aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2023-06-01 14:04:37 +0000
committerCy Schubert <cy@FreeBSD.org>2023-06-01 15:06:46 +0000
commit91ae4636fbf299134427aecebbd514fef467cbc6 (patch)
treec96c809e24062c748b7e6cd94918665a80fa6cc2
parentcf3a76018cadf9bb39c90badb13e779415bafe37 (diff)
downloadsrc-91ae4636fbf299134427aecebbd514fef467cbc6.tar.gz
src-91ae4636fbf299134427aecebbd514fef467cbc6.zip
ntp: import ntp-4.2.8p16
Security: NtpBUg3767, NtpBug3808, NtpBug3807 (CVE-2023-26555) (cherry picked from commit a466cc55373fc3cf86837f09da729535b57e69a1)
-rw-r--r--contrib/ntp/COPYRIGHT201
-rw-r--r--contrib/ntp/ChangeLog114
-rw-r--r--contrib/ntp/CommitLog5757
-rw-r--r--contrib/ntp/Makefile.am1
-rw-r--r--contrib/ntp/Makefile.in51
-rw-r--r--contrib/ntp/NEWS123
-rw-r--r--contrib/ntp/aclocal.m4340
-rw-r--r--contrib/ntp/adjtimed/Makefile.am3
-rw-r--r--contrib/ntp/adjtimed/Makefile.in96
-rw-r--r--contrib/ntp/check-libntp.mf14
-rw-r--r--contrib/ntp/check-libntpd.mf19
-rw-r--r--contrib/ntp/check-libunity.mf13
-rw-r--r--contrib/ntp/check-scm-rev.mf8
-rw-r--r--contrib/ntp/clockstuff/Makefile.am3
-rw-r--r--contrib/ntp/clockstuff/Makefile.in103
-rw-r--r--contrib/ntp/config.h.in141
-rwxr-xr-xcontrib/ntp/configure17134
-rw-r--r--contrib/ntp/configure.ac70
-rw-r--r--contrib/ntp/deps-ver2
-rw-r--r--contrib/ntp/depsver.mf9
-rw-r--r--contrib/ntp/html/authentic.html15
-rw-r--r--contrib/ntp/html/clockopt.html39
-rw-r--r--contrib/ntp/html/copyright.html9
-rw-r--r--contrib/ntp/html/drivers/driver20.html11
-rw-r--r--contrib/ntp/html/drivers/driver46.html31
-rw-r--r--contrib/ntp/html/miscopt.html9
-rw-r--r--contrib/ntp/html/ntpdc.html3
-rw-r--r--contrib/ntp/html/ntpq.html3
-rw-r--r--contrib/ntp/html/scripts/clockopt.txt1
-rw-r--r--contrib/ntp/include/Makefile.in28
-rw-r--r--contrib/ntp/include/isc/Makefile.in26
-rw-r--r--contrib/ntp/include/ntp.h1
-rw-r--r--contrib/ntp/include/ntp_config.h1
-rw-r--r--contrib/ntp/include/ntp_fp.h4
-rw-r--r--contrib/ntp/include/ntp_random.h1
-rw-r--r--contrib/ntp/include/ntp_refclock.h13
-rw-r--r--contrib/ntp/include/ntp_stdlib.h15
-rw-r--r--contrib/ntp/include/ntp_types.h11
-rw-r--r--contrib/ntp/include/ntpd.h1
-rw-r--r--contrib/ntp/include/ssl_applink.c2
-rw-r--r--contrib/ntp/include/vint64ops.h2
-rw-r--r--contrib/ntp/includes.mf6
-rw-r--r--contrib/ntp/kernel/Makefile.in28
-rw-r--r--contrib/ntp/kernel/sys/Makefile.in26
-rw-r--r--contrib/ntp/lib/isc/Atffile5
-rw-r--r--contrib/ntp/lib/isc/alpha/include/isc/atomic.h184
-rw-r--r--contrib/ntp/lib/isc/api8
-rw-r--r--contrib/ntp/lib/isc/app_api.c136
-rw-r--r--contrib/ntp/lib/isc/base32.c373
-rw-r--r--contrib/ntp/lib/isc/base64.c252
-rw-r--r--contrib/ntp/lib/isc/bitstring.c127
-rw-r--r--contrib/ntp/lib/isc/bufferlist.c64
-rw-r--r--contrib/ntp/lib/isc/commandline.c225
-rw-r--r--contrib/ntp/lib/isc/entropy.c1277
-rw-r--r--contrib/ntp/lib/isc/fsaccess.c102
-rw-r--r--contrib/ntp/lib/isc/hash.c404
-rw-r--r--contrib/ntp/lib/isc/heap.c265
-rw-r--r--contrib/ntp/lib/isc/hex.c201
-rw-r--r--contrib/ntp/lib/isc/hmacmd5.c149
-rw-r--r--contrib/ntp/lib/isc/hmacsha.c594
-rw-r--r--contrib/ntp/lib/isc/httpd.c1028
-rw-r--r--contrib/ntp/lib/isc/ia64/include/isc/atomic.h100
-rw-r--r--contrib/ntp/lib/isc/include/isc/base32.h128
-rw-r--r--contrib/ntp/lib/isc/include/isc/base64.h99
-rw-r--r--contrib/ntp/lib/isc/include/isc/bitstring.h157
-rw-r--r--contrib/ntp/lib/isc/include/isc/bufferlist.h86
-rw-r--r--contrib/ntp/lib/isc/include/isc/commandline.h50
-rw-r--r--contrib/ntp/lib/isc/include/isc/entropy.h314
-rw-r--r--contrib/ntp/lib/isc/include/isc/fsaccess.h178
-rw-r--r--contrib/ntp/lib/isc/include/isc/heap.h170
-rw-r--r--contrib/ntp/lib/isc/include/isc/hex.h98
-rw-r--r--contrib/ntp/lib/isc/include/isc/hmacmd5.h72
-rw-r--r--contrib/ntp/lib/isc/include/isc/hmacsha.h169
-rw-r--r--contrib/ntp/lib/isc/include/isc/httpd.h64
-rw-r--r--contrib/ntp/lib/isc/include/isc/ipv6.h148
-rw-r--r--contrib/ntp/lib/isc/include/isc/iterated_hash.h47
-rw-r--r--contrib/ntp/lib/isc/include/isc/lex.h431
-rw-r--r--contrib/ntp/lib/isc/include/isc/lfsr.h130
-rw-r--r--contrib/ntp/lib/isc/include/isc/mem.h750
-rw-r--r--contrib/ntp/lib/isc/include/isc/mutexblock.h71
-rw-r--r--contrib/ntp/lib/isc/include/isc/os.h38
-rw-r--r--contrib/ntp/lib/isc/include/isc/parseint.h64
-rw-r--r--contrib/ntp/lib/isc/include/isc/platform.h.in367
-rw-r--r--contrib/ntp/lib/isc/include/isc/portset.h141
-rw-r--r--contrib/ntp/lib/isc/include/isc/queue.h100
-rw-r--r--contrib/ntp/lib/isc/include/isc/quota.h119
-rw-r--r--contrib/ntp/lib/isc/include/isc/radix.h240
-rw-r--r--contrib/ntp/lib/isc/include/isc/ratelimiter.h134
-rw-r--r--contrib/ntp/lib/isc/include/isc/refcount.h233
-rw-r--r--contrib/ntp/lib/isc/include/isc/resource.h97
-rw-r--r--contrib/ntp/lib/isc/include/isc/rwlock.h135
-rw-r--r--contrib/ntp/lib/isc/include/isc/serial.h75
-rw-r--r--contrib/ntp/lib/isc/include/isc/sha2.h145
-rw-r--r--contrib/ntp/lib/isc/include/isc/stats.h121
-rw-r--r--contrib/ntp/lib/isc/include/isc/stdlib.h40
-rw-r--r--contrib/ntp/lib/isc/include/isc/symtab.h139
-rw-r--r--contrib/ntp/lib/isc/include/isc/taskpool.h157
-rw-r--r--contrib/ntp/lib/isc/include/isc/version.h28
-rw-r--r--contrib/ntp/lib/isc/inet_aton.c195
-rw-r--r--contrib/ntp/lib/isc/iterated_hash.c48
-rw-r--r--contrib/ntp/lib/isc/lex.c959
-rw-r--r--contrib/ntp/lib/isc/lfsr.c161
-rw-r--r--contrib/ntp/lib/isc/mem.c2477
-rw-r--r--contrib/ntp/lib/isc/mem_api.c303
-rw-r--r--contrib/ntp/lib/isc/mips/include/isc/atomic.h98
-rw-r--r--contrib/ntp/lib/isc/mutexblock.c58
-rw-r--r--contrib/ntp/lib/isc/noatomic/include/isc/atomic.h24
-rw-r--r--contrib/ntp/lib/isc/nothreads/mutex.c25
-rw-r--r--contrib/ntp/lib/isc/parseint.c72
-rw-r--r--contrib/ntp/lib/isc/portset.c143
-rw-r--r--contrib/ntp/lib/isc/powerpc/include/isc/atomic.h197
-rw-r--r--contrib/ntp/lib/isc/print.c624
-rw-r--r--contrib/ntp/lib/isc/quota.c101
-rw-r--r--contrib/ntp/lib/isc/radix.c706
-rw-r--r--contrib/ntp/lib/isc/ratelimiter.c328
-rw-r--r--contrib/ntp/lib/isc/refcount.c37
-rw-r--r--contrib/ntp/lib/isc/region.c45
-rw-r--r--contrib/ntp/lib/isc/rwlock.c809
-rw-r--r--contrib/ntp/lib/isc/serial.c59
-rw-r--r--contrib/ntp/lib/isc/sha2.c1449
-rw-r--r--contrib/ntp/lib/isc/socket_api.c231
-rw-r--r--contrib/ntp/lib/isc/sparc64/include/isc/atomic.h127
-rw-r--r--contrib/ntp/lib/isc/stats.c326
-rw-r--r--contrib/ntp/lib/isc/string.c271
-rw-r--r--contrib/ntp/lib/isc/strtoul.c129
-rw-r--r--contrib/ntp/lib/isc/symtab.c301
-rw-r--r--contrib/ntp/lib/isc/task_api.c244
-rw-r--r--contrib/ntp/lib/isc/taskpool.c185
-rw-r--r--contrib/ntp/lib/isc/tests/Atffile5
-rw-r--r--contrib/ntp/lib/isc/tests/hash_test.c1805
-rw-r--r--contrib/ntp/lib/isc/tests/isctest.c178
-rw-r--r--contrib/ntp/lib/isc/tests/isctest.h57
-rw-r--r--contrib/ntp/lib/isc/tests/queue_test.c144
-rw-r--r--contrib/ntp/lib/isc/tests/socket_test.c255
-rw-r--r--contrib/ntp/lib/isc/tests/symtab_test.c147
-rw-r--r--contrib/ntp/lib/isc/tests/task_test.c416
-rw-r--r--contrib/ntp/lib/isc/tests/taskpool_test.c211
-rw-r--r--contrib/ntp/lib/isc/timer.c1072
-rw-r--r--contrib/ntp/lib/isc/timer_api.c144
-rw-r--r--contrib/ntp/lib/isc/timer_p.h31
-rw-r--r--contrib/ntp/lib/isc/unix/app.c946
-rw-r--r--contrib/ntp/lib/isc/unix/entropy.c605
-rw-r--r--contrib/ntp/lib/isc/unix/fsaccess.c93
-rw-r--r--contrib/ntp/lib/isc/unix/include/isc/keyboard.h52
-rw-r--r--contrib/ntp/lib/isc/unix/include/isc/netdb.h57
-rw-r--r--contrib/ntp/lib/isc/unix/include/isc/syslog.h47
-rw-r--r--contrib/ntp/lib/isc/unix/ipv6.c27
-rw-r--r--contrib/ntp/lib/isc/unix/keyboard.c126
-rw-r--r--contrib/ntp/lib/isc/unix/os.c94
-rw-r--r--contrib/ntp/lib/isc/unix/resource.c231
-rw-r--r--contrib/ntp/lib/isc/unix/socket.c6011
-rw-r--r--contrib/ntp/lib/isc/unix/socket_p.h33
-rw-r--r--contrib/ntp/lib/isc/unix/syslog.c84
-rw-r--r--contrib/ntp/lib/isc/version.c28
-rw-r--r--contrib/ntp/lib/isc/win32/DLLMain.c58
-rw-r--r--contrib/ntp/lib/isc/win32/app.c260
-rw-r--r--contrib/ntp/lib/isc/win32/dir.c312
-rw-r--r--contrib/ntp/lib/isc/win32/entropy.c307
-rw-r--r--contrib/ntp/lib/isc/win32/errno2result.c113
-rw-r--r--contrib/ntp/lib/isc/win32/errno2result.h40
-rw-r--r--contrib/ntp/lib/isc/win32/file.c619
-rw-r--r--contrib/ntp/lib/isc/win32/fsaccess.c375
-rw-r--r--contrib/ntp/lib/isc/win32/include/isc/bind_registry.h50
-rw-r--r--contrib/ntp/lib/isc/win32/include/isc/bindevt.h91
-rw-r--r--contrib/ntp/lib/isc/win32/include/isc/keyboard.h47
-rw-r--r--contrib/ntp/lib/isc/win32/include/isc/netdb.h54
-rw-r--r--contrib/ntp/lib/isc/win32/include/isc/ntgroups.h35
-rw-r--r--contrib/ntp/lib/isc/win32/include/isc/ntpaths.h72
-rw-r--r--contrib/ntp/lib/isc/win32/include/isc/syslog.h45
-rw-r--r--contrib/ntp/lib/isc/win32/ipv6.c27
-rw-r--r--contrib/ntp/lib/isc/win32/keyboard.c89
-rw-r--r--contrib/ntp/lib/isc/win32/libgen.h25
-rw-r--r--contrib/ntp/lib/isc/win32/libisc.def583
-rw-r--r--contrib/ntp/lib/isc/win32/libisc.dsp802
-rw-r--r--contrib/ntp/lib/isc/win32/libisc.dsw29
-rw-r--r--contrib/ntp/lib/isc/win32/libisc.mak2055
-rw-r--r--contrib/ntp/lib/isc/win32/netdb.h187
-rw-r--r--contrib/ntp/lib/isc/win32/ntgroups.c186
-rw-r--r--contrib/ntp/lib/isc/win32/ntpaths.c147
-rw-r--r--contrib/ntp/lib/isc/win32/os.c45
-rw-r--r--contrib/ntp/lib/isc/win32/resource.c72
-rw-r--r--contrib/ntp/lib/isc/win32/socket.c3967
-rw-r--r--contrib/ntp/lib/isc/win32/stdio.c117
-rw-r--r--contrib/ntp/lib/isc/win32/syslog.c181
-rw-r--r--contrib/ntp/lib/isc/win32/syslog.h76
-rw-r--r--contrib/ntp/lib/isc/win32/unistd.h60
-rw-r--r--contrib/ntp/lib/isc/win32/version.c28
-rw-r--r--contrib/ntp/lib/isc/x86_32/include/isc/atomic.h176
-rw-r--r--contrib/ntp/lib/isc/x86_64/include/isc/atomic.h123
-rw-r--r--contrib/ntp/libntp/Makefile.am195
-rw-r--r--contrib/ntp/libntp/Makefile.in1526
-rw-r--r--contrib/ntp/libntp/a_md5encrypt.c32
-rw-r--r--contrib/ntp/libntp/authkeys.c112
-rw-r--r--contrib/ntp/libntp/authreadkeys.c79
-rw-r--r--contrib/ntp/libntp/authusekey.c16
-rw-r--r--contrib/ntp/libntp/caltontp.c34
-rw-r--r--contrib/ntp/libntp/lib/isc/assertions.c (renamed from contrib/ntp/lib/isc/assertions.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/backtrace-emptytbl.c (renamed from contrib/ntp/lib/isc/backtrace-emptytbl.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/backtrace.c (renamed from contrib/ntp/lib/isc/backtrace.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/buffer.c (renamed from contrib/ntp/lib/isc/buffer.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/error.c (renamed from contrib/ntp/lib/isc/error.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/event.c (renamed from contrib/ntp/lib/isc/event.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/app.h (renamed from contrib/ntp/lib/isc/include/isc/app.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/assertions.h (renamed from contrib/ntp/lib/isc/include/isc/assertions.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/backtrace.h (renamed from contrib/ntp/lib/isc/include/isc/backtrace.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/bind9.h (renamed from contrib/ntp/lib/isc/include/isc/bind9.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/boolean.h (renamed from contrib/ntp/lib/isc/include/isc/boolean.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/buffer.h (renamed from contrib/ntp/lib/isc/include/isc/buffer.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/error.h (renamed from contrib/ntp/lib/isc/include/isc/error.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/event.h (renamed from contrib/ntp/lib/isc/include/isc/event.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/eventclass.h (renamed from contrib/ntp/lib/isc/include/isc/eventclass.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/file.h (renamed from contrib/ntp/lib/isc/include/isc/file.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/formatcheck.h (renamed from contrib/ntp/lib/isc/include/isc/formatcheck.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/hash.h (renamed from contrib/ntp/lib/isc/include/isc/hash.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/interfaceiter.h (renamed from contrib/ntp/lib/isc/include/isc/interfaceiter.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/lang.h (renamed from contrib/ntp/lib/isc/include/isc/lang.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/lib.h (renamed from contrib/ntp/lib/isc/include/isc/lib.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/list.h (renamed from contrib/ntp/lib/isc/include/isc/list.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/log.h (renamed from contrib/ntp/lib/isc/include/isc/log.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/magic.h (renamed from contrib/ntp/lib/isc/include/isc/magic.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/md5.h (renamed from contrib/ntp/lib/isc/include/isc/md5.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/msgcat.h (renamed from contrib/ntp/lib/isc/include/isc/msgcat.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/msgs.h (renamed from contrib/ntp/lib/isc/include/isc/msgs.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/namespace.h (renamed from contrib/ntp/lib/isc/include/isc/namespace.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/netaddr.h (renamed from contrib/ntp/lib/isc/include/isc/netaddr.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/netscope.h (renamed from contrib/ntp/lib/isc/include/isc/netscope.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/ondestroy.h (renamed from contrib/ntp/lib/isc/include/isc/ondestroy.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/platform.h (renamed from contrib/ntp/lib/isc/include/isc/platform.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/print.h (renamed from contrib/ntp/lib/isc/include/isc/print.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/random.h (renamed from contrib/ntp/lib/isc/include/isc/random.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/region.h (renamed from contrib/ntp/lib/isc/include/isc/region.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/result.h (renamed from contrib/ntp/lib/isc/include/isc/result.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/resultclass.h (renamed from contrib/ntp/lib/isc/include/isc/resultclass.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/sha1.h (renamed from contrib/ntp/lib/isc/include/isc/sha1.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/sockaddr.h (renamed from contrib/ntp/lib/isc/include/isc/sockaddr.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/socket.h (renamed from contrib/ntp/lib/isc/include/isc/socket.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/stdio.h (renamed from contrib/ntp/lib/isc/include/isc/stdio.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/string.h (renamed from contrib/ntp/lib/isc/include/isc/string.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/task.h (renamed from contrib/ntp/lib/isc/include/isc/task.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/timer.h (renamed from contrib/ntp/lib/isc/include/isc/timer.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/types.h (renamed from contrib/ntp/lib/isc/include/isc/types.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/util.h (renamed from contrib/ntp/lib/isc/include/isc/util.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/include/isc/xml.h (renamed from contrib/ntp/lib/isc/include/isc/xml.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/inet_ntop.c (renamed from contrib/ntp/lib/isc/inet_ntop.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/inet_pton.c (renamed from contrib/ntp/lib/isc/inet_pton.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/lib.c (renamed from contrib/ntp/lib/isc/lib.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/log.c (renamed from contrib/ntp/lib/isc/log.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/md5.c (renamed from contrib/ntp/lib/isc/md5.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/netaddr.c (renamed from contrib/ntp/lib/isc/netaddr.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/netscope.c (renamed from contrib/ntp/lib/isc/netscope.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/nls/msgcat.c (renamed from contrib/ntp/lib/isc/nls/msgcat.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/nothreads/condition.c (renamed from contrib/ntp/lib/isc/nothreads/condition.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/nothreads/include/isc/condition.h (renamed from contrib/ntp/lib/isc/nothreads/include/isc/condition.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/nothreads/include/isc/mutex.h (renamed from contrib/ntp/lib/isc/nothreads/include/isc/mutex.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/nothreads/include/isc/once.h (renamed from contrib/ntp/lib/isc/nothreads/include/isc/once.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/nothreads/include/isc/thread.h (renamed from contrib/ntp/lib/isc/nothreads/include/isc/thread.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/nothreads/thread.c (renamed from contrib/ntp/lib/isc/nothreads/thread.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/ondestroy.c (renamed from contrib/ntp/lib/isc/ondestroy.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/pthreads/condition.c (renamed from contrib/ntp/lib/isc/pthreads/condition.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/pthreads/include/isc/condition.h (renamed from contrib/ntp/lib/isc/pthreads/include/isc/condition.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/pthreads/include/isc/mutex.h (renamed from contrib/ntp/lib/isc/pthreads/include/isc/mutex.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/pthreads/include/isc/once.h (renamed from contrib/ntp/lib/isc/pthreads/include/isc/once.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/pthreads/include/isc/thread.h (renamed from contrib/ntp/lib/isc/pthreads/include/isc/thread.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/pthreads/mutex.c (renamed from contrib/ntp/lib/isc/pthreads/mutex.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/pthreads/thread.c (renamed from contrib/ntp/lib/isc/pthreads/thread.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/random.c (renamed from contrib/ntp/lib/isc/random.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/result.c (renamed from contrib/ntp/lib/isc/result.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/sha1.c (renamed from contrib/ntp/lib/isc/sha1.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/sockaddr.c (renamed from contrib/ntp/lib/isc/sockaddr.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/task.c (renamed from contrib/ntp/lib/isc/task.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/task_p.h (renamed from contrib/ntp/lib/isc/task_p.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/tsmemcmp.c (renamed from contrib/ntp/lib/isc/tsmemcmp.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/dir.c (renamed from contrib/ntp/lib/isc/unix/dir.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/errno2result.c (renamed from contrib/ntp/lib/isc/unix/errno2result.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/errno2result.h (renamed from contrib/ntp/lib/isc/unix/errno2result.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/file.c (renamed from contrib/ntp/lib/isc/unix/file.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/ifiter_getifaddrs.c (renamed from contrib/ntp/lib/isc/unix/ifiter_getifaddrs.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/ifiter_ioctl.c (renamed from contrib/ntp/lib/isc/unix/ifiter_ioctl.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/ifiter_sysctl.c (renamed from contrib/ntp/lib/isc/unix/ifiter_sysctl.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/dir.h (renamed from contrib/ntp/lib/isc/unix/include/isc/dir.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/int.h (renamed from contrib/ntp/lib/isc/unix/include/isc/int.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/net.h (renamed from contrib/ntp/lib/isc/unix/include/isc/net.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/offset.h (renamed from contrib/ntp/lib/isc/unix/include/isc/offset.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/stat.h (renamed from contrib/ntp/lib/isc/unix/include/isc/stat.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/stdtime.h (renamed from contrib/ntp/lib/isc/unix/include/isc/stdtime.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/strerror.h (renamed from contrib/ntp/lib/isc/unix/include/isc/strerror.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/include/isc/time.h (renamed from contrib/ntp/lib/isc/unix/include/isc/time.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/interfaceiter.c (renamed from contrib/ntp/lib/isc/unix/interfaceiter.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/net.c (renamed from contrib/ntp/lib/isc/unix/net.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/stdio.c (renamed from contrib/ntp/lib/isc/unix/stdio.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/stdtime.c (renamed from contrib/ntp/lib/isc/unix/stdtime.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/strerror.c (renamed from contrib/ntp/lib/isc/unix/strerror.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/unix/time.c (renamed from contrib/ntp/lib/isc/unix/time.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/condition.c (renamed from contrib/ntp/lib/isc/win32/condition.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/condition.h (renamed from contrib/ntp/lib/isc/win32/include/isc/condition.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/dir.h (renamed from contrib/ntp/lib/isc/win32/include/isc/dir.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/int.h (renamed from contrib/ntp/lib/isc/win32/include/isc/int.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/ipv6.h (renamed from contrib/ntp/lib/isc/win32/include/isc/ipv6.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/mutex.h (renamed from contrib/ntp/lib/isc/win32/include/isc/mutex.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/net.h (renamed from contrib/ntp/lib/isc/win32/include/isc/net.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/offset.h (renamed from contrib/ntp/lib/isc/win32/include/isc/offset.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/once.h (renamed from contrib/ntp/lib/isc/win32/include/isc/once.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/platform.h (renamed from contrib/ntp/lib/isc/win32/include/isc/platform.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/stat.h (renamed from contrib/ntp/lib/isc/win32/include/isc/stat.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/stdtime.h (renamed from contrib/ntp/lib/isc/win32/include/isc/stdtime.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/strerror.h (renamed from contrib/ntp/lib/isc/win32/include/isc/strerror.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/thread.h (renamed from contrib/ntp/lib/isc/win32/include/isc/thread.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/time.h (renamed from contrib/ntp/lib/isc/win32/include/isc/time.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/include/isc/win32os.h (renamed from contrib/ntp/lib/isc/win32/include/isc/win32os.h)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/interfaceiter.c (renamed from contrib/ntp/lib/isc/win32/interfaceiter.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/net.c (renamed from contrib/ntp/lib/isc/win32/net.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/once.c (renamed from contrib/ntp/lib/isc/win32/once.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/stdtime.c (renamed from contrib/ntp/lib/isc/win32/stdtime.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/strerror.c (renamed from contrib/ntp/lib/isc/win32/strerror.c)2
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/thread.c (renamed from contrib/ntp/lib/isc/win32/thread.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/time.c (renamed from contrib/ntp/lib/isc/win32/time.c)0
-rw-r--r--contrib/ntp/libntp/lib/isc/win32/win32os.c (renamed from contrib/ntp/lib/isc/win32/win32os.c)0
-rw-r--r--contrib/ntp/libntp/mktime.c4
-rw-r--r--contrib/ntp/libntp/mstolfp.c110
-rw-r--r--contrib/ntp/libntp/msyslog.c2
-rw-r--r--contrib/ntp/libntp/ntp_crypto_rnd.c81
-rw-r--r--contrib/ntp/libntp/ntp_random.c15
-rw-r--r--contrib/ntp/libntp/ntp_realpath.c279
-rw-r--r--contrib/ntp/libntp/numtoa.c16
-rw-r--r--contrib/ntp/libntp/recvbuff.c9
-rw-r--r--contrib/ntp/libntp/refnumtoa.c2
-rw-r--r--contrib/ntp/libntp/socktoa.c2
-rw-r--r--contrib/ntp/libntp/systime.c5
-rw-r--r--contrib/ntp/libntp/vint64ops.c27
-rw-r--r--contrib/ntp/libntp/work_thread.c35
-rw-r--r--contrib/ntp/libntp/xsbprintf.c6
-rw-r--r--contrib/ntp/libparse/Makefile.am7
-rw-r--r--contrib/ntp/libparse/Makefile.in246
-rw-r--r--contrib/ntp/libparse/clk_wharton.c7
-rw-r--r--contrib/ntp/ntpd/Makefile.am112
-rw-r--r--contrib/ntp/ntpd/Makefile.in672
-rw-r--r--contrib/ntp/ntpd/cmd_args.c6
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.conf.texi32
-rw-r--r--contrib/ntp/ntpd/invoke-ntp.keys.texi2
-rw-r--r--contrib/ntp/ntpd/invoke-ntpd.texi8
-rw-r--r--contrib/ntp/ntpd/keyword-gen-utd2
-rw-r--r--contrib/ntp/ntpd/keyword-gen.c4
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5man38
-rw-r--r--contrib/ntp/ntpd/ntp.conf.5mdoc40
-rw-r--r--contrib/ntp/ntpd/ntp.conf.def32
-rw-r--r--contrib/ntp/ntpd/ntp.conf.html219
-rw-r--r--contrib/ntp/ntpd/ntp.conf.man.in38
-rw-r--r--contrib/ntp/ntpd/ntp.conf.mdoc.in40
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5man8
-rw-r--r--contrib/ntp/ntpd/ntp.keys.5mdoc10
-rw-r--r--contrib/ntp/ntpd/ntp.keys.html66
-rw-r--r--contrib/ntp/ntpd/ntp.keys.man.in8
-rw-r--r--contrib/ntp/ntpd/ntp.keys.mdoc.in10
-rw-r--r--contrib/ntp/ntpd/ntp_clockdev.c187
-rw-r--r--contrib/ntp/ntpd/ntp_clockdev.h25
-rw-r--r--contrib/ntp/ntpd/ntp_config.c222
-rw-r--r--contrib/ntp/ntpd/ntp_control.c14
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c8
-rw-r--r--contrib/ntp/ntpd/ntp_io.c58
-rw-r--r--contrib/ntp/ntpd/ntp_keyword.h2051
-rw-r--r--contrib/ntp/ntpd/ntp_leapsec.c15
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c12
-rw-r--r--contrib/ntp/ntpd/ntp_monitor.c8
-rw-r--r--contrib/ntp/ntpd/ntp_parser.c4281
-rw-r--r--contrib/ntp/ntpd/ntp_parser.h823
-rw-r--r--contrib/ntp/ntpd/ntp_ppsdev.c459
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c124
-rw-r--r--contrib/ntp/ntpd/ntp_refclock.c136
-rw-r--r--contrib/ntp/ntpd/ntp_request.c2
-rw-r--r--contrib/ntp/ntpd/ntp_util.c90
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.c251
-rw-r--r--contrib/ntp/ntpd/ntpd-opts.h21
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdman8
-rw-r--r--contrib/ntp/ntpd/ntpd.1ntpdmdoc8
-rw-r--r--contrib/ntp/ntpd/ntpd.c13
-rw-r--r--contrib/ntp/ntpd/ntpd.html420
-rw-r--r--contrib/ntp/ntpd/ntpd.man.in8
-rw-r--r--contrib/ntp/ntpd/ntpd.mdoc.in8
-rw-r--r--contrib/ntp/ntpd/refclock_acts.c30
-rw-r--r--contrib/ntp/ntpd/refclock_arbiter.c38
-rw-r--r--contrib/ntp/ntpd/refclock_arc.c2
-rw-r--r--contrib/ntp/ntpd/refclock_as2201.c7
-rw-r--r--contrib/ntp/ntpd/refclock_chronolog.c2
-rw-r--r--contrib/ntp/ntpd/refclock_chu.c4
-rw-r--r--contrib/ntp/ntpd/refclock_dumbclock.c10
-rw-r--r--contrib/ntp/ntpd/refclock_fg.c6
-rw-r--r--contrib/ntp/ntpd/refclock_gpsdjson.c47
-rw-r--r--contrib/ntp/ntpd/refclock_heath.c4
-rw-r--r--contrib/ntp/ntpd/refclock_hopfser.c8
-rw-r--r--contrib/ntp/ntpd/refclock_hpgps.c18
-rw-r--r--contrib/ntp/ntpd/refclock_jjy.c2
-rw-r--r--contrib/ntp/ntpd/refclock_jupiter.c2
-rw-r--r--contrib/ntp/ntpd/refclock_leitch.c2
-rw-r--r--contrib/ntp/ntpd/refclock_mx4200.c2
-rw-r--r--contrib/ntp/ntpd/refclock_neoclock4x.c2
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c71
-rw-r--r--contrib/ntp/ntpd/refclock_oncore.c25
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.c52
-rw-r--r--contrib/ntp/ntpd/refclock_parse.c20
-rw-r--r--contrib/ntp/ntpd/refclock_pst.c2
-rw-r--r--contrib/ntp/ntpd/refclock_ripencc.c2
-rw-r--r--contrib/ntp/ntpd/refclock_true.c10
-rw-r--r--contrib/ntp/ntpd/refclock_ulink.c2
-rw-r--r--contrib/ntp/ntpd/refclock_wwvb.c2
-rw-r--r--contrib/ntp/ntpd/refclock_zyfer.c2
-rw-r--r--contrib/ntp/ntpdate/Makefile.am22
-rw-r--r--contrib/ntp/ntpdate/Makefile.in131
-rw-r--r--contrib/ntp/ntpdc/Makefile.am52
-rw-r--r--contrib/ntp/ntpdc/Makefile.in168
-rw-r--r--contrib/ntp/ntpdc/invoke-ntpdc.texi17
-rw-r--r--contrib/ntp/ntpdc/ntpdc-opts.c351
-rw-r--r--contrib/ntp/ntpdc/ntpdc-opts.def10
-rw-r--r--contrib/ntp/ntpdc/ntpdc-opts.h40
-rw-r--r--contrib/ntp/ntpdc/ntpdc.1ntpdcman14
-rw-r--r--contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc13
-rw-r--r--contrib/ntp/ntpdc/ntpdc.c26
-rw-r--r--contrib/ntp/ntpdc/ntpdc.html220
-rw-r--r--contrib/ntp/ntpdc/ntpdc.man.in14
-rw-r--r--contrib/ntp/ntpdc/ntpdc.mdoc.in13
-rw-r--r--contrib/ntp/ntpq/Makefile.am38
-rw-r--r--contrib/ntp/ntpq/Makefile.in190
-rw-r--r--contrib/ntp/ntpq/invoke-ntpq.texi20
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.c367
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.def10
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.h42
-rw-r--r--contrib/ntp/ntpq/ntpq-subs.c65
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqman14
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqmdoc13
-rw-r--r--contrib/ntp/ntpq/ntpq.c211
-rw-r--r--contrib/ntp/ntpq/ntpq.html379
-rw-r--r--contrib/ntp/ntpq/ntpq.man.in14
-rw-r--r--contrib/ntp/ntpq/ntpq.mdoc.in13
-rw-r--r--contrib/ntp/ntpsnmpd/Makefile.am12
-rw-r--r--contrib/ntp/ntpsnmpd/Makefile.in120
-rw-r--r--contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi8
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c251
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h21
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman8
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc8
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.c2
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.html43
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.man.in8
-rw-r--r--contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in8
-rw-r--r--contrib/ntp/packageinfo.sh2
-rw-r--r--contrib/ntp/parseutil/Makefile.in111
-rw-r--r--contrib/ntp/parseutil/dcfd.c8
-rw-r--r--contrib/ntp/ports/winnt/vs2015/mkver.props25
-rw-r--r--contrib/ntp/scripts/Makefile.am18
-rw-r--r--contrib/ntp/scripts/Makefile.in46
-rw-r--r--contrib/ntp/scripts/build/Makefile.in24
-rw-r--r--contrib/ntp/scripts/calc_tickadj/Makefile.am10
-rw-r--r--contrib/ntp/scripts/calc_tickadj/Makefile.in39
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.html83
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in4
-rw-r--r--contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi4
-rw-r--r--contrib/ntp/scripts/invoke-plot_summary.texi4
-rw-r--r--contrib/ntp/scripts/invoke-summary.texi4
-rw-r--r--contrib/ntp/scripts/lib/Makefile.in24
-rw-r--r--contrib/ntp/scripts/ntp-wait/Makefile.am10
-rw-r--r--contrib/ntp/scripts/ntp-wait/Makefile.in34
-rw-r--r--contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait-opts4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.html100
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.man.in4
-rw-r--r--contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in4
-rw-r--r--contrib/ntp/scripts/ntpsweep/Makefile.am10
-rw-r--r--contrib/ntp/scripts/ntpsweep/Makefile.in34
-rw-r--r--contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep-opts4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.html104
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.man.in4
-rw-r--r--contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in4
-rw-r--r--contrib/ntp/scripts/ntptrace/Makefile.am10
-rw-r--r--contrib/ntp/scripts/ntptrace/Makefile.in34
-rw-r--r--contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace-opts4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.html95
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.man.in4
-rw-r--r--contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in4
-rw-r--r--contrib/ntp/scripts/plot_summary-opts4
-rw-r--r--contrib/ntp/scripts/plot_summary.1plot_summaryman4
-rw-r--r--contrib/ntp/scripts/plot_summary.1plot_summarymdoc4
-rw-r--r--contrib/ntp/scripts/plot_summary.html119
-rw-r--r--contrib/ntp/scripts/plot_summary.man.in4
-rw-r--r--contrib/ntp/scripts/plot_summary.mdoc.in4
-rw-r--r--contrib/ntp/scripts/summary-opts4
-rw-r--r--contrib/ntp/scripts/summary.1summaryman4
-rw-r--r--contrib/ntp/scripts/summary.1summarymdoc4
-rw-r--r--contrib/ntp/scripts/summary.html107
-rw-r--r--contrib/ntp/scripts/summary.man.in4
-rw-r--r--contrib/ntp/scripts/summary.mdoc.in4
-rw-r--r--contrib/ntp/scripts/update-leap/Makefile.am10
-rw-r--r--contrib/ntp/scripts/update-leap/Makefile.in34
-rw-r--r--contrib/ntp/scripts/update-leap/invoke-update-leap.texi2
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap-opts4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.1update-leapman4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.html128
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.man.in4
-rw-r--r--contrib/ntp/scripts/update-leap/update-leap.mdoc.in4
-rw-r--r--[-rwxr-xr-x]contrib/ntp/scripts/update-leap/update-leap.sh0
-rw-r--r--contrib/ntp/sntp/COPYRIGHT201
-rw-r--r--contrib/ntp/sntp/Makefile.am54
-rw-r--r--contrib/ntp/sntp/Makefile.in233
-rw-r--r--contrib/ntp/sntp/aclocal.m4338
-rw-r--r--contrib/ntp/sntp/check-libntp.mf13
-rw-r--r--contrib/ntp/sntp/check-libsntp.mf13
-rw-r--r--contrib/ntp/sntp/check-libunity.mf15
-rw-r--r--contrib/ntp/sntp/config.h.in120
-rwxr-xr-xcontrib/ntp/sntp/configure12740
-rw-r--r--contrib/ntp/sntp/configure.ac15
-rw-r--r--contrib/ntp/sntp/crypto.c26
-rw-r--r--contrib/ntp/sntp/deps-ver2
-rw-r--r--contrib/ntp/sntp/depsver.mf9
-rw-r--r--contrib/ntp/sntp/include/Makefile.in17
-rw-r--r--contrib/ntp/sntp/include/autogen-version.def2
-rw-r--r--contrib/ntp/sntp/include/copyright.def4
-rw-r--r--contrib/ntp/sntp/include/version.def2
-rw-r--r--contrib/ntp/sntp/include/version.texi6
-rw-r--r--contrib/ntp/sntp/includes.mf6
-rw-r--r--contrib/ntp/sntp/invoke-sntp.texi8
-rw-r--r--contrib/ntp/sntp/libevent/CMakeLists.txt1575
-rw-r--r--contrib/ntp/sntp/libevent/ChangeLog760
-rw-r--r--contrib/ntp/sntp/libevent/ChangeLog-1.42
-rw-r--r--contrib/ntp/sntp/libevent/ChangeLog-2.02
-rw-r--r--contrib/ntp/sntp/libevent/Doxyfile46
-rw-r--r--contrib/ntp/sntp/libevent/Makefile.am79
-rw-r--r--contrib/ntp/sntp/libevent/Makefile.in1747
-rw-r--r--contrib/ntp/sntp/libevent/README.md487
-rw-r--r--contrib/ntp/sntp/libevent/WIN32-Code/getopt.c149
-rw-r--r--contrib/ntp/sntp/libevent/WIN32-Code/getopt.h33
-rw-r--r--contrib/ntp/sntp/libevent/WIN32-Code/getopt_long.c234
-rw-r--r--contrib/ntp/sntp/libevent/WIN32-Code/nmake/event2/event-config.h26
-rw-r--r--contrib/ntp/sntp/libevent/aclocal.m4224
-rw-r--r--contrib/ntp/sntp/libevent/arc4random.c40
-rwxr-xr-xcontrib/ntp/sntp/libevent/autogen.sh7
-rw-r--r--contrib/ntp/sntp/libevent/buffer.c90
-rw-r--r--contrib/ntp/sntp/libevent/buffer_iocp.c1
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent-internal.h76
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent.c149
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent_async.c66
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent_filter.c102
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent_openssl.c338
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent_pair.c19
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent_ratelim.c9
-rw-r--r--contrib/ntp/sntp/libevent/bufferevent_sock.c176
-rw-r--r--[-rwxr-xr-x]contrib/ntp/sntp/libevent/build-aux/ltmain.sh0
-rw-r--r--contrib/ntp/sntp/libevent/cmake/AddCompilerFlags.cmake13
-rw-r--r--contrib/ntp/sntp/libevent/cmake/AddEventLibrary.cmake193
-rw-r--r--contrib/ntp/sntp/libevent/cmake/COPYING-CMAKE-SCRIPTS22
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CheckConstExists.cmake25
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.c14
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.cmake43
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CheckFunctionKeywords.cmake14
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.c.in29
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.cmake82
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CheckWorkingKqueue.cmake52
-rw-r--r--contrib/ntp/sntp/libevent/cmake/CodeCoverage.cmake165
-rw-r--r--contrib/ntp/sntp/libevent/cmake/Copyright.txt57
-rw-r--r--contrib/ntp/sntp/libevent/cmake/LibeventConfig.cmake.in183
-rw-r--r--contrib/ntp/sntp/libevent/cmake/LibeventConfigVersion.cmake.in11
-rw-r--r--contrib/ntp/sntp/libevent/cmake/Macros.cmake36
-rw-r--r--contrib/ntp/sntp/libevent/cmake/Uninstall.cmake.in23
-rw-r--r--contrib/ntp/sntp/libevent/cmake/UseDoxygen.cmake111
-rw-r--r--contrib/ntp/sntp/libevent/cmake/VersionViaGit.cmake66
-rwxr-xr-xcontrib/ntp/sntp/libevent/compile347
-rwxr-xr-xcontrib/ntp/sntp/libevent/config.guess1433
-rw-r--r--contrib/ntp/sntp/libevent/config.h.in168
-rwxr-xr-xcontrib/ntp/sntp/libevent/config.sub1804
-rwxr-xr-xcontrib/ntp/sntp/libevent/configure10695
-rw-r--r--contrib/ntp/sntp/libevent/configure.ac337
-rw-r--r--contrib/ntp/sntp/libevent/defer-internal.h5
-rwxr-xr-xcontrib/ntp/sntp/libevent/depcomp791
-rw-r--r--contrib/ntp/sntp/libevent/doxygen.am55
-rw-r--r--contrib/ntp/sntp/libevent/epoll.c54
-rw-r--r--contrib/ntp/sntp/libevent/epolltable-internal.h2
-rw-r--r--contrib/ntp/sntp/libevent/evbuffer-internal.h2
-rw-r--r--contrib/ntp/sntp/libevent/evconfig-private.h49
-rw-r--r--contrib/ntp/sntp/libevent/evconfig-private.h.cmake40
-rw-r--r--contrib/ntp/sntp/libevent/evconfig-private.h.in7
-rw-r--r--contrib/ntp/sntp/libevent/evdns.c239
-rw-r--r--contrib/ntp/sntp/libevent/event-config.h.cmake513
-rw-r--r--contrib/ntp/sntp/libevent/event-internal.h24
-rw-r--r--contrib/ntp/sntp/libevent/event.c488
-rw-r--r--contrib/ntp/sntp/libevent/event_iocp.c2
-rwxr-xr-xcontrib/ntp/sntp/libevent/event_rpcgen.py2057
-rw-r--r--contrib/ntp/sntp/libevent/event_tagging.c9
-rw-r--r--contrib/ntp/sntp/libevent/evmap.c43
-rw-r--r--contrib/ntp/sntp/libevent/evrpc.c6
-rw-r--r--contrib/ntp/sntp/libevent/evthread-internal.h16
-rw-r--r--contrib/ntp/sntp/libevent/evthread.c48
-rw-r--r--contrib/ntp/sntp/libevent/evutil.c214
-rw-r--r--contrib/ntp/sntp/libevent/evutil_rand.c6
-rw-r--r--contrib/ntp/sntp/libevent/evutil_time.c93
-rw-r--r--contrib/ntp/sntp/libevent/http-internal.h34
-rw-r--r--contrib/ntp/sntp/libevent/http.c605
-rw-r--r--contrib/ntp/sntp/libevent/include/event.h2
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/buffer.h3
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/buffer_compat.h5
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/bufferevent.h37
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/bufferevent_compat.h4
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/dns.h46
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/dns_compat.h24
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/event.h81
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/http.h54
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/http_compat.h10
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/listener.h12
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/rpc.h48
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/rpc_struct.h14
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/util.h63
-rw-r--r--contrib/ntp/sntp/libevent/include/event2/visibility.h48
-rw-r--r--contrib/ntp/sntp/libevent/include/include.am7
-rw-r--r--contrib/ntp/sntp/libevent/iocp-internal.h14
-rw-r--r--contrib/ntp/sntp/libevent/kqueue.c24
-rw-r--r--contrib/ntp/sntp/libevent/libevent_core.pc.in16
-rw-r--r--contrib/ntp/sntp/libevent/libevent_extra.pc.in16
-rw-r--r--contrib/ntp/sntp/libevent/listener.c30
-rw-r--r--contrib/ntp/sntp/libevent/log-internal.h25
-rw-r--r--contrib/ntp/sntp/libevent/log.c11
-rw-r--r--contrib/ntp/sntp/libevent/ltmain.sh11147
-rw-r--r--contrib/ntp/sntp/libevent/m4/ax_check_funcs_ex.m422
-rw-r--r--contrib/ntp/sntp/libevent/m4/ax_prog_doxygen.m4600
-rw-r--r--contrib/ntp/sntp/libevent/m4/libevent_openssl.m426
-rw-r--r--contrib/ntp/sntp/libevent/make-event-config.sed10
-rw-r--r--contrib/ntp/sntp/libevent/minheap-internal.h6
-rwxr-xr-xcontrib/ntp/sntp/libevent/missing215
-rw-r--r--contrib/ntp/sntp/libevent/mm-internal.h5
-rw-r--r--contrib/ntp/sntp/libevent/openssl-compat.h47
-rw-r--r--contrib/ntp/sntp/libevent/poll.c27
-rw-r--r--contrib/ntp/sntp/libevent/sample/dns-example.c264
-rw-r--r--contrib/ntp/sntp/libevent/sample/event-read-fifo.c162
-rw-r--r--contrib/ntp/sntp/libevent/sample/hello-world.c140
-rw-r--r--contrib/ntp/sntp/libevent/sample/hostcheck.c217
-rw-r--r--contrib/ntp/sntp/libevent/sample/hostcheck.h30
-rw-r--r--contrib/ntp/sntp/libevent/sample/http-connect.c131
-rw-r--r--contrib/ntp/sntp/libevent/sample/http-server.c582
-rw-r--r--contrib/ntp/sntp/libevent/sample/https-client.c544
-rw-r--r--contrib/ntp/sntp/libevent/sample/include.am56
-rw-r--r--contrib/ntp/sntp/libevent/sample/le-proxy.c305
-rw-r--r--contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c178
-rw-r--r--contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h56
-rw-r--r--contrib/ntp/sntp/libevent/sample/signal-test.c83
-rw-r--r--contrib/ntp/sntp/libevent/sample/time-test.c110
-rw-r--r--contrib/ntp/sntp/libevent/select.c2
-rw-r--r--contrib/ntp/sntp/libevent/signal.c2
-rw-r--r--contrib/ntp/sntp/libevent/strlcpy-internal.h2
-rw-r--r--contrib/ntp/sntp/libevent/test/bench.c62
-rw-r--r--contrib/ntp/sntp/libevent/test/bench_cascade.c8
-rw-r--r--contrib/ntp/sntp/libevent/test/bench_http.c7
-rw-r--r--contrib/ntp/sntp/libevent/test/bench_httpclient.c20
-rwxr-xr-xcontrib/ntp/sntp/libevent/test/check-dumpevents.py10
-rw-r--r--contrib/ntp/sntp/libevent/test/include.am46
-rw-r--r--contrib/ntp/sntp/libevent/test/print-winsock-errors.c86
-rw-r--r--contrib/ntp/sntp/libevent/test/regress.c505
-rw-r--r--contrib/ntp/sntp/libevent/test/regress.gen.c103
-rw-r--r--contrib/ntp/sntp/libevent/test/regress.gen.h5
-rw-r--r--contrib/ntp/sntp/libevent/test/regress.h13
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_buffer.c677
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_bufferevent.c527
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_dns.c710
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_et.c150
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_finalize.c48
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_http.c1380
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_listener.c142
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_main.c74
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_minheap.c1
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_rpc.c49
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_ssl.c802
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_testutils.c22
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_testutils.h1
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_thread.c15
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_thread.h34
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_util.c272
-rw-r--r--contrib/ntp/sntp/libevent/test/regress_zlib.c8
-rwxr-xr-xcontrib/ntp/sntp/libevent/test/rpcgen_wrapper.sh11
-rw-r--r--contrib/ntp/sntp/libevent/test/test-changelist.c4
-rw-r--r--contrib/ntp/sntp/libevent/test/test-closed.c12
-rw-r--r--contrib/ntp/sntp/libevent/test/test-eof.c15
-rw-r--r--contrib/ntp/sntp/libevent/test/test-fdleak.c15
-rw-r--r--contrib/ntp/sntp/libevent/test/test-init.c2
-rw-r--r--contrib/ntp/sntp/libevent/test/test-ratelim.c93
-rw-r--r--contrib/ntp/sntp/libevent/test/test-time.c28
-rw-r--r--contrib/ntp/sntp/libevent/test/test-weof.c9
-rwxr-xr-xcontrib/ntp/sntp/libevent/test/test.sh70
-rw-r--r--contrib/ntp/sntp/libevent/test/tinytest.c169
-rw-r--r--contrib/ntp/sntp/libevent/test/tinytest.h5
-rw-r--r--contrib/ntp/sntp/libevent/test/tinytest_macros.h18
-rw-r--r--contrib/ntp/sntp/libevent/time-internal.h3
-rw-r--r--contrib/ntp/sntp/libevent/util-internal.h86
-rw-r--r--contrib/ntp/sntp/libevent/whatsnew-2.1.txt88
-rw-r--r--contrib/ntp/sntp/libevent/win32select.c5
-rw-r--r--contrib/ntp/sntp/libopts/COPYING.gplv32
-rw-r--r--contrib/ntp/sntp/libopts/COPYING.lgplv36
-rw-r--r--contrib/ntp/sntp/libopts/COPYING.mbsd2
-rw-r--r--contrib/ntp/sntp/libopts/Makefile.am36
-rw-r--r--contrib/ntp/sntp/libopts/Makefile.in116
-rw-r--r--contrib/ntp/sntp/libopts/README2
-rw-r--r--contrib/ntp/sntp/libopts/_Noreturn.h (renamed from contrib/ntp/sntp/libopts/compat/_Noreturn.h)0
-rw-r--r--contrib/ntp/sntp/libopts/ag-char-map.h4
-rw-r--r--contrib/ntp/sntp/libopts/alias.c4
-rw-r--r--contrib/ntp/sntp/libopts/ao-strs.c281
-rw-r--r--contrib/ntp/sntp/libopts/ao-strs.h296
-rw-r--r--contrib/ntp/sntp/libopts/autoopts.c22
-rw-r--r--contrib/ntp/sntp/libopts/autoopts.h12
-rw-r--r--contrib/ntp/sntp/libopts/autoopts/options.h16
-rw-r--r--contrib/ntp/sntp/libopts/autoopts/project.h12
-rw-r--r--contrib/ntp/sntp/libopts/autoopts/usage-txt.h504
-rw-r--r--contrib/ntp/sntp/libopts/boolean.c4
-rw-r--r--contrib/ntp/sntp/libopts/check.c4
-rw-r--r--contrib/ntp/sntp/libopts/compat/compat.h8
-rw-r--r--contrib/ntp/sntp/libopts/compat/pathfind.c13
-rw-r--r--contrib/ntp/sntp/libopts/compat/windows-config.h2
-rw-r--r--contrib/ntp/sntp/libopts/configfile.c166
-rw-r--r--contrib/ntp/sntp/libopts/cook.c53
-rw-r--r--contrib/ntp/sntp/libopts/enum.c44
-rw-r--r--contrib/ntp/sntp/libopts/env.c12
-rw-r--r--contrib/ntp/sntp/libopts/file.c2
-rw-r--r--contrib/ntp/sntp/libopts/find.c63
-rw-r--r--contrib/ntp/sntp/libopts/genshell.c227
-rw-r--r--contrib/ntp/sntp/libopts/genshell.h21
-rw-r--r--contrib/ntp/sntp/libopts/gettext.h20
-rw-r--r--contrib/ntp/sntp/libopts/init.c18
-rw-r--r--contrib/ntp/sntp/libopts/intprops.h267
-rw-r--r--contrib/ntp/sntp/libopts/libopts.c6
-rw-r--r--contrib/ntp/sntp/libopts/load.c68
-rw-r--r--contrib/ntp/sntp/libopts/m4/libopts.m426
-rw-r--r--contrib/ntp/sntp/libopts/m4/liboptschk.m42
-rw-r--r--contrib/ntp/sntp/libopts/m4/stdnoreturn.m466
-rw-r--r--contrib/ntp/sntp/libopts/makeshell.c70
-rw-r--r--contrib/ntp/sntp/libopts/nested.c81
-rw-r--r--contrib/ntp/sntp/libopts/numeric.c17
-rw-r--r--contrib/ntp/sntp/libopts/option-value-type.c10
-rw-r--r--contrib/ntp/sntp/libopts/option-xat-attribute.c10
-rw-r--r--contrib/ntp/sntp/libopts/parse-duration.c14
-rw-r--r--contrib/ntp/sntp/libopts/parse-duration.h6
-rw-r--r--contrib/ntp/sntp/libopts/pgusage.c2
-rw-r--r--contrib/ntp/sntp/libopts/proto.h508
-rw-r--r--contrib/ntp/sntp/libopts/putshell.c42
-rw-r--r--contrib/ntp/sntp/libopts/reset.c4
-rw-r--r--contrib/ntp/sntp/libopts/restore.c2
-rw-r--r--contrib/ntp/sntp/libopts/save-flags.c248
-rw-r--r--contrib/ntp/sntp/libopts/save-flags.h68
-rw-r--r--contrib/ntp/sntp/libopts/save.c555
-rw-r--r--contrib/ntp/sntp/libopts/sort.c18
-rw-r--r--contrib/ntp/sntp/libopts/stack.c4
-rw-r--r--contrib/ntp/sntp/libopts/stdnoreturn.in.h32
-rw-r--r--contrib/ntp/sntp/libopts/streqvcmp.c4
-rw-r--r--contrib/ntp/sntp/libopts/text_mmap.c15
-rw-r--r--contrib/ntp/sntp/libopts/time.c8
-rw-r--r--contrib/ntp/sntp/libopts/tokenize.c21
-rw-r--r--contrib/ntp/sntp/libopts/usage.c83
-rw-r--r--contrib/ntp/sntp/libopts/version.c11
-rw-r--r--contrib/ntp/sntp/log.c2
-rw-r--r--contrib/ntp/sntp/m4/ntp_cacheversion.m49
-rw-r--r--contrib/ntp/sntp/m4/ntp_compiler.m430
-rw-r--r--contrib/ntp/sntp/m4/ntp_crypto_rand.m45
-rw-r--r--contrib/ntp/sntp/m4/ntp_googletest.m453
-rw-r--r--contrib/ntp/sntp/m4/realpath.m449
-rw-r--r--contrib/ntp/sntp/m4/version.m42
-rw-r--r--contrib/ntp/sntp/main.c1
-rw-r--r--contrib/ntp/sntp/scm-rev2
-rw-r--r--contrib/ntp/sntp/scripts/Makefile.in17
-rw-r--r--contrib/ntp/sntp/sntp-opts.c252
-rw-r--r--contrib/ntp/sntp/sntp-opts.h21
-rw-r--r--contrib/ntp/sntp/sntp.1sntpman10
-rw-r--r--contrib/ntp/sntp/sntp.1sntpmdoc8
-rw-r--r--contrib/ntp/sntp/sntp.c2
-rw-r--r--contrib/ntp/sntp/sntp.html246
-rw-r--r--contrib/ntp/sntp/sntp.man.in10
-rw-r--r--contrib/ntp/sntp/sntp.mdoc.in10
-rw-r--r--contrib/ntp/sntp/tests/Makefile.am73
-rw-r--r--contrib/ntp/sntp/tests/Makefile.in385
-rw-r--r--contrib/ntp/sntp/tests/packetProcessing.c2
-rw-r--r--contrib/ntp/sntp/tests/sntptest.c4
-rw-r--r--contrib/ntp/sntp/tests/sntptest.h1
-rw-r--r--contrib/ntp/sntp/tests/t-log.c1
-rw-r--r--contrib/ntp/sntp/tests/utilities.c3
-rw-r--r--contrib/ntp/sntp/unity/Makefile.am4
-rw-r--r--contrib/ntp/sntp/unity/Makefile.in138
-rw-r--r--[-rwxr-xr-x]contrib/ntp/sntp/unity/auto/parseOutput.rb0
-rw-r--r--[-rwxr-xr-x]contrib/ntp/sntp/unity/auto/type_sanitizer.rb0
-rw-r--r--[-rwxr-xr-x]contrib/ntp/sntp/unity/auto/unity_test_summary.py0
-rw-r--r--contrib/ntp/sntp/unity/libpkgver-colcomp.c1
-rw-r--r--contrib/ntp/sntp/unity/unity_internals.h2
-rw-r--r--contrib/ntp/sntp/utilities.c25
-rw-r--r--contrib/ntp/sntp/version.c5
-rw-r--r--contrib/ntp/tests/libntp/realpath.c94
-rw-r--r--contrib/ntp/tests/libntp/run-realpath.c70
-rw-r--r--contrib/ntp/tests/ntpd/test-libntp.c2
-rw-r--r--contrib/ntp/util/Makefile.am24
-rw-r--r--contrib/ntp/util/Makefile.in211
-rw-r--r--contrib/ntp/util/invoke-ntp-keygen.texi10
-rw-r--r--contrib/ntp/util/ntp-keygen-opts.c254
-rw-r--r--contrib/ntp/util/ntp-keygen-opts.def2
-rw-r--r--contrib/ntp/util/ntp-keygen-opts.h21
-rw-r--r--contrib/ntp/util/ntp-keygen.1ntp-keygenman10
-rw-r--r--contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc10
-rw-r--r--contrib/ntp/util/ntp-keygen.c20
-rw-r--r--contrib/ntp/util/ntp-keygen.html396
-rw-r--r--contrib/ntp/util/ntp-keygen.man.in10
-rw-r--r--contrib/ntp/util/ntp-keygen.mdoc.in10
-rw-r--r--usr.sbin/ntp/libntp/Makefile17
-rw-r--r--usr.sbin/ntp/libparse/Makefile4
-rw-r--r--usr.sbin/ntp/ntp-keygen/Makefile8
-rw-r--r--usr.sbin/ntp/ntpd/Makefile11
-rw-r--r--usr.sbin/ntp/ntpdate/Makefile6
-rw-r--r--usr.sbin/ntp/ntpdc/Makefile6
-rw-r--r--usr.sbin/ntp/ntpq/Makefile8
-rw-r--r--usr.sbin/ntp/ntptime/Makefile6
-rw-r--r--usr.sbin/ntp/sntp/Makefile6
820 files changed, 79860 insertions, 79292 deletions
diff --git a/contrib/ntp/COPYRIGHT b/contrib/ntp/COPYRIGHT
index 628ee6cc48d3..013202c0fb09 100644
--- a/contrib/ntp/COPYRIGHT
+++ b/contrib/ntp/COPYRIGHT
@@ -3,7 +3,7 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 4-Feb-2020 23:47 UTC
+ Last update: 2-Mar-2023 05:21 UTC
__________________________________________________________________
The following copyright notice applies to all files collectively called
@@ -28,11 +28,11 @@ This file is automatically generated from html/copyright.html
* *
***********************************************************************
- Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin
- Burnicki is:
+ Content starting in 2011 from Harlan Stenn, Juergen Perlinger, Dave
+ Hart, Danny Mayer, Martin Burnicki, and possibly others is:
***********************************************************************
* *
-* Copyright (c) Network Time Foundation 2011-2020 *
+* Copyright (c) Network Time Foundation 2011-2023 *
* *
* All Rights Reserved *
* *
@@ -85,73 +85,75 @@ This file is automatically generated from html/copyright.html
13. [14]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
14. [15]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and help
with target configuration
- 15. [16]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
+ 15. [16]Philippe De Muyter <phdm@macqel.be> Wharton reference clock
+ driver, sysV68 and AIX modifications.
+ 16. [17]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port.
- 16. [17]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
- 17. [18]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux port
- 18. [19]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
+ 17. [18]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
+ 18. [19]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux port
+ 19. [20]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
NTP Version 2 as specified in RFC-1119
- 19. [20]John Hay <jhay@icomtek.csir.co.za> IPv6 support and testing
- 20. [21]Dave Hart <davehart@davehart.com> General maintenance, Windows
- port interpolation rewrite
- 21. [22]Claas Hilbrecht <neoclock4x@linum.com> NeoClock4X clock driver
- 22. [23]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
- 23. [24]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
- 24. [25]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
- 25. [26]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
+ 20. [21]John Hay <jhay@icomtek.csir.co.za> IPv6 support and testing
+ 21. [22]Dave Hart <davehart@gmail.com> General maintenance, IPv6
+ cleanup, Windows PPSAPI
+ 22. [23]Claas Hilbrecht <neoclock4x@linum.com> NeoClock4X clock driver
+ 23. [24]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
+ 24. [25]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
+ 25. [26]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
+ 26. [27]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
overhaul
- 26. [27]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
- [28]<H.Lambermont@chello.nl> ntpsweep
- 27. [29]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
+ 27. [28]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
+ [29]<H.Lambermont@chello.nl> ntpsweep
+ 28. [30]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
author)
- 28. [30]Frank Kardel [31]<kardel (at) ntp (dot) org> PARSE <GENERIC>
+ 29. [31]Frank Kardel [32]<kardel (at) ntp (dot) org> PARSE <GENERIC>
(driver 14 reference clocks), STREAMS modules for PARSE, support
scripts, syslog cleanup, dynamic interface handling
- 29. [32]Johannes Maximilian Kuehn <kuehn@ntp.org> Rewrote sntp to
+ 30. [33]Johannes Maximilian Kuehn <kuehn@ntp.org> Rewrote sntp to
comply with NTPv4 specification, ntpq saveconfig
- 30. [33]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
+ 31. [34]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications
- 31. [34]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
- 32. [35]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
+ 32. [35]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
+ 33. [36]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
GPS clock driver
- 33. [36]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
- 34. [37]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
- 35. [38]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
+ 34. [37]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
+ 35. [38]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
+ 36. [39]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305
- 36. [39]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
+ 37. [40]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
Maintenance
- 37. [40]David L. Mills <mills@udel.edu> Version 4 foundation, precision
+ 38. [41]David L. Mills <mills@udel.edu> Version 4 foundation, precision
kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, 22, 36
- 38. [41]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
- 39. [42]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
- 40. [43]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
- 41. [44]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
- 42. [45]Derek Mulcahy <derek@toybox.demon.co.uk> and [46]Damon
+ 39. [42]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
+ 40. [43]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
+ 41. [44]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
+ 42. [45]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
+ 43. [46]Derek Mulcahy <derek@toybox.demon.co.uk> and [47]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver
- 43. [47]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
+ 44. [48]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
maintenance
- 44. [48]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
+ 45. [49]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling
- 45. [49]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
- 46. [50]Wilfredo Sánchez <wsanchez@apple.com> added support for NetInfo
- 47. [51]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
- 48. [52]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
+ 46. [50]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
+ 47. [51]Wilfredo Sánchez <wsanchez@apple.com> added support for NetInfo
+ 48. [52]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
+ 49. [53]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
- 49. [53]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
- 50. [54]Michael Shields <shields@tembel.org> USNO clock driver
- 51. [55]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock driver
- 52. [56]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
+ 50. [54]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
+ 51. [55]Michael Shields <shields@tembel.org> USNO clock driver
+ 52. [56]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock driver
+ 53. [57]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
- 53. [57]Kenneth Stone <ken@sdd.hp.com> HP-UX port
- 54. [58]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast support
- 55. [59]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock driver
- 56. [60]Brian Utterback <brian.utterback@oracle.com> General codebase,
+ 54. [58]Kenneth Stone <ken@sdd.hp.com> HP-UX port
+ 55. [59]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast support
+ 56. [60]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock driver
+ 57. [61]Brian Utterback <brian.utterback@oracle.com> General codebase,
Solaris issues
- 57. [61]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
+ 58. [62]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
(libseccomp) support
- 58. [62]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
+ 59. [63]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver
- 59. [63]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
+ 60. [64]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD
__________________________________________________________________
@@ -172,51 +174,52 @@ References
13. mailto:%20reg@dwf.com
14. mailto:%20clift@ml.csiro.au
15. mailto:%20casey@csc.co.za
- 16. mailto:%20Sven_Dietrich@trimble.COM
- 17. mailto:%20dundas@salt.jpl.nasa.gov
- 18. mailto:%20duwe@immd4.informatik.uni-erlangen.de
- 19. mailto:%20dennis@mrbill.canet.ca
- 20. mailto:%20jhay@icomtek.csir.co.za
- 21. mailto:%20davehart@davehart.com
- 22. mailto:%20neoclock4x@linum.com
- 23. mailto:%20glenn@herald.usask.ca
- 24. mailto:%20iglesias@uci.edu
- 25. mailto:%20jagubox.gsfc.nasa.gov
- 26. mailto:%20jbj@chatham.usdesign.com
- 27. mailto:%20Hans.Lambermont@nl.origin-it.com
- 28. mailto:H.Lambermont@chello.nl
- 29. mailto:%20phk@FreeBSD.ORG
- 30. http://www4.informatik.uni-erlangen.de/%7ekardel
- 31. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org
- 32. mailto:kuehn@ntp.org
- 33. mailto:%20jones@hermes.chpc.utexas.edu
- 34. mailto:%20dkatz@cisco.com
- 35. mailto:%20leres@ee.lbl.gov
- 36. mailto:%20lindholm@ucs.ubc.ca
- 37. mailto:%20louie@ni.umd.edu
- 38. mailto:%20thorinn@diku.dk
- 39. mailto:%20mayer@ntp.org
- 40. mailto:%20mills@udel.edu
- 41. mailto:%20moeller@gwdgv1.dnet.gwdg.de
- 42. mailto:%20mogul@pa.dec.com
- 43. mailto:%20tmoore@fievel.daytonoh.ncr.com
- 44. mailto:%20kamal@whence.com
- 45. mailto:%20derek@toybox.demon.co.uk
- 46. mailto:%20d@hd.org
- 47. mailto:%20neal@ntp.org
- 48. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
- 49. mailto:%20dirce@zk3.dec.com
- 50. mailto:%20wsanchez@apple.com
- 51. mailto:%20mrapple@quack.kfu.com
- 52. mailto:%20jack@innovativeinternet.com
- 53. mailto:%20schnitz@unipress.com
- 54. mailto:%20shields@tembel.org
- 55. mailto:%20pebbles.jpl.nasa.gov
- 56. mailto:%20harlan@pfcs.com
- 57. mailto:%20ken@sdd.hp.com
- 58. mailto:%20ajit@ee.udel.edu
- 59. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
- 60. mailto:%20brian.utterback@oracle.com
- 61. mailto:%20loganaden@gmail.com
- 62. mailto:%20vixie@vix.com
- 63. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
+ 16. mailto:%20phdm@macqel.be
+ 17. mailto:%20Sven_Dietrich@trimble.COM
+ 18. mailto:%20dundas@salt.jpl.nasa.gov
+ 19. mailto:%20duwe@immd4.informatik.uni-erlangen.de
+ 20. mailto:%20dennis@mrbill.canet.ca
+ 21. mailto:%20jhay@icomtek.csir.co.za
+ 22. mailto:%20davehart@gmail.com
+ 23. mailto:%20neoclock4x@linum.com
+ 24. mailto:%20glenn@herald.usask.ca
+ 25. mailto:%20iglesias@uci.edu
+ 26. mailto:%20jagubox.gsfc.nasa.gov
+ 27. mailto:%20jbj@chatham.usdesign.com
+ 28. mailto:%20Hans.Lambermont@nl.origin-it.com
+ 29. mailto:H.Lambermont@chello.nl
+ 30. mailto:%20phk@FreeBSD.ORG
+ 31. http://www4.informatik.uni-erlangen.de/%7ekardel
+ 32. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org
+ 33. mailto:kuehn@ntp.org
+ 34. mailto:%20jones@hermes.chpc.utexas.edu
+ 35. mailto:%20dkatz@cisco.com
+ 36. mailto:%20leres@ee.lbl.gov
+ 37. mailto:%20lindholm@ucs.ubc.ca
+ 38. mailto:%20louie@ni.umd.edu
+ 39. mailto:%20thorinn@diku.dk
+ 40. mailto:%20mayer@ntp.org
+ 41. mailto:%20mills@udel.edu
+ 42. mailto:%20moeller@gwdgv1.dnet.gwdg.de
+ 43. mailto:%20mogul@pa.dec.com
+ 44. mailto:%20tmoore@fievel.daytonoh.ncr.com
+ 45. mailto:%20kamal@whence.com
+ 46. mailto:%20derek@toybox.demon.co.uk
+ 47. mailto:%20d@hd.org
+ 48. mailto:%20neal@ntp.org
+ 49. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
+ 50. mailto:%20dirce@zk3.dec.com
+ 51. mailto:%20wsanchez@apple.com
+ 52. mailto:%20mrapple@quack.kfu.com
+ 53. mailto:%20jack@innovativeinternet.com
+ 54. mailto:%20schnitz@unipress.com
+ 55. mailto:%20shields@tembel.org
+ 56. mailto:%20pebbles.jpl.nasa.gov
+ 57. mailto:%20harlan@pfcs.com
+ 58. mailto:%20ken@sdd.hp.com
+ 59. mailto:%20ajit@ee.udel.edu
+ 60. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
+ 61. mailto:%20brian.utterback@oracle.com
+ 62. mailto:%20loganaden@gmail.com
+ 63. mailto:%20vixie@vix.com
+ 64. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
diff --git a/contrib/ntp/ChangeLog b/contrib/ntp/ChangeLog
index c0db6042c9fe..8e34d2a96696 100644
--- a/contrib/ntp/ChangeLog
+++ b/contrib/ntp/ChangeLog
@@ -1,6 +1,113 @@
---
+(4.2.8p16) 2023/05/31 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Sec 3808] Assertion failure in ntpq on malformed RT-11 date <perlinger@ntp.org>
+* [Sec 3807] praecis_parse() in the Palisade refclock driver has a
+ hypothetical input buffer overflow. Reported by ... stenn@
+* [Sec 3806] libntp/mstolfp.c needs bounds checking <perlinger@ntp.org>
+ - solved numerically instead of using string manipulation
+* [Sec 3767] An OOB KoD RATE value triggers an assertion when debug is enabled.
+ <stenn@ntp.org>
+* [Bug 3819] Updated libopts/Makefile.am was missing NTP_HARD_* values. <stenn@>
+* [Bug 3817] Bounds-check "tos floor" configuration. <hart@ntp.org>
+* [Bug 3814] First poll delay of new or cleared associations miscalculated.
+ <hart@ntp.org>
+* [Bug 3802] ntp-keygen -I default identity modulus bits too small for
+ OpenSSL 3. Reported by rmsh1216@163.com <hart@ntp.org>
+* [Bug 3801] gpsdjson refclock gps_open() device name mishandled. <hart@ntp.org>
+* [Bug 3800] libopts-42.1.17 does not compile with Microsoft C. <hart@ntp.org>
+* [Bug 3799] Enable libopts noreturn compiler advice for MSC. <hart@ntp.org>
+* [Bug 3797] Windows getaddrinfo w/AI_ADDRCONFIG fails for localhost when
+ disconnected, breaking ntpq and ntpdc. <hart@ntp.org>
+* [Bug 3795] pollskewlist documentation uses | when it shouldn't.
+ - ntp.conf manual page and miscopt.html corrections. <hart@ntp.org>
+* [Bug 3793] Wrong variable type passed to record_raw_stats(). <hart@ntp.org>
+ - Report and patch by Yuezhen LUAN <wei6410@sina.com>.
+* [Bug 3786] Timer starvation on high-load Windows ntpd. <hart@ntp.org>
+* [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded.
+ <hart@ntp.org>
+* [Bug 3781] log "Unable to listen for broadcasts" for IPv4 <hart@ntp.org>
+* [Bug 3774] mode 6 packets corrupted in rawstats file <hart@ntp.org>
+ - Reported by Edward McGuire, fix identified by <wei6410@sina.com>.
+* [Bug 3758] Provide a 'device' config statement for refclocks <perlinger@ntp.org>
+* [Bug 3757] Improve handling of Linux-PPS in NTPD <perlinger@ntp.org>
+* [Bug 3741] 4.2.8p15 can't build with glibc 2.34 <perlinger@ntp.org>
+* [Bug 3725] Make copyright of clk_wharton.c compatible with Debian.
+ Philippe De Muyter <phdm@macqel.be>
+* [Bug 3724] ntp-keygen with openSSL 1.1.1 fails on Windows <perlinger@ntp.org>
+ - openssl applink needed again for openSSL-1.1.1
+* [Bug 3719] configure.ac checks for closefrom() and getdtablesize() missing.
+ Reported by Brian Utterback, broken in 2010 by <hart@ntp.org>
+* [Bug 3699] Problems handling drift file and restoring previous drifts <perlinger@ntp.org>
+ - command line options override config statements where applicable
+ - make initial frequency settings idempotent and reversible
+ - make sure kernel PLL gets a recovered drift componsation
+* [Bug 3695] Fix memory leak with ntpq on Windows Server 2019 <perlinger@ntp.org>
+* [Bug 3694] NMEA refclock seems to unnecessarily require location in messages
+ - misleading title; essentially a request to ignore the receiver status.
+ Added a mode bit for this. <perlinger@ntp.org>
+* [Bug 3693] Improvement of error handling key lengths <perlinger@ntp.org>
+ - original patch by Richard Schmidt, with mods & unit test fixes
+* [Bug 3692] /dev/gpsN requirement prevents KPPS <perlinger@ntp.org>
+ - implement/wrap 'realpath()' to resolve symlinks in device names
+* [Bug 3691] Buffer Overflow reading GPSD output
+ - original patch by matt<ntpbr@mattcorallo.com>
+ - increased max PDU size to 4k to avoid truncation
+* [Bug 3690] newline in ntp clock variable (parse) <perlinger@ntp.org>
+ - patch by Frank Kardel
+* [Bug 3689] Extension for MD5, SHA-1 and other keys <perlinger@ntp.org>
+ - ntp{q,dc} now use the same password processing as ntpd does in the key
+ file, so having a binary secret >= 11 bytes is possible for all keys.
+ (This is a different approach to the problem than suggested)
+* [Bug 3688] GCC 10 build errors in testsuite <perlinger@ntp.org>
+* [Bug 3687] ntp_crypto_rand RNG status not known <perlinger@ntp.org>
+ - patch by Gerry Garvey
+* [Bug 3682] Fixes for warnings when compiled without OpenSSL <perlinger@ntp.org>
+ - original patch by Gerry Garvey
+* [Bug 3677] additional peer events not decoded in associations listing <perlinger@ntp.org>
+ - original patch by Gerry Garvey
+* [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough)
+ - applied patches by Gerry Garvey
+* [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage
+* [Bug 3674] ntpq command 'execute only' using '~' prefix <perlinger@ntp.org>
+ - idea+patch by Gerry Garvey
+* [Bug 3672] fix biased selection in median cut <perlinger@ntp.org>
+* [Bug 3666] avoid unlimited receive buffer allocation <perlinger@ntp.org>
+ - follow-up: fix inverted sense in check, reset shortfall counter
+* [Bug 3660] Revert 4.2.8p15 change to manycast. <hart@ntp.org>
+* [Bug 3640] document "discard monitor" and fix the code. <hart@ntp.org>
+ - fixed bug identified by Edward McGuire <perlinger@ntp.org>
+* [Bug 3626] (SNTP) UTC offset calculation needs dst flag <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3428] ntpd spinning consuming CPU on Linux router with full table.
+ Reported by Israel G. Lugo. <hart@ntp.org>
+* [Bug 3103] libopts zsave_warn format string too few arguments <bkorb@gnu.org>
+* [Bug 2990] multicastclient incorrectly causes bind to broadcast address.
+ Integrated patch from Brian Utterback. <hart@ntp.org>
+* [Bug 2525] Turn on automake subdir-objects across the project. <hart@ntp.org>
+* [Bug 2410] syslog an error message on panic exceeded. <brian.utterback@oracle.com>
+* Use correct rounding in mstolfp(). perlinger/hart
+* M_ADDF should use u_int32. <hart@ntp.org>
+* Only define tv_fmt_libbuf() if we will use it. <stenn@ntp.org>
+* Use recv_buffer instead of the longer recv_space.X_recv_buffer. hart/stenn
+* Make sure the value returned by refid_str() prints cleanly. <stenn@ntp.org>
+* If DEBUG is enabled, the startup banner now says that debug assertions
+ are in force and that ntpd will abort if any are violated. <stenn@ntp.org>
+* syslog valid incoming KoDs. <stenn@ntp.org>
+* Rename a poorly-named variable. <stenn@ntp.org>
+* Disable "embedded NUL in string" messages in libopts, when we can. <stenn@>
+* Use https in the AC_INIT URLs in configure.ac. <stenn@ntp.org>
+* Implement NTP_FUNC_REALPATH. <stenn@ntp.org>
+* Lose a gmake construct in ntpd/Makefile.am. <stenn@ntp.org>
+* upgrade to: autogen-5.18.16
+* upgrade to: libopts-42.1.17
+* upgrade to: autoconf-2.71
+* upgrade to: automake-1.16.15
+* Upgrade to libevent-2.1.12-stable <stenn@ntp.org>
+* Support OpenSSL-3.0
+
+---
(4.2.8p15) 2020/06/23 Released by Harlan Stenn <stenn@ntp.org>
-(4.2.8p15) 2020/06/23 Released by Harlan Stenn <stenn@ntp.or>
* [Sec 3661] memory leak with AES128CMAC keys <perlinger@ntp.org>
* [Bug 3670] Regression from bad merge of 3592 and 3596 <perlinger@ntp.org>
@@ -14,8 +121,7 @@
* [Bug 3662] Fix build errors on Windows with VS2008 <burnicki@ntp.org>
* [Bug 3660] Manycast orphan mode startup discovery problem. <stenn@ntp.org>
- integrated patch from Charles Claggett
-* [Bug 3659] Move definition of psl[] from ntp_config.h to
- ntp_config.h <perlinger@ntp.org>
+* [Bug 3659] Move definition of psl[] from ntp_config.h to ntp_config.c <perlinger@ntp.org>
* [Bug 3657] Wrong "Autokey group mismatch" debug message <perlinger@ntp.org>
* [Bug 3655] ntpdc memstats hash counts <perlinger@ntp.org>
- fix by Gerry garvey
@@ -26,6 +132,8 @@
* [Bug 3644] Unsynchronized server [...] selected as candidate <perlinger@ntp.org>
* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. <abe@ntp.org>
- applied patch by Takao Abe
+* [Bug 3432] refclocks that 'write()' should check the result <perlinger@ntp.org>
+ - plus some more work on warnings for unchecked results
---
(4.2.8p14) 2020/03/03 Released by Harlan Stenn <stenn@ntp.org>
diff --git a/contrib/ntp/CommitLog b/contrib/ntp/CommitLog
index 80104bc8d78c..54bf0f9a45fc 100644
--- a/contrib/ntp/CommitLog
+++ b/contrib/ntp/CommitLog
@@ -1,3 +1,5578 @@
+ChangeSet@1.3996, 2023-05-31 20:05:32-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ NTP_4_2_8P16
+ TAG: NTP_4_2_8P16
+
+ ChangeLog@1.2048 +1 -0
+ NTP_4_2_8P16
+
+ ntpd/invoke-ntp.conf.texi@1.224 +1 -1
+ NTP_4_2_8P16
+
+ ntpd/invoke-ntp.keys.texi@1.209 +1 -1
+ NTP_4_2_8P16
+
+ ntpd/invoke-ntpd.texi@1.523 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntp.conf.5man@1.258 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntp.conf.5mdoc@1.258 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntp.conf.html@1.206 +68 -121
+ NTP_4_2_8P16
+
+ ntpd/ntp.conf.man.in@1.258 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntp.conf.mdoc.in@1.258 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntp.keys.5man@1.243 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntp.keys.5mdoc@1.243 +3 -3
+ NTP_4_2_8P16
+
+ ntpd/ntp.keys.html@1.203 +23 -43
+ NTP_4_2_8P16
+
+ ntpd/ntp.keys.man.in@1.243 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntp.keys.mdoc.in@1.243 +3 -3
+ NTP_4_2_8P16
+
+ ntpd/ntpd-opts.c@1.548 +7 -7
+ NTP_4_2_8P16
+
+ ntpd/ntpd-opts.h@1.547 +3 -3
+ NTP_4_2_8P16
+
+ ntpd/ntpd.1ntpdman@1.352 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntpd.1ntpdmdoc@1.352 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntpd.html@1.197 +162 -254
+ NTP_4_2_8P16
+
+ ntpd/ntpd.man.in@1.352 +2 -2
+ NTP_4_2_8P16
+
+ ntpd/ntpd.mdoc.in@1.352 +2 -2
+ NTP_4_2_8P16
+
+ ntpdc/invoke-ntpdc.texi@1.522 +2 -2
+ NTP_4_2_8P16
+
+ ntpdc/ntpdc-opts.c@1.543 +7 -7
+ NTP_4_2_8P16
+
+ ntpdc/ntpdc-opts.h@1.542 +3 -3
+ NTP_4_2_8P16
+
+ ntpdc/ntpdc.1ntpdcman@1.353 +2 -2
+ NTP_4_2_8P16
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.353 +2 -2
+ NTP_4_2_8P16
+
+ ntpdc/ntpdc.html@1.367 +79 -129
+ NTP_4_2_8P16
+
+ ntpdc/ntpdc.man.in@1.353 +2 -2
+ NTP_4_2_8P16
+
+ ntpdc/ntpdc.mdoc.in@1.353 +2 -2
+ NTP_4_2_8P16
+
+ ntpq/invoke-ntpq.texi@1.532 +2 -2
+ NTP_4_2_8P16
+
+ ntpq/ntpq-opts.c@1.552 +7 -7
+ NTP_4_2_8P16
+
+ ntpq/ntpq-opts.h@1.550 +3 -3
+ NTP_4_2_8P16
+
+ ntpq/ntpq.1ntpqman@1.360 +2 -2
+ NTP_4_2_8P16
+
+ ntpq/ntpq.1ntpqmdoc@1.360 +2 -2
+ NTP_4_2_8P16
+
+ ntpq/ntpq.html@1.197 +149 -215
+ NTP_4_2_8P16
+
+ ntpq/ntpq.man.in@1.360 +2 -2
+ NTP_4_2_8P16
+
+ ntpq/ntpq.mdoc.in@1.360 +2 -2
+ NTP_4_2_8P16
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.522 +2 -2
+ NTP_4_2_8P16
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.543 +7 -7
+ NTP_4_2_8P16
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.542 +3 -3
+ NTP_4_2_8P16
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.351 +2 -2
+ NTP_4_2_8P16
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.351 +2 -2
+ NTP_4_2_8P16
+
+ ntpsnmpd/ntpsnmpd.html@1.189 +14 -29
+ NTP_4_2_8P16
+
+ ntpsnmpd/ntpsnmpd.man.in@1.351 +2 -2
+ NTP_4_2_8P16
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.351 +2 -2
+ NTP_4_2_8P16
+
+ packageinfo.sh@1.548 +2 -2
+ NTP_4_2_8P16
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.112 +2 -2
+ NTP_4_2_8P16
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.114 +2 -2
+ NTP_4_2_8P16
+
+ scripts/calc_tickadj/calc_tickadj.html@1.113 +30 -51
+ NTP_4_2_8P16
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.111 +2 -2
+ NTP_4_2_8P16
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.114 +2 -2
+ NTP_4_2_8P16
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.116 +1 -1
+ NTP_4_2_8P16
+
+ scripts/invoke-plot_summary.texi@1.134 +2 -2
+ NTP_4_2_8P16
+
+ scripts/invoke-summary.texi@1.133 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.345 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntp-wait/ntp-wait-opts@1.81 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.340 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.342 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntp-wait/ntp-wait.html@1.361 +37 -63
+ NTP_4_2_8P16
+
+ scripts/ntp-wait/ntp-wait.man.in@1.340 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.342 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.131 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntpsweep/ntpsweep-opts@1.84 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.119 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.119 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntpsweep/ntpsweep.html@1.133 +39 -65
+ NTP_4_2_8P16
+
+ scripts/ntpsweep/ntpsweep.man.in@1.119 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.120 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.134 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntptrace/ntptrace-opts@1.84 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.119 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.121 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntptrace/ntptrace.html@1.134 +36 -59
+ NTP_4_2_8P16
+
+ scripts/ntptrace/ntptrace.man.in@1.119 +2 -2
+ NTP_4_2_8P16
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.122 +2 -2
+ NTP_4_2_8P16
+
+ scripts/plot_summary-opts@1.85 +2 -2
+ NTP_4_2_8P16
+
+ scripts/plot_summary.1plot_summaryman@1.132 +2 -2
+ NTP_4_2_8P16
+
+ scripts/plot_summary.1plot_summarymdoc@1.132 +2 -2
+ NTP_4_2_8P16
+
+ scripts/plot_summary.html@1.136 +46 -73
+ NTP_4_2_8P16
+
+ scripts/plot_summary.man.in@1.132 +2 -2
+ NTP_4_2_8P16
+
+ scripts/plot_summary.mdoc.in@1.132 +2 -2
+ NTP_4_2_8P16
+
+ scripts/summary-opts@1.84 +2 -2
+ NTP_4_2_8P16
+
+ scripts/summary.1summaryman@1.131 +2 -2
+ NTP_4_2_8P16
+
+ scripts/summary.1summarymdoc@1.131 +2 -2
+ NTP_4_2_8P16
+
+ scripts/summary.html@1.135 +41 -66
+ NTP_4_2_8P16
+
+ scripts/summary.man.in@1.131 +2 -2
+ NTP_4_2_8P16
+
+ scripts/summary.mdoc.in@1.131 +2 -2
+ NTP_4_2_8P16
+
+ scripts/update-leap/invoke-update-leap.texi@1.32 +1 -1
+ NTP_4_2_8P16
+
+ scripts/update-leap/update-leap-opts@1.34 +2 -2
+ NTP_4_2_8P16
+
+ scripts/update-leap/update-leap.1update-leapman@1.32 +2 -2
+ NTP_4_2_8P16
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.33 +2 -2
+ NTP_4_2_8P16
+
+ scripts/update-leap/update-leap.html@1.32 +48 -80
+ NTP_4_2_8P16
+
+ scripts/update-leap/update-leap.man.in@1.32 +2 -2
+ NTP_4_2_8P16
+
+ scripts/update-leap/update-leap.mdoc.in@1.33 +2 -2
+ NTP_4_2_8P16
+
+ sntp/invoke-sntp.texi@1.522 +2 -2
+ NTP_4_2_8P16
+
+ sntp/sntp-opts.c@1.544 +7 -7
+ NTP_4_2_8P16
+
+ sntp/sntp-opts.h@1.542 +3 -3
+ NTP_4_2_8P16
+
+ sntp/sntp.1sntpman@1.357 +2 -2
+ NTP_4_2_8P16
+
+ sntp/sntp.1sntpmdoc@1.357 +2 -2
+ NTP_4_2_8P16
+
+ sntp/sntp.html@1.538 +93 -149
+ NTP_4_2_8P16
+
+ sntp/sntp.man.in@1.357 +2 -2
+ NTP_4_2_8P16
+
+ sntp/sntp.mdoc.in@1.357 +2 -2
+ NTP_4_2_8P16
+
+ util/invoke-ntp-keygen.texi@1.525 +2 -2
+ NTP_4_2_8P16
+
+ util/ntp-keygen-opts.c@1.546 +7 -7
+ NTP_4_2_8P16
+
+ util/ntp-keygen-opts.h@1.544 +3 -3
+ NTP_4_2_8P16
+
+ util/ntp-keygen.1ntp-keygenman@1.353 +2 -2
+ NTP_4_2_8P16
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.353 +2 -2
+ NTP_4_2_8P16
+
+ util/ntp-keygen.html@1.198 +156 -234
+ NTP_4_2_8P16
+
+ util/ntp-keygen.man.in@1.353 +2 -2
+ NTP_4_2_8P16
+
+ util/ntp-keygen.mdoc.in@1.353 +2 -2
+ NTP_4_2_8P16
+
+ChangeSet@1.3995, 2023-05-30 06:27:39-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ Prep for roll of p16
+
+ packageinfo.sh@1.547 +1 -1
+ Prep for roll of p16
+
+ChangeSet@1.3993, 2023-05-30 02:06:11-05:00, stenn@stenn.chi1.ntfo.org
+ Update NEWS file for ntp-4.2.8p16
+
+ NEWS@1.218 +1 -0
+ Update NEWS file for ntp-4.2.8p16
+
+ChangeSet@1.3992, 2023-05-30 01:37:16-05:00, stenn@stenn.chi1.ntfo.org
+ Update NEWS file for ntp-4.2.8p16
+
+ NEWS@1.217 +1 -0
+ Update NEWS file for ntp-4.2.8p16
+
+ChangeSet@1.3990, 2023-05-29 22:30:00-05:00, stenn@stenn.chi1.ntfo.org
+ Note OpenSSL-3.0 support
+
+ NEWS@1.216 +121 -0
+ Note OpenSSL-3.0 support
+
+ChangeSet@1.3989, 2023-05-29 22:29:10-05:00, stenn@stenn.chi1.ntfo.org
+ Note OpenSSL-3.0 support
+
+ ChangeLog@1.2046 +2 -0
+ Note OpenSSL-3.0 support
+
+ChangeSet@1.3971.2.11, 2023-05-29 21:21:01-05:00, stenn@stenn.chi1.ntfo.org
+ Updated libopts/Makefile.am was missing NTP_HARD_* values
+
+ ChangeLog@1.2031.3.5 +1 -0
+ Updated libopts/Makefile.am was missing NTP_HARD_* values
+
+ README.leapsmear@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/libopts/Makefile.am@1.31 +6 -3
+ Updated libopts/Makefile.am was missing NTP_HARD_* values
+
+ChangeSet@1.3912.22.1, 2023-05-19 05:17:41-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ Update the 2mirrors script
+
+ BitKeeper/triggers/2mirrors@1.12 +8 -6
+ Update the 2mirrors script
+
+ChangeSet@1.3971.2.10, 2023-05-13 17:18:57-05:00, stenn@stenn.chi1.ntfo.org
+ Put 3432 in the right place in the ChangeLog
+
+ ChangeLog@1.2031.3.4 +2 -2
+ Put 3432 in the right place in the ChangeLog
+
+ChangeSet@1.3988, 2023-05-10 18:03:29-05:00, stenn@stenn.chi1.ntfo.org
+ remove duplicate line from ChangeLog
+
+ ChangeLog@1.2045 +0 -1
+ remove duplicate line from ChangeLog
+
+ChangeSet@1.3971.2.9, 2023-05-10 04:46:32+00:00, davehart@tl.davehart.net
+ [Bug 3817] Bounds-check "tos floor" configuration. <hart@ntp.org>
+
+ ChangeLog@1.2031.3.3 +1 -0
+ [Bug 3817] Bounds-check "tos floor" configuration. <hart@ntp.org>
+
+ ntpd/ntp_config.c@1.380.1.1 +45 -16
+ [Bug 3817] Bounds-check "tos floor" configuration. <hart@ntp.org>
+ Also sanity check floor < ceiling and correct ceiling lower bound check and message.
+
+ChangeSet@1.3986, 2023-05-07 03:46:52-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Make sure the value returned by refid_str() prints cleanly
+
+ ChangeLog@1.2043 +1 -0
+ Make sure the value returned by refid_str() prints cleanly
+
+ libntp/numtoa.c@1.8 +16 -0
+ Make sure the value returned by refid_str() prints cleanly
+
+ChangeSet@1.3985, 2023-05-07 02:21:55-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Validate pkt->ppoll
+
+ ntpd/ntp_proto.c@1.445 +32 -2
+ Validate pkt->ppoll
+
+ChangeSet@1.3971.2.8, 2023-05-07 02:10:38-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Startup banner now notes when debug assertions are in force
+
+ ChangeLog@1.2031.3.2 +2 -0
+ Startup banner now notes when debug assertions are in force
+
+ ntpd/ntpd.c@1.188 +4 -0
+ Startup banner now notes when debug assertions are in force
+
+ChangeSet@1.3983, 2023-05-06 06:34:11-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Bug 3767: An OOB KoD RATE value triggers an assertion when debug is enabled.
+
+ ChangeLog@1.2041 +4 -2
+ Bug 3767: An OOB KoD RATE value triggers an assertion when debug is enabled.
+
+ configure.ac@1.629 +18 -0
+ Bug 3767: An OOB KoD RATE value triggers an assertion when debug is enabled.
+
+ ntpd/ntp_config.c@1.381 +2 -0
+ Bug 3767: An OOB KoD RATE value triggers an assertion when debug is enabled.
+
+ChangeSet@1.3971.5.1, 2023-05-03 21:16:16+00:00, davehart@tl.davehart.net
+ [Bug 3814] First poll delay of new or cleared associations miscalculated.
+ Switch NONEMPTY_TRANSLATION_UNIT extern reference from exit() to abs() to avoid
+ warning on VS 2022 due to mismatching declaration as exit() is now noreturn.
+ Minimum supported Visual Studio has been 2005, remove code for earlier.
+
+ BitKeeper/deleted/21/ntptrace.dsp~29080509@1.11 +0 -0
+ Delete: ports/winnt/ntptrace/ntptrace.dsp
+
+ ChangeLog@1.2031.3.1 +2 -0
+ [Bug 3814] First poll delay of new or cleared associations miscalculated.
+
+ include/ntp_types.h@1.37.1.1 +4 -3
+ Switch NONEMPTY_TRANSLATION_UNIT extern reference from exit() to abs() to avoid
+ warning on VS 2022 due to mismatching declaration as exit() is now noreturn.
+
+ libntp/mktime.c@1.14 +2 -2
+ Use NONEMPTY_TRANSLATION_UNIT
+
+ libntp/systime.c@1.76.1.1 +3 -0
+ #if out code unused with 64-bit time_t
+
+ ntpd/ntp_proto.c@1.442.1.1 +6 -6
+ [Bug 3814] First poll delay of new or cleared associations miscalculated.
+
+ ports/winnt/include/config.h@1.119 +2 -10
+ Minimum supported Visual Studio has been 2005, remove code for earlier.
+
+ChangeSet@1.3971.3.1, 2023-04-30 08:54:37+02:00, perlinger@ntp.org
+ [Bug 3808] Assertion failure in ntpq on malformed RT-11 date
+
+ ChangeLog@1.2031.2.4 +1 -0
+ [Bug 3808] Assertion failure in ntpq on malformed RT-11 date
+
+ libntp/caltontp.c@1.9 +18 -14
+ [Bug 3808] Assertion failure in ntpq on malformed RT-11 date
+ - set 'errno' instead of blowing up!
+
+ ntpq/ntpq.c@1.197 +4 -2
+ [Bug 3808] Assertion failure in ntpq on malformed RT-11 date
+ - check 'errno' after calling 'caltontp()'
+
+ChangeSet@1.3971.2.5, 2023-04-30 03:28:14+00:00, davehart@tl.davehart.net
+ Updated Solaris-specific patch from Brian Utterback
+
+ ntpd/ntp_proto.c@1.443 +4 -3
+ Patch from [Bug 2410] was not quite done.
+
+ChangeSet@1.3971.2.4, 2023-04-28 03:01:47-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ typo fix
+
+ libntp/caltontp.c@1.8 +1 -1
+ typo fix
+
+ChangeSet@1.3971.2.3, 2023-04-28 03:00:57-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ syslog valid incoming KoDs
+
+ ChangeLog@1.2031.2.3 +1 -0
+ syslog valid incoming KoDs
+
+ ntpd/ntp_proto.c@1.442 +28 -24
+ syslog valid incoming KoDs
+
+ChangeSet@1.3971.2.2, 2023-04-19 02:37:17-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Rename a poorly-named variable
+
+ ChangeLog@1.2031.2.2 +1 -0
+ Rename a poorly-named variable
+
+ ntpd/ntp_crypto.c@1.193 +4 -4
+ Rename a poorly-named variable
+
+ChangeSet@1.3976, 2023-04-17 04:19:46-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Use correct rounding in mstolfp()
+
+ ChangeLog@1.2036 +1 -0
+ Use correct rounding in mstolfp()
+
+ libntp/mstolfp.c@1.9 +3 -9
+ Use correct rounding in mstolfp()
+
+ChangeSet@1.3975, 2023-04-17 04:14:15-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ M_ADDF should use u_int32
+
+ ChangeLog@1.2035 +1 -0
+ M_ADDF should use u_int32
+
+ include/ntp_fp.h@1.36 +2 -2
+ M_ADDF should use u_int32
+
+ChangeSet@1.3974, 2023-04-16 03:27:34-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ cleanups
+
+ ChangeLog@1.2034 +4 -3
+
+ libntp/mstolfp.c@1.8 +4 -3
+
+ libntp/systime.c@1.77 +3 -0
+
+ChangeSet@1.3971.1.3, 2023-04-16 02:30:18-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Use recv_buffer instead of the longer recv_space.X_recv_buffer
+
+ ChangeLog@1.2031.1.3 +2 -1
+ Use recv_buffer instead of the longer recv_space.X_recv_buffer
+
+ ntpd/refclock_fg.c@1.17 +2 -2
+ Use recv_buffer instead of the longer recv_space.X_recv_buffer
+
+ ntpd/refclock_palisade.c@1.51 +1 -1
+ Use recv_buffer instead of the longer recv_space.X_recv_buffer
+
+ChangeSet@1.3971.2.1, 2023-04-16 02:12:16-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Disable "embedded NUL in string" messages in libopts, when we can.
+
+ ChangeLog@1.2031.2.1 +1 -0
+ Disable "embedded NUL in string" messages in libopts, when we can.
+
+ sntp/libopts/Makefile.am@1.30 +2 -0
+ Disable "embedded NUL in string" messages in libopts, when we can.
+
+ sntp/m4/ntp_compiler.m4@1.8 +29 -1
+ Disable "embedded NUL in string" messages in libopts, when we can.
+
+ChangeSet@1.3971.1.1, 2023-04-15 06:41:21-05:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Bug 3807: praecis_parse() input buffer
+
+ ChangeLog@1.2031.1.1 +2 -0
+ Bug 3807: praecis_parse() input buffer
+
+ ntpd/refclock_palisade.c@1.50 +37 -4
+ Bug 3807: praecis_parse() input buffer
+
+ChangeSet@1.3972, 2023-04-15 10:54:14+02:00, perlinger@ntp.org
+ [Bug 3806] libntp/mstolfp.c needs bounds checking
+
+ ChangeLog@1.2032 +2 -0
+ [Bug 3806] libntp/mstolfp.c needs bounds checking
+
+ libntp/mstolfp.c@1.7 +45 -68
+ [Bug 3806] libntp/mstolfp.c needs bounds checking
+ - soved numerically instead of using string manipulation
+
+ tests/libntp/strtolfp.c@1.8 +19 -14
+ [Bug 3806] libntp/mstolfp.c needs bounds checking
+ - dump numerical values on failed number comparison
+
+ChangeSet@1.3964.4.1, 2023-04-11 10:21:33+00:00, davehart@tl.davehart.net
+ Remove unused cruft from BitKeeper ignore file.
+ Clean up redundancy in VS 2015 project files.
+ Correct lingering instances of references to lib/isc to libntp/lib/isc [Bug 2525].
+ Prevent spurious rebuild of ntp_keyword.h and keyword_gen_utd during clean build or rebuild.
+ Enable vs2015 randomized base address and data execution prevention.
+ Use vs2015 link-time whole program optimization for release builds.
+
+ BitKeeper/etc/ignore@1.96 +1 -77
+
+ include/ntp_types.h@1.38 +2 -2
+ Fix comment typo (confirmed by perlinger@ntp.org)
+
+ libntp/msyslog.c@1.56 +1 -1
+ Comment typo
+
+ ntpd/ntp_control.c@1.240 +0 -4
+ Scrap unused MAX() macro, ours is max()
+
+ ntpd/ntp_parser.c@1.119 +1 -1
+ Use sizeof buffer
+
+ ntpd/ntp_parser.y@1.107 +1 -1
+ Use sizeof buffer
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c@1.1.1.1 +1 -1
+ Update email address
+
+ ports/winnt/scripts/mkver.bat@1.19 +116 -36
+ Enable splitting out fetching ChangeSet revision as a first step before generating
+ version.c. This is used by vs2015 build to enable proper dependency checking of
+ the revision so stale revisions aren't kept in version.c. Separate rules are used
+ to get the revision from scm-rev (from tarball) or from bk directly.
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.15 +50 -50
+ Account for [Bug 2525] move of lib/isc under libntp
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.5 +1 -1
+ Account for [Bug 2525] move of lib/isc under libntp
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters@1.2 +1 -1
+ Account for [Bug 2525] move of lib/isc under libntp
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.13 +14 -14
+ Account for [Bug 2525] move of lib/isc under libntp
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters@1.10 +14 -14
+ Account for [Bug 2525] move of lib/isc under libntp
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj@1.7 +1 -1
+ Account for [Bug 2525] move of lib/isc under libntp
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters@1.4 +1 -1
+ Account for [Bug 2525] move of lib/isc under libntp
+
+ ports/winnt/vs2015/common.props@1.2.1.1 +2 -3
+ Enable randomized base address and data execution prevention..
+ Use link-time code generation for release builds only.
+
+ ports/winnt/vs2015/debug-x64.props@1.3.1.1 +0 -1
+ minimize
+
+ ports/winnt/vs2015/debug.props@1.3.1.1 +0 -1
+ minimize
+
+ ports/winnt/vs2015/instsrv/instsrv.vcxproj@1.1.1.1 +21 -163
+ Eliminate redundancy, include common.props first.
+ instsrv doesn't use version string.
+
+ ports/winnt/vs2015/instsrv/instsrv.vcxproj.filters@1.1.1.1 +0 -6
+ instsrv doesn't use version string.
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj@1.7.1.1 +25 -141
+ Eliminate redundancy, include common.props first.
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.7.1.1 +1 -1
+ Move override libisc mem.h to libisc Header Files.
+
+ ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj@1.1.1.1 +16 -148
+ Eliminate redundancy, include common.props first.
+
+ ports/winnt/vs2015/mkver.props@1.1 +25 -0
+ Centralize version.c dependencies for all consumer .vcxproj files.
+
+ ports/winnt/vs2015/mkver.props@1.0 +0 -0
+
+ ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj@1.1.1.1 +20 -154
+ Eliminate redundancy, include common.props first.
+ Improve version.c dependency checking.
+
+ ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.1.1.1 +17 -122
+ Eliminate redundancy, include common.props first.
+ Correct path to libntp/lib/isc.
+
+ ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters@1.1.1.1 +3 -3
+ Correct lib/isc path
+
+ ports/winnt/vs2015/ntpd/gen-ntp_keyword.bat@1.1.1.1 +14 -2
+ Prevent spurious rebuild of ntp_keyword.h and keyword_gen_utd during clean build or rebuild.
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.5.3.1 +38 -239
+ Eliminate redundancy, include common.props first.
+ Improve version.c dependency checking.
+ Correct lib\isc to libntp\lib\isc
+ Remove uselesss message resource references.
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.4.2.1 +14 -14
+ Correct lib/isc path
+
+ ports/winnt/vs2015/ntpdate/ntpdate.vcxproj@1.1.1.1 +25 -162
+ Eliminate redundancy, include common.props first.
+ Improve version.c dependency checking.
+ Correct path to libntp/lib/isc.
+
+ ports/winnt/vs2015/ntpdate/ntpdate.vcxproj.filters@1.1.1.1 +1 -1
+ Correct path to libntp/lib/isc.
+
+ ports/winnt/vs2015/ntpdc/ntpdc.vcxproj@1.1.1.1 +24 -160
+ Eliminate redundancy, include common.props first.
+ Improve version.c dependency checking.
+
+ ports/winnt/vs2015/ntpq/ntpq.vcxproj@1.1.1.1 +23 -160
+ Eliminate redundancy, include common.props first.
+ Improve version.c dependency checking.
+
+ ports/winnt/vs2015/release-x64.props@1.3.1.1 +4 -1
+ Use link-time code generation for release builds only.
+
+ ports/winnt/vs2015/release.props@1.3.1.1 +4 -4
+ Use link-time code generation for release builds only.
+
+ChangeSet@1.3969.1.2, 2023-03-28 18:17:07+00:00, davehart@tl.davehart.net
+ Consolidate and correct check-scm-rev invocations.
+ Quiet -Wunused-function warnings in ntp_config.c building ntpdsim.
+ Quiet -Warray-bounds warning in ntpdc.c.
+ Fix make distcheck failure due to leftover version.Po files.
+ Use silent rules for Autogen invocations.
+ Remove other write permissions, e.g. chmod o-w
+ Add missing comma in configure.ac syscall() test.
+ Remove remnant of the no-longer-used Google Test framework.
+
+ BitKeeper/deleted/7c/ntp_googletest.m4~54a23ec15985e26c@1.5 +0 -0
+ Rename: sntp/m4/ntp_googletest.m4 -> BitKeeper/deleted/7c/ntp_googletest.m4~54a23ec15985e26c
+
+ check-libntp.mf@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ check-libntpd.mf@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ check-libopts.mf@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ check-libunity.mf@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ check-scm-rev.mf@1.1 +8 -0
+ Consolidate and correct check-scm-rev invocations
+
+ check-scm-rev.mf@1.0 +0 -0
+
+ configure.ac@1.628 +2 -9
+ Add missing comma to declare syscall() test.
+ Remove remnant of the no-longer-used Google Test framework.
+
+ depsver.mf@1.6 +2 -2
+ Use silent rules for deps-ver cp
+
+ include/declcond.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ include/ntp_intres.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ include/ntp_lineedit.h@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ include/ntp_lists.h@1.16 +0 -0
+ Change mode to -rw-rw-r--
+
+ include/safecast.h@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ includes.mf@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ libntp/ntp_lineedit.c@1.15 +0 -0
+ Change mode to -rw-rw-r--
+
+ libntp/strl_obsd.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ libparse/Makefile.am@1.35 +2 -2
+ Use silent rules for VPATH hack
+
+ ntpd/Makefile.am@1.146 +49 -36
+ Ensure bk revision is up-to-date in version
+ Use distinct progname for ntpdsim version string
+ Use silent rules for VPATH hack
+ Use silent rules for Autogen invocations.
+
+ ntpd/complete.conf.in@1.38 +0 -0
+ Change mode to -rw-rw-r--
+
+ ntpd/declcond.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ntpd/ntp_config.c@1.380 +23 -18
+ Quiet -Wunused-function warnings building ntpdsim.
+ Quiet string truncation warning with our one use of strncpy.
+
+ ntpdate/Makefile.am@1.41 +8 -9
+ Ensure bk revision is up-to-date in version
+ Use silent rules for Autogen invocations.
+
+ ntpdc/Makefile.am@1.80 +28 -17
+ Ensure bk revision is up-to-date in version
+ Use silent rules for Autogen invocations and ntpdc-layout
+
+ ntpdc/ntpdc.c@1.116 +1 -2
+ Quiet warning from gcc 11.3.0:
+
+ In file included from ../../ntpdc/ntpdc.h:4,
+ from ../../ntpdc/ntpdc.c:22:
+ ../../ntpdc/ntpdc.c: In function 'doquery':
+ ../../include/ntp_fp.h:86:22: warning: array subscript -1 is outside array bounds of 'struct req_pkt[1]' [-Warray-bounds]
+ 86 | (ni) = htonl(hi); \
+ | ^
+ ../../include/ntp_fp.h:91:9: note: in expansion of macro 'HTONL_MFP'
+ 91 | HTONL_MFP((h)->l_ui, (h)->l_uf, (n)->l_ui, (n)->l_uf)
+ | ^~~~~~~~~
+ ../../ntpdc/ntpdc.c:968:9: note: in expansion of macro 'HTONL_FP'
+ 968 | HTONL_FP(&ts, ptstamp);
+ | ^~~~~~~~
+ ../../ntpdc/ntpdc.c:900:24: note: while referencing 'qpkt'
+ 900 | struct req_pkt qpkt;
+ | ^~~~
+
+ ntpq/Makefile.am@1.78 +15 -16
+ Ensure bk revision is up-to-date in version
+ Use silent rules for Autogen invocations.
+
+ ntpsnmpd/Makefile.am@1.44 +4 -4
+ Use silent rules for Autogen invocations.
+
+ ports/winnt/include/msvc_ssl_autolib.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/ntp_iocplmem.h@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/ntp_iocpltypes.h@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/ntservice.h@1.6 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/stdint.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/timepps.h@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/arc4wrap.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ntpd/nt_ppsimpl.c@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ntpd/ntp_iocplmem.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ntpd/ntp_iocpltypes.c@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/loopback/src/sys/time.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/loopback/src/timepps.h@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/common.vsprops@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/debug-x64.vsprops@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/debug.vsprops@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/release-x64.vsprops@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/release.vsprops@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2013/common.props@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2013/debug-x64.props@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2013/debug.props@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2013/release-x64.props@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2013/release.props@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/common.props@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/debug-x64.props@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/debug.props@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/instsrv/instsrv.vcxproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/instsrv/instsrv.vcxproj.filters@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj@1.8 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.8 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/loopback-pps/loopback-ppsapi-provider.vcxproj.filters@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntp-keygen/ntp-keygen.vcxproj.filters@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntp.sln@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpd/gen-ntp_keyword.bat@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.7.1.1 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.7 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpdate/ntpdate.vcxproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpdate/ntpdate.vcxproj.filters@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpdc/ntpdc.vcxproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpdc/ntpdc.vcxproj.filters@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpq/ntpq.vcxproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/ntpq/ntpq.vcxproj.filters@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/release-x64.props@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2015/release.props@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ scripts/Makefile.am@1.42 +8 -8
+ Use silent rules for Autogen invocations.
+
+ scripts/calc_tickadj/Makefile.am@1.13 +4 -4
+ Use silent rules for Autogen invocations.
+
+ scripts/ntp-wait/Makefile.am@1.11 +4 -4
+ Use silent rules for Autogen invocations.
+
+ scripts/ntpsweep/Makefile.am@1.12 +4 -4
+ Use silent rules for Autogen invocations.
+
+ scripts/ntptrace/Makefile.am@1.12 +4 -4
+ Use silent rules for Autogen invocations.
+
+ scripts/update-leap/Makefile.am@1.6 +4 -4
+ Use silent rules for Autogen invocations.
+
+ sntp/Makefile.am@1.94 +23 -26
+ Ensure bk revision is up-to-date in version
+ Use silent rules for Autogen invocations.
+
+ sntp/check-libntp.mf@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/check-libopts.mf@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/check-libsntp.mf@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/check-libunity.mf@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/configure.ac@1.89 +0 -3
+ Remove remnant of the no-longer-used Google Test framework.
+
+ sntp/include/Makefile.am@1.6 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/include/debug-opt.def@1.9 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/includes.mf@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/libevent/m4/libevent_openssl.m4@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/libevent/m4/ntp_pkg_config.m4@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/LICENSE-OPENLDAP@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_cacheversion.m4@1.16 +2 -7
+ Update now that Autoconf should support AS_UNSET instead of hand-rolled.
+
+ sntp/m4/ntp_cacheversion.m4@1.15 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_compiler.m4@1.7 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_crosscompile.m4@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_debug.m4@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_ipv6.m4@1.9 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_lib_m.m4@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_libntp.m4@1.39 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_pkg_config.m4@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/ntp_sntp.m4@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/openldap-thread-check.m4@1.8 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/openldap.m4@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/m4/snprintf.m4@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/main.h@1.8 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/sntp.c@1.6 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/tests/Makefile.am@1.74 +30 -15
+ Ensure bk revision is up-to-date in version.
+
+ sntp/tests/packetProcessing.c@1.19 +0 -2
+ Use the real version string rather than a stub.
+
+ sntp/tests/packetProcessing.c@1.18 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/tests/sntptest.c@1.2 +1 -3
+ Remove redundant includes, use COUNTOF()
+
+ sntp/tests/sntptest.h@1.7 +1 -0
+ ntp_types.h for COUNTOF()
+
+ sntp/tests/utilities.c@1.6 +0 -3
+ Use the real version string rather than a stub.
+
+ sntp/unity/auto/parseOutput.rb@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/unity/auto/type_sanitizer.rb@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/unity/auto/unity_test_summary.py@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ sntp/unity/libpkgver-colcomp.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/caltontp.c@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/humandate.c@1.8 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/msyslog.c@1.8 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/prettydate.c@1.7 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/recvbuff.c@1.9 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/sfptostr.c@1.7 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/tstotv.c@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/libntp/tvtots.c@1.7 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/ntpd/ntp_prio_q.c@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/ntpd/ntp_restrict.c@1.8 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/ntpd/test-libntp.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ tests/sandbox/smeartest.c@1.12 +0 -0
+ Change mode to -rw-rw-r--
+
+ util/Makefile.am@1.83 +7 -10
+ Ensure bk revision is up-to-date in version
+
+ChangeSet@1.3969.1.1, 2023-03-25 01:48:40-04:00, davehart@tl.davehart.net
+ [Bug 3428] ntpd spinning consuming CPU on Linux router with full table.
+
+ ChangeLog@1.2029.1.1 +2 -0
+ [Bug 3428] ntpd spinning consuming CPU on Linux router with full table.
+
+ libntp/work_thread.c@1.26 +1 -1
+ Typo
+
+ ntpd/ntp_io.c@1.434.1.1 +28 -7
+ [Bug 3428] ntpd spinning consuming CPU on Linux router with full table.
+
+ChangeSet@1.3964.3.3, 2023-03-19 15:58:02-04:00, davehart@tl.davehart.net
+ [Bug 3725] Make copyright of clk_wharton.c compatible with Debian.
+
+ ChangeLog@1.2025.3.1 +4 -0
+ [Bug 3725] Make copyright of clk_wharton.c compatible with Debian.
+
+ html/copyright.html@1.73 +1 -0
+ Add Philippe De Muyter <phdm@macqel.be>
+
+ libparse/clk_wharton.c@1.12 +0 -7
+ [Bug 3725] Make copyright of clk_wharton.c compatible with Debian.
+
+ChangeSet@1.3964.3.2, 2023-03-19 15:15:02-04:00, davehart@z4.davehart.net
+ Fix mkver.bat invocation
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.5.2.1 +2 -2
+ 'fix
+
+ChangeSet@1.3964.3.1, 2023-03-19 13:54:01-04:00, davehart@tl.davehart.net
+ [Bug 2990] multicastclient incorrectly causes bind to broadcast address.
+
+ include/ntpd.h@1.208 +1 -0
+ Add sys_mclient for multicast to avoid overloading sys_bclient meaning.
+
+ ntpd/ntp_io.c@1.435 +1 -1
+ Add sys_mclient for multicast to avoid overloading sys_bclient meaning.
+
+ ntpd/ntp_proto.c@1.441 +6 -4
+ Separate sys_bclient into sys_mclient and sys_bclient. (from Brian Utterback)
+
+ ntpd/ntp_request.c@1.133 +1 -1
+ Backwards compat, signal broadcast client to ntpdc with either sys_bclient or sys_mclient lit.
+
+ChangeSet@1.3964.2.2, 2023-03-19 01:05:11-04:00, davehart@tl.davehart.net
+ Don't cast size_t to int, update contract for followlink().
+ Make ssize_t size match size_t, provide SSIZE_MAX on Windows.
+
+ ports/winnt/include/config.h@1.118 +8 -2
+ Make ssize_t size match size_t, provide SSIZE_MAX
+
+ util/ntp-keygen.c@1.112 +4 -4
+ Don't cast size_t to int, update contract for followlink().
+
+ChangeSet@1.3963.2.4, 2023-03-18 16:10:54+00:00, hart@ntp-devbuild.chi1.ntfo.org
+ [Bug 3719] configure.ac checks for closefrom() and getdtablesize() missing.
+
+ ChangeLog@1.2024.2.2 +2 -0
+ [Bug 3719] configure.ac checks for closefrom() and getdtablesize() missing.
+
+ configure.ac@1.625.1.1 +3 -1
+ [Bug 3719] configure.ac checks for closefrom() and getdtablesize() missing.
+
+ChangeSet@1.3963.2.3, 2023-03-18 11:37:40+00:00, hart@ntp-devbuild.chi1.ntfo.org
+ Autogen'd files
+
+ ntpd/invoke-ntp.conf.texi@1.223 +22 -10
+ Autogen output
+
+ ntpd/invoke-ntp.keys.texi@1.208 +1 -1
+ Autogen output
+
+ ntpd/invoke-ntpd.texi@1.522 +3 -3
+ Autogen output
+
+ ntpd/ntp.conf.5man@1.257 +25 -13
+ Autogen output
+
+ ntpd/ntp.conf.5mdoc@1.257 +26 -14
+ Autogen output
+
+ ntpd/ntp.conf.html@1.205 +21 -9
+ Autogen output
+
+ ntpd/ntp.conf.man.in@1.257 +25 -13
+ Autogen output
+
+ ntpd/ntp.conf.mdoc.in@1.257 +26 -14
+ Autogen output
+
+ ntpd/ntp.keys.5man@1.242 +4 -4
+ Autogen output
+
+ ntpd/ntp.keys.5mdoc@1.242 +4 -4
+ Autogen output
+
+ ntpd/ntp.keys.man.in@1.242 +4 -4
+ Autogen output
+
+ ntpd/ntp.keys.mdoc.in@1.242 +4 -4
+ Autogen output
+
+ ntpd/ntpd-opts.c@1.547 +7 -7
+ Autogen output
+
+ ntpd/ntpd-opts.h@1.546 +1 -1
+ Autogen output
+
+ ntpd/ntpd.1ntpdman@1.351 +4 -4
+ Autogen output
+
+ ntpd/ntpd.1ntpdmdoc@1.351 +4 -4
+ Autogen output
+
+ ntpd/ntpd.html@1.196 +2 -2
+ Autogen output
+
+ ntpd/ntpd.man.in@1.351 +4 -4
+ Autogen output
+
+ ntpd/ntpd.mdoc.in@1.351 +4 -4
+ Autogen output
+
+ ntpdc/invoke-ntpdc.texi@1.521 +3 -3
+ Autogen output
+
+ ntpdc/ntpdc-opts.c@1.542 +7 -7
+ Autogen output
+
+ ntpdc/ntpdc-opts.h@1.541 +1 -1
+ Autogen output
+
+ ntpdc/ntpdc.1ntpdcman@1.352 +701 -9
+ Autogen output
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.352 +668 -9
+ Autogen output
+
+ ntpdc/ntpdc.html@1.366 +2 -2
+ Autogen output
+
+ ntpdc/ntpdc.man.in@1.352 +701 -9
+ Autogen output
+
+ ntpdc/ntpdc.mdoc.in@1.352 +668 -9
+ Autogen output
+
+ ntpq/invoke-ntpq.texi@1.531 +5 -4
+ Autogen output
+
+ ntpq/ntpq-opts.c@1.551 +7 -7
+ Autogen output
+
+ ntpq/ntpq-opts.h@1.549 +1 -1
+ Autogen output
+
+ ntpq/ntpq.1ntpqman@1.359 +1393 -5
+ Autogen output
+
+ ntpq/ntpq.1ntpqmdoc@1.359 +891 -5
+ Autogen output
+
+ ntpq/ntpq.html@1.196 +28 -9
+ Autogen output
+
+ ntpq/ntpq.man.in@1.359 +1393 -5
+ Autogen output
+
+ ntpq/ntpq.mdoc.in@1.359 +891 -5
+ Autogen output
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.521 +4 -4
+ Autogen output
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.542 +7 -7
+ Autogen output
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.541 +1 -1
+ Autogen output
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.350 +4 -4
+ Autogen output
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.350 +4 -4
+ Autogen output
+
+ ntpsnmpd/ntpsnmpd.man.in@1.350 +4 -4
+ Autogen output
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.350 +4 -4
+ Autogen output
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.113 +2 -2
+ Autogen output
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.113 +2 -2
+ Autogen output
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.344 +1 -1
+ Autogen output
+
+ scripts/ntp-wait/ntp-wait-opts@1.80 +1 -1
+ Autogen output
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.341 +2 -2
+ Autogen output
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.341 +2 -2
+ Autogen output
+
+ scripts/ntpsweep/ntpsweep-opts@1.83 +1 -1
+ Autogen output
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.133 +1 -1
+ Autogen output
+
+ scripts/ntptrace/ntptrace-opts@1.83 +1 -1
+ Autogen output
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.120 +2 -2
+ Autogen output
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.121 +2 -2
+ Autogen output
+
+ scripts/plot_summary-opts@1.84 +1 -1
+ Autogen output
+
+ scripts/summary-opts@1.83 +1 -1
+ Autogen output
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.32 +2 -2
+ Autogen output
+
+ scripts/update-leap/update-leap.mdoc.in@1.32 +2 -2
+ Autogen output
+
+ sntp/invoke-sntp.texi@1.521 +3 -3
+ Autogen output
+
+ sntp/sntp-opts.c@1.543 +7 -7
+ Autogen output
+
+ sntp/sntp-opts.h@1.541 +1 -1
+ Autogen output
+
+ sntp/sntp.1sntpman@1.356 +5 -5
+ Autogen output
+
+ sntp/sntp.1sntpmdoc@1.356 +5 -5
+ Autogen output
+
+ sntp/sntp.html@1.537 +2 -2
+ Autogen output
+
+ sntp/sntp.man.in@1.356 +5 -5
+ Autogen output
+
+ sntp/sntp.mdoc.in@1.356 +5 -5
+ Autogen output
+
+ util/invoke-ntp-keygen.texi@1.524 +4 -4
+ Autogen output
+
+ util/ntp-keygen-opts.c@1.545 +8 -8
+ Autogen output
+
+ util/ntp-keygen-opts.h@1.543 +1 -1
+ Autogen output
+
+ util/ntp-keygen.1ntp-keygenman@1.352 +5 -5
+ Autogen output
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.352 +5 -5
+ Autogen output
+
+ util/ntp-keygen.html@1.197 +4 -4
+ Autogen output
+
+ util/ntp-keygen.man.in@1.352 +5 -5
+ Autogen output
+
+ util/ntp-keygen.mdoc.in@1.352 +5 -5
+ Autogen output
+
+ChangeSet@1.3963.2.2, 2023-03-18 07:05:37-04:00, davehart@tl.davehart.net
+ Clean up generated .html dependences.
+
+ ntpdc/Makefile.am@1.77.1.1 +1 -1
+ Clean up generated .html dependences.
+
+ ntpq/Makefile.am@1.75.1.1 +1 -1
+ Clean up generated .html dependences.
+
+ ntpsnmpd/Makefile.am@1.43 +1 -1
+ Clean up generated .html dependences.
+
+ scripts/Makefile.am@1.41 +1 -1
+ Clean up generated .html dependences.
+
+ scripts/calc_tickadj/Makefile.am@1.12 +1 -1
+ Clean up generated .html dependences.
+
+ scripts/ntp-wait/Makefile.am@1.10 +1 -1
+ Clean up generated .html dependences.
+
+ scripts/ntpsweep/Makefile.am@1.11 +1 -1
+ Clean up generated .html dependences.
+
+ scripts/ntptrace/Makefile.am@1.11 +1 -1
+ Clean up generated .html dependences.
+
+ scripts/update-leap/Makefile.am@1.5 +1 -1
+ Clean up generated .html dependences.
+
+ sntp/Makefile.am@1.91.1.1 +1 -1
+ Clean up generated .html dependences.
+
+ util/Makefile.am@1.80.1.1 +1 -1
+ Clean up generated .html dependences.
+
+ChangeSet@1.3963.2.1, 2023-03-18 06:23:34-04:00, davehart@tl.davehart.net
+ [Bug 3802] ntp-keygen -I default identity modulus bits too small for OpenSSL 3.
+ ntp-keygen.c:
+ Use different buffers for in/out args to readlink() to respect "restrict" modifiers and avoid undefined behavior.
+ smeartest.c:
+ clean up warning re: main() vs main(void)
+
+ ChangeLog@1.2024.2.1 +3 -0
+ [Bug 3802] ntp-keygen -I default identity modulus bits too small for OpenSSL 3.
+ [Bug 3103] libopts zsave_warn format string too few arguments.
+
+ sntp/include/copyright.def@1.31 +1 -1
+ http://bugs.ntp.org/ -> https
+
+ tests/sandbox/smeartest.c@1.11 +1 -1
+ clean up warning re: main() vs main(void)
+
+ util/ntp-keygen-opts.def@1.33 +1 -1
+ Increase IFF default modulus bits to 512 for OpenSSL 3 compatibility.
+
+ util/ntp-keygen.c@1.111 +8 -4
+ Increase IFF default modulus bits to 512 for OpenSSL 3 compatibility.
+ Use different buffers for in/out args to readlink() to respect "restrict" modifiers and avoid undefined behavior.
+
+ChangeSet@1.3968, 2023-03-16 08:06:24+00:00, hart@hart.chi1.ntfo.org
+ unity_internals.h:
+ FreeBSD11 stdnoreturn.h #define noreturn _Noreturn breaks hint
+
+ sntp/unity/unity_internals.h@1.7 +1 -1
+ Fix problem with FreeBSD #define noreturn _Noreturn expanding to invalid __attribute((_Noreturn)), upstreamed to Unity github.
+
+ChangeSet@1.3967, 2023-03-13 11:17:46+00:00, hart@ntp-devbuild.chi1.ntfo.org
+ ntp_config.c:
+ avoid problems with #define noreturn _Noreturn
+
+ ntpd/ntp_config.c@1.379 +1 -1
+ avoid problems with #define noreturn _Noreturn
+
+ChangeSet@1.3963.1.2, 2023-03-13 08:50:22+00:00, hart@ntp-devbuild.chi1.ntfo.org
+ Use silent rules for version.c files.
+ Correct configure.ac test and bump cache version to flush bad results.
+ Silence gcc format-truncation warning in refclock_leitch.c.
+
+ configure.ac@1.626 +2 -2
+ Correct ntp_cv_struct_nlist_u_un test
+
+ ntpd/Makefile.am@1.145 +0 -3
+ use Automake silent rules for version.c
+
+ ntpd/refclock_leitch.c@1.16 +1 -1
+ silence gcc warning for printf %d potential truncation
+
+ ntpdate/Makefile.am@1.40 +0 -3
+ use Automake silent rules for version.c
+
+ ntpdc/Makefile.am@1.78 +0 -3
+ use Automake silent rules for version.c
+
+ ntpq/Makefile.am@1.76 +0 -3
+ use Automake silent rules for version.c
+
+ sntp/Makefile.am@1.92 +0 -3
+ use Automake silent rules for version.c
+
+ util/Makefile.am@1.81 +0 -3
+ use Automake silent rules for version.c
+
+ChangeSet@1.3963.1.1, 2023-03-12 16:43:24-04:00, davehart@tl.davehart.net
+ [Bug 3801] gpsdjson refclock gps_open() device name mishandled.
+
+ ChangeLog@1.2024.1.1 +3 -1
+ [Bug 3801] gpsdjson refclock gps_open() device name mishandled.
+
+ ntpd/refclock_gpsdjson.c@1.34 +3 -2
+ Pass correct device name to ntp_realpath.
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.5.1.1 +2 -1
+ Add reference to refclock_gpsdjson.c
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.4.1.1 +4 -1
+ Add reference to refclock_gpsdjson.c
+
+ChangeSet@1.3965, 2023-03-11 03:23:55-05:00, davehart@tl.davehart.net
+ [Bug 3799] Enable libopts noreturn compiler advice for MSC.
+ Add ChangeLog to ntpd project for easy editing within VS.
+
+ ChangeLog@1.2026 +1 -0
+ [Bug 3799] Enable libopts noreturn compiler advice for MSC.
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.6 +2 -1
+ Add ChangeLog to ntpd project for easy editing within VS.
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.5 +2 -1
+ Add ChangeLog to ntpd project for easy editing within VS.
+
+ sntp/libopts/autoopts.h@1.23 +6 -6
+ Use lo_noreturn instead of noreturn for MSC compatibility.
+
+ sntp/libopts/autoopts/project.h@1.10 +6 -0
+ Preserve noreturn hint for Microsoft C compiler.
+
+ sntp/libopts/makeshell.c@1.23 +3 -3
+ Use lo_noreturn instead of noreturn for MSC compatibility.
+
+ sntp/libopts/proto.h@1.33 +3 -3
+ Use lo_noreturn instead of noreturn for MSC compatibility.
+
+ sntp/libopts/usage.c@1.23 +1 -1
+ Use lo_noreturn instead of noreturn for MSC compatibility.
+
+ChangeSet@1.3964, 2023-03-10 23:31:42-05:00, davehart@tl.davehart.net
+ [Bug 3800] libopts-42.1.17 does not compile with Microsoft C.
+ Clean up [Bug 2525] changes by moving libisc source and header files into
+ separate groups in the Visual Studio IDE.
+
+ ChangeLog@1.2025 +1 -0
+ [Bug 3800] libopts-42.1.17 does not compile with Microsoft C.
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.7 +152 -149
+ Clean up [Bug 2525] changes by moving libisc source and header files into
+ separate groups in the Visual Studio IDE.
+
+ sntp/libopts/save.c@1.21 +24 -0
+ Implement truncate() for Microsoft C
+
+ sntp/libopts/text_mmap.c@1.19 +1 -1
+ Use _O_BINARY not O_BINARY to fix MSC compile
+
+ChangeSet@1.3960.2.1, 2023-03-06 01:47:00-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ pollskewlist bug is 3795, not 3595
+
+ ChangeLog@1.2021.2.1 +2 -2
+ pollskewlist bug is 3795, not 3595
+
+ChangeSet@1.3960.1.1, 2023-03-06 01:45:12-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Use https URLs for AC_INIT
+
+ ChangeLog@1.2021.1.1 +1 -0
+ Use https URLs for AC_INIT
+
+ChangeSet@1.3960, 2023-03-06 00:15:49-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Use https in AC_INIT URLs
+
+ configure.ac@1.625 +2 -2
+ Use https in AC_INIT URLs
+
+ sntp/configure.ac@1.88 +2 -2
+ Use https in AC_INIT URLs
+
+ChangeSet@1.3958, 2023-03-05 22:03:49-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Cleanup ChangeLog
+
+ ChangeLog@1.2020 +10 -10
+ Cleanup ChangeLog
+
+ChangeSet@1.3940.3.5, 2023-03-05 21:44:20-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Check in missing libopts/ files
+
+ sntp/libopts/save-flags.c@1.1 +248 -0
+ BitKeeper file sntp/libopts/save-flags.c
+
+ sntp/libopts/save-flags.c@1.0 +0 -0
+
+ sntp/libopts/save-flags.h@1.1 +68 -0
+ BitKeeper file sntp/libopts/save-flags.h
+
+ sntp/libopts/save-flags.h@1.0 +0 -0
+
+ChangeSet@1.3955, 2023-03-05 15:28:23-05:00, davehart@tl.davehart.net
+ Correct const usage of strtouv64 endp argument.
+
+ include/vint64ops.h@1.3 +1 -1
+ Correct const usage of strtouv64 endp argument.
+
+ libntp/vint64ops.c@1.3 +3 -3
+ Correct const usage of strtouv64 endp argument.
+
+ ntpd/ntp_leapsec.c@1.25 +8 -7
+ Correct const usage of strtouv64 endp argument.
+ Use INT16_MAX, INT16_MIN for int16_t.
+
+ tests/libntp/vi64ops.c@1.7 +3 -3
+ Correct const usage of strtouv64 endp argument.
+
+ChangeSet@1.3940.3.4, 2023-03-05 02:26:19-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ autogen upgrade
+
+ ntpd/ntpd-opts.c@1.546 +1 -1
+ autogen upgrade
+
+ ntpd/ntpd-opts.h@1.545 +1 -1
+ autogen upgrade
+
+ ntpd/ntpdsim-opts.c@1.31 +1 -1
+ autogen upgrade
+
+ ntpd/ntpdsim-opts.h@1.31 +1 -1
+ autogen upgrade
+
+ ntpdc/ntpdc-opts.c@1.541 +1 -1
+ autogen upgrade
+
+ ntpdc/ntpdc-opts.h@1.540 +1 -1
+ autogen upgrade
+
+ ntpq/ntpq-opts.c@1.550 +1 -1
+ autogen upgrade
+
+ ntpq/ntpq-opts.h@1.548 +1 -1
+ autogen upgrade
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.541 +1 -1
+ autogen upgrade
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.540 +1 -1
+ autogen upgrade
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.12 +1 -1
+ autogen upgrade
+
+ scripts/ntpsweep/ntpsweep-opts@1.82 +1 -1
+ autogen upgrade
+
+ scripts/ntptrace/ntptrace-opts@1.82 +1 -1
+ autogen upgrade
+
+ scripts/plot_summary-opts@1.83 +1 -1
+ autogen upgrade
+
+ scripts/summary-opts@1.82 +1 -1
+ autogen upgrade
+
+ scripts/update-leap/update-leap-opts@1.33 +1 -1
+ autogen upgrade
+
+ sntp/sntp-opts.c@1.542 +1 -1
+ autogen upgrade
+
+ sntp/sntp-opts.h@1.540 +1 -1
+ autogen upgrade
+
+ util/ntp-keygen-opts.c@1.544 +1 -1
+ autogen upgrade
+
+ util/ntp-keygen-opts.h@1.542 +1 -1
+ autogen upgrade
+
+ChangeSet@1.3940.3.3, 2023-03-05 00:23:04-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ html/copyright.html@1.69.1.1 +3 -3
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpd/ntpd-opts.c@1.545 +115 -114
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpd/ntpd-opts.h@1.544 +13 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpd/ntpdsim-opts.c@1.30 +121 -120
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpd/ntpdsim-opts.h@1.30 +15 -6
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpdc/ntpdc-opts.c@1.540 +115 -114
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpdc/ntpdc-opts.h@1.539 +13 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpq/ntpq-opts.c@1.549 +115 -114
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpq/ntpq-opts.h@1.547 +13 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.540 +115 -114
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.539 +13 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.11 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.111 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.112 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/calc_tickadj/calc_tickadj.html@1.112 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.110 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.112 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.115 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/invoke-plot_summary.texi@1.133 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/invoke-summary.texi@1.132 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.343 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntp-wait/ntp-wait-opts@1.79 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.339 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.340 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntp-wait/ntp-wait.man.in@1.339 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.340 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.130 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntpsweep/ntpsweep-opts@1.81 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.118 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.118 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntpsweep/ntpsweep.man.in@1.118 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.119 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.132 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntptrace/ntptrace-opts@1.81 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.118 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.119 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntptrace/ntptrace.man.in@1.118 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.120 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/plot_summary-opts@1.82 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/plot_summary.1plot_summaryman@1.131 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/plot_summary.1plot_summarymdoc@1.131 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/plot_summary.man.in@1.131 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/plot_summary.mdoc.in@1.131 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/summary-opts@1.81 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/summary.1summaryman@1.130 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/summary.1summarymdoc@1.130 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/summary.man.in@1.130 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/summary.mdoc.in@1.130 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/update-leap/invoke-update-leap.texi@1.31 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/update-leap/update-leap-opts@1.32 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/update-leap/update-leap.1update-leapman@1.31 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/update-leap/update-leap.1update-leapmdoc@1.31 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/update-leap/update-leap.man.in@1.31 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ scripts/update-leap/update-leap.mdoc.in@1.31 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/include/autogen-version.def@1.23 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/include/copyright.def@1.28.1.1 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/COPYING.gplv3@1.9 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/COPYING.lgplv3@1.9 +3 -3
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/COPYING.mbsd@1.4 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/Makefile.am@1.29 +18 -21
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/README@1.11 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/ag-char-map.h@1.32 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/alias.c@1.9 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/ao-strs.c@1.18 +143 -138
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/ao-strs.h@1.17 +152 -144
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/autoopts.c@1.21 +8 -14
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/autoopts.h@1.22 +11 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/autoopts/options.h@1.33 +9 -7
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/autoopts/project.h@1.9 +5 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/autoopts/usage-txt.h@1.30 +249 -255
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/boolean.c@1.16 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/check.c@1.9 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/compat/compat.h@1.17 +4 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/compat/pathfind.c@1.14 +1 -12
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/compat/windows-config.h@1.15 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/configfile.c@1.25 +61 -105
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/cook.c@1.16 +24 -29
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/enum.c@1.15 +10 -34
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/env.c@1.10 +3 -9
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/file.c@1.17 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/find.c@1.14 +24 -39
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/genshell.c@1.32 +114 -113
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/genshell.h@1.33 +18 -3
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/gettext.h@1.5 +13 -7
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/init.c@1.10 +7 -11
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/intprops.h@1.3 +200 -67
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/libopts.c@1.10 +4 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/load.c@1.23 +29 -39
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/m4/libopts.m4@1.36 +10 -16
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/m4/liboptschk.m4@1.14 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/m4/stdnoreturn.m4@1.3 +38 -28
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/makeshell.c@1.22 +16 -54
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/nested.c@1.18 +24 -57
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/numeric.c@1.16 +9 -8
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/option-value-type.c@1.19 +5 -5
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/option-xat-attribute.c@1.19 +5 -5
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/parse-duration.c@1.16 +4 -10
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/parse-duration.h@1.11 +3 -3
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/pgusage.c@1.19 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/proto.h@1.32 +491 -17
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/putshell.c@1.16 +13 -29
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/reset.c@1.19 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/restore.c@1.15 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/save.c@1.20 +319 -212
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/sort.c@1.15 +2 -16
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/stack.c@1.17 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/stdnoreturn.in.h@1.3 +21 -11
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/streqvcmp.c@1.17 +2 -2
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/text_mmap.c@1.18 +9 -6
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/time.c@1.16 +5 -3
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/tokenize.c@1.15 +2 -19
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/usage.c@1.22 +16 -67
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/libopts/version.c@1.20 +7 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ util/ntp-keygen-opts.c@1.543 +115 -115
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ util/ntp-keygen-opts.h@1.541 +13 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ChangeSet@1.3940.3.2, 2023-03-04 23:57:28-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ configure.ac@1.622.1.1 +1 -1
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ChangeSet@1.3940.3.1, 2023-03-04 23:56:19-06:00, stenn@ntp-devbuild.chi1.ntfo.org
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ ChangeLog@1.2009.3.1 +4 -0
+ auto* and libopts upgrade
+
+ ntpd/Makefile.am@1.141.1.1 +1 -0
+
+ sntp/libopts/_Noreturn.h@1.2 +0 -0
+ Rename: sntp/libopts/compat/_Noreturn.h -> sntp/libopts/_Noreturn.h
+
+ sntp/sntp-opts.c@1.541 +115 -115
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ sntp/sntp-opts.h@1.539 +13 -4
+ Updated to autogen-5.16.18 and libopts-42.1.17
+
+ChangeSet@1.3954, 2023-02-27 03:04:43-05:00, davehart@tl.davehart.net
+ [Bug 3781] log "Unable to listen for broadcasts" for IPv4
+
+ ChangeLog@1.2018 +1 -0
+ [Bug 3781] log "Unable to listen for broadcasts" for IPv4
+
+ ntpd/ntp_io.c@1.432.1.2 +6 -8
+ Log "Unable to listen for broadcasts" on dual-stack systems with at least one IPv4 interface in use by ntpd.
+
+ChangeSet@1.3953, 2023-02-23 04:55:50-05:00, davehart@tl.davehart.net
+ Bugs 3774 and 3793
+ [Bug 3595] pollskewlist documentation uses | when it shouldn't.
+ [Bug 3797] Windows getaddrinfo w/AI_ADDRCONFIG fails for localhost when disconnected
+ [Bug 3774] mode 6 packets corrupted in rawstats file
+ [Bug 3793] Wrong variable type passed to record_raw_stats().
+ Remove inappropriate copyright notice in Windows messages.mc and messages.h
+
+ ChangeLog@1.2017 +8 -1
+ Bugs 3774, 3793, 3595, 3597
+
+ html/copyright.html@1.71 +2 -2
+ Update copyright year.
+
+ html/miscopt.html@1.94 +3 -6
+ [Bug 3595] pollskewlist documentation uses | when it shouldn't.
+
+ include/vint64ops.h@1.2 +1 -1
+ Remove unneccessary noconst union hack.
+
+ libntp/socktoa.c@1.19 +1 -1
+ Correct comment to match code for sock_hash()
+
+ libntp/vint64ops.c@1.2 +4 -23
+ Remove unneccessary noconst union hack.
+
+ ntpd/ntp.conf.def@1.36 +6 -4
+ [Bug 3595] pollskewlist documentation uses | when it shouldn't.
+
+ ntpd/ntp_io.c@1.432.1.1 +3 -2
+ [Bug 3793] Wrong variable type passed to record_raw_stats(). <hart@ntp.org>
+ - Report and patch by Yuezhen LUAN <wei6410@sina.com>.
+ Cast time_t to use with with format %ld.
+
+ ntpd/ntp_util.c@1.123 +7 -0
+ [Bug 3774] mode 6 packets corrupted in rawstats file <hart@ntp.org>
+ - Reported by Edward McGuire, fix identified by <wei6410@sina.com>.
+
+ ntpdc/ntpdc.c@1.115 +21 -2
+ [Bug 3797] Windows getaddrinfo w/AI_ADDRCONFIG fails for localhost when disconnected
+
+ ntpq/ntpq-subs.c@1.134 +24 -21
+ Remove unnecessary work for *peers when querying a single host, avoiding
+ a spurious message before the succhessful output on disconnected Windows:
+ ***Can't find host localhost
+
+ ntpq/ntpq.c@1.196 +25 -6
+ [Bug 3797] Windows getaddrinfo w/AI_ADDRCONFIG fails for localhost when disconnected
+
+ ports/winnt/libntp/messages.h@1.4 +8 -133
+ Remove inapplicable Microsoft boilerplate copyright from developer support sample code.
+
+ ports/winnt/libntp/messages.mc@1.4 +5 -133
+ Remove inapplicable Microsoft boilerplate copyright from developer support sample code.
+
+ sntp/include/copyright.def@1.29 +1 -1
+ Update copyright year.
+
+ tests/libntp/decodenetnum.c@1.14 +40 -40
+ Quiet warnings suggesting braces on FreeBSD where in6_addr has a union.
+
+ tests/libntp/socktoa.c@1.14 +14 -14
+ Quiet warnings suggesting braces on FreeBSD where in6_addr has a union.
+
+ChangeSet@1.3952, 2023-02-22 01:00:47-05:00, davehart@tl.davehart.net
+ Fix missing format specifier to msyslog in Windows port.
+ Comment clarification in ntp_proto.c
+
+ ntpd/ntp_proto.c@1.438.1.3 +1 -1
+ Comment clarification
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.85 +1 -1
+ Fix missing format specifier to msyslog in Windows port.
+
+ChangeSet@1.3951, 2023-02-20 14:12:24-05:00, davehart@tl.davehart.net
+ Finish the change for [Bug 3786]
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.84 +2 -2
+ Finish the change for [Bug 3786]
+
+ChangeSet@1.3912.21.1, 2023-02-20 13:53:27-05:00, davehart@tl.davehart.net
+ [Bug 3640] document "discard monitor" and fix the code. <hart@ntp.org>
+ - fixed bug identified by Edward McGuire <perlinger@ntp.org>
+
+ ChangeLog@1.1986.21.1 +3 -0
+ [Bug 3640] document "discard monitor" and fix the code. <hart@ntp.org>
+ - fixed bug identified by Edward McGuire <perlinger@ntp.org>
+
+ ntpd/ntp.conf.def@1.35 +16 -6
+ Documentation by Dave Hart
+
+ ntpd/ntp_monitor.c@1.44.1.1 +5 -3
+ Bugfix identified by Edward McGuire
+
+ChangeSet@1.3949, 2023-02-20 13:00:45-05:00, davehart@tl.davehart.net
+ minor cleanup, correct winsock error number range
+
+ libntp/lib/isc/win32/strerror.c@1.16 +1 -1
+ Correct range check for winsock error numbers
+
+ ports/winnt/ntpd/nt_ppsimpl.c@1.4 +29 -45
+ Use emalloc(), estrdup() and remove unneeded checks for NULL return.
+ Remove unneeded op[-1] \0 check.
+
+ChangeSet@1.3948, 2023-02-20 12:11:06-05:00, davehart@tl.davehart.net
+ [Bug 3660] Revert 4.2.8p15 change to manycast.
+
+ ChangeLog@1.2015 +1 -1
+ [Bug 3660] Revert 4.2.8p15 change to manycast.
+
+ ntpd/ntp_proto.c@1.438.1.2 +1 -1
+ [Bug 3660] Revert 4.2.8p15 change to manycast.
+ This was due to a misundersstanding of orphan mode, documentation could be better.
+
+ChangeSet@1.3947, 2023-02-20 12:05:44-05:00, davehart@tl.davehart.net
+ [Bug 3786] Timer starvation on high-load Windows ntpd.
+
+ ChangeLog@1.2014 +2 -1
+ [Bug 3786] Timer starvation on high-load Windows ntpd.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.83 +5 -5
+ [Bug 3786] Timer starvation on high-load Windows ntpd.
+
+ChangeSet@1.3946, 2023-02-20 12:03:02-05:00, davehart@tl.davehart.net
+ [Bug 2410] syslog an error message on panic exceeded.
+ Update email address.
+
+ ChangeLog@1.2013 +1 -0
+ [Bug 2410] syslog an error message on panic exceeded.
+
+ html/copyright.html@1.70 +1 -1
+ Update my email address.
+
+ ntpd/ntp_proto.c@1.438.1.1 +4 -0
+ [Bug 2410] syslog an error message on panic exceeded.
+
+ChangeSet@1.3944, 2023-01-26 03:09:16-05:00, davehart@tl.davehart.net
+ Enable Automake's subdir-objects option quieting warnings and
+ building .o files in corresponding build subdirs to the source
+ subdirs. [Bug 2525]
+ Centralize more logic to build prereq. libraries in included .mf files.
+ Fix building without OpenSSL where arc4random() is available.
+ Fix building without refclock support.
+ Fix make maintainer-clean and thereby distcheck re deps-ver files.
+
+ ChangeLog@1.2011 +5 -5
+ Add [Bug 2525] and fix a few previous typos.
+
+ Makefile.am@1.137 +0 -1
+ Move lib/isc/ under libntp/ and be more selective about which files are distributed.
+
+ adjtimed/Makefile.am@1.17 +2 -1
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Use top-level check-libntp.mf
+
+ check-libntp.mf@1.1 +14 -0
+ Split check-libntp.mf into main and sntp versions and remove duplicated logic in many Makefile.am files.
+
+ check-libntp.mf@1.0 +0 -0
+
+ check-libntpd.mf@1.1 +19 -0
+ Centralize makefile fragment to ensure libntpd.a is built.
+
+ check-libntpd.mf@1.0 +0 -0
+
+ check-libunity.mf@1.1 +13 -0
+ Centralize makefile logic to build libunity.a before dependents.
+
+ check-libunity.mf@1.0 +0 -0
+
+ clockstuff/Makefile.am@1.23 +2 -1
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Use top-level check-libntp.mf
+
+ configure.ac@1.623 +2 -6
+ Turn on Automake subdir-objects option to build subdir *.o files in corresponding
+ build subdirs instead of all in the Makefile directory.
+ Remove conditionalization of AM_PROG_AR needed for pre-1.12 automake.
+
+ deps-ver@1.7 +1 -1
+ Bump deps-ver to clean .deps directories as files have moved.
+
+ depsver.mf@1.5 +3 -2
+ Add deps-ver to DISTCLEANFILES to fix make distcheck.
+ Do not give group write permission when making deps-ver writable.
+
+ includes.mf@1.2 +3 -3
+ Account for new path to lib/isc/
+
+ libntp/Makefile.am@1.86 +158 -36
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Move lib/isc/ under libntp/ and be more selective about which files are distributed.
+ Build libevent if needed before libntp.
+
+ libntp/lib/isc/Atffile@1.3 +0 -0
+ Rename: libntp/lib/isc/Atffile -> libntp/lib/isc/Atffile
+
+ libntp/lib/isc/Atffile@1.2 +0 -0
+ Rename: lib/isc/Atffile -> libntp/lib/isc/Atffile
+
+ libntp/lib/isc/alpha/include/isc/atomic.h@1.4 +0 -0
+ Rename: libntp/lib/isc/alpha/include/isc/atomic.h -> libntp/lib/isc/alpha/include/isc/atomic.h
+
+ libntp/lib/isc/alpha/include/isc/atomic.h@1.3 +0 -0
+ Rename: lib/isc/alpha/include/isc/atomic.h -> libntp/lib/isc/alpha/include/isc/atomic.h
+
+ libntp/lib/isc/api@1.4 +0 -0
+ Rename: libntp/lib/isc/api -> libntp/lib/isc/api
+
+ libntp/lib/isc/api@1.3 +0 -0
+ Rename: lib/isc/api -> libntp/lib/isc/api
+
+ libntp/lib/isc/app_api.c@1.3 +0 -0
+ Rename: libntp/lib/isc/app_api.c -> libntp/lib/isc/app_api.c
+
+ libntp/lib/isc/app_api.c@1.2 +0 -0
+ Rename: lib/isc/app_api.c -> libntp/lib/isc/app_api.c
+
+ libntp/lib/isc/assertions.c@1.9 +0 -0
+ Rename: libntp/lib/isc/assertions.c -> libntp/lib/isc/assertions.c
+
+ libntp/lib/isc/assertions.c@1.8 +0 -0
+ Rename: lib/isc/assertions.c -> libntp/lib/isc/assertions.c
+
+ libntp/lib/isc/backtrace-emptytbl.c@1.3 +0 -0
+ Rename: libntp/lib/isc/backtrace-emptytbl.c -> libntp/lib/isc/backtrace-emptytbl.c
+
+ libntp/lib/isc/backtrace-emptytbl.c@1.2 +0 -0
+ Rename: lib/isc/backtrace-emptytbl.c -> libntp/lib/isc/backtrace-emptytbl.c
+
+ libntp/lib/isc/backtrace.c@1.5 +0 -0
+ Rename: libntp/lib/isc/backtrace.c -> libntp/lib/isc/backtrace.c
+
+ libntp/lib/isc/backtrace.c@1.4 +0 -0
+ Rename: lib/isc/backtrace.c -> libntp/lib/isc/backtrace.c
+
+ libntp/lib/isc/base32.c@1.4 +0 -0
+ Rename: libntp/lib/isc/base32.c -> libntp/lib/isc/base32.c
+
+ libntp/lib/isc/base32.c@1.3 +0 -0
+ Rename: lib/isc/base32.c -> libntp/lib/isc/base32.c
+
+ libntp/lib/isc/base64.c@1.4 +0 -0
+ Rename: libntp/lib/isc/base64.c -> libntp/lib/isc/base64.c
+
+ libntp/lib/isc/base64.c@1.3 +0 -0
+ Rename: lib/isc/base64.c -> libntp/lib/isc/base64.c
+
+ libntp/lib/isc/bitstring.c@1.3 +0 -0
+ Rename: libntp/lib/isc/bitstring.c -> libntp/lib/isc/bitstring.c
+
+ libntp/lib/isc/bitstring.c@1.2 +0 -0
+ Rename: lib/isc/bitstring.c -> libntp/lib/isc/bitstring.c
+
+ libntp/lib/isc/buffer.c@1.4 +0 -0
+ Rename: libntp/lib/isc/buffer.c -> libntp/lib/isc/buffer.c
+
+ libntp/lib/isc/buffer.c@1.3 +0 -0
+ Rename: lib/isc/buffer.c -> libntp/lib/isc/buffer.c
+
+ libntp/lib/isc/bufferlist.c@1.3 +0 -0
+ Rename: libntp/lib/isc/bufferlist.c -> libntp/lib/isc/bufferlist.c
+
+ libntp/lib/isc/bufferlist.c@1.2 +0 -0
+ Rename: lib/isc/bufferlist.c -> libntp/lib/isc/bufferlist.c
+
+ libntp/lib/isc/commandline.c@1.3 +0 -0
+ Rename: libntp/lib/isc/commandline.c -> libntp/lib/isc/commandline.c
+
+ libntp/lib/isc/commandline.c@1.2 +0 -0
+ Rename: lib/isc/commandline.c -> libntp/lib/isc/commandline.c
+
+ libntp/lib/isc/entropy.c@1.4 +0 -0
+ Rename: libntp/lib/isc/entropy.c -> libntp/lib/isc/entropy.c
+
+ libntp/lib/isc/entropy.c@1.3 +0 -0
+ Rename: lib/isc/entropy.c -> libntp/lib/isc/entropy.c
+
+ libntp/lib/isc/error.c@1.6 +0 -0
+ Rename: libntp/lib/isc/error.c -> libntp/lib/isc/error.c
+
+ libntp/lib/isc/error.c@1.5 +0 -0
+ Rename: lib/isc/error.c -> libntp/lib/isc/error.c
+
+ libntp/lib/isc/event.c@1.4 +0 -0
+ Rename: libntp/lib/isc/event.c -> libntp/lib/isc/event.c
+
+ libntp/lib/isc/event.c@1.3 +0 -0
+ Rename: lib/isc/event.c -> libntp/lib/isc/event.c
+
+ libntp/lib/isc/fsaccess.c@1.3 +0 -0
+ Rename: libntp/lib/isc/fsaccess.c -> libntp/lib/isc/fsaccess.c
+
+ libntp/lib/isc/fsaccess.c@1.2 +0 -0
+ Rename: lib/isc/fsaccess.c -> libntp/lib/isc/fsaccess.c
+
+ libntp/lib/isc/hash.c@1.4 +0 -0
+ Rename: libntp/lib/isc/hash.c -> libntp/lib/isc/hash.c
+
+ libntp/lib/isc/hash.c@1.3 +0 -0
+ Rename: lib/isc/hash.c -> libntp/lib/isc/hash.c
+
+ libntp/lib/isc/heap.c@1.4 +0 -0
+ Rename: libntp/lib/isc/heap.c -> libntp/lib/isc/heap.c
+
+ libntp/lib/isc/heap.c@1.3 +0 -0
+ Rename: lib/isc/heap.c -> libntp/lib/isc/heap.c
+
+ libntp/lib/isc/hex.c@1.3 +0 -0
+ Rename: libntp/lib/isc/hex.c -> libntp/lib/isc/hex.c
+
+ libntp/lib/isc/hex.c@1.2 +0 -0
+ Rename: lib/isc/hex.c -> libntp/lib/isc/hex.c
+
+ libntp/lib/isc/hmacmd5.c@1.5 +0 -0
+ Rename: libntp/lib/isc/hmacmd5.c -> libntp/lib/isc/hmacmd5.c
+
+ libntp/lib/isc/hmacmd5.c@1.4 +0 -0
+ Rename: lib/isc/hmacmd5.c -> libntp/lib/isc/hmacmd5.c
+
+ libntp/lib/isc/hmacsha.c@1.5 +0 -0
+ Rename: libntp/lib/isc/hmacsha.c -> libntp/lib/isc/hmacsha.c
+
+ libntp/lib/isc/hmacsha.c@1.4 +0 -0
+ Rename: lib/isc/hmacsha.c -> libntp/lib/isc/hmacsha.c
+
+ libntp/lib/isc/httpd.c@1.4 +0 -0
+ Rename: libntp/lib/isc/httpd.c -> libntp/lib/isc/httpd.c
+
+ libntp/lib/isc/httpd.c@1.3 +0 -0
+ Rename: lib/isc/httpd.c -> libntp/lib/isc/httpd.c
+
+ libntp/lib/isc/ia64/include/isc/atomic.h@1.4 +0 -0
+ Rename: libntp/lib/isc/ia64/include/isc/atomic.h -> libntp/lib/isc/ia64/include/isc/atomic.h
+
+ libntp/lib/isc/ia64/include/isc/atomic.h@1.3 +0 -0
+ Rename: lib/isc/ia64/include/isc/atomic.h -> libntp/lib/isc/ia64/include/isc/atomic.h
+
+ libntp/lib/isc/include/isc/app.h@1.7 +0 -0
+ Rename: libntp/lib/isc/include/isc/app.h -> libntp/lib/isc/include/isc/app.h
+
+ libntp/lib/isc/include/isc/app.h@1.6 +0 -0
+ Rename: lib/isc/include/isc/app.h -> libntp/lib/isc/include/isc/app.h
+
+ libntp/lib/isc/include/isc/assertions.h@1.9 +0 -0
+ Rename: libntp/lib/isc/include/isc/assertions.h -> libntp/lib/isc/include/isc/assertions.h
+
+ libntp/lib/isc/include/isc/assertions.h@1.8 +0 -0
+ Rename: lib/isc/include/isc/assertions.h -> libntp/lib/isc/include/isc/assertions.h
+
+ libntp/lib/isc/include/isc/backtrace.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/backtrace.h -> libntp/lib/isc/include/isc/backtrace.h
+
+ libntp/lib/isc/include/isc/backtrace.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/backtrace.h -> libntp/lib/isc/include/isc/backtrace.h
+
+ libntp/lib/isc/include/isc/base32.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/base32.h -> libntp/lib/isc/include/isc/base32.h
+
+ libntp/lib/isc/include/isc/base32.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/base32.h -> libntp/lib/isc/include/isc/base32.h
+
+ libntp/lib/isc/include/isc/base64.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/base64.h -> libntp/lib/isc/include/isc/base64.h
+
+ libntp/lib/isc/include/isc/base64.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/base64.h -> libntp/lib/isc/include/isc/base64.h
+
+ libntp/lib/isc/include/isc/bind9.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/bind9.h -> libntp/lib/isc/include/isc/bind9.h
+
+ libntp/lib/isc/include/isc/bind9.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/bind9.h -> libntp/lib/isc/include/isc/bind9.h
+
+ libntp/lib/isc/include/isc/bitstring.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/bitstring.h -> libntp/lib/isc/include/isc/bitstring.h
+
+ libntp/lib/isc/include/isc/bitstring.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/bitstring.h -> libntp/lib/isc/include/isc/bitstring.h
+
+ libntp/lib/isc/include/isc/boolean.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/boolean.h -> libntp/lib/isc/include/isc/boolean.h
+
+ libntp/lib/isc/include/isc/boolean.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/boolean.h -> libntp/lib/isc/include/isc/boolean.h
+
+ libntp/lib/isc/include/isc/buffer.h@1.7 +0 -0
+ Rename: libntp/lib/isc/include/isc/buffer.h -> libntp/lib/isc/include/isc/buffer.h
+
+ libntp/lib/isc/include/isc/buffer.h@1.6 +0 -0
+ Rename: lib/isc/include/isc/buffer.h -> libntp/lib/isc/include/isc/buffer.h
+
+ libntp/lib/isc/include/isc/bufferlist.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/bufferlist.h -> libntp/lib/isc/include/isc/bufferlist.h
+
+ libntp/lib/isc/include/isc/bufferlist.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/bufferlist.h -> libntp/lib/isc/include/isc/bufferlist.h
+
+ libntp/lib/isc/include/isc/commandline.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/commandline.h -> libntp/lib/isc/include/isc/commandline.h
+
+ libntp/lib/isc/include/isc/commandline.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/commandline.h -> libntp/lib/isc/include/isc/commandline.h
+
+ libntp/lib/isc/include/isc/entropy.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/entropy.h -> libntp/lib/isc/include/isc/entropy.h
+
+ libntp/lib/isc/include/isc/entropy.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/entropy.h -> libntp/lib/isc/include/isc/entropy.h
+
+ libntp/lib/isc/include/isc/error.h@1.7 +0 -0
+ Rename: libntp/lib/isc/include/isc/error.h -> libntp/lib/isc/include/isc/error.h
+
+ libntp/lib/isc/include/isc/error.h@1.6 +0 -0
+ Rename: lib/isc/include/isc/error.h -> libntp/lib/isc/include/isc/error.h
+
+ libntp/lib/isc/include/isc/event.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/event.h -> libntp/lib/isc/include/isc/event.h
+
+ libntp/lib/isc/include/isc/event.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/event.h -> libntp/lib/isc/include/isc/event.h
+
+ libntp/lib/isc/include/isc/eventclass.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/eventclass.h -> libntp/lib/isc/include/isc/eventclass.h
+
+ libntp/lib/isc/include/isc/eventclass.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/eventclass.h -> libntp/lib/isc/include/isc/eventclass.h
+
+ libntp/lib/isc/include/isc/file.h@1.8 +0 -0
+ Rename: libntp/lib/isc/include/isc/file.h -> libntp/lib/isc/include/isc/file.h
+
+ libntp/lib/isc/include/isc/file.h@1.7 +0 -0
+ Rename: lib/isc/include/isc/file.h -> libntp/lib/isc/include/isc/file.h
+
+ libntp/lib/isc/include/isc/formatcheck.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/formatcheck.h -> libntp/lib/isc/include/isc/formatcheck.h
+
+ libntp/lib/isc/include/isc/formatcheck.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/formatcheck.h -> libntp/lib/isc/include/isc/formatcheck.h
+
+ libntp/lib/isc/include/isc/fsaccess.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/fsaccess.h -> libntp/lib/isc/include/isc/fsaccess.h
+
+ libntp/lib/isc/include/isc/fsaccess.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/fsaccess.h -> libntp/lib/isc/include/isc/fsaccess.h
+
+ libntp/lib/isc/include/isc/hash.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/hash.h -> libntp/lib/isc/include/isc/hash.h
+
+ libntp/lib/isc/include/isc/hash.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/hash.h -> libntp/lib/isc/include/isc/hash.h
+
+ libntp/lib/isc/include/isc/heap.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/heap.h -> libntp/lib/isc/include/isc/heap.h
+
+ libntp/lib/isc/include/isc/heap.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/heap.h -> libntp/lib/isc/include/isc/heap.h
+
+ libntp/lib/isc/include/isc/hex.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/hex.h -> libntp/lib/isc/include/isc/hex.h
+
+ libntp/lib/isc/include/isc/hex.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/hex.h -> libntp/lib/isc/include/isc/hex.h
+
+ libntp/lib/isc/include/isc/hmacmd5.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/hmacmd5.h -> libntp/lib/isc/include/isc/hmacmd5.h
+
+ libntp/lib/isc/include/isc/hmacmd5.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/hmacmd5.h -> libntp/lib/isc/include/isc/hmacmd5.h
+
+ libntp/lib/isc/include/isc/hmacsha.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/hmacsha.h -> libntp/lib/isc/include/isc/hmacsha.h
+
+ libntp/lib/isc/include/isc/hmacsha.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/hmacsha.h -> libntp/lib/isc/include/isc/hmacsha.h
+
+ libntp/lib/isc/include/isc/httpd.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/httpd.h -> libntp/lib/isc/include/isc/httpd.h
+
+ libntp/lib/isc/include/isc/httpd.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/httpd.h -> libntp/lib/isc/include/isc/httpd.h
+
+ libntp/lib/isc/include/isc/interfaceiter.h@1.10 +0 -0
+ Rename: libntp/lib/isc/include/isc/interfaceiter.h -> libntp/lib/isc/include/isc/interfaceiter.h
+
+ libntp/lib/isc/include/isc/interfaceiter.h@1.9 +0 -0
+ Rename: lib/isc/include/isc/interfaceiter.h -> libntp/lib/isc/include/isc/interfaceiter.h
+
+ libntp/lib/isc/include/isc/ipv6.h@1.11 +0 -0
+ Rename: libntp/lib/isc/include/isc/ipv6.h -> libntp/lib/isc/include/isc/ipv6.h
+
+ libntp/lib/isc/include/isc/ipv6.h@1.10 +0 -0
+ Rename: lib/isc/include/isc/ipv6.h -> libntp/lib/isc/include/isc/ipv6.h
+
+ libntp/lib/isc/include/isc/iterated_hash.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/iterated_hash.h -> libntp/lib/isc/include/isc/iterated_hash.h
+
+ libntp/lib/isc/include/isc/iterated_hash.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/iterated_hash.h -> libntp/lib/isc/include/isc/iterated_hash.h
+
+ libntp/lib/isc/include/isc/lang.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/lang.h -> libntp/lib/isc/include/isc/lang.h
+
+ libntp/lib/isc/include/isc/lang.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/lang.h -> libntp/lib/isc/include/isc/lang.h
+
+ libntp/lib/isc/include/isc/lex.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/lex.h -> libntp/lib/isc/include/isc/lex.h
+
+ libntp/lib/isc/include/isc/lex.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/lex.h -> libntp/lib/isc/include/isc/lex.h
+
+ libntp/lib/isc/include/isc/lfsr.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/lfsr.h -> libntp/lib/isc/include/isc/lfsr.h
+
+ libntp/lib/isc/include/isc/lfsr.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/lfsr.h -> libntp/lib/isc/include/isc/lfsr.h
+
+ libntp/lib/isc/include/isc/lib.h@1.7 +0 -0
+ Rename: libntp/lib/isc/include/isc/lib.h -> libntp/lib/isc/include/isc/lib.h
+
+ libntp/lib/isc/include/isc/lib.h@1.6 +0 -0
+ Rename: lib/isc/include/isc/lib.h -> libntp/lib/isc/include/isc/lib.h
+
+ libntp/lib/isc/include/isc/list.h@1.7 +0 -0
+ Rename: libntp/lib/isc/include/isc/list.h -> libntp/lib/isc/include/isc/list.h
+
+ libntp/lib/isc/include/isc/list.h@1.6 +0 -0
+ Rename: lib/isc/include/isc/list.h -> libntp/lib/isc/include/isc/list.h
+
+ libntp/lib/isc/include/isc/log.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/log.h -> libntp/lib/isc/include/isc/log.h
+
+ libntp/lib/isc/include/isc/log.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/log.h -> libntp/lib/isc/include/isc/log.h
+
+ libntp/lib/isc/include/isc/magic.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/magic.h -> libntp/lib/isc/include/isc/magic.h
+
+ libntp/lib/isc/include/isc/magic.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/magic.h -> libntp/lib/isc/include/isc/magic.h
+
+ libntp/lib/isc/include/isc/md5.h@1.5 +0 -0
+ Rename: libntp/lib/isc/include/isc/md5.h -> libntp/lib/isc/include/isc/md5.h
+
+ libntp/lib/isc/include/isc/md5.h@1.4 +0 -0
+ Rename: lib/isc/include/isc/md5.h -> libntp/lib/isc/include/isc/md5.h
+
+ libntp/lib/isc/include/isc/mem.h@1.8 +0 -0
+ Rename: libntp/lib/isc/include/isc/mem.h -> libntp/lib/isc/include/isc/mem.h
+
+ libntp/lib/isc/include/isc/mem.h@1.7 +0 -0
+ Rename: lib/isc/include/isc/mem.h -> libntp/lib/isc/include/isc/mem.h
+
+ libntp/lib/isc/include/isc/msgcat.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/msgcat.h -> libntp/lib/isc/include/isc/msgcat.h
+
+ libntp/lib/isc/include/isc/msgcat.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/msgcat.h -> libntp/lib/isc/include/isc/msgcat.h
+
+ libntp/lib/isc/include/isc/msgs.h@1.9 +0 -0
+ Rename: libntp/lib/isc/include/isc/msgs.h -> libntp/lib/isc/include/isc/msgs.h
+
+ libntp/lib/isc/include/isc/msgs.h@1.8 +0 -0
+ Rename: lib/isc/include/isc/msgs.h -> libntp/lib/isc/include/isc/msgs.h
+
+ libntp/lib/isc/include/isc/mutexblock.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/mutexblock.h -> libntp/lib/isc/include/isc/mutexblock.h
+
+ libntp/lib/isc/include/isc/mutexblock.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/mutexblock.h -> libntp/lib/isc/include/isc/mutexblock.h
+
+ libntp/lib/isc/include/isc/namespace.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/namespace.h -> libntp/lib/isc/include/isc/namespace.h
+
+ libntp/lib/isc/include/isc/namespace.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/namespace.h -> libntp/lib/isc/include/isc/namespace.h
+
+ libntp/lib/isc/include/isc/netaddr.h@1.9 +0 -0
+ Rename: libntp/lib/isc/include/isc/netaddr.h -> libntp/lib/isc/include/isc/netaddr.h
+
+ libntp/lib/isc/include/isc/netaddr.h@1.8 +0 -0
+ Rename: lib/isc/include/isc/netaddr.h -> libntp/lib/isc/include/isc/netaddr.h
+
+ libntp/lib/isc/include/isc/netscope.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/netscope.h -> libntp/lib/isc/include/isc/netscope.h
+
+ libntp/lib/isc/include/isc/netscope.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/netscope.h -> libntp/lib/isc/include/isc/netscope.h
+
+ libntp/lib/isc/include/isc/ondestroy.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/ondestroy.h -> libntp/lib/isc/include/isc/ondestroy.h
+
+ libntp/lib/isc/include/isc/ondestroy.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/ondestroy.h -> libntp/lib/isc/include/isc/ondestroy.h
+
+ libntp/lib/isc/include/isc/os.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/os.h -> libntp/lib/isc/include/isc/os.h
+
+ libntp/lib/isc/include/isc/os.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/os.h -> libntp/lib/isc/include/isc/os.h
+
+ libntp/lib/isc/include/isc/parseint.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/parseint.h -> libntp/lib/isc/include/isc/parseint.h
+
+ libntp/lib/isc/include/isc/parseint.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/parseint.h -> libntp/lib/isc/include/isc/parseint.h
+
+ libntp/lib/isc/include/isc/platform.h@1.5 +0 -0
+ Rename: libntp/lib/isc/include/isc/platform.h -> libntp/lib/isc/include/isc/platform.h
+
+ libntp/lib/isc/include/isc/platform.h@1.4 +0 -0
+ Rename: lib/isc/include/isc/platform.h -> libntp/lib/isc/include/isc/platform.h
+
+ libntp/lib/isc/include/isc/platform.h.in@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/platform.h.in -> libntp/lib/isc/include/isc/platform.h.in
+
+ libntp/lib/isc/include/isc/platform.h.in@1.3 +0 -0
+ Rename: lib/isc/include/isc/platform.h.in -> libntp/lib/isc/include/isc/platform.h.in
+
+ libntp/lib/isc/include/isc/portset.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/portset.h -> libntp/lib/isc/include/isc/portset.h
+
+ libntp/lib/isc/include/isc/portset.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/portset.h -> libntp/lib/isc/include/isc/portset.h
+
+ libntp/lib/isc/include/isc/print.h@1.6 +0 -0
+ Rename: libntp/lib/isc/include/isc/print.h -> libntp/lib/isc/include/isc/print.h
+
+ libntp/lib/isc/include/isc/print.h@1.5 +0 -0
+ Rename: lib/isc/include/isc/print.h -> libntp/lib/isc/include/isc/print.h
+
+ libntp/lib/isc/include/isc/queue.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/queue.h -> libntp/lib/isc/include/isc/queue.h
+
+ libntp/lib/isc/include/isc/queue.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/queue.h -> libntp/lib/isc/include/isc/queue.h
+
+ libntp/lib/isc/include/isc/quota.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/quota.h -> libntp/lib/isc/include/isc/quota.h
+
+ libntp/lib/isc/include/isc/quota.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/quota.h -> libntp/lib/isc/include/isc/quota.h
+
+ libntp/lib/isc/include/isc/radix.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/radix.h -> libntp/lib/isc/include/isc/radix.h
+
+ libntp/lib/isc/include/isc/radix.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/radix.h -> libntp/lib/isc/include/isc/radix.h
+
+ libntp/lib/isc/include/isc/random.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/random.h -> libntp/lib/isc/include/isc/random.h
+
+ libntp/lib/isc/include/isc/random.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/random.h -> libntp/lib/isc/include/isc/random.h
+
+ libntp/lib/isc/include/isc/ratelimiter.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/ratelimiter.h -> libntp/lib/isc/include/isc/ratelimiter.h
+
+ libntp/lib/isc/include/isc/ratelimiter.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/ratelimiter.h -> libntp/lib/isc/include/isc/ratelimiter.h
+
+ libntp/lib/isc/include/isc/refcount.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/refcount.h -> libntp/lib/isc/include/isc/refcount.h
+
+ libntp/lib/isc/include/isc/refcount.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/refcount.h -> libntp/lib/isc/include/isc/refcount.h
+
+ libntp/lib/isc/include/isc/region.h@1.5 +0 -0
+ Rename: libntp/lib/isc/include/isc/region.h -> libntp/lib/isc/include/isc/region.h
+
+ libntp/lib/isc/include/isc/region.h@1.4 +0 -0
+ Rename: lib/isc/include/isc/region.h -> libntp/lib/isc/include/isc/region.h
+
+ libntp/lib/isc/include/isc/resource.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/resource.h -> libntp/lib/isc/include/isc/resource.h
+
+ libntp/lib/isc/include/isc/resource.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/resource.h -> libntp/lib/isc/include/isc/resource.h
+
+ libntp/lib/isc/include/isc/result.h@1.8 +0 -0
+ Rename: libntp/lib/isc/include/isc/result.h -> libntp/lib/isc/include/isc/result.h
+
+ libntp/lib/isc/include/isc/result.h@1.7 +0 -0
+ Rename: lib/isc/include/isc/result.h -> libntp/lib/isc/include/isc/result.h
+
+ libntp/lib/isc/include/isc/resultclass.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/resultclass.h -> libntp/lib/isc/include/isc/resultclass.h
+
+ libntp/lib/isc/include/isc/resultclass.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/resultclass.h -> libntp/lib/isc/include/isc/resultclass.h
+
+ libntp/lib/isc/include/isc/rwlock.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/rwlock.h -> libntp/lib/isc/include/isc/rwlock.h
+
+ libntp/lib/isc/include/isc/rwlock.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/rwlock.h -> libntp/lib/isc/include/isc/rwlock.h
+
+ libntp/lib/isc/include/isc/serial.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/serial.h -> libntp/lib/isc/include/isc/serial.h
+
+ libntp/lib/isc/include/isc/serial.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/serial.h -> libntp/lib/isc/include/isc/serial.h
+
+ libntp/lib/isc/include/isc/sha1.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/sha1.h -> libntp/lib/isc/include/isc/sha1.h
+
+ libntp/lib/isc/include/isc/sha1.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/sha1.h -> libntp/lib/isc/include/isc/sha1.h
+
+ libntp/lib/isc/include/isc/sha2.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/sha2.h -> libntp/lib/isc/include/isc/sha2.h
+
+ libntp/lib/isc/include/isc/sha2.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/sha2.h -> libntp/lib/isc/include/isc/sha2.h
+
+ libntp/lib/isc/include/isc/sockaddr.h@1.8 +0 -0
+ Rename: libntp/lib/isc/include/isc/sockaddr.h -> libntp/lib/isc/include/isc/sockaddr.h
+
+ libntp/lib/isc/include/isc/sockaddr.h@1.7 +0 -0
+ Rename: lib/isc/include/isc/sockaddr.h -> libntp/lib/isc/include/isc/sockaddr.h
+
+ libntp/lib/isc/include/isc/socket.h@1.5 +0 -0
+ Rename: libntp/lib/isc/include/isc/socket.h -> libntp/lib/isc/include/isc/socket.h
+
+ libntp/lib/isc/include/isc/socket.h@1.4 +0 -0
+ Rename: lib/isc/include/isc/socket.h -> libntp/lib/isc/include/isc/socket.h
+
+ libntp/lib/isc/include/isc/stats.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/stats.h -> libntp/lib/isc/include/isc/stats.h
+
+ libntp/lib/isc/include/isc/stats.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/stats.h -> libntp/lib/isc/include/isc/stats.h
+
+ libntp/lib/isc/include/isc/stdio.h@1.5 +0 -0
+ Rename: libntp/lib/isc/include/isc/stdio.h -> libntp/lib/isc/include/isc/stdio.h
+
+ libntp/lib/isc/include/isc/stdio.h@1.4 +0 -0
+ Rename: lib/isc/include/isc/stdio.h -> libntp/lib/isc/include/isc/stdio.h
+
+ libntp/lib/isc/include/isc/stdlib.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/stdlib.h -> libntp/lib/isc/include/isc/stdlib.h
+
+ libntp/lib/isc/include/isc/stdlib.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/stdlib.h -> libntp/lib/isc/include/isc/stdlib.h
+
+ libntp/lib/isc/include/isc/string.h@1.7 +0 -0
+ Rename: libntp/lib/isc/include/isc/string.h -> libntp/lib/isc/include/isc/string.h
+
+ libntp/lib/isc/include/isc/string.h@1.6 +0 -0
+ Rename: lib/isc/include/isc/string.h -> libntp/lib/isc/include/isc/string.h
+
+ libntp/lib/isc/include/isc/symtab.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/symtab.h -> libntp/lib/isc/include/isc/symtab.h
+
+ libntp/lib/isc/include/isc/symtab.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/symtab.h -> libntp/lib/isc/include/isc/symtab.h
+
+ libntp/lib/isc/include/isc/task.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/task.h -> libntp/lib/isc/include/isc/task.h
+
+ libntp/lib/isc/include/isc/task.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/task.h -> libntp/lib/isc/include/isc/task.h
+
+ libntp/lib/isc/include/isc/taskpool.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/taskpool.h -> libntp/lib/isc/include/isc/taskpool.h
+
+ libntp/lib/isc/include/isc/taskpool.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/taskpool.h -> libntp/lib/isc/include/isc/taskpool.h
+
+ libntp/lib/isc/include/isc/timer.h@1.4 +0 -0
+ Rename: libntp/lib/isc/include/isc/timer.h -> libntp/lib/isc/include/isc/timer.h
+
+ libntp/lib/isc/include/isc/timer.h@1.3 +0 -0
+ Rename: lib/isc/include/isc/timer.h -> libntp/lib/isc/include/isc/timer.h
+
+ libntp/lib/isc/include/isc/types.h@1.7 +0 -0
+ Rename: libntp/lib/isc/include/isc/types.h -> libntp/lib/isc/include/isc/types.h
+
+ libntp/lib/isc/include/isc/types.h@1.6 +0 -0
+ Rename: lib/isc/include/isc/types.h -> libntp/lib/isc/include/isc/types.h
+
+ libntp/lib/isc/include/isc/util.h@1.9 +0 -0
+ Rename: libntp/lib/isc/include/isc/util.h -> libntp/lib/isc/include/isc/util.h
+
+ libntp/lib/isc/include/isc/util.h@1.8 +0 -0
+ Rename: lib/isc/include/isc/util.h -> libntp/lib/isc/include/isc/util.h
+
+ libntp/lib/isc/include/isc/version.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/version.h -> libntp/lib/isc/include/isc/version.h
+
+ libntp/lib/isc/include/isc/version.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/version.h -> libntp/lib/isc/include/isc/version.h
+
+ libntp/lib/isc/include/isc/xml.h@1.3 +0 -0
+ Rename: libntp/lib/isc/include/isc/xml.h -> libntp/lib/isc/include/isc/xml.h
+
+ libntp/lib/isc/include/isc/xml.h@1.2 +0 -0
+ Rename: lib/isc/include/isc/xml.h -> libntp/lib/isc/include/isc/xml.h
+
+ libntp/lib/isc/inet_aton.c@1.8 +0 -0
+ Rename: libntp/lib/isc/inet_aton.c -> libntp/lib/isc/inet_aton.c
+
+ libntp/lib/isc/inet_aton.c@1.7 +0 -0
+ Rename: lib/isc/inet_aton.c -> libntp/lib/isc/inet_aton.c
+
+ libntp/lib/isc/inet_ntop.c@1.16 +0 -0
+ Rename: libntp/lib/isc/inet_ntop.c -> libntp/lib/isc/inet_ntop.c
+
+ libntp/lib/isc/inet_ntop.c@1.15 +0 -0
+ Rename: lib/isc/inet_ntop.c -> libntp/lib/isc/inet_ntop.c
+
+ libntp/lib/isc/inet_pton.c@1.10 +0 -0
+ Rename: libntp/lib/isc/inet_pton.c -> libntp/lib/isc/inet_pton.c
+
+ libntp/lib/isc/inet_pton.c@1.9 +0 -0
+ Rename: lib/isc/inet_pton.c -> libntp/lib/isc/inet_pton.c
+
+ libntp/lib/isc/iterated_hash.c@1.4 +0 -0
+ Rename: libntp/lib/isc/iterated_hash.c -> libntp/lib/isc/iterated_hash.c
+
+ libntp/lib/isc/iterated_hash.c@1.3 +0 -0
+ Rename: lib/isc/iterated_hash.c -> libntp/lib/isc/iterated_hash.c
+
+ libntp/lib/isc/lex.c@1.3 +0 -0
+ Rename: libntp/lib/isc/lex.c -> libntp/lib/isc/lex.c
+
+ libntp/lib/isc/lex.c@1.2 +0 -0
+ Rename: lib/isc/lex.c -> libntp/lib/isc/lex.c
+
+ libntp/lib/isc/lfsr.c@1.3 +0 -0
+ Rename: libntp/lib/isc/lfsr.c -> libntp/lib/isc/lfsr.c
+
+ libntp/lib/isc/lfsr.c@1.2 +0 -0
+ Rename: lib/isc/lfsr.c -> libntp/lib/isc/lfsr.c
+
+ libntp/lib/isc/lib.c@1.7 +0 -0
+ Rename: libntp/lib/isc/lib.c -> libntp/lib/isc/lib.c
+
+ libntp/lib/isc/lib.c@1.6 +0 -0
+ Rename: lib/isc/lib.c -> libntp/lib/isc/lib.c
+
+ libntp/lib/isc/log.c@1.11 +0 -0
+ Rename: libntp/lib/isc/log.c -> libntp/lib/isc/log.c
+
+ libntp/lib/isc/log.c@1.10 +0 -0
+ Rename: lib/isc/log.c -> libntp/lib/isc/log.c
+
+ libntp/lib/isc/md5.c@1.5 +0 -0
+ Rename: libntp/lib/isc/md5.c -> libntp/lib/isc/md5.c
+
+ libntp/lib/isc/md5.c@1.4 +0 -0
+ Rename: lib/isc/md5.c -> libntp/lib/isc/md5.c
+
+ libntp/lib/isc/mem.c@1.8 +0 -0
+ Rename: libntp/lib/isc/mem.c -> libntp/lib/isc/mem.c
+
+ libntp/lib/isc/mem.c@1.7 +0 -0
+ Rename: lib/isc/mem.c -> libntp/lib/isc/mem.c
+
+ libntp/lib/isc/mem_api.c@1.3 +0 -0
+ Rename: libntp/lib/isc/mem_api.c -> libntp/lib/isc/mem_api.c
+
+ libntp/lib/isc/mem_api.c@1.2 +0 -0
+ Rename: lib/isc/mem_api.c -> libntp/lib/isc/mem_api.c
+
+ libntp/lib/isc/mips/include/isc/atomic.h@1.3 +0 -0
+ Rename: libntp/lib/isc/mips/include/isc/atomic.h -> libntp/lib/isc/mips/include/isc/atomic.h
+
+ libntp/lib/isc/mips/include/isc/atomic.h@1.2 +0 -0
+ Rename: lib/isc/mips/include/isc/atomic.h -> libntp/lib/isc/mips/include/isc/atomic.h
+
+ libntp/lib/isc/mutexblock.c@1.4 +0 -0
+ Rename: libntp/lib/isc/mutexblock.c -> libntp/lib/isc/mutexblock.c
+
+ libntp/lib/isc/mutexblock.c@1.3 +0 -0
+ Rename: lib/isc/mutexblock.c -> libntp/lib/isc/mutexblock.c
+
+ libntp/lib/isc/netaddr.c@1.17 +0 -0
+ Rename: libntp/lib/isc/netaddr.c -> libntp/lib/isc/netaddr.c
+
+ libntp/lib/isc/netaddr.c@1.16 +0 -0
+ Rename: lib/isc/netaddr.c -> libntp/lib/isc/netaddr.c
+
+ libntp/lib/isc/netscope.c@1.5 +0 -0
+ Rename: libntp/lib/isc/netscope.c -> libntp/lib/isc/netscope.c
+
+ libntp/lib/isc/netscope.c@1.4 +0 -0
+ Rename: lib/isc/netscope.c -> libntp/lib/isc/netscope.c
+
+ libntp/lib/isc/nls/msgcat.c@1.8 +0 -0
+ Rename: libntp/lib/isc/nls/msgcat.c -> libntp/lib/isc/nls/msgcat.c
+
+ libntp/lib/isc/nls/msgcat.c@1.7 +0 -0
+ Rename: lib/isc/nls/msgcat.c -> libntp/lib/isc/nls/msgcat.c
+
+ libntp/lib/isc/noatomic/include/isc/atomic.h@1.3 +0 -0
+ Rename: libntp/lib/isc/noatomic/include/isc/atomic.h -> libntp/lib/isc/noatomic/include/isc/atomic.h
+
+ libntp/lib/isc/noatomic/include/isc/atomic.h@1.2 +0 -0
+ Rename: lib/isc/noatomic/include/isc/atomic.h -> libntp/lib/isc/noatomic/include/isc/atomic.h
+
+ libntp/lib/isc/nothreads/condition.c@1.3 +0 -0
+ Rename: libntp/lib/isc/nothreads/condition.c -> libntp/lib/isc/nothreads/condition.c
+
+ libntp/lib/isc/nothreads/condition.c@1.2 +0 -0
+ Rename: lib/isc/nothreads/condition.c -> libntp/lib/isc/nothreads/condition.c
+
+ libntp/lib/isc/nothreads/include/isc/condition.h@1.3 +0 -0
+ Rename: libntp/lib/isc/nothreads/include/isc/condition.h -> libntp/lib/isc/nothreads/include/isc/condition.h
+
+ libntp/lib/isc/nothreads/include/isc/condition.h@1.2 +0 -0
+ Rename: lib/isc/nothreads/include/isc/condition.h -> libntp/lib/isc/nothreads/include/isc/condition.h
+
+ libntp/lib/isc/nothreads/include/isc/mutex.h@1.8 +0 -0
+ Rename: libntp/lib/isc/nothreads/include/isc/mutex.h -> libntp/lib/isc/nothreads/include/isc/mutex.h
+
+ libntp/lib/isc/nothreads/include/isc/mutex.h@1.7 +0 -0
+ Rename: lib/isc/nothreads/include/isc/mutex.h -> libntp/lib/isc/nothreads/include/isc/mutex.h
+
+ libntp/lib/isc/nothreads/include/isc/once.h@1.8 +0 -0
+ Rename: libntp/lib/isc/nothreads/include/isc/once.h -> libntp/lib/isc/nothreads/include/isc/once.h
+
+ libntp/lib/isc/nothreads/include/isc/once.h@1.7 +0 -0
+ Rename: lib/isc/nothreads/include/isc/once.h -> libntp/lib/isc/nothreads/include/isc/once.h
+
+ libntp/lib/isc/nothreads/include/isc/thread.h@1.3 +0 -0
+ Rename: libntp/lib/isc/nothreads/include/isc/thread.h -> libntp/lib/isc/nothreads/include/isc/thread.h
+
+ libntp/lib/isc/nothreads/include/isc/thread.h@1.2 +0 -0
+ Rename: lib/isc/nothreads/include/isc/thread.h -> libntp/lib/isc/nothreads/include/isc/thread.h
+
+ libntp/lib/isc/nothreads/mutex.c@1.3 +0 -0
+ Rename: libntp/lib/isc/nothreads/mutex.c -> libntp/lib/isc/nothreads/mutex.c
+
+ libntp/lib/isc/nothreads/mutex.c@1.2 +0 -0
+ Rename: lib/isc/nothreads/mutex.c -> libntp/lib/isc/nothreads/mutex.c
+
+ libntp/lib/isc/nothreads/thread.c@1.3 +0 -0
+ Rename: libntp/lib/isc/nothreads/thread.c -> libntp/lib/isc/nothreads/thread.c
+
+ libntp/lib/isc/nothreads/thread.c@1.2 +0 -0
+ Rename: lib/isc/nothreads/thread.c -> libntp/lib/isc/nothreads/thread.c
+
+ libntp/lib/isc/ondestroy.c@1.3 +0 -0
+ Rename: libntp/lib/isc/ondestroy.c -> libntp/lib/isc/ondestroy.c
+
+ libntp/lib/isc/ondestroy.c@1.2 +0 -0
+ Rename: lib/isc/ondestroy.c -> libntp/lib/isc/ondestroy.c
+
+ libntp/lib/isc/parseint.c@1.3 +0 -0
+ Rename: libntp/lib/isc/parseint.c -> libntp/lib/isc/parseint.c
+
+ libntp/lib/isc/parseint.c@1.2 +0 -0
+ Rename: lib/isc/parseint.c -> libntp/lib/isc/parseint.c
+
+ libntp/lib/isc/portset.c@1.3 +0 -0
+ Rename: libntp/lib/isc/portset.c -> libntp/lib/isc/portset.c
+
+ libntp/lib/isc/portset.c@1.2 +0 -0
+ Rename: lib/isc/portset.c -> libntp/lib/isc/portset.c
+
+ libntp/lib/isc/powerpc/include/isc/atomic.h@1.4 +0 -0
+ Rename: libntp/lib/isc/powerpc/include/isc/atomic.h -> libntp/lib/isc/powerpc/include/isc/atomic.h
+
+ libntp/lib/isc/powerpc/include/isc/atomic.h@1.3 +0 -0
+ Rename: lib/isc/powerpc/include/isc/atomic.h -> libntp/lib/isc/powerpc/include/isc/atomic.h
+
+ libntp/lib/isc/print.c@1.4 +0 -0
+ Rename: libntp/lib/isc/print.c -> libntp/lib/isc/print.c
+
+ libntp/lib/isc/print.c@1.3 +0 -0
+ Rename: lib/isc/print.c -> libntp/lib/isc/print.c
+
+ libntp/lib/isc/pthreads/condition.c@1.3 +0 -0
+ Rename: libntp/lib/isc/pthreads/condition.c -> libntp/lib/isc/pthreads/condition.c
+
+ libntp/lib/isc/pthreads/condition.c@1.2 +0 -0
+ Rename: lib/isc/pthreads/condition.c -> libntp/lib/isc/pthreads/condition.c
+
+ libntp/lib/isc/pthreads/include/isc/condition.h@1.3 +0 -0
+ Rename: libntp/lib/isc/pthreads/include/isc/condition.h -> libntp/lib/isc/pthreads/include/isc/condition.h
+
+ libntp/lib/isc/pthreads/include/isc/condition.h@1.2 +0 -0
+ Rename: lib/isc/pthreads/include/isc/condition.h -> libntp/lib/isc/pthreads/include/isc/condition.h
+
+ libntp/lib/isc/pthreads/include/isc/mutex.h@1.3 +0 -0
+ Rename: libntp/lib/isc/pthreads/include/isc/mutex.h -> libntp/lib/isc/pthreads/include/isc/mutex.h
+
+ libntp/lib/isc/pthreads/include/isc/mutex.h@1.2 +0 -0
+ Rename: lib/isc/pthreads/include/isc/mutex.h -> libntp/lib/isc/pthreads/include/isc/mutex.h
+
+ libntp/lib/isc/pthreads/include/isc/once.h@1.3 +0 -0
+ Rename: libntp/lib/isc/pthreads/include/isc/once.h -> libntp/lib/isc/pthreads/include/isc/once.h
+
+ libntp/lib/isc/pthreads/include/isc/once.h@1.2 +0 -0
+ Rename: lib/isc/pthreads/include/isc/once.h -> libntp/lib/isc/pthreads/include/isc/once.h
+
+ libntp/lib/isc/pthreads/include/isc/thread.h@1.3 +0 -0
+ Rename: libntp/lib/isc/pthreads/include/isc/thread.h -> libntp/lib/isc/pthreads/include/isc/thread.h
+
+ libntp/lib/isc/pthreads/include/isc/thread.h@1.2 +0 -0
+ Rename: lib/isc/pthreads/include/isc/thread.h -> libntp/lib/isc/pthreads/include/isc/thread.h
+
+ libntp/lib/isc/pthreads/mutex.c@1.5 +0 -0
+ Rename: libntp/lib/isc/pthreads/mutex.c -> libntp/lib/isc/pthreads/mutex.c
+
+ libntp/lib/isc/pthreads/mutex.c@1.4 +0 -0
+ Rename: lib/isc/pthreads/mutex.c -> libntp/lib/isc/pthreads/mutex.c
+
+ libntp/lib/isc/pthreads/thread.c@1.3 +0 -0
+ Rename: libntp/lib/isc/pthreads/thread.c -> libntp/lib/isc/pthreads/thread.c
+
+ libntp/lib/isc/pthreads/thread.c@1.2 +0 -0
+ Rename: lib/isc/pthreads/thread.c -> libntp/lib/isc/pthreads/thread.c
+
+ libntp/lib/isc/quota.c@1.3 +0 -0
+ Rename: libntp/lib/isc/quota.c -> libntp/lib/isc/quota.c
+
+ libntp/lib/isc/quota.c@1.2 +0 -0
+ Rename: lib/isc/quota.c -> libntp/lib/isc/quota.c
+
+ libntp/lib/isc/radix.c@1.4 +0 -0
+ Rename: libntp/lib/isc/radix.c -> libntp/lib/isc/radix.c
+
+ libntp/lib/isc/radix.c@1.3 +0 -0
+ Rename: lib/isc/radix.c -> libntp/lib/isc/radix.c
+
+ libntp/lib/isc/random.c@1.4 +0 -0
+ Rename: libntp/lib/isc/random.c -> libntp/lib/isc/random.c
+
+ libntp/lib/isc/random.c@1.3 +0 -0
+ Rename: lib/isc/random.c -> libntp/lib/isc/random.c
+
+ libntp/lib/isc/ratelimiter.c@1.3 +0 -0
+ Rename: libntp/lib/isc/ratelimiter.c -> libntp/lib/isc/ratelimiter.c
+
+ libntp/lib/isc/ratelimiter.c@1.2 +0 -0
+ Rename: lib/isc/ratelimiter.c -> libntp/lib/isc/ratelimiter.c
+
+ libntp/lib/isc/refcount.c@1.3 +0 -0
+ Rename: libntp/lib/isc/refcount.c -> libntp/lib/isc/refcount.c
+
+ libntp/lib/isc/refcount.c@1.2 +0 -0
+ Rename: lib/isc/refcount.c -> libntp/lib/isc/refcount.c
+
+ libntp/lib/isc/region.c@1.3 +0 -0
+ Rename: libntp/lib/isc/region.c -> libntp/lib/isc/region.c
+
+ libntp/lib/isc/region.c@1.2 +0 -0
+ Rename: lib/isc/region.c -> libntp/lib/isc/region.c
+
+ libntp/lib/isc/result.c@1.6 +0 -0
+ Rename: libntp/lib/isc/result.c -> libntp/lib/isc/result.c
+
+ libntp/lib/isc/result.c@1.5 +0 -0
+ Rename: lib/isc/result.c -> libntp/lib/isc/result.c
+
+ libntp/lib/isc/rwlock.c@1.4 +0 -0
+ Rename: libntp/lib/isc/rwlock.c -> libntp/lib/isc/rwlock.c
+
+ libntp/lib/isc/rwlock.c@1.3 +0 -0
+ Rename: lib/isc/rwlock.c -> libntp/lib/isc/rwlock.c
+
+ libntp/lib/isc/serial.c@1.3 +0 -0
+ Rename: libntp/lib/isc/serial.c -> libntp/lib/isc/serial.c
+
+ libntp/lib/isc/serial.c@1.2 +0 -0
+ Rename: lib/isc/serial.c -> libntp/lib/isc/serial.c
+
+ libntp/lib/isc/sha1.c@1.4 +0 -0
+ Rename: libntp/lib/isc/sha1.c -> libntp/lib/isc/sha1.c
+
+ libntp/lib/isc/sha1.c@1.3 +0 -0
+ Rename: lib/isc/sha1.c -> libntp/lib/isc/sha1.c
+
+ libntp/lib/isc/sha2.c@1.4 +0 -0
+ Rename: libntp/lib/isc/sha2.c -> libntp/lib/isc/sha2.c
+
+ libntp/lib/isc/sha2.c@1.3 +0 -0
+ Rename: lib/isc/sha2.c -> libntp/lib/isc/sha2.c
+
+ libntp/lib/isc/sockaddr.c@1.16 +0 -0
+ Rename: libntp/lib/isc/sockaddr.c -> libntp/lib/isc/sockaddr.c
+
+ libntp/lib/isc/sockaddr.c@1.15 +0 -0
+ Rename: lib/isc/sockaddr.c -> libntp/lib/isc/sockaddr.c
+
+ libntp/lib/isc/socket_api.c@1.3 +0 -0
+ Rename: libntp/lib/isc/socket_api.c -> libntp/lib/isc/socket_api.c
+
+ libntp/lib/isc/socket_api.c@1.2 +0 -0
+ Rename: lib/isc/socket_api.c -> libntp/lib/isc/socket_api.c
+
+ libntp/lib/isc/sparc64/include/isc/atomic.h@1.3 +0 -0
+ Rename: libntp/lib/isc/sparc64/include/isc/atomic.h -> libntp/lib/isc/sparc64/include/isc/atomic.h
+
+ libntp/lib/isc/sparc64/include/isc/atomic.h@1.2 +0 -0
+ Rename: lib/isc/sparc64/include/isc/atomic.h -> libntp/lib/isc/sparc64/include/isc/atomic.h
+
+ libntp/lib/isc/stats.c@1.4 +0 -0
+ Rename: libntp/lib/isc/stats.c -> libntp/lib/isc/stats.c
+
+ libntp/lib/isc/stats.c@1.3 +0 -0
+ Rename: lib/isc/stats.c -> libntp/lib/isc/stats.c
+
+ libntp/lib/isc/string.c@1.4 +0 -0
+ Rename: libntp/lib/isc/string.c -> libntp/lib/isc/string.c
+
+ libntp/lib/isc/string.c@1.3 +0 -0
+ Rename: lib/isc/string.c -> libntp/lib/isc/string.c
+
+ libntp/lib/isc/strtoul.c@1.3 +0 -0
+ Rename: libntp/lib/isc/strtoul.c -> libntp/lib/isc/strtoul.c
+
+ libntp/lib/isc/strtoul.c@1.2 +0 -0
+ Rename: lib/isc/strtoul.c -> libntp/lib/isc/strtoul.c
+
+ libntp/lib/isc/symtab.c@1.4 +0 -0
+ Rename: libntp/lib/isc/symtab.c -> libntp/lib/isc/symtab.c
+
+ libntp/lib/isc/symtab.c@1.3 +0 -0
+ Rename: lib/isc/symtab.c -> libntp/lib/isc/symtab.c
+
+ libntp/lib/isc/task.c@1.10 +0 -0
+ Rename: libntp/lib/isc/task.c -> libntp/lib/isc/task.c
+
+ libntp/lib/isc/task.c@1.9 +0 -0
+ Rename: lib/isc/task.c -> libntp/lib/isc/task.c
+
+ libntp/lib/isc/task_api.c@1.3 +0 -0
+ Rename: libntp/lib/isc/task_api.c -> libntp/lib/isc/task_api.c
+
+ libntp/lib/isc/task_api.c@1.2 +0 -0
+ Rename: lib/isc/task_api.c -> libntp/lib/isc/task_api.c
+
+ libntp/lib/isc/task_p.h@1.4 +0 -0
+ Rename: libntp/lib/isc/task_p.h -> libntp/lib/isc/task_p.h
+
+ libntp/lib/isc/task_p.h@1.3 +0 -0
+ Rename: lib/isc/task_p.h -> libntp/lib/isc/task_p.h
+
+ libntp/lib/isc/taskpool.c@1.4 +0 -0
+ Rename: libntp/lib/isc/taskpool.c -> libntp/lib/isc/taskpool.c
+
+ libntp/lib/isc/taskpool.c@1.3 +0 -0
+ Rename: lib/isc/taskpool.c -> libntp/lib/isc/taskpool.c
+
+ libntp/lib/isc/tests/Atffile@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/Atffile -> libntp/lib/isc/tests/Atffile
+
+ libntp/lib/isc/tests/Atffile@1.2 +0 -0
+ Rename: lib/isc/tests/Atffile -> libntp/lib/isc/tests/Atffile
+
+ libntp/lib/isc/tests/hash_test.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/hash_test.c -> libntp/lib/isc/tests/hash_test.c
+
+ libntp/lib/isc/tests/hash_test.c@1.2 +0 -0
+ Rename: lib/isc/tests/hash_test.c -> libntp/lib/isc/tests/hash_test.c
+
+ libntp/lib/isc/tests/isctest.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/isctest.c -> libntp/lib/isc/tests/isctest.c
+
+ libntp/lib/isc/tests/isctest.c@1.2 +0 -0
+ Rename: lib/isc/tests/isctest.c -> libntp/lib/isc/tests/isctest.c
+
+ libntp/lib/isc/tests/isctest.h@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/isctest.h -> libntp/lib/isc/tests/isctest.h
+
+ libntp/lib/isc/tests/isctest.h@1.2 +0 -0
+ Rename: lib/isc/tests/isctest.h -> libntp/lib/isc/tests/isctest.h
+
+ libntp/lib/isc/tests/queue_test.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/queue_test.c -> libntp/lib/isc/tests/queue_test.c
+
+ libntp/lib/isc/tests/queue_test.c@1.2 +0 -0
+ Rename: lib/isc/tests/queue_test.c -> libntp/lib/isc/tests/queue_test.c
+
+ libntp/lib/isc/tests/socket_test.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/socket_test.c -> libntp/lib/isc/tests/socket_test.c
+
+ libntp/lib/isc/tests/socket_test.c@1.2 +0 -0
+ Rename: lib/isc/tests/socket_test.c -> libntp/lib/isc/tests/socket_test.c
+
+ libntp/lib/isc/tests/symtab_test.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/symtab_test.c -> libntp/lib/isc/tests/symtab_test.c
+
+ libntp/lib/isc/tests/symtab_test.c@1.2 +0 -0
+ Rename: lib/isc/tests/symtab_test.c -> libntp/lib/isc/tests/symtab_test.c
+
+ libntp/lib/isc/tests/task_test.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/task_test.c -> libntp/lib/isc/tests/task_test.c
+
+ libntp/lib/isc/tests/task_test.c@1.2 +0 -0
+ Rename: lib/isc/tests/task_test.c -> libntp/lib/isc/tests/task_test.c
+
+ libntp/lib/isc/tests/taskpool_test.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tests/taskpool_test.c -> libntp/lib/isc/tests/taskpool_test.c
+
+ libntp/lib/isc/tests/taskpool_test.c@1.2 +0 -0
+ Rename: lib/isc/tests/taskpool_test.c -> libntp/lib/isc/tests/taskpool_test.c
+
+ libntp/lib/isc/timer.c@1.4 +0 -0
+ Rename: libntp/lib/isc/timer.c -> libntp/lib/isc/timer.c
+
+ libntp/lib/isc/timer.c@1.3 +0 -0
+ Rename: lib/isc/timer.c -> libntp/lib/isc/timer.c
+
+ libntp/lib/isc/timer_api.c@1.3 +0 -0
+ Rename: libntp/lib/isc/timer_api.c -> libntp/lib/isc/timer_api.c
+
+ libntp/lib/isc/timer_api.c@1.2 +0 -0
+ Rename: lib/isc/timer_api.c -> libntp/lib/isc/timer_api.c
+
+ libntp/lib/isc/timer_p.h@1.4 +0 -0
+ Rename: libntp/lib/isc/timer_p.h -> libntp/lib/isc/timer_p.h
+
+ libntp/lib/isc/timer_p.h@1.3 +0 -0
+ Rename: lib/isc/timer_p.h -> libntp/lib/isc/timer_p.h
+
+ libntp/lib/isc/tsmemcmp.c@1.3 +0 -0
+ Rename: libntp/lib/isc/tsmemcmp.c -> libntp/lib/isc/tsmemcmp.c
+
+ libntp/lib/isc/tsmemcmp.c@1.2 +0 -0
+ Rename: lib/isc/tsmemcmp.c -> libntp/lib/isc/tsmemcmp.c
+
+ libntp/lib/isc/unix/app.c@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/app.c -> libntp/lib/isc/unix/app.c
+
+ libntp/lib/isc/unix/app.c@1.3 +0 -0
+ Rename: lib/isc/unix/app.c -> libntp/lib/isc/unix/app.c
+
+ libntp/lib/isc/unix/dir.c@1.6 +0 -0
+ Rename: libntp/lib/isc/unix/dir.c -> libntp/lib/isc/unix/dir.c
+
+ libntp/lib/isc/unix/dir.c@1.5 +0 -0
+ Rename: lib/isc/unix/dir.c -> libntp/lib/isc/unix/dir.c
+
+ libntp/lib/isc/unix/entropy.c@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/entropy.c -> libntp/lib/isc/unix/entropy.c
+
+ libntp/lib/isc/unix/entropy.c@1.3 +0 -0
+ Rename: lib/isc/unix/entropy.c -> libntp/lib/isc/unix/entropy.c
+
+ libntp/lib/isc/unix/errno2result.c@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/errno2result.c -> libntp/lib/isc/unix/errno2result.c
+
+ libntp/lib/isc/unix/errno2result.c@1.3 +0 -0
+ Rename: lib/isc/unix/errno2result.c -> libntp/lib/isc/unix/errno2result.c
+
+ libntp/lib/isc/unix/errno2result.h@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/errno2result.h -> libntp/lib/isc/unix/errno2result.h
+
+ libntp/lib/isc/unix/errno2result.h@1.3 +0 -0
+ Rename: lib/isc/unix/errno2result.h -> libntp/lib/isc/unix/errno2result.h
+
+ libntp/lib/isc/unix/file.c@1.9 +0 -0
+ Rename: libntp/lib/isc/unix/file.c -> libntp/lib/isc/unix/file.c
+
+ libntp/lib/isc/unix/file.c@1.8 +0 -0
+ Rename: lib/isc/unix/file.c -> libntp/lib/isc/unix/file.c
+
+ libntp/lib/isc/unix/fsaccess.c@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/fsaccess.c -> libntp/lib/isc/unix/fsaccess.c
+
+ libntp/lib/isc/unix/fsaccess.c@1.2 +0 -0
+ Rename: lib/isc/unix/fsaccess.c -> libntp/lib/isc/unix/fsaccess.c
+
+ libntp/lib/isc/unix/ifiter_getifaddrs.c@1.18 +0 -0
+ Rename: libntp/lib/isc/unix/ifiter_getifaddrs.c -> libntp/lib/isc/unix/ifiter_getifaddrs.c
+
+ libntp/lib/isc/unix/ifiter_getifaddrs.c@1.17 +0 -0
+ Rename: lib/isc/unix/ifiter_getifaddrs.c -> libntp/lib/isc/unix/ifiter_getifaddrs.c
+
+ libntp/lib/isc/unix/ifiter_ioctl.c@1.36 +0 -0
+ Rename: libntp/lib/isc/unix/ifiter_ioctl.c -> libntp/lib/isc/unix/ifiter_ioctl.c
+
+ libntp/lib/isc/unix/ifiter_ioctl.c@1.35 +0 -0
+ Rename: lib/isc/unix/ifiter_ioctl.c -> libntp/lib/isc/unix/ifiter_ioctl.c
+
+ libntp/lib/isc/unix/ifiter_sysctl.c@1.20 +0 -0
+ Rename: libntp/lib/isc/unix/ifiter_sysctl.c -> libntp/lib/isc/unix/ifiter_sysctl.c
+
+ libntp/lib/isc/unix/ifiter_sysctl.c@1.19 +0 -0
+ Rename: lib/isc/unix/ifiter_sysctl.c -> libntp/lib/isc/unix/ifiter_sysctl.c
+
+ libntp/lib/isc/unix/include/isc/dir.h@1.5 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/dir.h -> libntp/lib/isc/unix/include/isc/dir.h
+
+ libntp/lib/isc/unix/include/isc/dir.h@1.4 +0 -0
+ Rename: lib/isc/unix/include/isc/dir.h -> libntp/lib/isc/unix/include/isc/dir.h
+
+ libntp/lib/isc/unix/include/isc/int.h@1.6 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/int.h -> libntp/lib/isc/unix/include/isc/int.h
+
+ libntp/lib/isc/unix/include/isc/int.h@1.5 +0 -0
+ Rename: lib/isc/unix/include/isc/int.h -> libntp/lib/isc/unix/include/isc/int.h
+
+ libntp/lib/isc/unix/include/isc/keyboard.h@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/keyboard.h -> libntp/lib/isc/unix/include/isc/keyboard.h
+
+ libntp/lib/isc/unix/include/isc/keyboard.h@1.2 +0 -0
+ Rename: lib/isc/unix/include/isc/keyboard.h -> libntp/lib/isc/unix/include/isc/keyboard.h
+
+ libntp/lib/isc/unix/include/isc/net.h@1.14 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/net.h -> libntp/lib/isc/unix/include/isc/net.h
+
+ libntp/lib/isc/unix/include/isc/net.h@1.13 +0 -0
+ Rename: lib/isc/unix/include/isc/net.h -> libntp/lib/isc/unix/include/isc/net.h
+
+ libntp/lib/isc/unix/include/isc/netdb.h@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/netdb.h -> libntp/lib/isc/unix/include/isc/netdb.h
+
+ libntp/lib/isc/unix/include/isc/netdb.h@1.2 +0 -0
+ Rename: lib/isc/unix/include/isc/netdb.h -> libntp/lib/isc/unix/include/isc/netdb.h
+
+ libntp/lib/isc/unix/include/isc/offset.h@1.7 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/offset.h -> libntp/lib/isc/unix/include/isc/offset.h
+
+ libntp/lib/isc/unix/include/isc/offset.h@1.6 +0 -0
+ Rename: lib/isc/unix/include/isc/offset.h -> libntp/lib/isc/unix/include/isc/offset.h
+
+ libntp/lib/isc/unix/include/isc/stat.h@1.5 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/stat.h -> libntp/lib/isc/unix/include/isc/stat.h
+
+ libntp/lib/isc/unix/include/isc/stat.h@1.4 +0 -0
+ Rename: lib/isc/unix/include/isc/stat.h -> libntp/lib/isc/unix/include/isc/stat.h
+
+ libntp/lib/isc/unix/include/isc/stdtime.h@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/stdtime.h -> libntp/lib/isc/unix/include/isc/stdtime.h
+
+ libntp/lib/isc/unix/include/isc/stdtime.h@1.3 +0 -0
+ Rename: lib/isc/unix/include/isc/stdtime.h -> libntp/lib/isc/unix/include/isc/stdtime.h
+
+ libntp/lib/isc/unix/include/isc/strerror.h@1.7 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/strerror.h -> libntp/lib/isc/unix/include/isc/strerror.h
+
+ libntp/lib/isc/unix/include/isc/strerror.h@1.6 +0 -0
+ Rename: lib/isc/unix/include/isc/strerror.h -> libntp/lib/isc/unix/include/isc/strerror.h
+
+ libntp/lib/isc/unix/include/isc/syslog.h@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/syslog.h -> libntp/lib/isc/unix/include/isc/syslog.h
+
+ libntp/lib/isc/unix/include/isc/syslog.h@1.2 +0 -0
+ Rename: lib/isc/unix/include/isc/syslog.h -> libntp/lib/isc/unix/include/isc/syslog.h
+
+ libntp/lib/isc/unix/include/isc/time.h@1.6 +0 -0
+ Rename: libntp/lib/isc/unix/include/isc/time.h -> libntp/lib/isc/unix/include/isc/time.h
+
+ libntp/lib/isc/unix/include/isc/time.h@1.5 +0 -0
+ Rename: lib/isc/unix/include/isc/time.h -> libntp/lib/isc/unix/include/isc/time.h
+
+ libntp/lib/isc/unix/interfaceiter.c@1.27 +0 -0
+ Rename: libntp/lib/isc/unix/interfaceiter.c -> libntp/lib/isc/unix/interfaceiter.c
+
+ libntp/lib/isc/unix/interfaceiter.c@1.26 +0 -0
+ Rename: lib/isc/unix/interfaceiter.c -> libntp/lib/isc/unix/interfaceiter.c
+
+ libntp/lib/isc/unix/ipv6.c@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/ipv6.c -> libntp/lib/isc/unix/ipv6.c
+
+ libntp/lib/isc/unix/ipv6.c@1.2 +0 -0
+ Rename: lib/isc/unix/ipv6.c -> libntp/lib/isc/unix/ipv6.c
+
+ libntp/lib/isc/unix/keyboard.c@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/keyboard.c -> libntp/lib/isc/unix/keyboard.c
+
+ libntp/lib/isc/unix/keyboard.c@1.2 +0 -0
+ Rename: lib/isc/unix/keyboard.c -> libntp/lib/isc/unix/keyboard.c
+
+ libntp/lib/isc/unix/net.c@1.21 +0 -0
+ Rename: libntp/lib/isc/unix/net.c -> libntp/lib/isc/unix/net.c
+
+ libntp/lib/isc/unix/net.c@1.20 +0 -0
+ Rename: lib/isc/unix/net.c -> libntp/lib/isc/unix/net.c
+
+ libntp/lib/isc/unix/os.c@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/os.c -> libntp/lib/isc/unix/os.c
+
+ libntp/lib/isc/unix/os.c@1.2 +0 -0
+ Rename: lib/isc/unix/os.c -> libntp/lib/isc/unix/os.c
+
+ libntp/lib/isc/unix/resource.c@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/resource.c -> libntp/lib/isc/unix/resource.c
+
+ libntp/lib/isc/unix/resource.c@1.3 +0 -0
+ Rename: lib/isc/unix/resource.c -> libntp/lib/isc/unix/resource.c
+
+ libntp/lib/isc/unix/socket.c@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/socket.c -> libntp/lib/isc/unix/socket.c
+
+ libntp/lib/isc/unix/socket.c@1.3 +0 -0
+ Rename: lib/isc/unix/socket.c -> libntp/lib/isc/unix/socket.c
+
+ libntp/lib/isc/unix/socket_p.h@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/socket_p.h -> libntp/lib/isc/unix/socket_p.h
+
+ libntp/lib/isc/unix/socket_p.h@1.3 +0 -0
+ Rename: lib/isc/unix/socket_p.h -> libntp/lib/isc/unix/socket_p.h
+
+ libntp/lib/isc/unix/stdio.c@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/stdio.c -> libntp/lib/isc/unix/stdio.c
+
+ libntp/lib/isc/unix/stdio.c@1.3 +0 -0
+ Rename: lib/isc/unix/stdio.c -> libntp/lib/isc/unix/stdio.c
+
+ libntp/lib/isc/unix/stdtime.c@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/stdtime.c -> libntp/lib/isc/unix/stdtime.c
+
+ libntp/lib/isc/unix/stdtime.c@1.2 +0 -0
+ Rename: lib/isc/unix/stdtime.c -> libntp/lib/isc/unix/stdtime.c
+
+ libntp/lib/isc/unix/strerror.c@1.9 +0 -0
+ Rename: libntp/lib/isc/unix/strerror.c -> libntp/lib/isc/unix/strerror.c
+
+ libntp/lib/isc/unix/strerror.c@1.8 +0 -0
+ Rename: lib/isc/unix/strerror.c -> libntp/lib/isc/unix/strerror.c
+
+ libntp/lib/isc/unix/syslog.c@1.3 +0 -0
+ Rename: libntp/lib/isc/unix/syslog.c -> libntp/lib/isc/unix/syslog.c
+
+ libntp/lib/isc/unix/syslog.c@1.2 +0 -0
+ Rename: lib/isc/unix/syslog.c -> libntp/lib/isc/unix/syslog.c
+
+ libntp/lib/isc/unix/time.c@1.4 +0 -0
+ Rename: libntp/lib/isc/unix/time.c -> libntp/lib/isc/unix/time.c
+
+ libntp/lib/isc/unix/time.c@1.3 +0 -0
+ Rename: lib/isc/unix/time.c -> libntp/lib/isc/unix/time.c
+
+ libntp/lib/isc/version.c@1.3 +0 -0
+ Rename: libntp/lib/isc/version.c -> libntp/lib/isc/version.c
+
+ libntp/lib/isc/version.c@1.2 +0 -0
+ Rename: lib/isc/version.c -> libntp/lib/isc/version.c
+
+ libntp/lib/isc/win32/DLLMain.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/DLLMain.c -> libntp/lib/isc/win32/DLLMain.c
+
+ libntp/lib/isc/win32/DLLMain.c@1.2 +0 -0
+ Rename: lib/isc/win32/DLLMain.c -> libntp/lib/isc/win32/DLLMain.c
+
+ libntp/lib/isc/win32/app.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/app.c -> libntp/lib/isc/win32/app.c
+
+ libntp/lib/isc/win32/app.c@1.3 +0 -0
+ Rename: lib/isc/win32/app.c -> libntp/lib/isc/win32/app.c
+
+ libntp/lib/isc/win32/condition.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/condition.c -> libntp/lib/isc/win32/condition.c
+
+ libntp/lib/isc/win32/condition.c@1.2 +0 -0
+ Rename: lib/isc/win32/condition.c -> libntp/lib/isc/win32/condition.c
+
+ libntp/lib/isc/win32/dir.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/dir.c -> libntp/lib/isc/win32/dir.c
+
+ libntp/lib/isc/win32/dir.c@1.3 +0 -0
+ Rename: lib/isc/win32/dir.c -> libntp/lib/isc/win32/dir.c
+
+ libntp/lib/isc/win32/entropy.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/entropy.c -> libntp/lib/isc/win32/entropy.c
+
+ libntp/lib/isc/win32/entropy.c@1.3 +0 -0
+ Rename: lib/isc/win32/entropy.c -> libntp/lib/isc/win32/entropy.c
+
+ libntp/lib/isc/win32/errno2result.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/errno2result.c -> libntp/lib/isc/win32/errno2result.c
+
+ libntp/lib/isc/win32/errno2result.c@1.2 +0 -0
+ Rename: lib/isc/win32/errno2result.c -> libntp/lib/isc/win32/errno2result.c
+
+ libntp/lib/isc/win32/errno2result.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/errno2result.h -> libntp/lib/isc/win32/errno2result.h
+
+ libntp/lib/isc/win32/errno2result.h@1.2 +0 -0
+ Rename: lib/isc/win32/errno2result.h -> libntp/lib/isc/win32/errno2result.h
+
+ libntp/lib/isc/win32/file.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/file.c -> libntp/lib/isc/win32/file.c
+
+ libntp/lib/isc/win32/file.c@1.3 +0 -0
+ Rename: lib/isc/win32/file.c -> libntp/lib/isc/win32/file.c
+
+ libntp/lib/isc/win32/fsaccess.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/fsaccess.c -> libntp/lib/isc/win32/fsaccess.c
+
+ libntp/lib/isc/win32/fsaccess.c@1.2 +0 -0
+ Rename: lib/isc/win32/fsaccess.c -> libntp/lib/isc/win32/fsaccess.c
+
+ libntp/lib/isc/win32/include/isc/bind_registry.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/bind_registry.h -> libntp/lib/isc/win32/include/isc/bind_registry.h
+
+ libntp/lib/isc/win32/include/isc/bind_registry.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/bind_registry.h -> libntp/lib/isc/win32/include/isc/bind_registry.h
+
+ libntp/lib/isc/win32/include/isc/bindevt.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/bindevt.h -> libntp/lib/isc/win32/include/isc/bindevt.h
+
+ libntp/lib/isc/win32/include/isc/bindevt.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/bindevt.h -> libntp/lib/isc/win32/include/isc/bindevt.h
+
+ libntp/lib/isc/win32/include/isc/condition.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/condition.h -> libntp/lib/isc/win32/include/isc/condition.h
+
+ libntp/lib/isc/win32/include/isc/condition.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/condition.h -> libntp/lib/isc/win32/include/isc/condition.h
+
+ libntp/lib/isc/win32/include/isc/dir.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/dir.h -> libntp/lib/isc/win32/include/isc/dir.h
+
+ libntp/lib/isc/win32/include/isc/dir.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/dir.h -> libntp/lib/isc/win32/include/isc/dir.h
+
+ libntp/lib/isc/win32/include/isc/int.h@1.7 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/int.h -> libntp/lib/isc/win32/include/isc/int.h
+
+ libntp/lib/isc/win32/include/isc/int.h@1.6 +0 -0
+ Rename: lib/isc/win32/include/isc/int.h -> libntp/lib/isc/win32/include/isc/int.h
+
+ libntp/lib/isc/win32/include/isc/ipv6.h@1.13 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/ipv6.h -> libntp/lib/isc/win32/include/isc/ipv6.h
+
+ libntp/lib/isc/win32/include/isc/ipv6.h@1.12 +0 -0
+ Rename: lib/isc/win32/include/isc/ipv6.h -> libntp/lib/isc/win32/include/isc/ipv6.h
+
+ libntp/lib/isc/win32/include/isc/keyboard.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/keyboard.h -> libntp/lib/isc/win32/include/isc/keyboard.h
+
+ libntp/lib/isc/win32/include/isc/keyboard.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/keyboard.h -> libntp/lib/isc/win32/include/isc/keyboard.h
+
+ libntp/lib/isc/win32/include/isc/mutex.h@1.7 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/mutex.h -> libntp/lib/isc/win32/include/isc/mutex.h
+
+ libntp/lib/isc/win32/include/isc/mutex.h@1.6 +0 -0
+ Rename: lib/isc/win32/include/isc/mutex.h -> libntp/lib/isc/win32/include/isc/mutex.h
+
+ libntp/lib/isc/win32/include/isc/net.h@1.13 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/net.h -> libntp/lib/isc/win32/include/isc/net.h
+
+ libntp/lib/isc/win32/include/isc/net.h@1.12 +0 -0
+ Rename: lib/isc/win32/include/isc/net.h -> libntp/lib/isc/win32/include/isc/net.h
+
+ libntp/lib/isc/win32/include/isc/netdb.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/netdb.h -> libntp/lib/isc/win32/include/isc/netdb.h
+
+ libntp/lib/isc/win32/include/isc/netdb.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/netdb.h -> libntp/lib/isc/win32/include/isc/netdb.h
+
+ libntp/lib/isc/win32/include/isc/ntgroups.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/ntgroups.h -> libntp/lib/isc/win32/include/isc/ntgroups.h
+
+ libntp/lib/isc/win32/include/isc/ntgroups.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/ntgroups.h -> libntp/lib/isc/win32/include/isc/ntgroups.h
+
+ libntp/lib/isc/win32/include/isc/ntpaths.h@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/ntpaths.h -> libntp/lib/isc/win32/include/isc/ntpaths.h
+
+ libntp/lib/isc/win32/include/isc/ntpaths.h@1.3 +0 -0
+ Rename: lib/isc/win32/include/isc/ntpaths.h -> libntp/lib/isc/win32/include/isc/ntpaths.h
+
+ libntp/lib/isc/win32/include/isc/offset.h@1.6 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/offset.h -> libntp/lib/isc/win32/include/isc/offset.h
+
+ libntp/lib/isc/win32/include/isc/offset.h@1.5 +0 -0
+ Rename: lib/isc/win32/include/isc/offset.h -> libntp/lib/isc/win32/include/isc/offset.h
+
+ libntp/lib/isc/win32/include/isc/once.h@1.7 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/once.h -> libntp/lib/isc/win32/include/isc/once.h
+
+ libntp/lib/isc/win32/include/isc/once.h@1.6 +0 -0
+ Rename: lib/isc/win32/include/isc/once.h -> libntp/lib/isc/win32/include/isc/once.h
+
+ libntp/lib/isc/win32/include/isc/platform.h@1.11 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/platform.h -> libntp/lib/isc/win32/include/isc/platform.h
+
+ libntp/lib/isc/win32/include/isc/platform.h@1.10 +0 -0
+ Rename: lib/isc/win32/include/isc/platform.h -> libntp/lib/isc/win32/include/isc/platform.h
+
+ libntp/lib/isc/win32/include/isc/stat.h@1.7 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/stat.h -> libntp/lib/isc/win32/include/isc/stat.h
+
+ libntp/lib/isc/win32/include/isc/stat.h@1.6 +0 -0
+ Rename: lib/isc/win32/include/isc/stat.h -> libntp/lib/isc/win32/include/isc/stat.h
+
+ libntp/lib/isc/win32/include/isc/stdtime.h@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/stdtime.h -> libntp/lib/isc/win32/include/isc/stdtime.h
+
+ libntp/lib/isc/win32/include/isc/stdtime.h@1.3 +0 -0
+ Rename: lib/isc/win32/include/isc/stdtime.h -> libntp/lib/isc/win32/include/isc/stdtime.h
+
+ libntp/lib/isc/win32/include/isc/strerror.h@1.6 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/strerror.h -> libntp/lib/isc/win32/include/isc/strerror.h
+
+ libntp/lib/isc/win32/include/isc/strerror.h@1.5 +0 -0
+ Rename: lib/isc/win32/include/isc/strerror.h -> libntp/lib/isc/win32/include/isc/strerror.h
+
+ libntp/lib/isc/win32/include/isc/syslog.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/syslog.h -> libntp/lib/isc/win32/include/isc/syslog.h
+
+ libntp/lib/isc/win32/include/isc/syslog.h@1.2 +0 -0
+ Rename: lib/isc/win32/include/isc/syslog.h -> libntp/lib/isc/win32/include/isc/syslog.h
+
+ libntp/lib/isc/win32/include/isc/thread.h@1.5 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/thread.h -> libntp/lib/isc/win32/include/isc/thread.h
+
+ libntp/lib/isc/win32/include/isc/thread.h@1.4 +0 -0
+ Rename: lib/isc/win32/include/isc/thread.h -> libntp/lib/isc/win32/include/isc/thread.h
+
+ libntp/lib/isc/win32/include/isc/time.h@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/time.h -> libntp/lib/isc/win32/include/isc/time.h
+
+ libntp/lib/isc/win32/include/isc/time.h@1.3 +0 -0
+ Rename: lib/isc/win32/include/isc/time.h -> libntp/lib/isc/win32/include/isc/time.h
+
+ libntp/lib/isc/win32/include/isc/win32os.h@1.7 +0 -0
+ Rename: libntp/lib/isc/win32/include/isc/win32os.h -> libntp/lib/isc/win32/include/isc/win32os.h
+
+ libntp/lib/isc/win32/include/isc/win32os.h@1.6 +0 -0
+ Rename: lib/isc/win32/include/isc/win32os.h -> libntp/lib/isc/win32/include/isc/win32os.h
+
+ libntp/lib/isc/win32/interfaceiter.c@1.25 +0 -0
+ Rename: libntp/lib/isc/win32/interfaceiter.c -> libntp/lib/isc/win32/interfaceiter.c
+
+ libntp/lib/isc/win32/interfaceiter.c@1.24 +0 -0
+ Rename: lib/isc/win32/interfaceiter.c -> libntp/lib/isc/win32/interfaceiter.c
+
+ libntp/lib/isc/win32/ipv6.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/ipv6.c -> libntp/lib/isc/win32/ipv6.c
+
+ libntp/lib/isc/win32/ipv6.c@1.2 +0 -0
+ Rename: lib/isc/win32/ipv6.c -> libntp/lib/isc/win32/ipv6.c
+
+ libntp/lib/isc/win32/keyboard.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/keyboard.c -> libntp/lib/isc/win32/keyboard.c
+
+ libntp/lib/isc/win32/keyboard.c@1.2 +0 -0
+ Rename: lib/isc/win32/keyboard.c -> libntp/lib/isc/win32/keyboard.c
+
+ libntp/lib/isc/win32/libgen.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/libgen.h -> libntp/lib/isc/win32/libgen.h
+
+ libntp/lib/isc/win32/libgen.h@1.2 +0 -0
+ Rename: lib/isc/win32/libgen.h -> libntp/lib/isc/win32/libgen.h
+
+ libntp/lib/isc/win32/libisc.def@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/libisc.def -> libntp/lib/isc/win32/libisc.def
+
+ libntp/lib/isc/win32/libisc.def@1.3 +0 -0
+ Rename: lib/isc/win32/libisc.def -> libntp/lib/isc/win32/libisc.def
+
+ libntp/lib/isc/win32/libisc.dsp@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/libisc.dsp -> libntp/lib/isc/win32/libisc.dsp
+
+ libntp/lib/isc/win32/libisc.dsp@1.3 +0 -0
+ Rename: lib/isc/win32/libisc.dsp -> libntp/lib/isc/win32/libisc.dsp
+
+ libntp/lib/isc/win32/libisc.dsw@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/libisc.dsw -> libntp/lib/isc/win32/libisc.dsw
+
+ libntp/lib/isc/win32/libisc.dsw@1.2 +0 -0
+ Rename: lib/isc/win32/libisc.dsw -> libntp/lib/isc/win32/libisc.dsw
+
+ libntp/lib/isc/win32/libisc.mak@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/libisc.mak -> libntp/lib/isc/win32/libisc.mak
+
+ libntp/lib/isc/win32/libisc.mak@1.3 +0 -0
+ Rename: lib/isc/win32/libisc.mak -> libntp/lib/isc/win32/libisc.mak
+
+ libntp/lib/isc/win32/net.c@1.19 +0 -0
+ Rename: libntp/lib/isc/win32/net.c -> libntp/lib/isc/win32/net.c
+
+ libntp/lib/isc/win32/net.c@1.18 +0 -0
+ Rename: lib/isc/win32/net.c -> libntp/lib/isc/win32/net.c
+
+ libntp/lib/isc/win32/netdb.h@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/netdb.h -> libntp/lib/isc/win32/netdb.h
+
+ libntp/lib/isc/win32/netdb.h@1.3 +0 -0
+ Rename: lib/isc/win32/netdb.h -> libntp/lib/isc/win32/netdb.h
+
+ libntp/lib/isc/win32/ntgroups.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/ntgroups.c -> libntp/lib/isc/win32/ntgroups.c
+
+ libntp/lib/isc/win32/ntgroups.c@1.3 +0 -0
+ Rename: lib/isc/win32/ntgroups.c -> libntp/lib/isc/win32/ntgroups.c
+
+ libntp/lib/isc/win32/ntpaths.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/ntpaths.c -> libntp/lib/isc/win32/ntpaths.c
+
+ libntp/lib/isc/win32/ntpaths.c@1.3 +0 -0
+ Rename: lib/isc/win32/ntpaths.c -> libntp/lib/isc/win32/ntpaths.c
+
+ libntp/lib/isc/win32/once.c@1.6 +0 -0
+ Rename: libntp/lib/isc/win32/once.c -> libntp/lib/isc/win32/once.c
+
+ libntp/lib/isc/win32/once.c@1.5 +0 -0
+ Rename: lib/isc/win32/once.c -> libntp/lib/isc/win32/once.c
+
+ libntp/lib/isc/win32/os.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/os.c -> libntp/lib/isc/win32/os.c
+
+ libntp/lib/isc/win32/os.c@1.2 +0 -0
+ Rename: lib/isc/win32/os.c -> libntp/lib/isc/win32/os.c
+
+ libntp/lib/isc/win32/resource.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/resource.c -> libntp/lib/isc/win32/resource.c
+
+ libntp/lib/isc/win32/resource.c@1.2 +0 -0
+ Rename: lib/isc/win32/resource.c -> libntp/lib/isc/win32/resource.c
+
+ libntp/lib/isc/win32/socket.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/socket.c -> libntp/lib/isc/win32/socket.c
+
+ libntp/lib/isc/win32/socket.c@1.3 +0 -0
+ Rename: lib/isc/win32/socket.c -> libntp/lib/isc/win32/socket.c
+
+ libntp/lib/isc/win32/stdio.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/stdio.c -> libntp/lib/isc/win32/stdio.c
+
+ libntp/lib/isc/win32/stdio.c@1.2 +0 -0
+ Rename: lib/isc/win32/stdio.c -> libntp/lib/isc/win32/stdio.c
+
+ libntp/lib/isc/win32/stdtime.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/stdtime.c -> libntp/lib/isc/win32/stdtime.c
+
+ libntp/lib/isc/win32/stdtime.c@1.3 +0 -0
+ Rename: lib/isc/win32/stdtime.c -> libntp/lib/isc/win32/stdtime.c
+
+ libntp/lib/isc/win32/strerror.c@1.15 +0 -0
+ Rename: libntp/lib/isc/win32/strerror.c -> libntp/lib/isc/win32/strerror.c
+
+ libntp/lib/isc/win32/strerror.c@1.14 +0 -0
+ Rename: lib/isc/win32/strerror.c -> libntp/lib/isc/win32/strerror.c
+
+ libntp/lib/isc/win32/syslog.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/syslog.c -> libntp/lib/isc/win32/syslog.c
+
+ libntp/lib/isc/win32/syslog.c@1.2 +0 -0
+ Rename: lib/isc/win32/syslog.c -> libntp/lib/isc/win32/syslog.c
+
+ libntp/lib/isc/win32/syslog.h@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/syslog.h -> libntp/lib/isc/win32/syslog.h
+
+ libntp/lib/isc/win32/syslog.h@1.2 +0 -0
+ Rename: lib/isc/win32/syslog.h -> libntp/lib/isc/win32/syslog.h
+
+ libntp/lib/isc/win32/thread.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/thread.c -> libntp/lib/isc/win32/thread.c
+
+ libntp/lib/isc/win32/thread.c@1.3 +0 -0
+ Rename: lib/isc/win32/thread.c -> libntp/lib/isc/win32/thread.c
+
+ libntp/lib/isc/win32/time.c@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/time.c -> libntp/lib/isc/win32/time.c
+
+ libntp/lib/isc/win32/time.c@1.3 +0 -0
+ Rename: lib/isc/win32/time.c -> libntp/lib/isc/win32/time.c
+
+ libntp/lib/isc/win32/unistd.h@1.4 +0 -0
+ Rename: libntp/lib/isc/win32/unistd.h -> libntp/lib/isc/win32/unistd.h
+
+ libntp/lib/isc/win32/unistd.h@1.3 +0 -0
+ Rename: lib/isc/win32/unistd.h -> libntp/lib/isc/win32/unistd.h
+
+ libntp/lib/isc/win32/version.c@1.3 +0 -0
+ Rename: libntp/lib/isc/win32/version.c -> libntp/lib/isc/win32/version.c
+
+ libntp/lib/isc/win32/version.c@1.2 +0 -0
+ Rename: lib/isc/win32/version.c -> libntp/lib/isc/win32/version.c
+
+ libntp/lib/isc/win32/win32os.c@1.6 +0 -0
+ Rename: libntp/lib/isc/win32/win32os.c -> libntp/lib/isc/win32/win32os.c
+
+ libntp/lib/isc/win32/win32os.c@1.5 +0 -0
+ Rename: lib/isc/win32/win32os.c -> libntp/lib/isc/win32/win32os.c
+
+ libntp/lib/isc/x86_32/include/isc/atomic.h@1.3 +0 -0
+ Rename: libntp/lib/isc/x86_32/include/isc/atomic.h -> libntp/lib/isc/x86_32/include/isc/atomic.h
+
+ libntp/lib/isc/x86_32/include/isc/atomic.h@1.2 +0 -0
+ Rename: lib/isc/x86_32/include/isc/atomic.h -> libntp/lib/isc/x86_32/include/isc/atomic.h
+
+ libntp/lib/isc/x86_64/include/isc/atomic.h@1.3 +0 -0
+ Rename: libntp/lib/isc/x86_64/include/isc/atomic.h -> libntp/lib/isc/x86_64/include/isc/atomic.h
+
+ libntp/lib/isc/x86_64/include/isc/atomic.h@1.2 +0 -0
+ Rename: lib/isc/x86_64/include/isc/atomic.h -> libntp/lib/isc/x86_64/include/isc/atomic.h
+
+ libntp/ntp_crypto_rnd.c@1.7 +30 -42
+ Enable building without OpenSSL when arc4random_buf() is available.
+
+ libparse/Makefile.am@1.34 +2 -1
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Use top-level check-libntp.mf
+
+ ntpd/Makefile.am@1.143 +1 -1
+ Use top-level check-libntp.mf
+
+ ntpd/ntp_ppsdev.c@1.5 +6 -0
+ Fix building without refclock support.
+
+ ntpdate/Makefile.am@1.39 +1 -1
+ Use top-level check-libntp.mf
+
+ ntpdc/Makefile.am@1.77 +1 -1
+ Use top-level check-libntp.mf
+
+ ntpq/Makefile.am@1.75 +1 -1
+ Use top-level check-libntp.mf
+
+ ntpsnmpd/Makefile.am@1.42 +1 -1
+ Use top-level check-libntp.mf
+
+ ports/winnt/vs2005/libntp.vcproj@1.30 +45 -49
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2005/ntpd.vcproj@1.25 +8 -8
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2005/ntpdate.vcproj@1.6 +2 -2
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2005/ntpdc.vcproj@1.8 +2 -2
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2005/ntpkeygen.vcproj@1.8 +2 -2
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2005/ntpq.vcproj@1.8 +2 -2
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2008/common.vsprops@1.3 +1 -1
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.61 +50 -54
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2013/common.props@1.4 +1 -1
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.17 +49 -50
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2015/common.props@1.2 +1 -1
+ Move lib/isc/ under libntp/
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj@1.7 +49 -50
+ Move lib/isc/ under libntp/
+
+ sntp/check-libntp.mf@1.4 +7 -6
+ Split check-libntp.mf into main and sntp versions and remove duplicated logic in many Makefile.am files.
+
+ sntp/check-libsntp.mf@1.1 +13 -0
+ Centralize makefile logic to build libsntp.a before dependents
+
+ sntp/check-libsntp.mf@1.0 +0 -0
+
+ sntp/check-libunity.mf@1.1 +15 -0
+ Centralize makefile logic to build libunity.a before dependents.
+
+ sntp/check-libunity.mf@1.0 +0 -0
+
+ sntp/configure.ac@1.87 +2 -6
+ Turn on Automake subdir-objects option to build subdir *.o files in corresponding
+ build subdirs instead of all in the Makefile directory.
+ Remove conditionalization of AM_PROG_AR needed for pre-1.12 automake.
+
+ sntp/deps-ver@1.4 +1 -1
+ Bump deps-ver to clean .deps directories as files have moved.
+
+ sntp/includes.mf@1.2 +3 -3
+ Account for new path to lib/isc/
+
+ sntp/m4/ntp_crypto_rand.m4@1.3 +3 -2
+ Fix building without OpenSSL.
+
+ sntp/tests/Makefile.am@1.73 +19 -39
+ Build our own version.c rather than reusing a parent directory's.
+ Centralize logic to build prerequisite libraries in included .mf files.
+
+ sntp/unity/Makefile.am@1.12 +2 -2
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ subdir-objects needs sources in this dir or subdirs.
+
+ sntp/unity/libpkgver-colcomp.c@1.1 +1 -0
+ subdir-objects breaks with sources from parent or sibling dir.
+
+ sntp/unity/libpkgver-colcomp.c@1.0 +0 -0
+
+ tests/bug-2803/Makefile.am@1.20 +3 -19
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Centralize logic to build prerequisite libraries in included .mf files.
+
+ tests/libntp/Makefile.am@1.102 +3 -18
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Centralize logic to build prerequisite libraries in included .mf files.
+
+ tests/ntpd/Makefile.am@1.37 +12 -35
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Centralize logic to build prerequisite libraries in included .mf files.
+ subdir-objects sources in parent or sibling dir break.
+
+ tests/ntpd/test-libntp.c@1.1 +2 -0
+ subdir-objects doesn't work with sources from parent or sibling dir
+
+ tests/ntpd/test-libntp.c@1.0 +0 -0
+
+ tests/ntpq/Makefile.am@1.15 +3 -28
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Centralize logic to build prerequisite libraries in included .mf files.
+
+ tests/sandbox/Makefile.am@1.14 +3 -20
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Centralize logic to build prerequisite libraries in included .mf files.
+
+ tests/sec-2853/Makefile.am@1.10 +5 -25
+ Link against libntpd.a instead of ntpd/rc_cmdlength.o
+ Initialize DISTCLEANFILES so that depsver.mf can append to it.
+ Centralize logic to build prerequisite libraries in included .mf files.
+
+ util/Makefile.am@1.80 +1 -1
+ Use top-level check-libntp.mf
+
+ChangeSet@1.3943, 2023-01-20 00:42:52-05:00, davehart@tl.davehart.net
+ Fix 'make distcheck' failure from missing ntpd/ntp_clockdev.h in tarball.
+
+ ntpd/Makefile.am@1.142 +2 -0
+ Add ntp_clockdev.h to ntpd/Makefile.am noinst_HEADERS to fix 'make distcheck'
+
+ChangeSet@1.3912.20.1, 2022-12-31 02:00:09-05:00, davehart@z4.davehart.net
+ [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded
+
+ ChangeLog@1.1986.20.1 +2 -0
+ [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded
+
+ ntpd/ntp_keyword.h@1.38.1.1 +1 -1
+ [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.82 +12 -4
+ high-load ntpd on Windows deaf after enough ICMP TTL exceeded
+
+ChangeSet@1.3940.2.2, 2022-11-13 09:47:08+01:00, perlinger@ntp.org
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ ChangeLog@1.2009.2.1 +2 -0
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ include/ntp_random.h@1.4 +1 -0
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ libntp/ntp_random.c@1.12 +15 -0
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ libntp/systime.c@1.76 +1 -1
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ ntpd/ntp_io.c@1.433 +1 -1
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ ntpd/ntp_monitor.c@1.45 +1 -1
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ ntpd/ntp_proto.c@1.439 +1 -1
+ [Bug 3640] sidekick: fixed "discard monitor" implementation
+
+ChangeSet@1.3940.2.1, 2022-09-06 19:15:41+02:00, perlinger@ntp.org
+ [4.2.8p16 rc] c99-ism breaks VS2008 build
+
+ libntp/ntp_crypto_rnd.c@1.6 +2 -6
+ [4.2.8p16 rc] c99-ism breaks VS2008 build
+
+ChangeSet@1.3940.1.2, 2022-09-01 02:57:43-05:00, stenn@stenn.chi1.ntfo.org
+ Merge stenn.chi1.ntfo.org:/home/nfs1.chi1/stenn/ntp-stable-libevent
+ into stenn.chi1.ntfo.org:/home/nfs1.chi1/stenn/ntp-stable
+
+ BitKeeper/deleted/78/test-driver~3d169fff1185c4af@1.2 +0 -0
+ Merge rename: sntp/libevent/build-aux/test-driver -> /home/nfs1.chi1/stenn/ntp-stable/RESYNC/BitKeeper/deleted/78/test-driver~3d169fff1185c4af
+
+ChangeSet@1.3940.1.1, 2022-09-01 02:56:37-05:00, stenn@stenn.chi1.ntfo.org
+ libevent-2.1.12-stable
+
+ ChangeLog@1.2009.1.1 +1 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/CMakeLists.txt@1.1 +1575 -0
+ BitKeeper file sntp/libevent/CMakeLists.txt
+
+ sntp/libevent/CMakeLists.txt@1.0 +0 -0
+
+ sntp/libevent/ChangeLog@1.10 +760 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/ChangeLog-1.4@1.2 +1 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/ChangeLog-2.0@1.3 +1 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/Doxyfile@1.4 +23 -23
+ libevent-2.1.12-stable
+
+ sntp/libevent/Makefile.am@1.16 +59 -20
+ libevent-2.1.12-stable
+
+ sntp/libevent/README.md@1.2 +197 -28
+ libevent-2.1.12-stable
+
+ sntp/libevent/WIN32-Code/getopt_long.c@1.2 +4 -3
+ libevent-2.1.12-stable
+
+ sntp/libevent/WIN32-Code/nmake/event2/event-config.h@1.3 +8 -18
+ libevent-2.1.12-stable
+
+ sntp/libevent/arc4random.c@1.7 +15 -25
+ libevent-2.1.12-stable
+
+ sntp/libevent/autogen.sh@1.2 +7 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/buffer.c@1.11 +59 -31
+ libevent-2.1.12-stable
+
+ sntp/libevent/buffer_iocp.c@1.6 +1 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent-internal.h@1.8 +72 -4
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent.c@1.9 +98 -51
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent_async.c@1.8 +43 -23
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent_filter.c@1.8 +91 -11
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent_openssl.c@1.10 +179 -159
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent_pair.c@1.9 +13 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent_ratelim.c@1.6 +3 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/bufferevent_sock.c@1.8 +87 -89
+ libevent-2.1.12-stable
+
+ sntp/libevent/build-aux/test-driver@1.1 +148 -0
+ BitKeeper file sntp/libevent/build-aux/test-driver
+
+ sntp/libevent/build-aux/test-driver@1.0 +0 -0
+
+ sntp/libevent/checkpatch.sh@1.1 +299 -0
+ BitKeeper file sntp/libevent/checkpatch.sh
+
+ sntp/libevent/checkpatch.sh@1.0 +0 -0
+
+ sntp/libevent/cmake/AddCompilerFlags.cmake@1.1 +13 -0
+ BitKeeper file sntp/libevent/cmake/AddCompilerFlags.cmake
+
+ sntp/libevent/cmake/AddCompilerFlags.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/AddEventLibrary.cmake@1.1 +193 -0
+ BitKeeper file sntp/libevent/cmake/AddEventLibrary.cmake
+
+ sntp/libevent/cmake/AddEventLibrary.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/COPYING-CMAKE-SCRIPTS@1.1 +22 -0
+ BitKeeper file sntp/libevent/cmake/COPYING-CMAKE-SCRIPTS
+
+ sntp/libevent/cmake/COPYING-CMAKE-SCRIPTS@1.0 +0 -0
+
+ sntp/libevent/cmake/CheckConstExists.cmake@1.1 +25 -0
+ BitKeeper file sntp/libevent/cmake/CheckConstExists.cmake
+
+ sntp/libevent/cmake/CheckConstExists.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/CheckFileOffsetBits.c@1.1 +14 -0
+ BitKeeper file sntp/libevent/cmake/CheckFileOffsetBits.c
+
+ sntp/libevent/cmake/CheckFileOffsetBits.c@1.0 +0 -0
+
+ sntp/libevent/cmake/CheckFileOffsetBits.cmake@1.1 +43 -0
+ BitKeeper file sntp/libevent/cmake/CheckFileOffsetBits.cmake
+
+ sntp/libevent/cmake/CheckFileOffsetBits.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/CheckFunctionKeywords.cmake@1.1 +14 -0
+ BitKeeper file sntp/libevent/cmake/CheckFunctionKeywords.cmake
+
+ sntp/libevent/cmake/CheckFunctionKeywords.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/CheckPrototypeDefinition.c.in@1.1 +29 -0
+ BitKeeper file sntp/libevent/cmake/CheckPrototypeDefinition.c.in
+
+ sntp/libevent/cmake/CheckPrototypeDefinition.c.in@1.0 +0 -0
+
+ sntp/libevent/cmake/CheckPrototypeDefinition.cmake@1.1 +82 -0
+ BitKeeper file sntp/libevent/cmake/CheckPrototypeDefinition.cmake
+
+ sntp/libevent/cmake/CheckPrototypeDefinition.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/CheckWorkingKqueue.cmake@1.1 +52 -0
+ BitKeeper file sntp/libevent/cmake/CheckWorkingKqueue.cmake
+
+ sntp/libevent/cmake/CheckWorkingKqueue.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/CodeCoverage.cmake@1.1 +165 -0
+ BitKeeper file sntp/libevent/cmake/CodeCoverage.cmake
+
+ sntp/libevent/cmake/CodeCoverage.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/Copyright.txt@1.1 +57 -0
+ BitKeeper file sntp/libevent/cmake/Copyright.txt
+
+ sntp/libevent/cmake/Copyright.txt@1.0 +0 -0
+
+ sntp/libevent/cmake/LibeventConfig.cmake.in@1.1 +183 -0
+ BitKeeper file sntp/libevent/cmake/LibeventConfig.cmake.in
+
+ sntp/libevent/cmake/LibeventConfig.cmake.in@1.0 +0 -0
+
+ sntp/libevent/cmake/LibeventConfigVersion.cmake.in@1.1 +11 -0
+ BitKeeper file sntp/libevent/cmake/LibeventConfigVersion.cmake.in
+
+ sntp/libevent/cmake/LibeventConfigVersion.cmake.in@1.0 +0 -0
+
+ sntp/libevent/cmake/Macros.cmake@1.1 +36 -0
+ BitKeeper file sntp/libevent/cmake/Macros.cmake
+
+ sntp/libevent/cmake/Macros.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/Uninstall.cmake.in@1.1 +23 -0
+ BitKeeper file sntp/libevent/cmake/Uninstall.cmake.in
+
+ sntp/libevent/cmake/Uninstall.cmake.in@1.0 +0 -0
+
+ sntp/libevent/cmake/UseDoxygen.cmake@1.1 +111 -0
+ BitKeeper file sntp/libevent/cmake/UseDoxygen.cmake
+
+ sntp/libevent/cmake/UseDoxygen.cmake@1.0 +0 -0
+
+ sntp/libevent/cmake/VersionViaGit.cmake@1.1 +66 -0
+ BitKeeper file sntp/libevent/cmake/VersionViaGit.cmake
+
+ sntp/libevent/cmake/VersionViaGit.cmake@1.0 +0 -0
+
+ sntp/libevent/compile@1.1 +347 -0
+ BitKeeper file sntp/libevent/compile
+
+ sntp/libevent/compile@1.0 +0 -0
+
+ sntp/libevent/config.guess@1.1 +1433 -0
+ BitKeeper file sntp/libevent/config.guess
+
+ sntp/libevent/config.guess@1.0 +0 -0
+
+ sntp/libevent/config.sub@1.1 +1804 -0
+ BitKeeper file sntp/libevent/config.sub
+
+ sntp/libevent/config.sub@1.0 +0 -0
+
+ sntp/libevent/configure.ac@1.19 +210 -123
+ libevent-2.1.12-stable
+
+ sntp/libevent/defer-internal.h@1.6 +4 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/depcomp@1.1 +791 -0
+ BitKeeper file sntp/libevent/depcomp
+
+ sntp/libevent/depcomp@1.0 +0 -0
+
+ sntp/libevent/doxygen.am@1.1 +55 -0
+ BitKeeper file sntp/libevent/doxygen.am
+
+ sntp/libevent/doxygen.am@1.0 +0 -0
+
+ sntp/libevent/epoll.c@1.7 +29 -25
+ libevent-2.1.12-stable
+
+ sntp/libevent/epolltable-internal.h@1.2 +1 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/evbuffer-internal.h@1.9 +1 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/evconfig-private.h.cmake@1.1 +40 -0
+ BitKeeper file sntp/libevent/evconfig-private.h.cmake
+
+ sntp/libevent/evconfig-private.h.cmake@1.0 +0 -0
+
+ sntp/libevent/evconfig-private.h.in@1.3 +7 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/evdns.c@1.12 +165 -75
+ libevent-2.1.12-stable
+
+ sntp/libevent/event-config.h.cmake@1.1 +513 -0
+ BitKeeper file sntp/libevent/event-config.h.cmake
+
+ sntp/libevent/event-config.h.cmake@1.0 +0 -0
+
+ sntp/libevent/event-internal.h@1.10 +19 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/event.c@1.14 +309 -179
+ libevent-2.1.12-stable
+
+ sntp/libevent/event_iocp.c@1.7 +1 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/event_rpcgen.py@1.4 +1112 -915
+ libevent-2.1.12-stable
+
+ sntp/libevent/event_tagging.c@1.6 +7 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/evmap.c@1.8 +25 -18
+ libevent-2.1.12-stable
+
+ sntp/libevent/evrpc.c@1.7 +3 -3
+ libevent-2.1.12-stable
+
+ sntp/libevent/evthread-internal.h@1.9 +15 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/evthread.c@1.9 +41 -7
+ libevent-2.1.12-stable
+
+ sntp/libevent/evutil.c@1.11 +158 -56
+ libevent-2.1.12-stable
+
+ sntp/libevent/evutil_rand.c@1.8 +3 -3
+ libevent-2.1.12-stable
+
+ sntp/libevent/evutil_time.c@1.6 +88 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/http-internal.h@1.7 +17 -17
+ libevent-2.1.12-stable
+
+ sntp/libevent/http.c@1.11 +438 -167
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event.h@1.6 +0 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/buffer.h@1.8 +2 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/buffer_compat.h@1.5 +3 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/bufferevent.h@1.7 +33 -4
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/bufferevent_compat.h@1.4 +4 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/dns.h@1.8 +40 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/dns_compat.h@1.5 +23 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/event.h@1.12 +37 -44
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/http.h@1.8 +46 -8
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/http_compat.h@1.4 +7 -3
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/listener.h@1.5 +12 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/rpc.h@1.4 +39 -9
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/rpc_struct.h@1.4 +14 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/util.h@1.8 +57 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/event2/visibility.h@1.2 +29 -17
+ libevent-2.1.12-stable
+
+ sntp/libevent/include/include.am@1.3 +5 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/iocp-internal.h@1.4 +14 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/kqueue.c@1.8 +19 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/libevent_core.pc.in@1.1 +16 -0
+ BitKeeper file sntp/libevent/libevent_core.pc.in
+
+ sntp/libevent/libevent_core.pc.in@1.0 +0 -0
+
+ sntp/libevent/libevent_extra.pc.in@1.1 +16 -0
+ BitKeeper file sntp/libevent/libevent_extra.pc.in
+
+ sntp/libevent/libevent_extra.pc.in@1.0 +0 -0
+
+ sntp/libevent/listener.c@1.9 +20 -10
+ libevent-2.1.12-stable
+
+ sntp/libevent/log-internal.h@1.4 +18 -7
+ libevent-2.1.12-stable
+
+ sntp/libevent/log.c@1.7 +1 -10
+ libevent-2.1.12-stable
+
+ sntp/libevent/ltmain.sh@1.1 +11147 -0
+ BitKeeper file sntp/libevent/ltmain.sh
+
+ sntp/libevent/ltmain.sh@1.0 +0 -0
+
+ sntp/libevent/m4/ax_check_funcs_ex.m4@1.1 +22 -0
+ BitKeeper file sntp/libevent/m4/ax_check_funcs_ex.m4
+
+ sntp/libevent/m4/ax_check_funcs_ex.m4@1.0 +0 -0
+
+ sntp/libevent/m4/ax_prog_doxygen.m4@1.1 +600 -0
+ BitKeeper file sntp/libevent/m4/ax_prog_doxygen.m4
+
+ sntp/libevent/m4/ax_prog_doxygen.m4@1.0 +0 -0
+
+ sntp/libevent/m4/libevent_openssl.m4@1.3 +20 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/make-event-config.sed@1.2 +7 -3
+ libevent-2.1.12-stable
+
+ sntp/libevent/minheap-internal.h@1.7 +5 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/missing@1.1 +215 -0
+ BitKeeper file sntp/libevent/missing
+
+ sntp/libevent/missing@1.0 +0 -0
+
+ sntp/libevent/mm-internal.h@1.3 +5 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/openssl-compat.h@1.1 +47 -0
+ BitKeeper file sntp/libevent/openssl-compat.h
+
+ sntp/libevent/openssl-compat.h@1.0 +0 -0
+
+ sntp/libevent/poll.c@1.4 +22 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/dns-example.c@1.8 +59 -43
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/event-read-fifo.c@1.6 +2 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/hello-world.c@1.5 +2 -3
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/http-connect.c@1.1 +131 -0
+ BitKeeper file sntp/libevent/sample/http-connect.c
+
+ sntp/libevent/sample/http-connect.c@1.0 +0 -0
+
+ sntp/libevent/sample/http-server.c@1.13 +229 -69
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/https-client.c@1.3 +147 -42
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/include.am@1.4 +10 -7
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/le-proxy.c@1.4 +18 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/openssl_hostname_validation.c@1.2 +9 -3
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/signal-test.c@1.5 +19 -11
+ libevent-2.1.12-stable
+
+ sntp/libevent/sample/time-test.c@1.5 +5 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/select.c@1.7 +1 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/signal.c@1.8 +2 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/strlcpy-internal.h@1.4 +2 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/test-driver@1.1 +148 -0
+ BitKeeper file sntp/libevent/test-driver
+
+ sntp/libevent/test-driver@1.0 +0 -0
+
+ sntp/libevent/test/bench.c@1.6 +44 -16
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/bench_cascade.c@1.6 +4 -4
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/bench_http.c@1.6 +6 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/bench_httpclient.c@1.9 +13 -7
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/check-dumpevents.py@1.4 +5 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/include.am@1.5 +37 -7
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/print-winsock-errors.c@1.2 +2 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress.c@1.9 +393 -112
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress.h@1.6 +13 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_buffer.c@1.9 +633 -44
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_bufferevent.c@1.7 +416 -111
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_dns.c@1.11 +587 -119
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_et.c@1.6 +106 -44
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_finalize.c@1.3 +48 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_http.c@1.11 +1096 -284
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_listener.c@1.7 +138 -4
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_main.c@1.8 +68 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_minheap.c@1.6 +0 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_rpc.c@1.7 +48 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_ssl.c@1.9 +694 -108
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_testutils.c@1.7 +18 -4
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_testutils.h@1.3 +1 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_thread.c@1.7 +10 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_thread.h@1.2 +21 -13
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_util.c@1.8 +270 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/regress_zlib.c@1.6 +4 -4
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.5 +1 -10
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-changelist.c@1.6 +2 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-closed.c@1.2 +3 -9
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-eof.c@1.7 +4 -11
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-fdleak.c@1.3 +9 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-init.c@1.5 +1 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-ratelim.c@1.12 +88 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-time.c@1.8 +17 -11
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test-weof.c@1.5 +3 -6
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/test.sh@1.11 +57 -13
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/tinytest.c@1.7 +143 -26
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/tinytest.h@1.5 +4 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/tinytest_demo.c@1.2 +3 -1
+ libevent-2.1.12-stable
+
+ sntp/libevent/test/tinytest_macros.h@1.4 +16 -2
+ libevent-2.1.12-stable
+
+ sntp/libevent/time-internal.h@1.3 +3 -0
+ libevent-2.1.12-stable
+
+ sntp/libevent/util-internal.h@1.11 +79 -7
+ libevent-2.1.12-stable
+
+ sntp/libevent/whatsnew-2.1.txt@1.5 +83 -5
+ libevent-2.1.12-stable
+
+ sntp/libevent/win32select.c@1.6 +3 -2
+ libevent-2.1.12-stable
+
+ChangeSet@1.3936.1.1, 2022-08-27 05:04:31-05:00, stenn@stenn.chi1.ntfo.org
+ ChangeLog:
+ [Bug 3695] Fix memory leak with ntpq on Windows Server 2019 <perlinger@ntp.org>
+
+ ChangeLog@1.2008 +1 -0
+ [Bug 3695] Fix memory leak with ntpq on Windows Server 2019 <perlinger@ntp.org>
+
+ChangeSet@1.3938, 2022-08-27 04:27:52-05:00, stenn@stenn.chi1.ntfo.org
+ sntp.c, main.c:
+ Bug 3688 (-fno-common) fixes
+
+ sntp/main.c@1.108 +1 -1
+ Bug 3688 (-fno-common) fixes
+
+ sntp/sntp.c@1.5 +2 -0
+ Bug 3688 (-fno-common) fixes
+
+ChangeSet@1.3937, 2022-08-27 03:36:11-05:00, stenn@stenn.chi1.ntfo.org
+ main.c:
+ One more fix for Bug 3695
+
+ sntp/main.c@1.107 +1 -1
+ One more fix for Bug 3695
+
+ChangeSet@1.3935, 2022-08-27 03:03:40-05:00, stenn@stenn.chi1.ntfo.org
+ test-libntp.h:
+ Bug 3688 - one more fix
+
+ tests/libntp/test-libntp.h@1.8 +5 -1
+ Bug 3688 - one more fix
+
+ChangeSet@1.3912.19.9, 2022-06-27 00:02:54-05:00, stenn@stenn.chi1.ntfo.org
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/invoke-ntpdc.texi@1.520 +10 -1
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc-opts.c@1.539 +73 -43
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc-opts.def@1.24 +10 -0
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc-opts.h@1.538 +14 -7
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc.1ntpdcman@1.351 +8 -2
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.351 +7 -2
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc.html@1.365 +24 -8
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc.man.in@1.351 +8 -2
+ Add -u option for ntpq/ntpdc
+
+ ntpdc/ntpdc.mdoc.in@1.351 +7 -2
+ Add -u option for ntpq/ntpdc
+
+ ntpq/invoke-ntpq.texi@1.530 +10 -1
+ Add -u option for ntpq/ntpdc
+
+ ntpq/ntpq-opts.c@1.548 +81 -51
+ Add -u option for ntpq/ntpdc
+
+ ntpq/ntpq-opts.def@1.33 +10 -0
+ Add -u option for ntpq/ntpdc
+
+ ntpq/ntpq-opts.h@1.546 +15 -8
+ Add -u option for ntpq/ntpdc
+
+ ntpq/ntpq.1ntpqman@1.358 +8 -2
+ Add -u option for ntpq/ntpdc
+
+ ntpq/ntpq.1ntpqmdoc@1.358 +7 -2
+ Add -u option for ntpq/ntpdc
+
+ ntpq/ntpq.man.in@1.358 +8 -2
+ Add -u option for ntpq/ntpdc
+
+ ntpq/ntpq.mdoc.in@1.358 +7 -2
+ Add -u option for ntpq/ntpdc
+
+ChangeSet@1.3912.19.8, 2022-06-26 05:46:50-05:00, stenn@stenn.chi1.ntfo.org
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpdc/invoke-ntpdc.texi@1.519 +1 -1
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpdc/ntpdc-opts.c@1.538 +1 -1
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpdc/ntpdc-opts.h@1.537 +1 -1
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpdc/ntpdc.1ntpdcman@1.350 +7 -699
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.350 +7 -666
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpdc/ntpdc.man.in@1.350 +7 -699
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpdc/ntpdc.mdoc.in@1.350 +7 -666
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpq/invoke-ntpq.texi@1.529 +1 -1
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpq/ntpq-opts.c@1.547 +1 -1
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpq/ntpq-opts.h@1.545 +1 -1
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpq/ntpq.1ntpqman@1.357 +3 -1391
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpq/ntpq.1ntpqmdoc@1.357 +3 -889
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpq/ntpq.man.in@1.357 +3 -1391
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ ntpq/ntpq.mdoc.in@1.357 +3 -889
+ Check in autogen files for the -u flag to ntpdc/ntpq
+
+ChangeSet@1.3912.19.7, 2022-04-14 08:07:58+02:00, perlinger@ntp.org
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - update docs on refclock-gpsdjson
+
+ html/drivers/driver46.html@1.8 +19 -12
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - update docs on refclock-gpsdjson
+
+ChangeSet@1.3912.19.6, 2022-04-13 21:57:26+02:00, perlinger@ntp.org
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ hook up refclock_gpsdjson to device redirection
+
+ ntpd/ntp_clockdev.c@1.2 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - comment typo
+
+ ntpd/refclock_gpsdjson.c@1.28.3.1 +14 -9
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - hook up to device redirection (this driver is special)
+ - increase receive/assembly buffer: Multi GNSS reports are HUGE
+ - fix regression in buffer handling (overflow)
+
+ChangeSet@1.3912.19.5, 2022-03-28 09:18:23+02:00, perlinger@ntp.org
+ [Bug 3758] Provide a 'device' config statement for refclocks
+
+ ChangeLog@1.1986.19.3 +1 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ ---
+ merge with 3757 (magic PPS) as there are overlpped changes otherwise
+
+ html/clockopt.html@1.29 +39 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - document 'device' syntax
+
+ html/scripts/clockopt.txt@1.4 +1 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - document 'device' syntax
+
+ include/ntp_config.h@1.91 +1 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'device' list to config
+
+ include/ntp_refclock.h@1.38.1.6 +3 -2
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - have 'ppsdev_reopen()' lookup alternative device names, too
+
+ include/ntp_stdlib.h@1.86.4.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - make 'refnumtoa()' take a const pointer
+
+ libntp/refnumtoa.c@1.10.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - make 'refnumtoa()' take a const pointer
+
+ ntpd/Makefile.am@1.138.1.2 +1 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'ntp_clockdev.c' to source list
+
+ ntpd/keyword-gen-utd@1.36 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - auto-update
+
+ ntpd/keyword-gen.c@1.43 +4 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'device', 'ppsdata', 'timedata' keywords
+
+ ntpd/ntp_clockdev.c@1.1 +187 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - implement device table + info-logging the redirections
+ - add callback for windows port
+
+ ntpd/ntp_clockdev.c@1.0 +0 -0
+
+ ntpd/ntp_clockdev.h@1.1 +25 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - API dt set&query clock-specific device redirections
+
+ ntpd/ntp_clockdev.h@1.0 +0 -0
+
+ ntpd/ntp_config.c@1.376.1.1 +110 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - handle the device redirections in the config tree
+
+ ntpd/ntp_keyword.h@1.39 +1034 -1017
+ [[Bug 3758] Provide a 'device' config statement for refclocks
+ - regenerated
+
+ ntpd/ntp_parser.c@1.118 +2261 -2016
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - regenerated
+
+ ntpd/ntp_parser.h@1.80 +421 -402
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - regenerated
+
+ ntpd/ntp_parser.y@1.106 +44 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add grammar supoort for 'device' statement
+
+ ntpd/ntp_ppsdev.c@1.4 +16 -3
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - have 'ppsdev_reopen()' lookup alternative device names, too
+ - unclutter include
+
+ ntpd/ntp_refclock.c@1.126.3.1 +56 -2
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add conversion between symbolic and numeric baud rates
+ - log open of refclock devices
+
+ ntpd/refclock_acts.c@1.54.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_arbiter.c@1.20.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_arc.c@1.34 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_as2201.c@1.16.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_chronolog.c@1.13 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_chu.c@1.59 +2 -2
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_dumbclock.c@1.18.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_fg.c@1.16 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_heath.c@1.19.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_hopfser.c@1.17.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_hpgps.c@1.16.1.1 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_jjy.c@1.38 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_jupiter.c@1.35 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_mx4200.c@1.32 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_neoclock4x.c@1.24 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_nmea.c@1.79.2.3 +3 -15
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - let refclock_open() do the logging
+ - 'refclock_open()' API change
+
+ ntpd/refclock_oncore.c@1.104.1.3 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_palisade.c@1.46.1.4 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_parse.c@1.89.1.1 +16 -2
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - use new refclock_open() API
+
+ ntpd/refclock_pst.c@1.14 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_ripencc.c@1.19 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_true.c@1.25.1.2 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_ulink.c@1.20 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_wwvb.c@1.36 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ntpd/refclock_zyfer.c@1.12 +1 -1
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - 'refclock_open()' API change
+
+ ports/winnt/libntp/termios.c@1.35 +16 -2
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - new refclock_open() signature
+ - add device name lookup callback
+ - support '\\.\COMxxx' windows device name space
+
+ ports/winnt/vs2005/ntpd.vcproj@1.24 +22 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'ntp_clockdev.c' to project
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.54 +4 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'ntp_clockdev.c' to project
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.12 +1 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'ntp_clockdev.c' to project
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters@1.9 +3 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'ntp_clockdev.c' to project
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.2.1.2 +1 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'ntp_clockdev.c' to project
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.4 +3 -0
+ [Bug 3758] Provide a 'device' config statement for refclocks
+ - add 'ntp_clockdev.c' to project
+
+ChangeSet@1.3912.19.4, 2022-03-27 10:21:50+02:00, perlinger@ntp.org
+ [bug 3757] final cleanup
+
+ ntpd/ntp_ppsdev.c@1.3 +79 -49
+ [bug 3757] final cleanup
+
+ChangeSet@1.3912.19.3, 2022-03-13 08:38:51+01:00, perlinger@ntp.org
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+ cleanup
+
+ include/ntp_refclock.h@1.38.1.5 +4 -6
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ntpd/ntp_ppsdev.c@1.2 +33 -7
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ntpd/refclock_nmea.c@1.79.2.2 +9 -26
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ntpd/refclock_oncore.c@1.104.1.2 +2 -2
+ indent cleanup
+
+ ports/winnt/vs2005/ntpd.vcproj@1.23 +22 -0
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.53 +4 -0
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.11 +2 -1
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters@1.8 +4 -1
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.2.1.1 +2 -1
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj.filters@1.3 +4 -1
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ChangeSet@1.3912.19.2, 2022-03-07 07:54:01+01:00, perlinger@ntp.org
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ChangeLog@1.1986.19.2 +1 -0
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ configure.ac@1.619.2.1 +20 -0
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+ - add '--enable-magicpps' with default=yes to config options
+ - check for the necessary functions to implement it
+
+ include/ntp_refclock.h@1.38.1.4 +6 -0
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+ - add prototype for 'ppsdev_open()' function
+
+ ntpd/Makefile.am@1.138.1.1 +1 -0
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ ntpd/ntp_ppsdev.c@1.1 +384 -0
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+ - implement 'ppsdev_open()' function
+ - implement tty<-->pps mapping for Linux
+ - implement 'magic' pps instantiation for Linux
+
+ ntpd/ntp_ppsdev.c@1.0 +0 -0
+
+ ntpd/refclock_nmea.c@1.79.2.1 +33 -16
+ [Bug 3757] Improve handling of Linux-PPS in NTPD
+
+ChangeSet@1.3912.19.1, 2022-01-16 11:35:06+01:00, perlinger@ntp.org
+ [Bug 3741] 4.2.8p15 can't build with glibc 2.34
+ PTHREAD stack sizes can be runtime variant, so make all size adjustments
+ runtime checks (as opposed to the compile time checks they were before)
+
+ ChangeLog@1.1986.19.1 +3 -0
+ [Bug 3741] 4.2.8p15 can't build with glibc 2.34
+
+ libntp/work_thread.c@1.23.1.1 +18 -15
+ [Bug 3741] 4.2.8p15 can't build with glibc 2.34
+ PTHREAD stack sizes can be runtime variant, so make all size adjustments
+ runtime checks (as opposed to the compile time checks they were before)
+
+ChangeSet@1.3912.18.1, 2021-03-14 09:31:22+01:00, perlinger@ntp.org
+ [Bug 3724] ntp-keygen with openSSL 1.1.1 fails on Windows
+
+ ChangeLog@1.1986.18.1 +4 -0
+ [Bug 3724] ntp-keygen with openSSL 1.1.1 fails on Windows
+
+ include/ssl_applink.c@1.7 +1 -1
+ [Bug 3724] ntp-keygen with openSSL 1.1.1 fails on Windows
+ - omit openssl/applink.c only for openSSL-1.1.0 (was giving linker trouble there)
+
+ChangeSet@1.3931, 2020-12-10 02:41:35-08:00, harlan@max-e0.pfcs.com
+ Lose a gmake construct in ntpd/Makefile.am
+
+ ChangeLog@1.2004 +1 -0
+ Lose a gmake construct in ntpd/Makefile.am
+
+ ntpd/Makefile.am@1.139 +9 -9
+ Lose a gmake construct in ntpd/Makefile.am
+
+ChangeSet@1.3912.17.2, 2020-11-29 16:31:39+01:00, perlinger@ntp.org
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+ - a bit of cleanup on command line option locking
+
+ ChangeLog@1.1986.17.1 +6 -0
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+
+ ntpd/ntp_util.c@1.122 +39 -40
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+ - a bit of cleanup on command line option locking
+
+ChangeSet@1.3912.17.1, 2020-11-29 10:41:07+01:00, perlinger@ntp.org
+ [Bug 3699] Problems handling drift file and restoring previous drifts <perlinger@ntp.org>
+ - command line options override config statements where applicable
+ - make initial frequency settings idempotent and reversible
+ - make sure kernel PLL gets a revovered drift componsation
+
+ include/ntp.h@1.234 +1 -0
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+ - support removing an initial drift spec from loop filter
+
+ ntpd/cmd_args.c@1.64 +3 -3
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+ - tag calls to 'stats_config()' as coming from command line
+
+ ntpd/ntp_config.c@1.377 +2 -4
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+ - avoid memory leaks with driftfile specs, and let cleanup/override be done in 'stats_config()'
+
+ ntpd/ntp_loopfilter.c@1.196 +11 -1
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+ - support removing an initial drift spec from loop filter
+ - make sure kernel PLL starts with proper initial drift if given
+
+ ntpd/ntp_util.c@1.121 +53 -9
+ [Bug 3699] Problems handling drift file and restoring previous drifts
+ - make sure command line options have precedence over corresponding config options
+
+ChangeSet@1.3912.15.2, 2020-10-26 08:30:46+01:00, perlinger@ntp.org
+ [Bug 3677] additional peer events not decoded in associations listing
+ - add numeric formatting to default branch
+
+ ChangeLog@1.1986.15.2 +1 -1
+ [Bug 3677] additional peer events not decoded in associations listing
+ - add numeric formatting to default branch
+
+ ntpq/ntpq-subs.c@1.133 +3 -1
+ [Bug 3677] additional peer events not decoded in associations listing
+ - add numeric formatting to default branch
+
+ChangeSet@1.3912.16.1, 2020-10-26 07:58:13+01:00, perlinger@ntp.org
+ [Bug 3674] ntpq command 'execute only' using '~' prefix
+
+ ChangeLog@1.1986.16.1 +4 -0
+ [Bug 3674] ntpq command 'execute only' using '~' prefix
+
+ ntpq/ntpq.c@1.192.2.1 +19 -0
+ [Bug 3674] ntpq command 'execute only' using '~' prefix
+
+ChangeSet@1.3912.15.1, 2020-10-26 07:38:57+01:00, perlinger@ntp.org
+ [Bug 3677] additional peer events not decoded in associations listing
+
+ ChangeLog@1.1986.15.1 +4 -0
+ [Bug 3677] additional peer events not decoded in associations listing
+
+ ntpq/ntpq-subs.c@1.132 +16 -0
+ [Bug 3677] additional peer events not decoded in associations listing
+
+ChangeSet@1.3927, 2020-10-25 12:25:51+01:00, perlinger@ntp.org
+ [mysterious problem] disable realpath() resolving of /dev/std* links
+
+ tests/libntp/realpath.c@1.3 +9 -0
+ [mysterious problem] disable realpath() resolving of /dev/std* links
+
+ChangeSet@1.3912.14.2, 2020-10-25 08:43:17+01:00, perlinger@ntp.org
+ [bug 3432] backport to 4.2.8-p15
+ - check 'write' for daemon wait pipe
+
+ ntpd/ntp_proto.c@1.438 +2 -1
+ [bug 3432] backport to 4.2.8-p15
+ - check 'write' for daemon wait pipe
+
+ ntpd/ntpd.c@1.185.1.1 +4 -2
+ [bug 3432] backport to 4.2.8-p15
+ - check 'write' for daemon wait pipe
+
+ChangeSet@1.3912.13.1, 2020-10-24 08:52:24+02:00, perlinger@ntp.org
+ [Bug 3682] Fixes for warnings when compiled without OpenSSL
+
+ ChangeLog@1.1986.13.1 +4 -0
+ [Bug 3682] Fixes for warnings when compiled without OpenSSL
+
+ libntp/a_md5encrypt.c@1.52.1.1 +14 -12
+ [Bug 3682] Fixes for warnings when compiled without OpenSSL
+
+ ntpd/ntp_control.c@1.239 +8 -2
+ [Bug 3682] Fixes for warnings when compiled without OpenSSL
+
+ ntpd/ntpd.c@1.186 +1 -2
+ [Bug 3682] Fixes for warnings when compiled without OpenSSL
+
+ ntpq/ntpq.c@1.192.1.1 +5 -3
+ [Bug 3682] Fixes for warnings when compiled without OpenSSL
+
+ sntp/crypto.c@1.41 +15 -11
+ [Bug 3682] Fixes for warnings when compiled without OpenSSL
+
+ChangeSet@1.3912.12.1, 2020-10-24 07:49:18+02:00, perlinger@ntp.org
+ [Bug 3687] ntp_crypto_rand RNG status not known
+
+ ChangeLog@1.1986.12.1 +4 -0
+ [Bug 3687] ntp_crypto_rand RNG status not known
+
+ libntp/ntp_crypto_rnd.c@1.5 +23 -6
+ [Bug 3687] ntp_crypto_rand RNG status not known
+
+ChangeSet@1.3923, 2020-10-21 02:36:52-04:00, stenn@psp-deb2.ntp.org
+ ChangeLog tweak
+
+ ChangeLog@1.1997 +1 -0
+ ChangeLog tweak
+
+ChangeSet@1.3914, 2020-10-20 07:35:29+00:00, stenn@psp-deb1.ntp.org
+ cleanup
+
+ ChangeLog@1.1988 +1 -0
+ cleanup
+
+ChangeSet@1.3912.5.4, 2020-10-20 07:12:32+00:00, stenn@psp-deb1.ntp.org
+ typo
+
+ sntp/m4/realpath.m4@1.2 +1 -1
+ typo
+
+ChangeSet@1.3912.11.1, 2020-10-20 06:48:48+02:00, perlinger@ntp.org
+ [Bug 3693] Improvement of error handling key lengths
+
+ ChangeLog@1.1986.11.1 +4 -0
+ [Bug 3693] Improvement of error handling key lengths
+
+ include/ntp_stdlib.h@1.86.3.1 +1 -1
+ [Bug 3693] Improvement of error handling key lengths
+
+ libntp/a_md5encrypt.c@1.53 +4 -2
+ [Bug 3693] Improvement of error handling key lengths
+
+ libntp/authkeys.c@1.41.1.1 +1 -1
+ [Bug 3693] Improvement of error handling key lengths
+
+ tests/libntp/a_md5encrypt.c@1.17 +4 -3
+ [Bug 3693] Improvement of error handling key lengths
+
+ tests/libntp/run-a_md5encrypt.c@1.18 +5 -5
+ [Bug 3693] Improvement of error handling key lengths
+ - auto-regenerated
+
+ChangeSet@1.3912.10.2, 2020-10-19 20:27:38+02:00, perlinger@ntp.org
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - enum for password encoding, symdef for secret size
+ - update docs
+
+ html/authentic.html@1.19 +8 -7
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - update docs
+
+ html/ntpdc.html@1.40 +2 -1
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - update docs
+
+ html/ntpq.html@1.53 +2 -1
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - update docs
+
+ include/ntp_stdlib.h@1.86.2.2 +8 -4
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - enum for password encoding, symdef for secret size
+
+ libntp/authkeys.c@1.43 +14 -14
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - enum for password encoding, symdef for secret size
+
+ libntp/authreadkeys.c@1.35 +1 -1
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - enum for password encoding, symdef for secret size
+
+ libntp/authusekey.c@1.13 +3 -3
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - enum for password encoding, symdef for secret size
+
+ChangeSet@1.3912.10.1, 2020-10-19 08:15:03+02:00, perlinger@ntp.org
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - refactor decoding a passwd string / secret
+ - have ntp{q,dc} use the same password decoding ntpd uses
+
+ ChangeLog@1.1986.10.1 +6 -0
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+
+ include/ntp_stdlib.h@1.86.2.1 +5 -0
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - refactor decoding a passwd string / secret
+
+ libntp/authkeys.c@1.42 +92 -0
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+
+ libntp/authreadkeys.c@1.34 +33 -46
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - refactor decoding a passwd string / secret
+
+ libntp/authusekey.c@1.12 +10 -10
+ [Bug 3689] Extension for MD5, SHA-1 and other keys
+ - have ntp{q,dc} use the same password decoding ntpd uses
+
+ChangeSet@1.3912.9.1, 2020-10-18 07:23:45+02:00, perlinger@ntp.org
+ [Bug 3690] newline in ntp clock variable
+
+ ChangeLog@1.1986.9.1 +4 -0
+ [Bug 3690] newline in ntp clock variable
+
+ ntpd/refclock_parse.c@1.90 +1 -1
+ [Bug 3690] newline in ntp clock variable
+
+ChangeSet@1.3912.8.1, 2020-10-17 16:06:54+02:00, perlinger@ntp.org
+ [Bug 3694] NMEA refclock appears to unnecessarily require location in messages
+ - add/describe 'ignore receiver status' bit
+
+ ChangeLog@1.1986.8.1 +5 -0
+ [Bug 3694] NMEA refclock appears to unnecessarily require location in messages
+
+ html/drivers/driver20.html@1.35 +10 -1
+ [Bug 3694] NMEA refclock appears to unnecessarily require location in messages
+ - add/describe 'ignore receiver status' bit
+
+ ntpd/refclock_nmea.c@1.79.1.7 +6 -0
+ [Bug 3694] NMEA refclock appears to unnecessarily require location in messages
+ - add/describe 'ignore receiver status' bit
+
+ChangeSet@1.3912.6.3, 2020-10-17 10:39:53+02:00, perlinger@ntp.org
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+ - increase path buffer for unit tests
+
+ libntp/ntp_realpath.c@1.2 +42 -36
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+
+ libntp/xsbprintf.c@1.3 +3 -3
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - sidekick: bad indentations
+
+ ports/winnt/vs2005/libntp.vcproj@1.29 +4 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.60 +11 -7
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.16 +3 -2
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.14 +5 -2
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj@1.6 +3 -2
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+
+ ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.6 +5 -2
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement 'ntp_realpath()' for windows, too
+
+ tests/libntp/realpath.c@1.2 +2 -2
+ Bug 3692 - /dev/gpsN requirement prevents KPPS
+ increase path buffer for unit tests
+
+ChangeSet@1.3912.6.2, 2020-10-16 08:11:40+02:00, perlinger@ntp.org
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - first unit tests (not applicable for windows so far)
+
+ tests/libntp/Makefile.am@1.101 +12 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - first unit tests (not applicable for windows so far)
+
+ tests/libntp/realpath.c@1.1 +85 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - first unit tests (not applicable for windows so far)
+
+ tests/libntp/realpath.c@1.0 +0 -0
+
+ tests/libntp/run-realpath.c@1.1 +70 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - first unit tests (not applicable for windows so far)
+
+ tests/libntp/run-realpath.c@1.0 +0 -0
+
+ChangeSet@1.3912.7.2, 2020-10-15 20:29:32+02:00, perlinger@ntp.org
+ [Bug 3688] GCC 10 build errors in testsuite
+ - fix the real issue -- 'progname' defined in wrong file
+
+ sntp/log.c@1.26 +1 -3
+ [Bug 3688] GCC 10 build errors in testsuite
+ - fix the real issue -- 'progname' defined in wrong file
+
+ sntp/main.c@1.106 +1 -0
+ [Bug 3688] GCC 10 build errors in testsuite
+ - fix the real issue -- 'progname' defined in wrong file
+
+ sntp/tests/t-log.c@1.9 +0 -1
+ [Bug 3688] GCC 10 build errors in testsuite
+ - fix the real issue -- 'progname' defined in wrong file
+
+ChangeSet@1.3912.7.1, 2020-10-15 08:39:12+02:00, perlinger@ntp.org
+ [Bug 3688] GCC 10 build errors in testsuite
+
+ ChangeLog@1.1986.7.1 +3 -0
+ [Bug 3688] GCC 10 build errors in testsuite
+
+ sntp/log.c@1.25 +2 -0
+ [Bug 3688] GCC 10 build errors in testsuite
+ - skip local definition of 'progname' in sntp/log.c when running unit tests
+
+ sntp/tests/t-log.c@1.8 +1 -1
+ [Bug 3688] GCC 10 build errors in testsuite
+ - skip local definition of 'progname' in sntp/log.c when running unit tests
+
+ChangeSet@1.3912.6.1, 2020-10-14 18:40:09+02:00, perlinger@ntp.org
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - resolve symlinks in device names for GPSD_JSON driver
+
+ ChangeLog@1.1986.6.1 +5 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - resolve symlinks in device names for GPSD_JSON driver
+
+ configure.ac@1.619.1.1 +1 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - Implement NTP_FUNC_REALPATH
+
+ include/ntp_stdlib.h@1.86.1.3 +2 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement wrapper for 'realpath()'
+
+ libntp/Makefile.am@1.85 +1 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - add 'realpath()' wrapper
+
+ libntp/ntp_realpath.c@1.1 +273 -0
+ -[Bug 3692] /dev/gpsN requirement prevents KPPS
+ - implement wrapper around 'realpath()' or a replacement plugged from FreeBSD
+
+ libntp/ntp_realpath.c@1.0 +0 -0
+
+ ntpd/refclock_gpsdjson.c@1.28.2.1 +20 -5
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - use 'ntp_realpath()' to resolve symlinks
+
+ ntpsnmpd/ntpsnmpd.c@1.11 +1 -1
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ - sidekick: remove indentation warning
+
+ sntp/m4/realpath.m4@1.1 +49 -0
+ [Bug 3692] /dev/gpsN requirement prevents KPPS
+ autoconf: test for POSIX-2008 compliant 'realpath()'
+
+ sntp/m4/realpath.m4@1.0 +0 -0
+
+ChangeSet@1.3912.5.2, 2020-10-14 06:15:18+00:00, stenn@psp-deb1.ntp.org
+ fix typos
+
+ sntp/m4/realpath.m4@1.2 +4 -5
+ fix typos
+
+ChangeSet@1.3912.5.1, 2020-10-14 05:52:43+00:00, stenn@psp-deb1.ntp.org
+ Implement NTP_FUNC_REALPATH
+
+ ChangeLog@1.1986.5.1 +4 -0
+ Implement NTP_FUNC_REALPATH
+
+ configure.ac@1.620 +1 -0
+ Implement NTP_FUNC_REALPATH
+
+ sntp/m4/realpath.m4@1.1 +50 -0
+ BitKeeper file sntp/m4/realpath.m4
+
+ sntp/m4/realpath.m4@1.0 +0 -0
+
+ChangeSet@1.3912.4.1, 2020-10-12 08:01:45+02:00, perlinger@ntp.org
+ [Bug 3691] Buffer Overflow reading GPSD output
+
+ ChangeLog@1.1986.4.1 +5 -0
+ [Bug 3691] Buffer Overflow reading GPSD output
+
+ ntpd/refclock_gpsdjson.c@1.28.1.3 +2 -2
+ [Bug 3691] Buffer Overflow reading GPSD output
+ - fixed bad buffer end calculation
+ - increased max PDU size
+
+ChangeSet@1.3912.3.1, 2020-07-20 07:35:48+02:00, perlinger@ntp.org
+ [Bug 3666] avoid unlimited receive buffer allocation
+ - follow-up: fix inverted sense in check, reset shortfall counter
+
+ ChangeLog@1.1986.3.1 +4 -0
+ [Bug 3666] avoid unlimited receive buffer allocation
+ - follow-up: fix inverted sense in check, reset shortfall counter
+
+ libntp/recvbuff.c@1.45 +5 -4
+ [Bug 3666] avoid unlimited receive buffer allocation
+ - follow-up: fix inverted sense in check, reset shortfall counter
+
+ChangeSet@1.3912.2.1, 2020-07-18 08:33:48+02:00, perlinger@ntp.org
+ [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage
+ [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough)
+
+ ChangeLog@1.1986.2.1 +5 -0
+ [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage
+ [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough)
+
+ ntpq/ntpq.c@1.193 +80 -67
+ [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage
+ [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough)
+
+ sntp/libevent/evdns.c@1.11 +1 -0
+ [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage
+ [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough)
+
+ChangeSet@1.3912.1.1, 2020-06-28 08:39:28+02:00, perlinger@ntp.org
+ [Bug 3672] fix biased selection in median cut
+
+ ChangeLog@1.1986.1.1 +3 -0
+ [Bug 3672] fix biased selection in median cut
+
+ ntpd/ntp_refclock.c@1.126.1.7 +7 -4
+ [Bug 3672] fix biased selection in median cut
+
+ChangeSet@1.3913, 2020-06-24 19:39:47+02:00, perlinger@ntp.org
+ [Bug 3626] (SNTP) UTC offset calculation needs dst flag
+
+ ChangeLog@1.1987 +4 -0
+ [Bug 3626] (SNTP) UTC offset calculation needs dst flag
+
+ sntp/utilities.c@1.21 +15 -10
+ [Bug 3626] (SNTP) UTC offset calculation needs dst flag
+
+ChangeSet@1.3912, 2020-06-23 02:27:53-07:00, ntpreleng@ntp-build.tal1.ntfo.org
+ typo
+
+ ChangeLog@1.1986 +0 -1
+ typo
+
ChangeSet@1.3911, 2020-06-23 02:22:19-07:00, ntpreleng@ntp-build.tal1.ntfo.org
NTP_4_2_8P15
TAG: NTP_4_2_8P15
@@ -622,13 +6197,13 @@ ChangeSet@1.3896.6.2, 2020-04-07 17:48:25+02:00, burnicki@psp-deb1.ntp.org
Fix compiling refclock_palisade.c
Don't have variable declarations after code.
- ntpd/refclock_palisade.c@1.49 +25 -23
+ ntpd/refclock_palisade.c@1.46.1.3 +25 -23
Don't have variable declarations after code.
ChangeSet@1.3896.6.1, 2020-04-07 17:47:02+02:00, burnicki@psp-deb1.ntp.org
Fix prototype in ntpd/refclock_nmea.c
- ntpd/refclock_nmea.c@1.85 +1 -1
+ ntpd/refclock_nmea.c@1.79.1.6 +1 -1
Fix prototype in ntpd/refclock_nmea.c
ChangeSet@1.3896.5.1, 2020-04-05 10:10:12+02:00, perlinger@ntp.org
@@ -646,7 +6221,7 @@ ChangeSet@1.3896.4.1, 2020-04-05 09:53:25+02:00, perlinger@ntp.org
ChangeLog@1.1974.4.1 +4 -0
[Bug 3653] Refclock jitter RMS calculation
- ntpd/ntp_refclock.c@1.132 +36 -36
+ ntpd/ntp_refclock.c@1.126.1.6 +36 -36
[Bug 3653] Refclock jitter RMS calculation
ChangeSet@1.3896.3.1, 2020-04-04 08:57:51+02:00, perlinger@ntp.org
@@ -1535,7 +7110,7 @@ ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org
include/ntp_request.h@1.54 +2 -1
srvfuzrft patches
- include/ntp_stdlib.h@1.88 +1 -1
+ include/ntp_stdlib.h@1.86.1.2 +1 -1
randomizepoll/server response fuzz reftime fixes
include/ntpd.h@1.207 +1 -1
@@ -1578,7 +7153,7 @@ ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org
ntpd/ntp_proto.c@1.427.1.2 +183 -36
bug3596: pollskewlist, server response fuzz, xmtnonce
- ntpd/ntp_refclock.c@1.131 +1 -1
+ ntpd/ntp_refclock.c@1.126.1.5 +1 -1
pollskew upodates
ntpd/ntp_request.c@1.131 +2 -2
@@ -2035,7 +7610,7 @@ ChangeSet@1.3873.2.2, 2020-01-17 06:59:50+01:00, perlinger@ntp.org
libntp/ntp_calgps.c@1.4 +31 -20
[Bug 3636] NMEA: combine time/date from multiple sentences
- ntpd/refclock_nmea.c@1.84 +158 -97
+ ntpd/refclock_nmea.c@1.79.1.5 +158 -97
[Bug 3636] NMEA: combine time/date from multiple sentences
ChangeSet@1.3873.3.2, 2020-01-12 07:10:55+01:00, perlinger@ntp.org
@@ -2218,7 +7793,7 @@ ChangeSet@1.3871.1.5, 2019-10-03 10:04:23+02:00, perlinger@ntp.org
ChangeLog@1.1968.25.3 +1 -0
[Bug 3594] ntpd discards messages coming through nmead
- ntpd/refclock_nmea.c@1.83 +110 -28
+ ntpd/refclock_nmea.c@1.79.1.4 +110 -28
[Bug 3594] ntpd discards messages coming through nmead
- make socket I/O for NMEAD nonblocking
- do local line split / record assembly as TCP does not preserve boundaries
@@ -2245,7 +7820,7 @@ ChangeSet@1.3870.1.1, 2019-09-21 07:31:44+02:00, perlinger@ntp.org
ChangeLog@1.1968.25.1 +1 -0
[Bug 3615] accelerate refclock startup
- include/ntp_refclock.h@1.39.1.1 +1 -0
+ include/ntp_refclock.h@1.38.2.1 +1 -0
[Bug 3615] accelerate refclock startup
- add 'inpoll' flag
@@ -2253,12 +7828,12 @@ ChangeSet@1.3870.1.1, 2019-09-21 07:31:44+02:00, perlinger@ntp.org
[Bug 3615] accelerate refclock startup
- time boxed stepping of sys_poll (avoid quick sys_poll overshoot)
- ntpd/ntp_refclock.c@1.128.1.1 +77 -6
+ ntpd/ntp_refclock.c@1.126.2.1 +77 -6
[Bug 3615] accelerate refclock startup
- check if clock status could benefit from early poll
- 'unsolicited' calls to refclock_receive add bits to the reach mask
- ntpd/refclock_nmea.c@1.82 +14 -10
+ ntpd/refclock_nmea.c@1.79.1.3 +14 -10
[Bug 3615] accelerate refclock startup
- minor sidekick: different order of data integrity checks reduces number of clock events
during signal dropout
@@ -2278,7 +7853,7 @@ ChangeSet@1.3872, 2019-09-13 08:18:14+02:00, perlinger@ntp.org
html/drivers/driver29.html@1.18 +68 -10
[Bug 3617] Add support for ACE III and Copernicus II receivers
- ntpd/refclock_palisade.c@1.48 +197 -11
+ ntpd/refclock_palisade.c@1.46.1.2 +197 -11
[Bug 3617] Add support for ACE III and Copernicus II receivers
ntpd/refclock_palisade.h@1.16 +5 -2
@@ -2318,7 +7893,7 @@ ChangeSet@1.3867.1.1, 2019-09-05 22:24:53+02:00, perlinger@ntp.org
[Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
- implementing 'fudge minjitter'
- include/ntp_refclock.h@1.40 +4 -1
+ include/ntp_refclock.h@1.38.1.2 +4 -1
[Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
- implementing 'fudge minjitter'
@@ -2354,7 +7929,7 @@ ChangeSet@1.3867.1.1, 2019-09-05 22:24:53+02:00, perlinger@ntp.org
[Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
- implementing 'fudge minjitter'
- ntpd/ntp_refclock.c@1.129 +19 -0
+ ntpd/ntp_refclock.c@1.126.1.3 +19 -0
[Bug 3609] Fixing wrong falseticker in case of non-statistic jitter
- implementing 'fudge minjitter'
@@ -2380,7 +7955,7 @@ ChangeSet@1.3868, 2019-09-04 21:40:55+02:00, perlinger@ntp.org
[Bug 3611] NMEA time interpreted incorrectly
- make GPS era folding a runtime decision ("date trust" support)
- ntpd/refclock_nmea.c@1.81 +5 -4
+ ntpd/refclock_nmea.c@1.79.1.2 +5 -4
[Bug 3611] NMEA time interpreted incorrectly
- restore hitherto undocumented "date trust" feature (was lost in [bug 3577])
- move "date trust" to mode bit 18
@@ -2513,7 +8088,7 @@ ChangeSet@1.3844.19.1, 2019-06-04 07:59:30+02:00, perlinger@ntp.org
ChangeLog@1.1968.18.1 +4 -0
[Bug 3490] Patch to support Trimble Resolution Receivers
- ntpd/refclock_palisade.c@1.47 +45 -1
+ ntpd/refclock_palisade.c@1.46.1.1 +45 -1
[Bug 3490] Patch to support Trimble Resolution Receivers
- original patch by Richard Steedman
- fixed bitwise AND vs boolean AND operation (not a real bug, but confusing)
@@ -2683,7 +8258,7 @@ ChangeSet@1.3844.3.10, 2019-05-13 07:44:52+02:00, perlinger@ntp.org
libntp/ntp_calgps.c@1.2 +29 -5
[Bug 3590] Update refclock_oncore.c to the new GPS date API
- ntpd/refclock_oncore.c@1.105 +54 -2
+ ntpd/refclock_oncore.c@1.104.1.1 +54 -2
[Bug 3590] Update refclock_oncore.c to the new GPS date API
- use GPS era remapping
@@ -2873,7 +8448,7 @@ ChangeSet@1.3844.7.1, 2019-04-28 09:50:11+02:00, perlinger@ntp.org
[Bug 3585] Unity tests mix buffered and unbuffered output
- regenrated test runner
- tests/libntp/run-caljulian.c@1.15 +2 -0
+ tests/libntp/run-caljulian.c@1.14.1.1 +2 -0
[Bug 3585] Unity tests mix buffered and unbuffered output
- regenrated test runner
@@ -3090,7 +8665,7 @@ ChangeSet@1.3844.5.5, 2019-04-23 08:17:58+02:00, perlinger@ntp.org
ChangeLog@1.1968.4.1 +3 -0
[Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled
- ntpd/refclock_gpsdjson.c@1.30 +1 -1
+ ntpd/refclock_gpsdjson.c@1.28.1.2 +1 -1
[Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled
ChangeSet@1.3844.3.9, 2019-04-22 11:57:53+02:00, perlinger@ntp.org
@@ -3152,7 +8727,7 @@ ChangeSet@1.3844.3.7, 2019-04-20 08:38:11+02:00, perlinger@ntp.org
ntpd/refclock_jupiter.c@1.33 +312 -409
[Bug 3577] Update refclock_zyfer.c to the new GPS date API
- ntpd/refclock_nmea.c@1.80 +434 -703
+ ntpd/refclock_nmea.c@1.79.1.1 +434 -703
[Bug 3577] Update refclock_zyfer.c to the new GPS date API
- use new API to wrap/warp GPS time stamps
- implement silent PPS mode & data expiration
@@ -3177,7 +8752,7 @@ ChangeSet@1.3844.3.6, 2019-04-20 08:18:00+02:00, perlinger@ntp.org
include/ntp_calgps.h@1.0 +0 -0
- include/ntp_refclock.h@1.39 +20 -9
+ include/ntp_refclock.h@1.38.1.1 +20 -9
[Bug 3576] New GPS date function API
- filter stage count is power of two now
- new functions for buffer handling
@@ -3206,7 +8781,7 @@ ChangeSet@1.3844.3.6, 2019-04-20 08:18:00+02:00, perlinger@ntp.org
libntp/timespecops.c@1.0 +0 -0
- ntpd/ntp_refclock.c@1.128 +309 -7
+ ntpd/ntp_refclock.c@1.126.1.2 +309 -7
[Bug 3576] New GPS date function API
- filter stage count is power of two now
- new functions for buffer handling
@@ -3215,7 +8790,7 @@ ChangeSet@1.3844.3.6, 2019-04-20 08:18:00+02:00, perlinger@ntp.org
[Bug 3576] New GPS date function API
- side kick: remove unused variables
- parseutil/dcfd.c@1.30 +10 -10
+ parseutil/dcfd.c@1.29.1.1 +10 -10
[Bug 3576] New GPS date function API
- side kick: fix compiler warnings (dprintf is a function and not the same as DPRINTF)
@@ -3992,7 +9567,7 @@ ChangeSet@1.3827.11.1, 2018-12-01 12:10:51+01:00, perlinger@ntp.org
[Bug 3556] ntp_loopfilter.c snprintf compilation warnings
- provide better function for incremental string formatting
- include/ntp_stdlib.h@1.87 +3 -0
+ include/ntp_stdlib.h@1.86.1.1 +3 -0
[Bug 3556] ntp_loopfilter.c snprintf compilation warnings
- provide better API for incremental string formatting
@@ -4828,19 +10403,19 @@ ChangeSet@1.3813, 2018-07-03 18:46:27+02:00, perlinger@ntp.org
ntpq/ntpq.c@1.188 +10 -13
[Sec 3505] CVE-2018-12327 - Arbitrary Code Execution Vulnerability
-ChangeSet@1.3790.6.3, 2018-06-19 13:00:54+02:00, burnicki@pc-martin4.py.meinberg.de
+ChangeSet@1.3790.7.3, 2018-06-19 13:00:54+02:00, burnicki@pc-martin4.py.meinberg.de
Fixes for ntpdate as discussed in bug #3442.
- ChangeLog@1.1920.6.2 +2 -0
+ ChangeLog@1.1920.7.2 +2 -0
Fixes for ntpdate as discussed in bug #3442.
ntpdate/ntpdate.c@1.101 +96 -73
Fixes for ntpdate as discussed in bug #3442.
-ChangeSet@1.3790.6.2, 2018-06-19 12:30:58+02:00, burnicki@pc-martin4.py.meinberg.de
+ChangeSet@1.3790.7.2, 2018-06-19 12:30:58+02:00, burnicki@pc-martin4.py.meinberg.de
New macro REFID_IS_TEXT().
- ChangeLog@1.1920.6.1 +3 -1
+ ChangeLog@1.1920.7.1 +3 -1
New macro REFID_IS_TEXT().
include/ntp.h@1.231 +12 -0
@@ -4849,7 +10424,7 @@ ChangeSet@1.3790.6.2, 2018-06-19 12:30:58+02:00, burnicki@pc-martin4.py.meinberg
ntpd/ntp_control.c@1.226.1.2 +6 -7
Use new macro REFID_IS_TEXT().
-ChangeSet@1.3790.6.1, 2018-06-19 11:40:42+02:00, burnicki@pc-martin4.py.meinberg.de
+ChangeSet@1.3790.7.1, 2018-06-19 11:40:42+02:00, burnicki@pc-martin4.py.meinberg.de
Removed trailing spaces in some files.
ntpd/ntp_config.c@1.360.2.1 +9 -9
@@ -5046,7 +10621,7 @@ ChangeSet@1.3797, 2018-04-08 12:17:35+02:00, perlinger@ntp.org
[Bug 3461] refclock_shm.c: clear error status on clock recovery
- fixed minor (non-functional) regression
- ntpd/ntp_refclock.c@1.127 +1 -1
+ ntpd/ntp_refclock.c@1.126.1.1 +1 -1
[Bug 3461] refclock_shm.c: clear error status on clock recovery
- dont't step 'lastevent' if NOMINAL
@@ -5101,17 +10676,25 @@ ChangeSet@1.3795, 2018-04-08 11:07:13+02:00, perlinger@ntp.org
- use 'sig{set,long}jmp()' instead of '{set,long}jmp()' when possible
- unclutter jumping out of signal handler
-ChangeSet@1.3790.5.2, 2018-04-07 09:39:54+00:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.3790.3.3, 2018-04-07 13:54:34+02:00, perlinger@ntp.org
+ [Bug 3432] - refclocks that 'write()' should check the result
+ - sidekick: unchecked write in async resover code
+
+ libntp/work_thread.c@1.22.1.1 +4 -2
+ [Bug 3432] - refclocks that 'write()' should check the result
+ - sidekick: unchecked write in async resover code
+
+ChangeSet@1.3790.6.2, 2018-04-07 09:39:54+00:00, stenn@psp-deb1.ntp.org
tweak the Changelog
- ChangeLog@1.1920.5.2 +1 -0
+ ChangeLog@1.1920.6.2 +1 -0
tweak
-ChangeSet@1.3790.5.1, 2018-04-07 10:03:14+02:00, jnperlin@hydra.localnet
+ChangeSet@1.3790.6.1, 2018-04-07 10:03:14+02:00, jnperlin@hydra.localnet
[Bug 2821] minor build issues
+ bug fixes
- ChangeLog@1.1920.5.1 +4 -0
+ ChangeLog@1.1920.6.1 +4 -0
[Bug 2821] minor build issues
+ bug fixes
@@ -5139,7 +10722,7 @@ ChangeSet@1.3790.5.1, 2018-04-07 10:03:14+02:00, jnperlin@hydra.localnet
[Bug 2821] minor build issues
+ bug fixes
- ntpd/refclock_gpsdjson.c@1.29 +2 -2
+ ntpd/refclock_gpsdjson.c@1.28.1.1 +2 -2
[Bug 2821] minor build issues
+ bug fixes
@@ -5147,7 +10730,7 @@ ChangeSet@1.3790.5.1, 2018-04-07 10:03:14+02:00, jnperlin@hydra.localnet
[Bug 2821] minor build issues
+ bug fixes
- ntpd/refclock_true.c@1.26 +1 -1
+ ntpd/refclock_true.c@1.25.1.1 +1 -1
[Bug 2821] minor build issues
+ bug fixes
@@ -5163,13 +10746,13 @@ ChangeSet@1.3790.5.1, 2018-04-07 10:03:14+02:00, jnperlin@hydra.localnet
[Bug 2821] minor build issues
+ bug fixes
-ChangeSet@1.3790.4.1, 2018-03-16 06:37:19+01:00, perlinger@ntp.org
+ChangeSet@1.3790.5.1, 2018-03-16 06:37:19+01:00, perlinger@ntp.org
[Bug 3471] Check for openssl/[ch]mac.h
- cond-compile if CMAC not supported
- fix tests when CMAC not available
- add #define ENABLE_CMAC support in configure
- ChangeLog@1.1920.4.1 +4 -0
+ ChangeLog@1.1920.5.1 +4 -0
[Bug 3471] Check for openssl/[ch]mac.h
---
Bug 3471: add --enable-cmac support in configure
@@ -5219,33 +10802,121 @@ ChangeSet@1.3790.4.1, 2018-03-16 06:37:19+01:00, perlinger@ntp.org
[Bug 3471] Check for openssl/[ch]mac.h
- fix tests when CMAC not available
-ChangeSet@1.3790.3.3, 2018-03-15 23:16:22+00:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.3790.4.3, 2018-03-15 23:16:22+00:00, stenn@psp-deb1.ntp.org
Bug 3471: add #define ENABLE_CMAC support in configure
- ChangeLog@1.1920.3.3 +1 -1
+ ChangeLog@1.1920.4.3 +1 -1
Bug 3471: add #define ENABLE_CMAC support in configure
configure.ac@1.612 +6 -13
Bug 3471: add #define ENABLE_CMAC support in configure
-ChangeSet@1.3790.3.2, 2018-03-15 07:55:58+00:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.3790.4.2, 2018-03-15 07:55:58+00:00, stenn@psp-deb1.ntp.org
Bug 3471: add --enable-cmac support in configure
- ChangeLog@1.1920.3.2 +1 -0
+ ChangeLog@1.1920.4.2 +1 -0
Bug 3471: add --enable-cmac support in configure
configure.ac@1.611 +18 -0
Bug 3471: add --enable-cmac support in configure
-ChangeSet@1.3790.3.1, 2018-03-15 06:55:28+00:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.3790.4.1, 2018-03-15 06:55:28+00:00, stenn@psp-deb1.ntp.org
[Bug 3471] Check for openssl/[ch]mac.h
- ChangeLog@1.1920.3.1 +3 -0
+ ChangeLog@1.1920.4.1 +3 -0
[Bug 3471] Check for openssl/[ch]mac.h
sntp/m4/ntp_openssl.m4@1.30 +1 -0
[Bug 3471] Check for openssl/[ch]mac.h
+ChangeSet@1.3790.3.1, 2018-03-15 06:29:23+01:00, perlinger@ntp.org
+ [Bug 3432] refclocks that 'write()' should check the result
+ - also fixed some more compiler warnings
+
+ ChangeLog@1.1920.3.1 +4 -0
+ [Bug 3432] refclocks that 'write()' should check the result
+
+ include/ntp_refclock.h@1.39 +6 -0
+ [Bug 3432] refclocks that 'write()' should check the result
+ - add 'refclock_[fd]write()' functions
+ - define FDWRITE_ERROR
+
+ include/ntp_stdlib.h@1.87 +1 -1
+ [Bug 3432] refclocks that 'write()' should check the result
+ - 'refnumtoa()' arg can be 'const'
+
+ libntp/refnumtoa.c@1.11 +1 -1
+ [Bug 3432] refclocks that 'write()' should check the result
+ - 'refnumtoa()' arg can be 'const'
+
+ ntpd/ntp_refclock.c@1.127 +67 -0
+ [Bug 3432] refclocks that 'write()' should check the result
+ - add 'refclock_[fd]write()' functions
+
+ ntpd/refclock_acts.c@1.55 +9 -19
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_arbiter.c@1.21 +17 -19
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_as2201.c@1.17 +3 -2
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_dumbclock.c@1.19 +1 -7
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_gpsdjson.c@1.29 +1 -1
+ [Bug 3432] refclocks that 'write()' should check the result
+ - comment typo
+
+ ntpd/refclock_heath.c@1.20 +1 -1
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_hopfser.c@1.18 +0 -6
+ [Bug 3432] refclocks that 'write()' should check the result
+ - this clock does not write at all, remove unused defs
+
+ ntpd/refclock_hpgps.c@1.17 +8 -8
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_nmea.c@1.80 +1 -8
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_oncore.c@1.105 +12 -7
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_palisade.c@1.47 +6 -3
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ ntpd/refclock_true.c@1.26 +1 -7
+ [Bug 3432] refclocks that 'write()' should check the result
+ - use 'refclock_[fd]write()' functions, not 'write()'
+
+ parseutil/dcfd.c@1.30 +6 -2
+ [Bug 3432] refclocks that 'write()' should check the result
+ - sidekick: check result of 'fscanf()' and 'daemon()'
+
+ ports/winnt/vs2015/ntpd/ntpd.vcxproj@1.3 +1 -0
+ Bug 3432 - refclocks that 'write()' should check the result
+ - sidekick: refclock_arc warnings on integer const overflow
+
+ tests/libntp/caljulian.c@1.15 +17 -57
+ [Bug 3432] refclocks that 'write()' should check the result
+ - fix warnings and rather mechanic translation from C++ to C
+
+ tests/libntp/run-caljulian.c@1.15 +5 -4
+ [Bug 3432] refclocks that 'write()' should check the result
+ - regenerated file
+
ChangeSet@1.3790.2.1, 2018-03-12 16:36:51+01:00, perlinger@ntp.org
[Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
diff --git a/contrib/ntp/Makefile.am b/contrib/ntp/Makefile.am
index 7c95863d8a1d..72c35cb0e45d 100644
--- a/contrib/ntp/Makefile.am
+++ b/contrib/ntp/Makefile.am
@@ -52,7 +52,6 @@ EXTRA_DIST = \
\
conf \
html \
- lib/isc \
libjsmn \
ports \
\
diff --git a/contrib/ntp/Makefile.in b/contrib/ntp/Makefile.in
index 7353076ae838..4307d8bebee9 100644
--- a/contrib/ntp/Makefile.in
+++ b/contrib/ntp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -127,6 +126,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -173,9 +173,9 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- cscope distdir dist dist-all distcheck
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
- $(LISP)config.h.in
+ cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+ config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@@ -192,9 +192,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/sntp/libevent/build-aux/ar-lib \
@@ -250,6 +247,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -271,6 +270,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -280,6 +280,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -292,14 +294,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -510,6 +508,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -570,7 +569,6 @@ EXTRA_DIST = \
\
conf \
html \
- lib/isc \
libjsmn \
ports \
\
@@ -619,8 +617,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -761,8 +759,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -845,6 +845,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@@ -887,6 +891,8 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@@ -902,7 +908,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -961,7 +967,8 @@ installdirs: installdirs-recursive
installdirs-am:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
@@ -1064,13 +1071,13 @@ ps-am:
uninstall-am: uninstall-local
.MAKE: $(am__recursive_targets) all check install install-am \
- install-strip
+ install-exec install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
- dist-tarZ dist-xz dist-zip distcheck distclean \
+ dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
diff --git a/contrib/ntp/NEWS b/contrib/ntp/NEWS
index caf9ea664df5..d9d8a0987ab6 100644
--- a/contrib/ntp/NEWS
+++ b/contrib/ntp/NEWS
@@ -1,4 +1,127 @@
---
+NTP 4.2.8p16 (Harlan Stenn <stenn@ntp.org>, 2023 May 30)
+
+Focus: Security, Bug fixes
+
+Severity: LOW
+
+This release:
+
+- fixes 4 vulnerabilities (3 LOW and 1 None severity),
+- fixes 46 bugs
+- includes 15 general improvements
+- adds support for OpenSSL-3.0
+
+Details below:
+
+* [Sec 3808] Assertion failure in ntpq on malformed RT-11 date <perlinger@ntp.org>
+* [Sec 3807] praecis_parse() in the Palisade refclock driver has a
+ hypothetical input buffer overflow. Reported by ... stenn@
+* [Sec 3806] libntp/mstolfp.c needs bounds checking <perlinger@ntp.org>
+ - solved numerically instead of using string manipulation
+* [Sec 3767] An OOB KoD RATE value triggers an assertion when debug is enabled.
+ <stenn@ntp.org>
+* [Bug 3819] Updated libopts/Makefile.am was missing NTP_HARD_* values. <stenn@>
+* [Bug 3817] Bounds-check "tos floor" configuration. <hart@ntp.org>
+* [Bug 3814] First poll delay of new or cleared associations miscalculated.
+ <hart@ntp.org>
+* [Bug 3802] ntp-keygen -I default identity modulus bits too small for
+ OpenSSL 3. Reported by rmsh1216@163.com <hart@ntp.org>
+* [Bug 3801] gpsdjson refclock gps_open() device name mishandled. <hart@ntp.org>
+* [Bug 3800] libopts-42.1.17 does not compile with Microsoft C. <hart@ntp.org>
+* [Bug 3799] Enable libopts noreturn compiler advice for MSC. <hart@ntp.org>
+* [Bug 3797] Windows getaddrinfo w/AI_ADDRCONFIG fails for localhost when
+ disconnected, breaking ntpq and ntpdc. <hart@ntp.org>
+* [Bug 3795] pollskewlist documentation uses | when it shouldn't.
+ - ntp.conf manual page and miscopt.html corrections. <hart@ntp.org>
+* [Bug 3793] Wrong variable type passed to record_raw_stats(). <hart@ntp.org>
+ - Report and patch by Yuezhen LUAN <wei6410@sina.com>.
+* [Bug 3786] Timer starvation on high-load Windows ntpd. <hart@ntp.org>
+* [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded.
+ <hart@ntp.org>
+* [Bug 3781] log "Unable to listen for broadcasts" for IPv4 <hart@ntp.org>
+* [Bug 3774] mode 6 packets corrupted in rawstats file <hart@ntp.org>
+ - Reported by Edward McGuire, fix identified by <wei6410@sina.com>.
+* [Bug 3758] Provide a 'device' config statement for refclocks <perlinger@ntp.org>
+* [Bug 3757] Improve handling of Linux-PPS in NTPD <perlinger@ntp.org>
+* [Bug 3741] 4.2.8p15 can't build with glibc 2.34 <perlinger@ntp.org>
+* [Bug 3725] Make copyright of clk_wharton.c compatible with Debian.
+ Philippe De Muyter <phdm@macqel.be>
+* [Bug 3724] ntp-keygen with openSSL 1.1.1 fails on Windows <perlinger@ntp.org>
+ - openssl applink needed again for openSSL-1.1.1
+* [Bug 3719] configure.ac checks for closefrom() and getdtablesize() missing.
+ Reported by Brian Utterback, broken in 2010 by <hart@ntp.org>
+* [Bug 3699] Problems handling drift file and restoring previous drifts <perlinger@ntp.org>
+ - command line options override config statements where applicable
+ - make initial frequency settings idempotent and reversible
+ - make sure kernel PLL gets a recovered drift componsation
+* [Bug 3695] Fix memory leak with ntpq on Windows Server 2019 <perlinger@ntp.org>
+* [Bug 3694] NMEA refclock seems to unnecessarily require location in messages
+ - misleading title; essentially a request to ignore the receiver status.
+ Added a mode bit for this. <perlinger@ntp.org>
+* [Bug 3693] Improvement of error handling key lengths <perlinger@ntp.org>
+ - original patch by Richard Schmidt, with mods & unit test fixes
+* [Bug 3692] /dev/gpsN requirement prevents KPPS <perlinger@ntp.org>
+ - implement/wrap 'realpath()' to resolve symlinks in device names
+* [Bug 3691] Buffer Overflow reading GPSD output
+ - original patch by matt<ntpbr@mattcorallo.com>
+ - increased max PDU size to 4k to avoid truncation
+* [Bug 3690] newline in ntp clock variable (parse) <perlinger@ntp.org>
+ - patch by Frank Kardel
+* [Bug 3689] Extension for MD5, SHA-1 and other keys <perlinger@ntp.org>
+ - ntp{q,dc} now use the same password processing as ntpd does in the key
+ file, so having a binary secret >= 11 bytes is possible for all keys.
+ (This is a different approach to the problem than suggested)
+* [Bug 3688] GCC 10 build errors in testsuite <perlinger@ntp.org>
+* [Bug 3687] ntp_crypto_rand RNG status not known <perlinger@ntp.org>
+ - patch by Gerry Garvey
+* [Bug 3682] Fixes for warnings when compiled without OpenSSL <perlinger@ntp.org>
+ - original patch by Gerry Garvey
+* [Bug 3677] additional peer events not decoded in associations listing <perlinger@ntp.org>
+ - original patch by Gerry Garvey
+* [Bug 3676] compiler warnings (CMAC, interrupt_buf, typo, fallthrough)
+ - applied patches by Gerry Garvey
+* [Bug 3675] ntpq ccmds[] stores pointer to non-persistent storage
+* [Bug 3674] ntpq command 'execute only' using '~' prefix <perlinger@ntp.org>
+ - idea+patch by Gerry Garvey
+* [Bug 3672] fix biased selection in median cut <perlinger@ntp.org>
+* [Bug 3666] avoid unlimited receive buffer allocation <perlinger@ntp.org>
+ - follow-up: fix inverted sense in check, reset shortfall counter
+* [Bug 3660] Revert 4.2.8p15 change to manycast. <hart@ntp.org>
+* [Bug 3640] document "discard monitor" and fix the code. <hart@ntp.org>
+ - fixed bug identified by Edward McGuire <perlinger@ntp.org>
+* [Bug 3626] (SNTP) UTC offset calculation needs dst flag <perlinger@ntp.org>
+ - applied patch by Gerry Garvey
+* [Bug 3432] refclocks that 'write()' should check the result <perlinger@ntp.org>
+ - backport from -dev, plus some more work on warnings for unchecked results
+* [Bug 3428] ntpd spinning consuming CPU on Linux router with full table.
+ Reported by Israel G. Lugo. <hart@ntp.org>
+* [Bug 3103] libopts zsave_warn format string too few arguments <bkorb@gnu.org>
+* [Bug 2990] multicastclient incorrectly causes bind to broadcast address.
+ Integrated patch from Brian Utterback. <hart@ntp.org>
+* [Bug 2525] Turn on automake subdir-objects across the project. <hart@ntp.org>
+* [Bug 2410] syslog an error message on panic exceeded. <brian.utterback@oracle.com>
+* Use correct rounding in mstolfp(). perlinger/hart
+* M_ADDF should use u_int32. <hart@ntp.org>
+* Only define tv_fmt_libbuf() if we will use it. <stenn@ntp.org>
+* Use recv_buffer instead of the longer recv_space.X_recv_buffer. hart/stenn
+* Make sure the value returned by refid_str() prints cleanly. <stenn@ntp.org>
+* If DEBUG is enabled, the startup banner now says that debug assertions
+ are in force and that ntpd will abort if any are violated. <stenn@ntp.org>
+* syslog valid incoming KoDs. <stenn@ntp.org>
+* Rename a poorly-named variable. <stenn@ntp.org>
+* Disable "embedded NUL in string" messages in libopts, when we can. <stenn@>
+* Use https in the AC_INIT URLs in configure.ac. <stenn@ntp.org>
+* Implement NTP_FUNC_REALPATH. <stenn@ntp.org>
+* Lose a gmake construct in ntpd/Makefile.am. <stenn@ntp.org>
+* upgrade to: autogen-5.18.16
+* upgrade to: libopts-42.1.17
+* upgrade to: autoconf-2.71
+* upgrade to: automake-1.16.15
+* Upgrade to libevent-2.1.12-stable <stenn@ntp.org>
+* Support OpenSSL-3.0
+
+---
NTP 4.2.8p15 (Harlan Stenn <stenn@ntp.org>, 2020 Jun 23)
Focus: Security, Bug fixes
diff --git a/contrib/ntp/aclocal.m4 b/contrib/ntp/aclocal.m4
index ec9f3a527ca3..6d97d06e2a52 100644
--- a/contrib/ntp/aclocal.m4
+++ b/contrib/ntp/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,127 +14,13 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.61, and can be faster
-# than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
-# defined. In this case you can treat 'long long int' like 'long int'.
-
-AC_DEFUN([AC_TYPE_LONG_LONG_INT],
-[
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
- AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
- [ac_cv_type_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
- if test $ac_cv_type_long_long_int = yes; then
- dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
- dnl If cross compiling, assume the bug is not important, since
- dnl nobody cross compiles for this platform as far as we know.
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[@%:@include <limits.h>
- @%:@ifndef LLONG_MAX
- @%:@ define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- @%:@ define LLONG_MAX (HALF - 1 + HALF)
- @%:@endif]],
- [[long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;]])],
- [],
- [ac_cv_type_long_long_int=no],
- [:])
- fi
- fi])
- if test $ac_cv_type_long_long_int = yes; then
- AC_DEFINE([HAVE_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type 'long long int'.])
- fi
-])
-
-# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.61, and can be faster
-# than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'unsigned long long int' exists but is only 32 bits
-# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
-# will not be defined. In this case you can treat 'unsigned long long int'
-# like 'unsigned long int'.
-
-AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
-[
- AC_CACHE_CHECK([for unsigned long long int],
- [ac_cv_type_unsigned_long_long_int],
- [ac_cv_type_unsigned_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- AC_LINK_IFELSE(
- [_AC_TYPE_LONG_LONG_SNIPPET],
- [],
- [ac_cv_type_unsigned_long_long_int=no])
- fi])
- if test $ac_cv_type_unsigned_long_long_int = yes; then
- AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type 'unsigned long long int'.])
- fi
-])
-
-# Expands to a C program that can be used to test for simultaneous support
-# of 'long long' and 'unsigned long long'. We don't want to say that
-# 'long long' is available if 'unsigned long long' is not, or vice versa,
-# because too many programs rely on the symmetry between signed and unsigned
-# integer types (excluding 'bool').
-AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
-[
- AC_LANG_PROGRAM(
- [[/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;]],
- [[/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));]])
-])
-
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -146,10 +32,10 @@ AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.15.1], [],
+m4_if([$1], [1.16.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -165,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -232,7 +118,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -284,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -315,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -506,13 +392,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -520,49 +405,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "$am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -571,18 +450,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -610,6 +488,10 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -646,7 +528,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
- m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@@ -669,8 +551,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
@@ -698,6 +580,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
@@ -737,7 +633,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -779,7 +675,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -800,7 +696,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -821,7 +717,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -829,49 +725,42 @@ AC_SUBST([am__leading_dot])])
# AM_MAKE_INCLUDE()
# -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -892,12 +781,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
@@ -910,7 +794,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -939,7 +823,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -986,7 +870,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1005,7 +889,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1086,7 +970,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1146,7 +1030,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1174,7 +1058,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1193,7 +1077,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2017 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1342,7 +1226,6 @@ m4_include([sntp/m4/ntp_crypto_rand.m4])
m4_include([sntp/m4/ntp_debug.m4])
m4_include([sntp/m4/ntp_dir_sep.m4])
m4_include([sntp/m4/ntp_facilitynames.m4])
-m4_include([sntp/m4/ntp_googletest.m4])
m4_include([sntp/m4/ntp_harden.m4])
m4_include([sntp/m4/ntp_ipv6.m4])
m4_include([sntp/m4/ntp_lib_m.m4])
@@ -1362,4 +1245,5 @@ m4_include([sntp/m4/ntp_vpathhack.m4])
m4_include([sntp/m4/openldap-thread-check.m4])
m4_include([sntp/m4/openldap.m4])
m4_include([sntp/m4/os_cflags.m4])
+m4_include([sntp/m4/realpath.m4])
m4_include([sntp/m4/snprintf.m4])
diff --git a/contrib/ntp/adjtimed/Makefile.am b/contrib/ntp/adjtimed/Makefile.am
index 19bfe0c952cd..87c12b393e76 100644
--- a/contrib/ntp/adjtimed/Makefile.am
+++ b/contrib/ntp/adjtimed/Makefile.am
@@ -6,6 +6,7 @@ sbin_PROGRAMS = $(ADJTIMED_DS)
BUILT_SOURCES =
CLEANFILES =
+DISTCLEANFILES =
EXTRA_PROGRAMS = adjtimed
AM_CFLAGS = $(CFLAGS_NTP)
@@ -19,6 +20,6 @@ LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
include $(top_srcdir)/bincheck.mf
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/adjtimed/Makefile.in b/contrib/ntp/adjtimed/Makefile.in
index 87e1fba23032..7e7469c4f1b6 100644
--- a/contrib/ntp/adjtimed/Makefile.in
+++ b/contrib/ntp/adjtimed/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -116,7 +116,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -136,6 +135,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -172,7 +172,8 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/adjtimed.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -216,11 +217,9 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
- $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
- $(top_srcdir)/sntp/check-libntp.mf \
+ $(top_srcdir)/check-libntp.mf $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -240,6 +239,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -249,6 +249,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -261,14 +263,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -479,6 +477,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -490,19 +489,21 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
BUILT_SOURCES = check-libntp .deps-ver
CLEANFILES = check-libntp .deps-ver
+DISTCLEANFILES = $(DEPDIR)/deps-ver
AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -519,10 +520,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -690,25 +691,34 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -770,8 +780,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -811,7 +823,8 @@ installdirs:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -837,6 +850,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -848,7 +862,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/adjtimed.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -896,7 +910,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/adjtimed.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -916,9 +930,10 @@ ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
uninstall-sbinPROGRAMS
-.MAKE: all check install install-am install-exec-am install-strip
+.MAKE: all check install install-am install-exec install-exec-am \
+ install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic \
@@ -952,17 +967,18 @@ install-exec-hook:
#
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -980,7 +996,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1010,7 +1026,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/check-libntp.mf b/contrib/ntp/check-libntp.mf
new file mode 100644
index 000000000000..07c855b4be78
--- /dev/null
+++ b/contrib/ntp/check-libntp.mf
@@ -0,0 +1,14 @@
+## check-libntp.mf - automake fragment
+##
+## sntp/check-libntp.mf
+## The above file has a version of this for the sntp tree.
+
+BUILT_SOURCES += check-libntp
+CLEANFILES += check-libntp
+
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
diff --git a/contrib/ntp/check-libntpd.mf b/contrib/ntp/check-libntpd.mf
new file mode 100644
index 000000000000..46304dd5f236
--- /dev/null
+++ b/contrib/ntp/check-libntpd.mf
@@ -0,0 +1,19 @@
+##
+## check-libntpd.mf - automake fragment
+##
+
+BUILT_SOURCES += check-libntpd
+
+# CLEANFILES addition below won't be needed after a while.
+# Leave it in for now for folks tracking the source repo
+# who have the file from a former version of the rule.
+# DLH Jan 2023
+
+CLEANFILES += check-libntpd
+
+check-libntpd: $(top_builddir)/ntpd/libntpd.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/ntpd/libntpd.a:
+ cd $(top_builddir)/ntpd && $(MAKE) $(AM_MAKEFLAGS) libntpd.a
+
diff --git a/contrib/ntp/check-libunity.mf b/contrib/ntp/check-libunity.mf
new file mode 100644
index 000000000000..4e052058c0c3
--- /dev/null
+++ b/contrib/ntp/check-libunity.mf
@@ -0,0 +1,13 @@
+## check-libunity.mf - automake fragment
+##
+## sntp/check-libunity.mf
+## The above file has a version of this for the sntp tree.
+
+BUILT_SOURCES += check-libunity
+
+check-libunity: $(top_builddir)/sntp/unity/libunity.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/sntp/unity/libunity.a:
+ cd $(top_builddir)/sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+
diff --git a/contrib/ntp/check-scm-rev.mf b/contrib/ntp/check-scm-rev.mf
new file mode 100644
index 000000000000..e2abbf0e452c
--- /dev/null
+++ b/contrib/ntp/check-scm-rev.mf
@@ -0,0 +1,8 @@
+$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
+
diff --git a/contrib/ntp/clockstuff/Makefile.am b/contrib/ntp/clockstuff/Makefile.am
index 27984e9df718..5b3f59f841eb 100644
--- a/contrib/ntp/clockstuff/Makefile.am
+++ b/contrib/ntp/clockstuff/Makefile.am
@@ -14,7 +14,8 @@ propdelay_LDADD = $(LDADD)
BUILT_SOURCES =
CLEANFILES =
+DISTCLEANFILES =
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/clockstuff/Makefile.in b/contrib/ntp/clockstuff/Makefile.in
index 0775b9ae8060..f33483eb59c8 100644
--- a/contrib/ntp/clockstuff/Makefile.in
+++ b/contrib/ntp/clockstuff/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -168,7 +168,8 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/chutest.Po ./$(DEPDIR)/propdelay.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -212,10 +213,8 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/check-libntp.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -235,6 +234,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -244,6 +244,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -256,14 +258,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -474,6 +472,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -491,15 +490,17 @@ AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
propdelay_LDADD = $(LDADD)
BUILT_SOURCES = check-libntp .deps-ver
CLEANFILES = check-libntp .deps-ver
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+DISTCLEANFILES = $(DEPDIR)/deps-ver
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -516,10 +517,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -553,26 +554,35 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chutest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propdelay.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chutest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propdelay.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -634,8 +644,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -672,7 +684,8 @@ all-am: Makefile $(PROGRAMS)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -698,6 +711,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -709,7 +723,8 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/chutest.Po
+ -rm -f ./$(DEPDIR)/propdelay.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -755,7 +770,8 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/chutest.Po
+ -rm -f ./$(DEPDIR)/propdelay.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -774,11 +790,11 @@ ps-am:
uninstall-am:
-.MAKE: all check install install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
- ctags-am distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@@ -793,17 +809,18 @@ uninstall-am:
.PRECIOUS: Makefile
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -821,7 +838,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -851,7 +868,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/config.h.in b/contrib/ntp/config.h.in
index 4fa8c3188377..c00eba442298 100644
--- a/contrib/ntp/config.h.in
+++ b/contrib/ntp/config.h.in
@@ -171,12 +171,7 @@
/* Zyfer GPStarplus */
#undef CLOCK_ZYFER
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
+/* Define to 1 if using 'alloca.c'. */
#undef C_ALLOCA
/* Enable debugging code? */
@@ -299,6 +294,9 @@
/* use old autokey session key behavior? */
#undef DISABLE_BUG3527_FIX
+/* Disable debug assertion on OOB KoD RATE value? */
+#undef DISABLE_BUG3767_FIX
+
/* synch TODR hourly? */
#undef DOSYNCTODR
@@ -317,6 +315,9 @@
/* Enable CMAC support? */
#undef ENABLE_CMAC
+/* auto-instantiate missing PPS devices on Linux */
+#undef ENABLE_MAGICPPS
+
/* nls support in libopts */
#undef ENABLE_NLS
@@ -332,11 +333,10 @@
/* via __adjtimex */
#undef HAVE_ADJTIMEX
-/* Define to 1 if you have `alloca', as a function or macro. */
+/* Define to 1 if you have 'alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
+/* Define to 1 if <alloca.h> works. */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the `arc4random_buf' function. */
@@ -372,6 +372,9 @@
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
+/* Define to 1 if you have the `closefrom' function. */
+#undef HAVE_CLOSEFROM
+
/* Define to 1 if you have the <cthreads.h> header file. */
#undef HAVE_CTHREADS_H
@@ -418,6 +421,9 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define to 1 if you have the `fdopendir' function. */
+#undef HAVE_FDOPENDIR
+
/* Define to 1 if you have the `finite' function. */
#undef HAVE_FINITE
@@ -433,6 +439,12 @@
/* Define to 1 if you have the `fstat' function. */
#undef HAVE_FSTAT
+/* Define to 1 if you have the `fstatat' function. */
+#undef HAVE_FSTATAT
+
+/* Define to 1 if we have realpath() that supports NULL as the 2nd argument */
+#undef HAVE_FUNC_POSIX_REALPATH
+
/* Define to 1 if you have the `getbootfile' function. */
#undef HAVE_GETBOOTFILE
@@ -553,7 +565,7 @@
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
-/* Define to 1 if the system has the type 'long long int'. */
+/* Define to 1 if the system has the type `long long int'. */
#undef HAVE_LONG_LONG_INT
/* if you have SunOS LWP package */
@@ -592,6 +604,9 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
+
/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
@@ -670,6 +685,9 @@
/* if you have NT Threads */
#undef HAVE_NT_THREADS
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
/* Define to 1 if you have the <openssl/cmac.h> header file. */
#undef HAVE_OPENSSL_CMAC_H
@@ -868,6 +886,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -883,7 +904,7 @@
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
-/* Define to 1 if you have the `strerror_r' function. */
+/* Define if you have `strerror_r'. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */
@@ -1179,7 +1200,7 @@
/* deviant sigwait? */
#undef HAVE_UNIXWARE_SIGWAIT
-/* Define to 1 if the system has the type 'unsigned long long int'. */
+/* Define to 1 if the system has the type `unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
/* Define to 1 if you have the `updwtmp' function. */
@@ -1566,7 +1587,9 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Step, then slew the clock? */
@@ -1596,7 +1619,8 @@
/* Is K_TICK_NAME in nanoseconds? */
#undef TICK_NANO
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
+ macro is obsolete. */
#undef TIME_WITH_SYS_TIME
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
@@ -1627,21 +1651,87 @@ typedef unsigned int uintptr_t;
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
-/* Enable threading extensions on Solaris. */
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+/* Enable X/Open extensions. Define to 500 only if necessary
+ to make mbstate_t available. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
#endif
@@ -1675,16 +1765,6 @@ typedef unsigned int uintptr_t;
/* routine worker child proc uses to exit. */
#undef WORKER_CHILD_EXIT
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
/* enable thread safety */
#undef _REENTRANT
@@ -1700,7 +1780,8 @@ typedef unsigned int uintptr_t;
/* Are we _special_? */
#undef __APPLE_USE_RFC_3542
-/* Define to 1 if type `char' is unsigned and you are not using gcc. */
+/* Define to 1 if type `char' is unsigned and your compiler does not
+ predefine this macro. */
#ifndef __CHAR_UNSIGNED__
# undef __CHAR_UNSIGNED__
#endif
@@ -1733,7 +1814,7 @@ typedef unsigned int uintptr_t;
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
#undef pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
diff --git a/contrib/ntp/configure b/contrib/ntp/configure
index 71b0d0c29167..a8c2ba593aa3 100755
--- a/contrib/ntp/configure
+++ b/contrib/ntp/configure
@@ -1,11 +1,12 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ntp 4.2.8p15.
+# Generated by GNU Autoconf 2.71 for ntp 4.2.8p16.
#
-# Report bugs to <http://bugs.ntp.org./>.
+# Report bugs to <https://bugs.ntp.org/>.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -16,14 +17,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -33,46 +36,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -96,8 +92,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -109,30 +109,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
@@ -154,20 +134,22 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -187,12 +169,15 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
@@ -207,30 +192,38 @@ test \$(( 1 + 1 )) = 2 || exit 1
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
|| test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -238,14 +231,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -263,19 +263,20 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: http://bugs.ntp.org./ about your system, including any
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
+$0: https://bugs.ntp.org/ about your system, including any
$0: error possibly output before this message. Then install
$0: a modern shell, or manually run the script under such a
$0: shell if you do have one."
@@ -302,6 +303,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -319,6 +321,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -333,7 +343,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -342,7 +352,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -381,12 +391,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -398,18 +409,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -421,9 +441,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -450,7 +470,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -494,7 +514,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -508,6 +528,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -521,6 +545,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -590,48 +621,44 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp'
-PACKAGE_VERSION='4.2.8p15'
-PACKAGE_STRING='ntp 4.2.8p15'
-PACKAGE_BUGREPORT='http://bugs.ntp.org./'
-PACKAGE_URL='http://www.ntp.org./'
+PACKAGE_VERSION='4.2.8p16'
+PACKAGE_STRING='ntp 4.2.8p16'
+PACKAGE_BUGREPORT='https://bugs.ntp.org/'
+PACKAGE_URL='https://www.ntp.org/'
# Factoring default headers for most tests.
ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_header_list=
+ac_header_c_list=
+ac_func_c_list=
enable_option_checking=no
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
@@ -645,13 +672,6 @@ BUILD_TEST_NTP_SCANNER_FALSE
BUILD_TEST_NTP_SCANNER_TRUE
BUILD_TEST_NTP_RESTRICT_FALSE
BUILD_TEST_NTP_RESTRICT_TRUE
-GTEST_AVAILABLE_FALSE
-GTEST_AVAILABLE_TRUE
-GTEST_CPPFLAGS
-GTEST_CXXFLAGS
-GTEST_LIBS
-GTEST_LDFLAGS
-GTEST_CONFIG
UNITYBUILD_AVAILABLE_FALSE
UNITYBUILD_AVAILABLE_TRUE
PATH_RUBY
@@ -841,6 +861,7 @@ LDFLAGS_NTP
LDADD_NTP
CPPFLAGS_NTP
CFLAGS_NTP
+CC_NOFORMAT
EGREP
GREP
CPP
@@ -851,7 +872,6 @@ am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
-am__quote
am__include
DEPDIR
OBJEXT
@@ -873,6 +893,9 @@ AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
+CSCOPE
+ETAGS
+CTAGS
am__untar
am__tar
AMTAR
@@ -915,6 +938,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -933,7 +957,8 @@ PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
ac_subst_files='calc_tickadj_opts
ntp_wait_opts
ntpsweep_opts
@@ -1053,16 +1078,17 @@ enable_kernel_fll_bug
enable_bug1243_fix
enable_bug3020_fix
enable_bug3527_fix
+enable_bug3767_fix
enable_irig_sawtooth
enable_nist
enable_ntp_signd
+enable_magicpps
enable_ipv6
with_kame
enable_getifaddrs
enable_saveconfig
enable_leap_smear
enable_dynamic_interleave
-with_gtest
enable_problem_tests
'
ac_precious_vars='build_alias
@@ -1115,6 +1141,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1144,8 +1171,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -1186,9 +1211,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1212,9 +1237,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1367,6 +1392,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1416,9 +1450,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1432,9 +1466,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1478,9 +1512,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1496,7 +1530,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1504,7 +1538,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1560,7 +1594,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1617,7 +1651,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ntp 4.2.8p15 to adapt to many kinds of systems.
+\`configure' configures ntp 4.2.8p16 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1657,6 +1691,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1687,7 +1722,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ntp 4.2.8p15:";;
+ short | recursive ) echo "Configuration of ntp 4.2.8p16:";;
esac
cat <<\_ACEOF
@@ -1830,10 +1865,12 @@ Optional Features and Packages:
--enable-bug1243-fix + use unmodified autokey session keys
--enable-bug3020-fix + Provide the explicit 127.0.0.0/8 martian filter
--enable-bug3527-fix + provide correct mode7 fudgetime2 behavior
+ --enable-bug3767-fix + Disable debug assertion on OOB KoD RATE value
--enable-irig-sawtooth s if we should enable the IRIG sawtooth filter
--enable-nist - if we should enable the NIST lockclock scheme
--enable-ntp-signd - Provide support for Samba's signing daemon,
=/var/run/ntp_signd
+ --enable-magicpps + try to auto-instantiate PPS devices on Linux
--enable-ipv6 s use IPv6?
--with-kame - =/usr/local/v6
@@ -1842,7 +1879,6 @@ Optional Features and Packages:
--enable-leap-smear - experimental leap smear code
--enable-dynamic-interleave
- dynamic interleave support
- --with-gtest Use the gtest framework (Default: if it's available)
--enable-problem-tests + enable tests with undiagnosed problems
Some influential environment variables:
@@ -1866,8 +1902,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <http://bugs.ntp.org./>.
-ntp home page: <http://www.ntp.org./>.
+Report bugs to <https://bugs.ntp.org/>.
+ntp home page: <https://www.ntp.org/>.
_ACEOF
ac_status=$?
fi
@@ -1883,9 +1919,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1913,7 +1949,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1921,7 +1958,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1930,10 +1967,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ntp configure 4.2.8p15
-generated by GNU Autoconf 2.69
+ntp configure 4.2.8p16
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1950,14 +1987,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1965,14 +2002,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1982,6 +2020,39 @@ fi
} # ac_fn_c_try_compile
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1994,7 +2065,7 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -2002,14 +2073,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -2019,184 +2091,20 @@ fi
} # ac_fn_c_try_cpp
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------------ ##
-## Report this to http://bugs.ntp.org./ ##
-## ------------------------------------ ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -2204,17 +2112,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -2229,17 +2138,61 @@ fi
} # ac_fn_c_try_link
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -2247,16 +2200,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ which can conflict with char $2 (); below. */
+#include <limits.h>
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -2274,24 +2220,25 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -2303,17 +2250,18 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -2321,12 +2269,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -2334,18 +2283,19 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
eval "$3=yes"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -2364,7 +2314,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
@@ -2374,14 +2324,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=0 ac_mid=0
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2391,9 +2342,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid; break
-else
+else $as_nop
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -2401,14 +2353,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
@@ -2418,14 +2370,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=-1 ac_mid=-1
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
@@ -2435,9 +2388,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=$ac_mid; break
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -2445,14 +2399,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
ac_lo= ac_hi=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
@@ -2460,7 +2414,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2470,12 +2424,13 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
@@ -2485,12 +2440,12 @@ esac
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.val", "w");
@@ -2518,9 +2473,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
+else $as_nop
ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -2533,25 +2489,28 @@ rm -f conftest.val
} # ac_fn_c_compute_int
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
@@ -2565,19 +2524,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_decl
+} # ac_fn_check_decl
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
@@ -2586,16 +2548,17 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_member ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
@@ -2604,14 +2567,15 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
@@ -2620,29 +2584,50 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
eval "$4=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$4
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ntp $as_me 4.2.8p15, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by ntp $as_me 4.2.8p16, which was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -2675,8 +2660,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -2711,7 +2700,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2746,11 +2735,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -2761,8 +2752,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -2786,7 +2777,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -2794,14 +2785,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -2809,15 +2800,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -2825,8 +2816,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2840,63 +2831,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2906,20 +2882,442 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
-as_fn_append ac_header_list " stdarg.h"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
+as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
+as_fn_append ac_func_c_list " fork HAVE_FORK"
+as_fn_append ac_func_c_list " vfork HAVE_VFORK"
+as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
+as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="ltmain.sh ar-lib compile config.guess config.sub missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/sntp/libevent/build-aux"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2930,12 +3328,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -2944,24 +3342,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2971,11 +3369,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2989,34 +3388,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_aux_dir=
-for ac_dir in sntp/libevent/build-aux "$srcdir"/sntp/libevent/build-aux; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in sntp/libevent/build-aux \"$srcdir\"/sntp/libevent/build-aux" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -3049,7 +3420,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20120806
+ntp_configure_cache_version=20230326
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -3130,15 +3501,15 @@ ntp_configure_cache_version=20120806
for c_varname in $c_varname_list
do
- { eval $c_varname=; unset $c_varname; }
+ { eval $c_varname=; unset $c_varname;}
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
-$as_echo "$as_me: $cache_file saved by another version, ignored." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: configure script cache version: $ntp_configure_cache_version" >&5
-$as_echo "$as_me: configure script cache version: $ntp_configure_cache_version" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
-$as_echo "$as_me: $cache_file version: $c_version" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
+printf "%s\n" "$as_me: $cache_file saved by another version, ignored." >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: configure script cache version: $ntp_configure_cache_version" >&5
+printf "%s\n" "$as_me: configure script cache version: $ntp_configure_cache_version" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
+printf "%s\n" "$as_me: $cache_file version: $c_version" >&6;}
{ c_varname=; unset c_varname;}
{ c_varname_list=; unset c_varname_list;}
{ c_version=; unset c_version;}
@@ -3154,9 +3525,11 @@ $as_echo "$as_me: $cache_file version: $c_version" >&6;}
NTP_CACHEVERSION_PARENT='main' ; export NTP_CACHEVERSION_PARENT
-am__api_version='1.15'
+am__api_version='1.16'
+
-# Find a good install program. We prefer a C program (faster),
+
+ # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
@@ -3170,20 +3543,25 @@ am__api_version='1.15'
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -3193,13 +3571,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -3207,12 +3585,12 @@ case $as_dir/ in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -3228,7 +3606,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3238,8 +3616,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -3249,8 +3627,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -3304,8 +3682,8 @@ else
as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
@@ -3324,26 +3702,23 @@ test "$program_suffix" != NONE &&
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
am_missing_run="$MISSING "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh+set}" != xset; then
@@ -3363,11 +3738,12 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -3375,11 +3751,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3390,11 +3770,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3403,11 +3783,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -3415,11 +3796,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3430,11 +3815,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -3442,8 +3827,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -3455,25 +3840,31 @@ fi
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
esac
done
@@ -3484,7 +3875,7 @@ IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
+ if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3494,18 +3885,19 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
@@ -3513,11 +3905,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3528,24 +3924,25 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -n "$AWK" && break
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@@ -3561,12 +3958,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -3580,7 +3977,8 @@ fi
rmdir .tst 2>/dev/null
# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
enableval=$enable_silent_rules;
fi
@@ -3590,12 +3988,13 @@ case $enable_silent_rules in # (((
*) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3607,8 +4006,8 @@ else
am_cv_make_support_nested_variables=no
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -3640,17 +4039,13 @@ fi
# Define the identity of the package.
PACKAGE='ntp'
- VERSION='4.2.8p15'
+ VERSION='4.2.8p16'
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
# Some tools Automake needs.
@@ -3670,8 +4065,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
# We need awk for the "check" target (and possibly the TAP driver). The
@@ -3690,6 +4085,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+
+
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
@@ -3722,7 +4131,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -3735,7 +4144,8 @@ fi
# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
enableval=$enable_silent_rules;
fi
@@ -3745,12 +4155,13 @@ case $enable_silent_rules in # (((
*) AM_DEFAULT_VERBOSITY=0;;
esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3762,8 +4173,8 @@ else
am_cv_make_support_nested_variables=no
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -3774,26 +4185,29 @@ fi
AM_BACKSLASH='\'
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
@@ -3812,21 +4226,22 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
@@ -3846,9 +4261,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-cat >>confdefs.h <<_ACEOF
-#define STR_SYSTEM "$host"
-_ACEOF
+printf "%s\n" "#define STR_SYSTEM \"$host\"" >>confdefs.h
ac_config_headers="$ac_config_headers config.h"
@@ -3859,52 +4272,62 @@ ntp_parse_ok=${ntp_parse_ok=no}
ntp_ripe_ncc_ok=${ntp_parse_ok=no}
ntp_jupiter_ok=${ntp_jupiter_ok=no}
+
+
+
+
+
+
+
+
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
+if test ${enable_dependency_tracking+y}
+then :
enableval=$enable_dependency_tracking;
fi
@@ -3945,11 +4368,12 @@ if test -n "$ac_tool_prefix"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3957,11 +4381,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3972,11 +4400,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3989,11 +4417,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -4001,11 +4430,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4016,11 +4449,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -4032,8 +4465,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -4041,23 +4474,23 @@ esac
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -4067,7 +4500,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -4075,7 +4508,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4087,9 +4520,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -4110,11 +4543,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -4131,7 +4565,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -4147,44 +4581,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -4198,15 +4634,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -4215,7 +4651,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -4227,8 +4663,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -4236,10 +4672,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -4247,39 +4683,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4293,11 +4730,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -4306,31 +4744,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -4340,29 +4779,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -4371,57 +4814,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -4436,94 +4882,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -4532,21 +5028,23 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_ext=c
+
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4574,8 +5072,8 @@ _ACEOF
rm -f core conftest*
unset am_i
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
@@ -4593,11 +5091,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
@@ -4704,8 +5203,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -4722,45 +5221,212 @@ fi
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_should_define__xopen_source=no
+ if test $ac_cv_header_wchar_h = yes
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
+
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+ if test $ac_cv_header_minix_config_h = yes
+then :
+ MINIX=yes
+ printf "%s\n" "#define _MINIX 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else $as_nop
+ MINIX=
+fi
+ if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+ if test $ac_cv_should_define__xopen_source = yes
+then :
+ printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+fi
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -4772,10 +5438,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -4785,7 +5452,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -4797,29 +5465,24 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -4831,10 +5494,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -4844,11 +5508,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -4860,11 +5525,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
@@ -4872,10 +5538,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
@@ -4884,13 +5555,13 @@ case `"$ac_path_GREP" --version 2>&1` in
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4918,16 +5589,17 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
@@ -4938,10 +5610,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
@@ -4950,13 +5627,13 @@ case `"$ac_path_EGREP" --version 2>&1` in
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4985,493 +5662,11 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
- MINIX=yes
-else
- MINIX=
-fi
-
-
- if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# define __EXTENSIONS__ 1
- $ac_includes_default
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_safe_to_define___extensions__=yes
-else
- ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
- test $ac_cv_safe_to_define___extensions__ = yes &&
- $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
- $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
-
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
-
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
-
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
-
- const char *str;
- int number;
- float fnumber;
-
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
-
-int
-main ()
-{
-
- // Check bool.
- _Bool success = false;
-
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
-
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
-
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
-
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
-
- ni.number = 58;
-
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
-
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
-
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c99=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-else
- ac_cv_prog_cc_stdc=no
-fi
-
-fi
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
-$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if ${ac_cv_prog_cc_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;; #(
- '') :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
-$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
-esac
@@ -5481,11 +5676,12 @@ esac
# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
if test $ac_cv_c_compiler_gnu = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
-if ${ac_cv_prog_gcc_traditional+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+printf %s "checking whether $CC needs -traditional... " >&6; }
+if test ${ac_cv_prog_gcc_traditional+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_pattern="Autoconf.*'x'"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5493,12 +5689,13 @@ else
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
-else
+else $as_nop
ac_cv_prog_gcc_traditional=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $ac_cv_prog_gcc_traditional = no; then
@@ -5508,15 +5705,16 @@ rm -f conftest*
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
fi
-rm -f conftest*
+rm -rf conftest*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
@@ -5524,6 +5722,7 @@ fi
+CC_NOFORMAT=
CFLAGS_NTP=
CPPFLAGS_NTP=
LDADD_NTP=
@@ -5533,59 +5732,63 @@ LDFLAGS_NTP=
+
case "$ac_cv_prog_cc_c89" in
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
version 4.2.5 and higher." >&5
-$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+printf "%s\n" "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
version 4.2.5 and higher." >&2;}
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
-$as_echo_n "checking if $CC can handle #warning... " >&6; }
-if ${ntp_cv_cpp_warning+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
+printf %s "checking if $CC can handle #warning... " >&6; }
+if test ${ntp_cv_cpp_warning+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#warning foo
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_cpp_warning=yes
-else
+else $as_nop
ntp_cv_cpp_warning=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
-$as_echo "$ntp_cv_cpp_warning" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
+printf "%s\n" "$ntp_cv_cpp_warning" >&6; }
case "$ntp_cv_cpp_warning" in
no)
-$as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
+printf "%s\n" "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
-$as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
-if ${ntp_cv_cc_attribute+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
+printf %s "checking if $CC supports __attribute__((...))... " >&6; }
+if test ${ntp_cv_cc_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
void foo(void) __attribute__((__noreturn__));
@@ -5593,21 +5796,22 @@ void foo(void) __attribute__((__noreturn__));
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_cc_attribute=yes
-else
+else $as_nop
ntp_cv_cc_attribute=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
-$as_echo "$ntp_cv_cc_attribute" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
+printf "%s\n" "$ntp_cv_cc_attribute" >&6; }
case "$ntp_cv_cc_attribute" in
yes)
-$as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
+printf "%s\n" "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
esac
@@ -5615,79 +5819,130 @@ esac
case "$GCC" in
yes)
SAVED_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wstrict-overflow"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
-$as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
-if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ CFLAGS="$SAVED_CFLAGS -Wstrict-overflow"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
+printf %s "checking if $CC can handle -Wstrict-overflow... " >&6; }
+if test ${ntp_cv_gcc_Wstrict_overflow+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_gcc_Wstrict_overflow=yes
-else
+else $as_nop
ntp_cv_gcc_Wstrict_overflow=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
-$as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
+printf "%s\n" "$ntp_cv_gcc_Wstrict_overflow" >&6; }
#
# $ntp_cv_gcc_Wstrict_overflow is tested later to add the
# flag to CFLAGS.
#
CFLAGS="$SAVED_CFLAGS -Winit-self"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
-$as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
-if ${ntp_cv_gcc_Winit_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
+printf %s "checking if $CC can handle -Winit-self... " >&6; }
+if test ${ntp_cv_gcc_Winit_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_gcc_Winit_self=yes
-else
+else $as_nop
ntp_cv_gcc_Winit_self=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
+printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
+ #
+ # libopts specifically builds a string with embedded NULs.
+ # This causes a bunch of distracting warnings due to -Wformat.
+ # Let's see if we can figure out how to disable these.
+ #
+ CFLAGS="$SAVED_CFLAGS -Wno-format"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format" >&5
+printf %s "checking if $CC can handle -Wno-format... " >&6; }
+if test ${ntp_cv_gcc_Wno_format+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_Wno_format=yes
+else $as_nop
+ ntp_cv_gcc_Wno_format=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
-$as_echo "$ntp_cv_gcc_Winit_self" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
+printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
+
+ case "$ntp_cv_gcc_Wno_format" in
+ yes)
+ CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
+ ;;
+ no)
+ ;;
+ esac
+
CFLAGS="$SAVED_CFLAGS"
{ SAVED_CFLAGS=; unset SAVED_CFLAGS;}
#
# $ntp_cv_gcc_Winit_self is tested later to add the
# flag to CFLAGS_NTP.
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
-$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
-if ${ntp_cv_gc_sections_runs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
+printf %s "checking if linker supports omitting unused code and data... " >&6; }
+if test ${ntp_cv_gc_sections_runs+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
origCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wl,--gc-sections"
@@ -5698,7 +5953,7 @@ else
#include <stdio.h>
int
-main ()
+main (void)
{
FILE * fpC;
@@ -5727,7 +5982,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
ntp_cv_gc_sections_runs=no
@@ -5736,19 +5992,19 @@ if ac_fn_c_try_link "$LINENO"; then :
./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
fi
-else
+else $as_nop
ntp_cv_gc_sections_runs=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$origCFLAGS"
{ origCFLAGS=; unset origCFLAGS;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
-$as_echo "$ntp_cv_gc_sections_runs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
+printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
case "$ntp_cv_gc_sections_runs" in
yes)
LDADD_LIBNTP="-Wl,--gc-sections"
@@ -5782,8 +6038,8 @@ $as_echo "$ntp_cv_gc_sections_runs" >&6; }
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
-$as_echo_n "checking additional compiler flags... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
+printf %s "checking additional compiler flags... " >&6; }
# allow ntp_os_cflags to be preset to skip this stuff
case "${ntp_os_cflags+set}" in
set)
@@ -5880,12 +6136,12 @@ $as_echo_n "checking additional compiler flags... " >&6; }
ntp_os_cflags_msg="$ntp_os_cflags"
esac
CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
-$as_echo "$ntp_os_cflags_msg" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
+printf "%s\n" "$ntp_os_cflags_msg" >&6; }
{ ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
###
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
-$as_echo_n "checking additional linker flags... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
+printf %s "checking additional linker flags... " >&6; }
# HMS: The following might still need tweaking
# allow ntp_os_ldflags to be preset to skip this stuff
case "${ntp_os_ldflags+set}" in
@@ -5912,16 +6168,17 @@ $as_echo_n "checking additional linker flags... " >&6; }
ntp_os_ldflags_msg="$ntp_os_ldflags"
esac
LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
-$as_echo "$ntp_os_ldflags_msg" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
+printf "%s\n" "$ntp_os_ldflags_msg" >&6; }
{ ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+printf %s "checking whether byte ordering is bigendian... " >&6; }
+if test ${ac_cv_c_bigendian+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_bigendian=unknown
# See if we're dealing with a universal compiler.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5932,7 +6189,8 @@ else
typedef int dummy;
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
# Check for potential -arch flags. It is not universal unless
# there are at least two -arch flags with different values.
@@ -5956,7 +6214,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
done
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
# See if sys/param.h defines the BYTE_ORDER macro.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5965,7 +6223,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include <sys/param.h>
int
-main ()
+main (void)
{
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
@@ -5977,7 +6235,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
# It does; now see whether it defined to BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5985,7 +6244,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
#include <sys/param.h>
int
-main ()
+main (void)
{
#if BYTE_ORDER != BIG_ENDIAN
not big endian
@@ -5995,14 +6254,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_bigendian=yes
-else
+else $as_nop
ac_cv_c_bigendian=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test $ac_cv_c_bigendian = unknown; then
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
@@ -6011,7 +6271,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include <limits.h>
int
-main ()
+main (void)
{
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
bogus endian macros
@@ -6021,14 +6281,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
# It does; now see whether it defined to _BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
int
-main ()
+main (void)
{
#ifndef _BIG_ENDIAN
not big endian
@@ -6038,31 +6299,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_bigendian=yes
-else
+else $as_nop
ac_cv_c_bigendian=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test $ac_cv_c_bigendian = unknown; then
# Compile a test program.
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
# Try to guess by grepping values from an object file.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-short int ascii_mm[] =
+unsigned short int ascii_mm[] =
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
- short int ascii_ii[] =
+ unsigned short int ascii_ii[] =
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
int use_ascii (int i) {
return ascii_mm[i] + ascii_ii[i];
}
- short int ebcdic_ii[] =
+ unsigned short int ebcdic_ii[] =
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
- short int ebcdic_mm[] =
+ unsigned short int ebcdic_mm[] =
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
int use_ebcdic (int i) {
return ebcdic_mm[i] + ebcdic_ii[i];
@@ -6070,14 +6333,15 @@ short int ascii_mm[] =
extern int foo;
int
-main ()
+main (void)
{
return use_ascii (foo) == use_ebcdic (foo);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
ac_cv_c_bigendian=yes
fi
@@ -6090,13 +6354,13 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
fi
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
/* Are we little or big endian? From Harbison&Steele. */
@@ -6112,9 +6376,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_c_bigendian=no
-else
+else $as_nop
ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -6123,17 +6388,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+printf "%s\n" "$ac_cv_c_bigendian" >&6; }
case $ac_cv_c_bigendian in #(
yes)
- $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+ printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
;; #(
no)
;; #(
universal)
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
;; #(
*)
@@ -6141,16 +6406,17 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
-if ${ac_cv_c_volatile+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+printf %s "checking for working volatile... " >&6; }
+if test ${ac_cv_c_volatile+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
volatile int x;
@@ -6160,18 +6426,19 @@ return !x && !y;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_volatile=yes
-else
+else $as_nop
ac_cv_c_volatile=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
-$as_echo "$ac_cv_c_volatile" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+printf "%s\n" "$ac_cv_c_volatile" >&6; }
if test $ac_cv_c_volatile = no; then
-$as_echo "#define volatile /**/" >>confdefs.h
+printf "%s\n" "#define volatile /**/" >>confdefs.h
fi
@@ -6180,40 +6447,36 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -6225,10 +6488,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -6238,7 +6502,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -6250,29 +6515,24 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -6284,10 +6544,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -6297,11 +6558,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -6319,11 +6581,12 @@ for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_YACC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
@@ -6331,11 +6594,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6346,11 +6613,11 @@ fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+printf "%s\n" "$YACC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6358,186 +6625,10 @@ fi
done
test -n "$YACC" || YACC="yacc"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
-
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
-
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
-
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
-
- const char *str;
- int number;
- float fnumber;
-
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
-
-int
-main ()
-{
-
- // Check bool.
- _Bool success = false;
-
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
-
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
-
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
-
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
-
- ni.number = 58;
-
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
-
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
-
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c99=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
-
-fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
-$as_echo_n "checking whether the compiler supports C99 structure initialization... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
+printf %s "checking whether the compiler supports C99 structure initialization... " >&6; }
ac_ext=c
@@ -6554,17 +6645,18 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if ac_fn_c_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
-$as_echo "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
+printf "%s\n" "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6576,14 +6668,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
-$as_echo_n "checking for compile/link hardening flags... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
+printf %s "checking for compile/link hardening flags... " >&6; }
# Check whether --with-hardenfile was given.
-if test "${with_hardenfile+set}" = set; then :
+if test ${with_hardenfile+y}
+then :
withval=$with_hardenfile;
-else
+else $as_nop
with_hardenfile=no
fi
@@ -6605,13 +6698,13 @@ fi
case "$GENHARDFLAG" in
OK)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
-$as_echo "in file $GENHARDFLAGFILE" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
+printf "%s\n" "in file $GENHARDFLAGFILE" >&6; }
rm genHardFlags.err genHardFlags.i
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
-$as_echo "failed." >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
+printf "%s\n" "failed." >&6; }
as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
;;
esac
@@ -6623,8 +6716,8 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
-$as_echo_n "checking to see if we need ylwrap VPATH hack... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
+printf %s "checking to see if we need ylwrap VPATH hack... " >&6; }
ntp_vpath_hack="no"
case "$srcdir::${force_ntp_vpath_hack-no}" in
.::*)
@@ -6638,8 +6731,8 @@ case "$srcdir::${force_ntp_vpath_hack-no}" in
ntp_vpath_hack="yes"
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_vpath_hack" >&5
-$as_echo "$ntp_vpath_hack" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_vpath_hack" >&5
+printf "%s\n" "$ntp_vpath_hack" >&6; }
if test x$ntp_vpath_hack = xyes; then
VPATH_HACK_TRUE=
VPATH_HACK_FALSE='#'
@@ -6651,14 +6744,15 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
-$as_echo_n "checking for install dir and man conventions... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
+printf %s "checking for install dir and man conventions... " >&6; }
# Check whether --with-locfile was given.
-if test "${with_locfile+set}" = set; then :
+if test ${with_locfile+y}
+then :
withval=$with_locfile;
-else
+else $as_nop
with_locfile=no
fi
@@ -6680,13 +6774,13 @@ fi
case "$GENLOCINFO" in
OK)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
-$as_echo "in file $GENLOCINFOFILE" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
+printf "%s\n" "in file $GENLOCINFOFILE" >&6; }
rm genLocInfo.err genLocInfo.i
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
-$as_echo "failed." >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
+printf "%s\n" "failed." >&6; }
as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
;;
esac
@@ -6799,16 +6893,18 @@ fi
-if test -n "$ac_tool_prefix"; then
+
+ if test -n "$ac_tool_prefix"; then
for ac_prog in ar lib "link -lib"
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
@@ -6816,11 +6912,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6831,11 +6931,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6848,11 +6948,12 @@ if test -z "$AR"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
@@ -6860,11 +6961,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6875,11 +6980,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6891,8 +6996,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
@@ -6901,11 +7006,12 @@ fi
: ${AR=ar}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
-$as_echo_n "checking the archiver ($AR) interface... " >&6; }
-if ${am_cv_ar_interface+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+printf %s "checking the archiver ($AR) interface... " >&6; }
+if test ${am_cv_ar_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6917,12 +7023,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
/* end confdefs.h. */
int some_variable = 0;
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
(eval $am_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test "$ac_status" -eq 0; then
am_cv_ar_interface=ar
@@ -6931,7 +7038,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
(eval $am_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test "$ac_status" -eq 0; then
am_cv_ar_interface=lib
@@ -6942,7 +7049,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
rm -f conftest.lib libconftest.a
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6950,8 +7057,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
-$as_echo "$am_cv_ar_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+printf "%s\n" "$am_cv_ar_interface" >&6; }
case $am_cv_ar_interface in
ar)
@@ -6971,11 +7078,11 @@ unknown)
esac
-
# So far, the only shared library we might use is libopts.
# It's a small library - we might as well use a static version of it.
# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
+if test ${enable_shared+y}
+then :
enableval=$enable_shared; p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
@@ -6993,7 +7100,7 @@ if test "${enable_shared+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_shared=no
fi
@@ -7007,8 +7114,8 @@ fi
case `pwd` in
*\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
esac
@@ -7028,6 +7135,7 @@ macro_revision='2.4.6'
+
ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
@@ -7051,8 +7159,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -7078,12 +7186,12 @@ func_echo_all ()
}
case $ECHO in
- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
+ printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+ print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
esac
@@ -7099,11 +7207,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
@@ -7117,10 +7226,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
@@ -7129,13 +7243,13 @@ case `"$ac_path_SED" --version 2>&1` in
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -7163,8 +7277,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
SED="$ac_cv_path_SED"
rm -f conftest.sed
@@ -7181,11 +7295,12 @@ Xsed="$SED -e 1s/^X//"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
then ac_cv_path_FGREP="$GREP -F"
else
@@ -7196,10 +7311,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in fgrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
@@ -7208,13 +7328,13 @@ case `"$ac_path_FGREP" --version 2>&1` in
ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
+ printf "%s\n" 'FGREP' >> "conftest.nl"
"$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -7243,8 +7363,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
FGREP="$ac_cv_path_FGREP"
@@ -7269,17 +7389,18 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
+else $as_nop
with_gnu_ld=no
fi
ac_prog=ld
if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return, which upsets mingw
@@ -7308,15 +7429,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
;;
esac
elif test yes = "$with_gnu_ld"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
fi
-if ${lt_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
@@ -7345,18 +7467,19 @@ fi
LD=$lt_cv_path_LD
if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
@@ -7367,8 +7490,8 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -7379,11 +7502,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM=$NM
@@ -7433,8 +7557,8 @@ else
: ${lt_cv_path_NM=no}
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
if test no != "$lt_cv_path_NM"; then
NM=$lt_cv_path_NM
else
@@ -7447,11 +7571,12 @@ else
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DUMPBIN"; then
ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
else
@@ -7459,11 +7584,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7474,11 +7603,11 @@ fi
fi
DUMPBIN=$ac_cv_prog_DUMPBIN
if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7491,11 +7620,12 @@ if test -z "$DUMPBIN"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DUMPBIN"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
@@ -7503,11 +7633,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7518,11 +7652,11 @@ fi
fi
ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7534,8 +7668,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DUMPBIN=$ac_ct_DUMPBIN
@@ -7563,11 +7697,12 @@ test -z "$NM" && NM=nm
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
@@ -7583,26 +7718,27 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
fi
# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
i=0
teststring=ABCD
@@ -7729,11 +7865,11 @@ else
fi
if test -n "$lt_cv_sys_max_cmd_len"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
fi
max_cmd_len=$lt_cv_sys_max_cmd_len
@@ -7777,11 +7913,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $host in
*-*-mingw* )
case $build in
@@ -7817,18 +7954,19 @@ esac
fi
to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
@@ -7844,22 +7982,23 @@ esac
fi
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_reload_flag='-r'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
@@ -7892,11 +8031,12 @@ esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
@@ -7904,11 +8044,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7919,11 +8063,11 @@ fi
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7932,11 +8076,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
ac_ct_OBJDUMP=$OBJDUMP
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OBJDUMP"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
else
@@ -7944,11 +8089,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7959,11 +8108,11 @@ fi
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OBJDUMP" = x; then
@@ -7971,8 +8120,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OBJDUMP=$ac_ct_OBJDUMP
@@ -7991,11 +8140,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
@@ -8191,8 +8341,8 @@ os2*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
file_magic_glob=
want_nocaseglob=no
@@ -8236,11 +8386,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
@@ -8248,11 +8399,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8263,11 +8418,11 @@ fi
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8276,11 +8431,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
ac_ct_DLLTOOL=$DLLTOOL
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DLLTOOL"; then
ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
@@ -8288,11 +8444,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8303,11 +8463,11 @@ fi
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DLLTOOL" = x; then
@@ -8315,8 +8475,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DLLTOOL=$ac_ct_DLLTOOL
@@ -8336,11 +8496,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
@@ -8363,8 +8524,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
@@ -8379,11 +8540,12 @@ if test -n "$ac_tool_prefix"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
@@ -8391,11 +8553,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8406,11 +8572,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8423,11 +8589,12 @@ if test -z "$AR"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
@@ -8435,11 +8602,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8450,11 +8621,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8466,8 +8637,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
@@ -8487,30 +8658,32 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ar_at_file=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
@@ -8518,7 +8691,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
@@ -8527,11 +8700,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
rm -f conftest.* libconftest.a
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
@@ -8548,11 +8721,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -8560,11 +8734,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8575,11 +8753,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8588,11 +8766,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -8600,11 +8779,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8615,11 +8798,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -8627,8 +8810,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -8647,11 +8830,12 @@ test -z "$STRIP" && STRIP=:
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
@@ -8659,11 +8843,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8674,11 +8862,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8687,11 +8875,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
@@ -8699,11 +8888,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8714,11 +8907,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -8726,8 +8919,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -8816,11 +9009,12 @@ compiler=$CC
# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
@@ -8972,14 +9166,14 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
# Now try to grab the symbols.
nlist=conftest.nm
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
(eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -9048,7 +9242,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
@@ -9083,11 +9277,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
fi
# Response file support.
@@ -9133,13 +9327,14 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
# Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
+if test ${with_sysroot+y}
+then :
withval=$with_sysroot;
-else
+else $as_nop
with_sysroot=no
fi
@@ -9157,24 +9352,25 @@ case $with_sysroot in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
: ${lt_DD:=$DD}
@@ -9185,10 +9381,15 @@ if test -z "$lt_DD"; then
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in dd; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in dd
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_lt_DD" || continue
if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cmp -s conftest.i conftest.out \
@@ -9208,15 +9409,16 @@ fi
rm -f conftest.i conftest2.i conftest.out
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
lt_cv_truncate_bin=
@@ -9227,8 +9429,8 @@ fi
rm -f conftest.i conftest2.i conftest.out
test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
@@ -9251,7 +9453,8 @@ func_cc_basename ()
}
# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
+if test ${enable_libtool_lock+y}
+then :
enableval=$enable_libtool_lock;
fi
@@ -9267,7 +9470,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
@@ -9287,7 +9490,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
@@ -9325,7 +9528,7 @@ mips64*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
emul=elf
case `/usr/bin/file conftest.$ac_objext` in
@@ -9366,7 +9569,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
@@ -9429,11 +9632,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -9444,19 +9648,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_cc_needs_belf=yes
-else
+else $as_nop
lt_cv_cc_needs_belf=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -9465,8 +9670,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS=$SAVE_CFLAGS
@@ -9479,7 +9684,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*64-bit*)
@@ -9516,11 +9721,12 @@ need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$MANIFEST_TOOL"; then
ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
@@ -9528,11 +9734,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9543,11 +9753,11 @@ fi
fi
MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
if test -n "$MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9556,11 +9766,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
# Extract the first word of "mt", so it can be a program name with args.
set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_MANIFEST_TOOL"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
else
@@ -9568,11 +9779,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9583,11 +9798,11 @@ fi
fi
ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
if test -n "$ac_ct_MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_MANIFEST_TOOL" = x; then
@@ -9595,8 +9810,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
@@ -9606,11 +9821,12 @@ else
fi
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_path_mainfest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
@@ -9620,8 +9836,8 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -9636,11 +9852,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DSYMUTIL"; then
ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
@@ -9648,11 +9865,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9663,11 +9884,11 @@ fi
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9676,11 +9897,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
ac_ct_DSYMUTIL=$DSYMUTIL
# Extract the first word of "dsymutil", so it can be a program name with args.
set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DSYMUTIL"; then
ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
else
@@ -9688,11 +9910,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9703,11 +9929,11 @@ fi
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DSYMUTIL" = x; then
@@ -9715,8 +9941,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DSYMUTIL=$ac_ct_DSYMUTIL
@@ -9728,11 +9954,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NMEDIT"; then
ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
@@ -9740,11 +9967,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9755,11 +9986,11 @@ fi
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9768,11 +9999,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then
ac_ct_NMEDIT=$NMEDIT
# Extract the first word of "nmedit", so it can be a program name with args.
set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_NMEDIT"; then
ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
@@ -9780,11 +10012,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9795,11 +10031,11 @@ fi
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_NMEDIT" = x; then
@@ -9807,8 +10043,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
NMEDIT=$ac_ct_NMEDIT
@@ -9820,11 +10056,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
else
@@ -9832,11 +10069,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9847,11 +10088,11 @@ fi
fi
LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9860,11 +10101,12 @@ if test -z "$ac_cv_prog_LIPO"; then
ac_ct_LIPO=$LIPO
# Extract the first word of "lipo", so it can be a program name with args.
set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_LIPO"; then
ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
else
@@ -9872,11 +10114,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9887,11 +10133,11 @@ fi
fi
ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_LIPO" = x; then
@@ -9899,8 +10145,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
LIPO=$ac_ct_LIPO
@@ -9912,11 +10158,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
@@ -9924,11 +10171,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9939,11 +10190,11 @@ fi
fi
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9952,11 +10203,12 @@ if test -z "$ac_cv_prog_OTOOL"; then
ac_ct_OTOOL=$OTOOL
# Extract the first word of "otool", so it can be a program name with args.
set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL"; then
ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
else
@@ -9964,11 +10216,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9979,11 +10235,11 @@ fi
fi
ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL" = x; then
@@ -9991,8 +10247,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL=$ac_ct_OTOOL
@@ -10004,11 +10260,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL64"; then
ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
else
@@ -10016,11 +10273,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -10031,11 +10292,11 @@ fi
fi
OTOOL64=$ac_cv_prog_OTOOL64
if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -10044,11 +10305,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then
ac_ct_OTOOL64=$OTOOL64
# Extract the first word of "otool64", so it can be a program name with args.
set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL64"; then
ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
else
@@ -10056,11 +10318,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -10071,11 +10337,11 @@ fi
fi
ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL64" = x; then
@@ -10083,8 +10349,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL64=$ac_ct_OTOOL64
@@ -10119,11 +10385,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_apple_cc_single_mod=no
if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
@@ -10152,14 +10419,15 @@ else
rm -f conftest.*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_exported_symbols_list=no
save_LDFLAGS=$LDFLAGS
echo "_main" > conftest.sym
@@ -10168,31 +10436,33 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_ld_exported_symbols_list=yes
-else
+else $as_nop
lt_cv_ld_exported_symbols_list=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
int forced_loaded() { return 2;}
@@ -10220,8 +10490,8 @@ _LT_EOF
rm -rf conftest.dSYM
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
@@ -10292,19 +10562,14 @@ func_munge_path_list ()
esac
}
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
fi
-done
-
@@ -10321,7 +10586,8 @@ done
# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
+if test ${enable_static+y}
+then :
enableval=$enable_static; p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
@@ -10339,7 +10605,7 @@ if test "${enable_static+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_static=yes
fi
@@ -10353,7 +10619,8 @@ fi
# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
+if test ${with_pic+y}
+then :
withval=$with_pic; lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
@@ -10370,7 +10637,7 @@ if test "${with_pic+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
pic_mode=default
fi
@@ -10382,7 +10649,8 @@ fi
# Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
+if test ${enable_fast_install+y}
+then :
enableval=$enable_fast_install; p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
@@ -10400,7 +10668,7 @@ if test "${enable_fast_install+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_fast_install=yes
fi
@@ -10414,11 +10682,12 @@ fi
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[5-9]*,yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
# Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
+if test ${with_aix_soname+y}
+then :
withval=$with_aix_soname; case $withval in
aix|svr4|both)
;;
@@ -10427,18 +10696,19 @@ if test "${with_aix_soname+set}" = set; then :
;;
esac
lt_cv_with_aix_soname=$with_aix_soname
-else
- if ${lt_cv_with_aix_soname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ if test ${lt_cv_with_aix_soname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_with_aix_soname=aix
fi
with_aix_soname=$lt_cv_with_aix_soname
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
@@ -10520,11 +10790,12 @@ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
@@ -10535,17 +10806,15 @@ else
fi
rmdir .libs 2>/dev/null
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
objdir=$lt_cv_objdir
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
@@ -10591,11 +10860,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -10644,11 +10914,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -10657,11 +10927,12 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -10710,11 +10981,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -10799,11 +11070,12 @@ if test yes = "$GCC"; then
lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -10834,8 +11106,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -11192,26 +11464,28 @@ case $host_os in
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -11242,8 +11516,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
@@ -11271,11 +11545,12 @@ fi
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_static_works=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
@@ -11299,8 +11574,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
if test yes = "$lt_cv_prog_compiler_static_works"; then
:
@@ -11314,11 +11589,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -11361,19 +11637,20 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -11416,8 +11693,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -11425,19 +11702,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
hard_links=nottested
if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
hard_links=yes
$RM conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -11449,8 +11726,8 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag=
@@ -12005,21 +12282,23 @@ _LT_EOF
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -12034,7 +12313,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -12058,21 +12337,23 @@ fi
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -12087,7 +12368,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -12338,11 +12619,12 @@ fi
# Older versions of the 11.00 compiler do not understand -b yet
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler__b=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
@@ -12366,8 +12648,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
if test yes = "$lt_cv_prog_compiler__b"; then
archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -12407,28 +12689,30 @@ fi
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
# This should be the same for all languages, so no per-tag cache variable.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_irix_exported_symbol=yes
-else
+else $as_nop
lt_cv_irix_exported_symbol=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
if test yes = "$lt_cv_irix_exported_symbol"; then
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
@@ -12708,8 +12992,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -12745,18 +13029,19 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
$RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -12774,7 +13059,7 @@ else
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
(eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then
lt_cv_archive_cmds_need_lc=no
@@ -12788,8 +13073,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
;;
esac
@@ -12948,8 +13233,8 @@ esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
if test yes = "$GCC"; then
case $host_os in
@@ -13510,9 +13795,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
shlibpath_overrides_runpath=no
# Some binutils ld are patched to set DT_RUNPATH
- if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
@@ -13522,19 +13808,21 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+if ac_fn_c_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
lt_cv_shlibpath_overrides_runpath=yes
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
@@ -13766,8 +14054,8 @@ uts4*)
dynamic_linker=no
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -13888,8 +14176,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
@@ -13913,8 +14201,8 @@ else
# directories.
hardcode_action=unsupported
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
if test relink = "$hardcode_action" ||
test yes = "$inherit_rpath"; then
@@ -13958,11 +14246,12 @@ else
darwin*)
# if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13971,32 +14260,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
+else $as_nop
lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
@@ -14016,14 +14304,16 @@ fi
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
+if test "x$ac_cv_func_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14032,41 +14322,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char shl_load ();
int
-main ()
+main (void)
{
return shl_load ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_shl_load=yes
-else
+else $as_nop
ac_cv_lib_dld_shl_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else
+else $as_nop
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
+if test "x$ac_cv_func_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14075,37 +14366,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14114,37 +14405,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_svld_dlopen=yes
-else
+else $as_nop
ac_cv_lib_svld_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14153,30 +14444,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dld_link ();
int
-main ()
+main (void)
{
return dld_link ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_dld_link=yes
-else
+else $as_nop
ac_cv_lib_dld_dld_link=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -14215,11 +14505,12 @@ fi
save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
@@ -14298,7 +14589,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -14316,16 +14607,17 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
@@ -14404,7 +14696,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -14422,8 +14714,8 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS=$save_CPPFLAGS
@@ -14461,13 +14753,13 @@ fi
striplib=
old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
@@ -14475,16 +14767,16 @@ else
if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
esac
fi
@@ -14501,13 +14793,13 @@ fi
# Report what library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -14531,15 +14823,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
fi
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test yes = "$enable_shared" || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
@@ -14592,34 +14884,154 @@ case "${enable_libopts_install+set}" in
*) enable_libopts_install=no ;;
esac
enable_nls=no
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change. They are probably safe to remove.
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+ac_func=
+for ac_item in $ac_func_c_list
+do
+ if test $ac_func; then
+ ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
+ if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
+ echo "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_func=
+ else
+ ac_func=$ac_item
+ fi
+done
+
+ ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
+if test "x$ac_cv_type_pid_t" = xyes
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if defined _WIN64 && !defined __CYGWIN__
+ LLP64
+ #endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_pid_type='int'
+else $as_nop
+ ac_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
+
fi
+
+
+
+
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+printf %s "checking for $ac_hdr that defines DIR... " >&6; }
+if eval test \${$as_ac_Header+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
int
-main ()
+main (void)
{
if ((DIR *) 0)
return 0;
@@ -14627,19 +15039,21 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_ac_Header=yes"
-else
+else $as_nop
eval "$as_ac_Header=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
ac_header_dirent=$ac_hdr; break
@@ -14648,11 +15062,12 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14660,56 +15075,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dir; do
+for ac_lib in '' dir
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14717,46 +15135,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
+for ac_lib in '' x
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -14767,135 +15187,258 @@ fi
# =================
# AC_CHECK_HEADERS
# =================
- for ac_header in \
- sys/mman.h sys/param.h sys/poll.h sys/procset.h \
- sys/select.h sys/socket.h sys/stropts.h sys/time.h \
- sys/un.h sys/wait.h dlfcn.h errno.h \
- fcntl.h libgen.h libintl.h memory.h \
- netinet/in.h setjmp.h stdbool.h sysexits.h \
- unistd.h utime.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mman_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_poll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/procset.h" "ac_cv_header_sys_procset_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_procset_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PROCSET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_select_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stropts_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_un_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcntl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
+if test "x$ac_cv_header_libgen_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
+if test "x$ac_cv_header_memory_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_setjmp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdbool_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
+if test "x$ac_cv_header_sysexits_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
+if test "x$ac_cv_header_utime_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
- for ac_header in stdarg.h varargs.h
+fi
+
+
+ for ac_header in stdarg.h varargs.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_arg_hdr=true;break
-else
+else $as_nop
lo_have_arg_hdr=false
fi
done
-
- for ac_header in string.h strings.h
+ for ac_header in string.h strings.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_str_hdr=true;break
-else
+else $as_nop
lo_have_str_hdr=false
fi
done
-
- for ac_header in limits.h sys/limits.h values.h
+ for ac_header in limits.h sys/limits.h values.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_lim_hdr=true;break
-else
+else $as_nop
lo_have_lim_hdr=false
fi
done
-
- for ac_header in inttypes.h stdint.h
+ for ac_header in inttypes.h stdint.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_typ_hdr=true;break
-else
+else $as_nop
lo_have_typ_hdr=false
fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
-$as_echo_n "checking for working stdnoreturn.h... " >&6; }
-if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ case "$host_os" in
+ cygwin*)
+ STDNORETURN_H='stdnoreturn.h'
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
+printf %s "checking for working stdnoreturn.h... " >&6; }
+if test ${gl_cv_header_working_stdnoreturn_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- #include <stdnoreturn.h>
- /* Do not check for 'noreturn' after the return type.
- C11 allows it, but it's rarely done that way
- and circa-2012 bleeding-edge GCC rejects it when given
- -Werror=old-style-declaration. */
- noreturn void foo1 (void) { exit (0); }
- _Noreturn void foo2 (void) { exit (0); }
- int testit (int argc, char **argv) {
- if (argc & 1)
- return 0;
- (argv[0][0] ? foo1 : foo2) ();
- }
+ #include <stdnoreturn.h>
+ /* Do not check for 'noreturn' after the return type.
+ C11 allows it, but it's rarely done that way
+ and circa-2012 bleeding-edge GCC rejects it when given
+ -Werror=old-style-declaration. */
+ noreturn void foo1 (void) { exit (0); }
+ _Noreturn void foo2 (void) { exit (0); }
+ int testit (int argc, char **argv)
+ {
+ if (argc & 1)
+ return 0;
+ (argv[0][0] ? foo1 : foo2) ();
+ }
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_working_stdnoreturn_h=yes
-else
+else $as_nop
gl_cv_header_working_stdnoreturn_h=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
-$as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
-
- if test $gl_cv_header_working_stdnoreturn_h = yes; then
- STDNORETURN_H=''
- else
- STDNORETURN_H='stdnoreturn.h'
- fi
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
+printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
+ if test $gl_cv_header_working_stdnoreturn_h = yes; then
+ STDNORETURN_H=''
+ else
+ STDNORETURN_H='stdnoreturn.h'
+ fi
+ ;;
+ esac
if test -n "$STDNORETURN_H"; then
GL_GENERATE_STDNORETURN_H_TRUE=
@@ -14911,36 +15454,44 @@ fi
# check for various programs used during the build.
# On OS/X, "wchar.h" needs "runetype.h" to work properly.
# ----------------------------------------------------------------------
- for ac_header in runetype.h wchar.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+ ac_fn_c_check_header_compile "$LINENO" "runetype.h" "ac_cv_header_runetype_h" "
$ac_includes_default
#if HAVE_RUNETYPE_H
# include <runetype.h>
#endif
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_runetype_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_RUNETYPE_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "
+ $ac_includes_default
+ #if HAVE_RUNETYPE_H
+ # include <runetype.h>
+ #endif
-done
+"
+if test "x$ac_cv_header_wchar_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
+
+fi
# Check whether --enable-nls was given.
-if test "${enable_nls+set}" = set; then :
+if test ${enable_nls+y}
+then :
enableval=$enable_nls;
fi
if test "x$enable_nls" != "xno" && \
- test "X${ac_cv_header_libintl_h}" = Xyes; then :
+ test "X${ac_cv_header_libintl_h}" = Xyes
+then :
-$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
fi
@@ -14972,11 +15523,10 @@ fi
# Checks for typedefs
# ----------------------------------------------------------------------
ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
-if test "x$ac_cv_type_wchar_t" = xyes; then :
+if test "x$ac_cv_type_wchar_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WCHAR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
fi
@@ -14991,120 +15541,107 @@ fi
#endif
"
-if test "x$ac_cv_type_wint_t" = xyes; then :
+if test "x$ac_cv_type_wint_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINT_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
-if test "x$ac_cv_type_int8_t" = xyes; then :
+if test "x$ac_cv_type_int8_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT8_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint8_t" = xyes; then :
+if test "x$ac_cv_type_uint8_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT8_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
-if test "x$ac_cv_type_int16_t" = xyes; then :
+if test "x$ac_cv_type_int16_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT16_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT16_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint16_t" = xyes; then :
+if test "x$ac_cv_type_uint16_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT16_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT16_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
-if test "x$ac_cv_type_int32_t" = xyes; then :
+if test "x$ac_cv_type_int32_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT32_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint32_t" = xyes; then :
+if test "x$ac_cv_type_uint32_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT32_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT32_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_intptr_t" = xyes; then :
+if test "x$ac_cv_type_intptr_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INTPTR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint_t" = xyes; then :
+if test "x$ac_cv_type_uint_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
+if test "x$ac_cv_type_pid_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PID_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PID_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIZE_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_SIZE_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTRDIFF_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
fi
@@ -15113,17 +15650,19 @@ fi
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
-$as_echo_n "checking size of char *... " >&6; }
-if ${ac_cv_sizeof_char_p+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
+printf %s "checking size of char *... " >&6; }
+if test ${ac_cv_sizeof_char_p+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_char_p" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (char *)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -15132,31 +15671,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
-$as_echo "$ac_cv_sizeof_char_p" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
+printf "%s\n" "$ac_cv_sizeof_char_p" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
-_ACEOF
+printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+printf %s "checking size of int... " >&6; }
+if test ${ac_cv_sizeof_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -15165,31 +15704,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+printf "%s\n" "$ac_cv_sizeof_int" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
+printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+printf %s "checking size of long... " >&6; }
+if test ${ac_cv_sizeof_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -15198,31 +15737,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+printf %s "checking size of short... " >&6; }
+if test ${ac_cv_sizeof_short+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -15231,25 +15770,24 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+printf "%s\n" "$ac_cv_sizeof_short" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
+printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
# ------------
# AC_CHECK_LIB
# ------------
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
-$as_echo_n "checking for pathfind in -lgen... " >&6; }
-if ${ac_cv_lib_gen_pathfind+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
+printf %s "checking for pathfind in -lgen... " >&6; }
+if test ${ac_cv_lib_gen_pathfind+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgen $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15258,43 +15796,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char pathfind ();
int
-main ()
+main (void)
{
return pathfind ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_gen_pathfind=yes
-else
+else $as_nop
ac_cv_lib_gen_pathfind=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
-$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
-if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGEN 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
+printf "%s\n" "$ac_cv_lib_gen_pathfind" >&6; }
+if test "x$ac_cv_lib_gen_pathfind" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBGEN 1" >>confdefs.h
LIBS="-lgen $LIBS"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
-$as_echo_n "checking for gettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_gettext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+printf %s "checking for gettext in -lintl... " >&6; }
+if test ${ac_cv_lib_intl_gettext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15303,95 +15839,65 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char gettext ();
int
-main ()
+main (void)
{
return gettext ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_intl_gettext=yes
-else
+else $as_nop
ac_cv_lib_intl_gettext=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
-$as_echo "$ac_cv_lib_intl_gettext" >&6; }
-if test "x$ac_cv_lib_intl_gettext" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINTL 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
+printf "%s\n" "$ac_cv_lib_intl_gettext" >&6; }
+if test "x$ac_cv_lib_intl_gettext" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h
LIBS="-lintl $LIBS"
fi
- for ac_func in vprintf
-do :
- ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VPRINTF 1
-_ACEOF
-ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = xyes; then :
+if test "x$ac_cv_func_vprintf" = xno
+then :
+ ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = xyes
+then :
-$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
fi
fi
-done
-
- for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+printf %s "checking for working fork... " >&6; }
+if test ${ac_cv_func_fork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_fork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
/* By Ruediger Kuhlmann. */
@@ -15401,9 +15907,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_fork_works=yes
-else
+else $as_nop
ac_cv_func_fork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -15411,8 +15918,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+printf "%s\n" "$ac_cv_func_fork_works" >&6; }
else
ac_cv_func_fork_works=$ac_cv_func_fork
@@ -15427,27 +15934,37 @@ if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_fork_works=yes
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+printf %s "checking for working vfork... " >&6; }
+if test ${ac_cv_func_vfork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_vfork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
+#include <signal.h>
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
+
+static void
+do_nothing (int sig)
+{
+ (void) sig;
+}
+
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent. The compiler
is told about this with #include <vfork.h>, but some compilers
@@ -15455,11 +15972,7 @@ $ac_includes_default
static variable whose address is put into a register that is
clobbered by the vfork. */
static void
-#ifdef __cplusplus
sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
{
static pid_t child;
if (!child) {
@@ -15477,13 +15990,18 @@ sparc_address_test (arg) int arg;
}
int
-main ()
+main (void)
{
pid_t parent = getpid ();
pid_t child;
sparc_address_test (0);
+ /* On Solaris 2.4, changes by the child to the signal handler
+ also munge signal handlers in the parent. To detect this,
+ start by putting the parent's handler in a known state. */
+ signal (SIGTERM, SIG_DFL);
+
child = vfork ();
if (child == 0) {
@@ -15505,6 +16023,10 @@ main ()
|| p != p5 || p != p6 || p != p7)
_exit(1);
+ /* Alter the child's signal handler. */
+ if (signal (SIGTERM, do_nothing) != SIG_DFL)
+ _exit(1);
+
/* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
from child file descriptors. If the child closes a descriptor
before it execs or exits, this munges the parent's descriptor
@@ -15520,6 +16042,9 @@ main ()
/* Was there some problem with vforking? */
child < 0
+ /* Did the child munge the parent's signal handler? */
+ || signal (SIGTERM, SIG_DFL) != SIG_DFL
+
/* Did the child fail? (This shouldn't happen.) */
|| status
@@ -15532,9 +16057,10 @@ main ()
}
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_vfork_works=yes
-else
+else $as_nop
ac_cv_func_vfork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -15542,49 +16068,98 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
else
-$as_echo "#define vfork fork" >>confdefs.h
+printf "%s\n" "#define vfork fork" >>confdefs.h
fi
if test "x$ac_cv_func_fork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
- for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
- strrchr strsignal fchmod fstat chmod
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+ printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "canonicalize_file_name" "ac_cv_func_canonicalize_file_name"
+if test "x$ac_cv_func_canonicalize_file_name" = xyes
+then :
+ printf "%s\n" "#define HAVE_CANONICALIZE_FILE_NAME 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+fi
+ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
+if test "x$ac_cv_func_strchr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
+if test "x$ac_cv_func_strrchr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
+if test "x$ac_cv_func_strsignal" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
+if test "x$ac_cv_func_fchmod" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat"
+if test "x$ac_cv_func_fstat" = xyes
+then :
+ printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "chmod" "ac_cv_func_chmod"
+if test "x$ac_cv_func_chmod" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHMOD 1" >>confdefs.h
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
@@ -15598,10 +16173,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
@@ -15610,13 +16190,13 @@ case `"$ac_path_SED" --version 2>&1` in
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -15644,13 +16224,14 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
SED="$ac_cv_path_SED"
rm -f conftest.sed
while :
do
+ test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which bash`
test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which dash`
@@ -15665,9 +16246,7 @@ $as_echo "$ac_cv_path_SED" >&6; }
as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
done
-cat >>confdefs.h <<_ACEOF
-#define POSIX_SHELL "${POSIX_SHELL}"
-_ACEOF
+printf "%s\n" "#define POSIX_SHELL \"${POSIX_SHELL}\"" >>confdefs.h
@@ -15679,11 +16258,12 @@ _ACEOF
NEED_LIBOPTS_DIR=''
# Check whether --enable-local-libopts was given.
-if test "${enable_local_libopts+set}" = set; then :
+if test ${enable_local_libopts+y}
+then :
enableval=$enable_local_libopts;
if test x$enableval = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
-$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
+printf "%s\n" "$as_me: Using supplied libopts tearoff" >&6;}
LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
NEED_LIBOPTS_DIR=true
LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
@@ -15692,7 +16272,8 @@ fi
# Check whether --enable-libopts-install was given.
-if test "${enable_libopts_install+set}" = set; then :
+if test ${enable_libopts_install+y}
+then :
enableval=$enable_libopts_install;
fi
@@ -15706,33 +16287,36 @@ fi
if test -z "${NEED_LIBOPTS_DIR}" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
-$as_echo_n "checking whether autoopts-config can be found... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
+printf %s "checking whether autoopts-config can be found... " >&6; }
# Check whether --with-autoopts-config was given.
-if test "${with_autoopts_config+set}" = set; then :
+if test ${with_autoopts_config+y}
+then :
withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
-$as_echo_n "checking whether autoopts-config is specified... " >&6; }
-if ${lo_cv_with_autoopts_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
+printf %s "checking whether autoopts-config is specified... " >&6; }
+if test ${lo_cv_with_autoopts_config+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if autoopts-config --help 2>/dev/null 1>&2
then lo_cv_with_autoopts_config=autoopts-config
elif libopts-config --help 2>/dev/null 1>&2
then lo_cv_with_autoopts_config=libopts-config
else lo_cv_with_autoopts_config=no ; fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
-$as_echo "$lo_cv_with_autoopts_config" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
+printf "%s\n" "$lo_cv_with_autoopts_config" >&6; }
fi
# end of AC_ARG_WITH
- if ${lo_cv_test_autoopts+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lo_cv_test_autoopts+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "${lo_cv_with_autoopts_config}" \
-o X"${lo_cv_with_autoopts_config}" = Xno
@@ -15750,8 +16334,8 @@ else
fi
# end of CACHE_VAL
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
-$as_echo "${lo_cv_test_autoopts}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
+printf "%s\n" "${lo_cv_test_autoopts}" >&6; }
if test "X${lo_cv_test_autoopts}" != Xno
then
@@ -15790,11 +16374,12 @@ ntp_pkgconfig_min_version='0.15.0'
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
@@ -15804,11 +16389,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -15820,11 +16409,11 @@ esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -15833,11 +16422,12 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
@@ -15847,11 +16437,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -15863,11 +16457,11 @@ esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
@@ -15875,8 +16469,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
@@ -15890,14 +16484,14 @@ fi
case "$PKG_CONFIG" in
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
-$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
PKG_CONFIG=""
fi
;;
@@ -15907,9 +16501,10 @@ esac
# Check whether --enable-local-libevent was given.
-if test "${enable_local_libevent+set}" = set; then :
+if test ${enable_local_libevent+y}
+then :
enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
-else
+else $as_nop
ntp_use_local_libevent=${ntp_use_local_libevent-detect}
fi
@@ -15931,8 +16526,8 @@ case "$ntp_use_local_libevent" in
*) # If we have (a good enough) pkg-config, see if it can find libevent
case "$PKG_CONFIG" in
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
-$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
then
ntp_use_local_libevent=no
@@ -15941,8 +16536,8 @@ $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed
*.*) ;;
*) ntp_libevent_version='(unknown)' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
-$as_echo "yes, version $ntp_libevent_version" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
+printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
# HMS: I hope the following is accurate.
@@ -15975,8 +16570,8 @@ $as_echo "yes, version $ntp_libevent_version" >&6; }
# HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
# is "pthreads"?
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
;;
*)
@@ -15988,8 +16583,8 @@ esac
case "$ntp_use_local_libevent" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
-$as_echo "$as_me: Using libevent tearoff" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
+printf "%s\n" "$as_me: Using libevent tearoff" >&6;}
CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
case "$LIBISC_PTHREADS_NOTHREADS" in
pthreads)
@@ -16026,21 +16621,111 @@ fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
+
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
+
+fi
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strerror_r" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
fi
+printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
+
# Check whether --enable-c99-snprintf was given.
-if test "${enable_c99_snprintf+set}" = set; then :
+if test ${enable_c99_snprintf+y}
+then :
enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
-else
+else $as_nop
force_c99_snprintf=no
fi
@@ -16056,99 +16741,89 @@ fi
- for ac_header in $ac_header_list
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if ${ac_cv_type_unsigned_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+printf %s "checking for unsigned long long int... " >&6; }
+if test ${ac_cv_type_unsigned_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_type_unsigned_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ case $ac_prog_cc_stdc in
+ no | c89) ;;
+ *)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
+ ? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
+ ? 1 : -1)];
int i = 63;
int
-main ()
+main (void)
{
/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-else
+else $as_nop
ac_cv_type_unsigned_long_long_int=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext;;
+ esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
if test $ac_cv_type_unsigned_long_long_int = yes; then
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
-if test "x$ac_cv_func_vsnprintf" = xyes; then :
+if test "x$ac_cv_func_vsnprintf" = xyes
+then :
hw_cv_func_vsnprintf=yes
-else
+else $as_nop
hw_cv_func_vsnprintf=no
fi
- if test "$hw_cv_func_vsnprintf" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
-$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
-if ${hw_cv_func_vsnprintf_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ if test "$hw_cv_func_vsnprintf" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
+printf %s "checking whether vsnprintf is C99 compliant... " >&6; }
+if test ${hw_cv_func_vsnprintf_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
hw_cv_func_vsnprintf_c99=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if HAVE_STDARG_H
@@ -16165,7 +16840,7 @@ else
return result;
}
int
-main ()
+main (void)
{
char buf[43];
if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
@@ -16176,9 +16851,10 @@ char buf[43];
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
hw_cv_func_vsnprintf_c99=yes
-else
+else $as_nop
hw_cv_func_vsnprintf_c99=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -16186,72 +16862,86 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
-$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
+printf "%s\n" "$hw_cv_func_vsnprintf_c99" >&6; }
+else $as_nop
hw_cv_func_vsnprintf_c99=no
fi
-$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
-$as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
- if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
+printf %s "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
+ if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no
+then :
hw_use_rpl_vsnprintf=yes
-else
+else $as_nop
hw_use_rpl_vsnprintf=no
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
-$as_echo "$hw_use_rpl_vsnprintf" >&6; }
- if test "$hw_use_rpl_vsnprintf" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
+printf "%s\n" "$hw_use_rpl_vsnprintf" >&6; }
+ if test "$hw_use_rpl_vsnprintf" = yes
+then :
-$as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
- if test ${hw_nodef_vsnprintf=no} = no; then :
+ if test ${hw_nodef_vsnprintf=no} = no
+then :
-$as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
+printf "%s\n" "#define vsnprintf rpl_vsnprintf" >>confdefs.h
fi
- for ac_header in inttypes.h locale.h stddef.h stdint.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
+if test "x$ac_cv_header_locale_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
+if test "x$ac_cv_header_stddef_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
+
+fi
ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
"
-if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
fi
ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
"
-if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
+if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
-$as_echo_n "checking for long double... " >&6; }
-if ${ac_cv_type_long_double+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
+printf %s "checking for long double... " >&6; }
+if test ${ac_cv_type_long_double+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "$GCC" = yes; then
ac_cv_type_long_double=yes
else
@@ -16261,7 +16951,7 @@ else
not support it. */
long double foo = 0.0L;
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
sizeof (double) <= sizeof (long double))];
@@ -16272,165 +16962,173 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_type_long_double=yes
-else
+else $as_nop
ac_cv_type_long_double=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
-$as_echo "$ac_cv_type_long_double" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
+printf "%s\n" "$ac_cv_type_long_double" >&6; }
if test $ac_cv_type_long_double = yes; then
-$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if ${ac_cv_type_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+printf %s "checking for long long int... " >&6; }
+if test ${ac_cv_type_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_type_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
- if test $ac_cv_type_long_long_int = yes; then
- if test "$cross_compiling" = yes; then :
+ case $ac_prog_cc_stdc in
+ no | c89) ;;
+ *)
+ ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+ if test $ac_cv_type_long_long_int = yes; then
+ if test "$cross_compiling" = yes
+then :
:
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
- #ifndef LLONG_MAX
- # define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- # define LLONG_MAX (HALF - 1 + HALF)
- #endif
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
int
-main ()
+main (void)
{
long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
-else
+else $as_nop
ac_cv_type_long_long_int=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- fi
- fi
+ fi;;
+ esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
if test $ac_cv_type_long_long_int = yes; then
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if ${ac_cv_type_unsigned_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+printf %s "checking for unsigned long long int... " >&6; }
+if test ${ac_cv_type_unsigned_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_type_unsigned_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ case $ac_prog_cc_stdc in
+ no | c89) ;;
+ *)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
+ ? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
+ ? 1 : -1)];
int i = 63;
int
-main ()
+main (void)
{
/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-else
+else $as_nop
ac_cv_type_unsigned_long_long_int=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext;;
+ esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
if test $ac_cv_type_unsigned_long_long_int = yes; then
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_intmax_t" = xyes; then :
+if test "x$ac_cv_type_intmax_t" = xyes
+then :
-$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
-else
+else $as_nop
test $ac_cv_type_long_long_int = yes \
&& ac_type='long long int' \
|| ac_type='long int'
-cat >>confdefs.h <<_ACEOF
-#define intmax_t $ac_type
-_ACEOF
+printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
fi
@@ -16438,36 +17136,36 @@ fi
ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintmax_t" = xyes; then :
+if test "x$ac_cv_type_uintmax_t" = xyes
+then :
-$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h
-else
+else $as_nop
test $ac_cv_type_unsigned_long_long_int = yes \
&& ac_type='unsigned long long int' \
|| ac_type='unsigned long int'
-cat >>confdefs.h <<_ACEOF
-#define uintmax_t $ac_type
-_ACEOF
+printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
-$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
-else
+else $as_nop
for ac_type in 'unsigned int' 'unsigned long int' \
'unsigned long long int'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
test_array [0] = 0;
@@ -16477,53 +17175,49 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-cat >>confdefs.h <<_ACEOF
-#define uintptr_t $ac_type
-_ACEOF
+printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
ac_type=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
test -z "$ac_type" && break
done
fi
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTRDIFF_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
fi
- for ac_func in localeconv
-do :
- ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
-if test "x$ac_cv_func_localeconv" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LOCALECONV 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
+if test "x$ac_cv_func_localeconv" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h
fi
-done
- if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -16536,7 +17230,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -16564,7 +17258,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -16580,18 +17274,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
@@ -16611,26 +17306,30 @@ fi
ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
-if test "x$ac_cv_func_snprintf" = xyes; then :
+if test "x$ac_cv_func_snprintf" = xyes
+then :
hw_cv_func_snprintf=yes
-else
+else $as_nop
hw_cv_func_snprintf=no
fi
- if test "$hw_cv_func_snprintf" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
-$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
-if ${hw_cv_func_snprintf_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ if test "$hw_cv_func_snprintf" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
+printf %s "checking whether snprintf is C99 compliant... " >&6; }
+if test ${hw_cv_func_snprintf_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
hw_cv_func_snprintf_c99=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
char buf[43];
if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
@@ -16641,9 +17340,10 @@ char buf[43];
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
hw_cv_func_snprintf_c99=yes
-else
+else $as_nop
hw_cv_func_snprintf_c99=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -16651,44 +17351,49 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
-$as_echo "$hw_cv_func_snprintf_c99" >&6; }
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
+printf "%s\n" "$hw_cv_func_snprintf_c99" >&6; }
+else $as_nop
hw_cv_func_snprintf_c99=no
fi
-$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
-$as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
- if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
+printf %s "checking if C99-snprintf replacement snprintf will be used... " >&6; }
+ if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no
+then :
hw_use_rpl_snprintf=yes
-else
+else $as_nop
hw_use_rpl_snprintf=no
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
-$as_echo "$hw_use_rpl_snprintf" >&6; }
- if test "$hw_use_rpl_snprintf" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
+printf "%s\n" "$hw_use_rpl_snprintf" >&6; }
+ if test "$hw_use_rpl_snprintf" = yes
+then :
-$as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
- if test ${hw_nodef_snprintf=no} = no; then :
+ if test ${hw_nodef_snprintf=no} = no
+then :
-$as_echo "#define snprintf rpl_snprintf" >>confdefs.h
+printf "%s\n" "#define snprintf rpl_snprintf" >>confdefs.h
fi
- if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -16701,7 +17406,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -16729,7 +17434,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -16745,18 +17450,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
@@ -16790,17 +17496,18 @@ LIBS=
# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
+else $as_nop
with_gnu_ld=no
fi
ac_prog=ld
if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return, which upsets mingw
@@ -16829,15 +17536,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
;;
esac
elif test yes = "$with_gnu_ld"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
fi
-if ${lt_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
@@ -16866,18 +17574,19 @@ fi
LD=$lt_cv_path_LD
if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
@@ -16888,8 +17597,8 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -16899,11 +17608,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
-$as_echo_n "checking for directory path separator... " >&6; }
-if ${ntp_cv_dir_sep+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
+printf %s "checking for directory path separator... " >&6; }
+if test ${ntp_cv_dir_sep+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$ntp_cv_dir_sep" in
'')
@@ -16919,29 +17629,28 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
-$as_echo "$ntp_cv_dir_sep" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
+printf "%s\n" "$ntp_cv_dir_sep" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DIR_SEP $ntp_cv_dir_sep
-_ACEOF
+printf "%s\n" "#define DIR_SEP $ntp_cv_dir_sep" >>confdefs.h
NTP_ORIG_LIBS="$LIBS"
# Check whether --with-lineeditlibs was given.
-if test "${with_lineeditlibs+set}" = set; then :
+if test ${with_lineeditlibs+y}
+then :
withval=$with_lineeditlibs; use_lineeditlibs="$withval"
-else
+else $as_nop
use_lineeditlibs="edit,editline"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
-$as_echo_n "checking line editing libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
-$as_echo "$use_lineeditlibs" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
+printf %s "checking line editing libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
+printf "%s\n" "$use_lineeditlibs" >&6; }
case "$use_lineeditlibs" in
no)
ntp_lib_lineedit=no
@@ -16958,40 +17667,38 @@ $as_echo "$use_lineeditlibs" >&6; }
;;
esac
LIBS="$NTP_ORIG_LIBS $TRY_LIB"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
-$as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
+printf %s "checking for readline() with $TRY_LIB... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char readline ();
int
-main ()
+main (void)
{
return readline ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_lib_lineedit="$TRY_LIB"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
case "$ntp_lib_lineedit" in
'')
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
*)
# Use readline()
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
break
esac
case "$term_lib" in
@@ -16999,39 +17706,37 @@ $as_echo "yes" >&6; }
# do not try el_gets without a terminal library
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
-$as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
+printf %s "checking for el_gets() with $TRY_LIB... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char el_gets ();
int
-main ()
+main (void)
{
return el_gets ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_lib_lineedit="$TRY_LIB"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
case "$ntp_lib_lineedit" in
'')
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
*) # Use el_gets()
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
break
;;
esac # $ntp_lib_lineedit
@@ -17065,40 +17770,47 @@ $as_echo "yes" >&6; }
no)
;;
*)
- for ac_header in readline.h readline/readline.h histedit.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_READLINE_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_readline_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_READLINE_READLINE_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"
+if test "x$ac_cv_header_histedit_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_HISTEDIT_H 1" >>confdefs.h
- for ac_header in history.h readline/history.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+
+ ac_fn_c_check_header_compile "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
+if test "x$ac_cv_header_history_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_HISTORY_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_history_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_READLINE_HISTORY_H 1" >>confdefs.h
-done
+fi
case "$ac_cv_header_histedit_h" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
-$as_echo_n "checking number of arguments to el_init()... " >&6; }
-if ${ntp_cv_el_init_args+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
+printf %s "checking number of arguments to el_init()... " >&6; }
+if test ${ntp_cv_el_init_args+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17106,7 +17818,7 @@ else
#include <histedit.h>
int
-main ()
+main (void)
{
el_init("conftest", stdin, stdout, stderr);
@@ -17116,26 +17828,25 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_el_init_args=4
-else
+else $as_nop
ntp_cv_el_init_args=3
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
-$as_echo "$ntp_cv_el_init_args" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
+printf "%s\n" "$ntp_cv_el_init_args" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define EL_INIT_ARGS $ntp_cv_el_init_args
-_ACEOF
+printf "%s\n" "#define EL_INIT_ARGS $ntp_cv_el_init_args" >>confdefs.h
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
-$as_echo_n "checking whether readline supports history... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
+printf %s "checking whether readline supports history... " >&6; }
ntp_lib_lineedit_history="no"
ORIG_LIBS="$LIBS"
@@ -17146,32 +17857,30 @@ $as_echo_n "checking whether readline supports history... " >&6; }
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char add_history ();
int
-main ()
+main (void)
{
return add_history ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_lib_lineedit_history="yes"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$ORIG_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
-$as_echo "$ntp_lib_lineedit_history" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
+printf "%s\n" "$ntp_lib_lineedit_history" >&6; }
case "$ntp_lib_lineedit_history" in
yes)
-$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
+printf "%s\n" "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
esac
esac # $ntp_lib_lineedit
@@ -17187,11 +17896,12 @@ case "$host" in
;;
*)
_libs=$LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
-$as_echo_n "checking for library containing cos... " >&6; }
-if ${ac_cv_search_cos+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
+printf %s "checking for library containing cos... " >&6; }
+if test ${ac_cv_search_cos+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17199,46 +17909,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char cos ();
int
-main ()
+main (void)
{
return cos ();
;
return 0;
}
_ACEOF
-for ac_lib in '' m; do
+for ac_lib in '' m
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_cos=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_cos+:} false; then :
+ if test ${ac_cv_search_cos+y}
+then :
break
fi
done
-if ${ac_cv_search_cos+:} false; then :
+if test ${ac_cv_search_cos+y}
+then :
-else
+else $as_nop
ac_cv_search_cos=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
-$as_echo "$ac_cv_search_cos" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
+printf "%s\n" "$ac_cv_search_cos" >&6; }
ac_res=$ac_cv_search_cos
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
LIBM="-lm"
fi
@@ -17250,44 +17962,24 @@ esac
{ _libs=; unset _libs;}
-for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-fi
-
-done
-
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+printf %s "checking for working fork... " >&6; }
+if test ${ac_cv_func_fork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_fork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
/* By Ruediger Kuhlmann. */
@@ -17297,9 +17989,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_fork_works=yes
-else
+else $as_nop
ac_cv_func_fork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -17307,8 +18000,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+printf "%s\n" "$ac_cv_func_fork_works" >&6; }
else
ac_cv_func_fork_works=$ac_cv_func_fork
@@ -17323,27 +18016,37 @@ if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_fork_works=yes
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+printf %s "checking for working vfork... " >&6; }
+if test ${ac_cv_func_vfork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_vfork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
+#include <signal.h>
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
+
+static void
+do_nothing (int sig)
+{
+ (void) sig;
+}
+
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent. The compiler
is told about this with #include <vfork.h>, but some compilers
@@ -17351,11 +18054,7 @@ $ac_includes_default
static variable whose address is put into a register that is
clobbered by the vfork. */
static void
-#ifdef __cplusplus
sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
{
static pid_t child;
if (!child) {
@@ -17373,13 +18072,18 @@ sparc_address_test (arg) int arg;
}
int
-main ()
+main (void)
{
pid_t parent = getpid ();
pid_t child;
sparc_address_test (0);
+ /* On Solaris 2.4, changes by the child to the signal handler
+ also munge signal handlers in the parent. To detect this,
+ start by putting the parent's handler in a known state. */
+ signal (SIGTERM, SIG_DFL);
+
child = vfork ();
if (child == 0) {
@@ -17401,6 +18105,10 @@ main ()
|| p != p5 || p != p6 || p != p7)
_exit(1);
+ /* Alter the child's signal handler. */
+ if (signal (SIGTERM, do_nothing) != SIG_DFL)
+ _exit(1);
+
/* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
from child file descriptors. If the child closes a descriptor
before it execs or exits, this munges the parent's descriptor
@@ -17416,6 +18124,9 @@ main ()
/* Was there some problem with vforking? */
child < 0
+ /* Did the child munge the parent's signal handler? */
+ || signal (SIGTERM, SIG_DFL) != SIG_DFL
+
/* Did the child fail? (This shouldn't happen.) */
|| status
@@ -17428,9 +18139,10 @@ main ()
}
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_vfork_works=yes
-else
+else $as_nop
ac_cv_func_vfork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -17438,43 +18150,44 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
else
-$as_echo "#define vfork fork" >>confdefs.h
+printf "%s\n" "#define vfork fork" >>confdefs.h
fi
if test "x$ac_cv_func_fork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
-$as_echo_n "checking for working alloca.h... " >&6; }
-if ${ac_cv_working_alloca_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+printf %s "checking for working alloca.h... " >&6; }
+if test ${ac_cv_working_alloca_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <alloca.h>
int
-main ()
+main (void)
{
char *p = (char *) alloca (2 * sizeof (int));
if (p) return 0;
@@ -17482,52 +18195,52 @@ char *p = (char *) alloca (2 * sizeof (int));
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_working_alloca_h=yes
-else
+else $as_nop
ac_cv_working_alloca_h=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
-$as_echo "$ac_cv_working_alloca_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
if test $ac_cv_working_alloca_h = yes; then
-$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-$as_echo_n "checking for alloca... " >&6; }
-if ${ac_cv_func_alloca_works+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+printf %s "checking for alloca... " >&6; }
+if test ${ac_cv_func_alloca_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test $ac_cv_working_alloca_h = yes; then
+ ac_cv_func_alloca_works=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
+#include <stdlib.h>
+#include <stddef.h>
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-void *alloca (size_t);
-# endif
-# endif
+# ifdef __cplusplus
+extern "C"
# endif
+void *alloca (size_t);
# endif
#endif
int
-main ()
+main (void)
{
char *p = (char *) alloca (1);
if (p) return 0;
@@ -17535,20 +18248,22 @@ char *p = (char *) alloca (1);
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_alloca_works=yes
-else
+else $as_nop
ac_cv_func_alloca_works=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
-$as_echo "$ac_cv_func_alloca_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
+fi
if test $ac_cv_func_alloca_works = yes; then
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -17558,58 +18273,19 @@ else
ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
-$as_echo "#define C_ALLOCA 1" >>confdefs.h
-
+printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if ${ac_cv_os_cray+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then :
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-$as_echo "$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
- break
-fi
-
- done
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
-$as_echo_n "checking stack direction for C alloca... " >&6; }
-if ${ac_cv_c_stack_direction+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+printf %s "checking stack direction for C alloca... " >&6; }
+if test ${ac_cv_c_stack_direction+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_c_stack_direction=0
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
@@ -17630,9 +18306,10 @@ main (int argc, char **argv)
return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_c_stack_direction=1
-else
+else $as_nop
ac_cv_c_stack_direction=-1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -17640,50 +18317,37 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-$as_echo "$ac_cv_c_stack_direction" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
+printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
fi
-ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R $ac_have_decl
-_ACEOF
+if test $ac_cv_have_decl_strerror_r = yes; then
+ # For backward compatibility's sake, define HAVE_STRERROR_R.
+ # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
+ # as AC_CHECK_DECLS_ONCE.)
-for ac_func in strerror_r
-do :
- ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
-if test "x$ac_cv_func_strerror_r" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR_R 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
fi
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
-$as_echo_n "checking whether strerror_r returns char *... " >&6; }
-if ${ac_cv_func_strerror_r_char_p+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+printf %s "checking whether strerror_r returns char *... " >&6; }
+if test ${ac_cv_func_strerror_r_char_p+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_func_strerror_r_char_p=no
if test $ac_cv_have_decl_strerror_r = yes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
+#include <string.h>
int
-main ()
+main (void)
{
char buf[100];
@@ -17695,49 +18359,20 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_func_strerror_r_char_p=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- else
- # strerror_r is not declared. Choose between
- # systems that have relatively inaccessible declarations for the
- # function. BeOS and DEC UNIX 4.0 fall in this category, but the
- # former has a strerror_r that returns char*, while the latter
- # has a strerror_r that returns `int'.
- # This test should segfault on the DEC system.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
- extern char *strerror_r ();
-int
-main ()
-{
-char buf[100];
- char x = *strerror_r (0, buf, sizeof buf);
- return ! isalpha (x);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_func_strerror_r_char_p=yes
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
-$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
if test $ac_cv_func_strerror_r_char_p = yes; then
-$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
fi
@@ -17783,11 +18418,12 @@ case "$host" in
# instead to try to set the time to itself and check errno.
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17795,46 +18431,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char clock_gettime ();
int
-main ()
+main (void)
{
return clock_gettime ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt; do
+for ac_lib in '' rt
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_clock_gettime=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
+ if test ${ac_cv_search_clock_gettime+y}
+then :
break
fi
done
-if ${ac_cv_search_clock_gettime+:} false; then :
+if test ${ac_cv_search_clock_gettime+y}
+then :
-else
+else $as_nop
ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_clock_gettime" in
'none required') ;;
@@ -17844,42 +18482,69 @@ if test "$ac_res" != no; then :
fi
- for ac_func in clock_getres clock_gettime clock_settime
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
+if test "x$ac_cv_func_clock_getres" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
+if test "x$ac_cv_func_clock_settime" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
fi
-done
;;
esac
-for ac_func in getclock stime timegm strlcpy strlcat
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "getclock" "ac_cv_func_getclock"
+if test "x$ac_cv_func_getclock" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETCLOCK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "stime" "ac_cv_func_stime"
+if test "x$ac_cv_func_stime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
+if test "x$ac_cv_func_timegm" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
+if test "x$ac_cv_func_strlcat" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
fi
-done
# Bug 2713
LDADD_LIBUTIL=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
-$as_echo_n "checking for library containing snprintb... " >&6; }
-if ${ac_cv_search_snprintb+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
+printf %s "checking for library containing snprintb... " >&6; }
+if test ${ac_cv_search_snprintb+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17887,46 +18552,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char snprintb ();
int
-main ()
+main (void)
{
return snprintb ();
;
return 0;
}
_ACEOF
-for ac_lib in '' util; do
+for ac_lib in '' util
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_snprintb=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_snprintb+:} false; then :
+ if test ${ac_cv_search_snprintb+y}
+then :
break
fi
done
-if ${ac_cv_search_snprintb+:} false; then :
+if test ${ac_cv_search_snprintb+y}
+then :
-else
+else $as_nop
ac_cv_search_snprintb=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
-$as_echo "$ac_cv_search_snprintb" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
+printf "%s\n" "$ac_cv_search_snprintb" >&6; }
ac_res=$ac_cv_search_snprintb
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_snprintb" in
'none required') ;;
@@ -17934,49 +18601,57 @@ if test "$ac_res" != no; then :
*) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
esac
-$as_echo "#define USE_SNPRINTB 1" >>confdefs.h
+printf "%s\n" "#define USE_SNPRINTB 1" >>confdefs.h
fi
#
-for ac_header in errno.h sys/socket.h sys/types.h time.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_types_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
-for ac_header in net/if.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+fi
+ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
"
-if test "x$ac_cv_header_net_if_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_H 1
-_ACEOF
+if test "x$ac_cv_header_net_if_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
fi
-done
-
case "$host" in
*-hp-hpux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
-$as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
-if ${ntp_cv_predecl_mpinfou+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
+printf %s "checking if net/if.h requires mpinfou predeclaration... " >&6; }
+if test ${ntp_cv_predecl_mpinfou+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
np_cv_predecl_mpinfou=no
case "$ac_cv_header_net_if_h" in
@@ -17994,7 +18669,7 @@ else
#include <net/if.h>
int
-main ()
+main (void)
{
@@ -18003,20 +18678,21 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_predecl_mpinfou=yes
ac_cv_header_net_if_h=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
-$as_echo "$ntp_cv_predecl_mpinfou" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
+printf "%s\n" "$ntp_cv_predecl_mpinfou" >&6; }
case "$ntp_cv_predecl_mpinfou" in
yes)
cat >>confdefs.h <<_ACEOF
@@ -18034,76 +18710,82 @@ esac
case "$host" in
*-linux*)
- for ac_header in linux/if_addr.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
+ ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
"
-if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LINUX_IF_ADDR_H 1
-_ACEOF
+if test "x$ac_cv_header_linux_if_addr_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_IF_ADDR_H 1" >>confdefs.h
fi
-done
-
-$as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
+printf "%s\n" "#define NEED_EARLY_FORK 1" >>confdefs.h
esac
-for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
+if test "x$ac_cv_header_arpa_nameser_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/timers.h" "ac_cv_header_sys_timers_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timers_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIMERS_H 1" >>confdefs.h
+
+fi
# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
-for ac_header in sys/sysctl.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
#if defined HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
"
-if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SYSCTL_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_sysctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
fi
-done
+ac_fn_c_check_header_compile "$LINENO" "netinet/in_system.h" "ac_cv_header_netinet_in_system_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_system_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_SYSTEM_H 1" >>confdefs.h
-for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_systm_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_SYSTM_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
-done
+fi
-for ac_header in resolv.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
+ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -18115,19 +18797,14 @@ do :
#endif
"
-if test "x$ac_cv_header_resolv_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_RESOLV_H 1
-_ACEOF
+if test "x$ac_cv_header_resolv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
fi
-done
-
-for ac_header in net/if_var.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
+ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -18142,20 +18819,14 @@ do :
#endif
"
-if test "x$ac_cv_header_net_if_var_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_VAR_H 1
-_ACEOF
+if test "x$ac_cv_header_net_if_var_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_VAR_H 1" >>confdefs.h
fi
-done
-
-for ac_header in netinet/ip.h netinet/in_var.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -18176,22 +18847,46 @@ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
#endif
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_netinet_ip_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IP_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in_var.h" "ac_cv_header_netinet_in_var_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_VAR_H
+ # include <net/if_var.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_SYSTM_H
+ # include <netinet/in_systm.h>
+ #endif
-done
+"
+if test "x$ac_cv_header_netinet_in_var_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_VAR_H 1" >>confdefs.h
+
+fi
# HMS: Do we need to check for -lsocket before or after these tests?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
-$as_echo_n "checking for library containing inet_pton... " >&6; }
-if ${ac_cv_search_inet_pton+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+printf %s "checking for library containing inet_pton... " >&6; }
+if test ${ac_cv_search_inet_pton+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18199,46 +18894,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inet_pton ();
int
-main ()
+main (void)
{
return inet_pton ();
;
return 0;
}
_ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' nsl
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inet_pton=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inet_pton+:} false; then :
+ if test ${ac_cv_search_inet_pton+y}
+then :
break
fi
done
-if ${ac_cv_search_inet_pton+:} false; then :
+if test ${ac_cv_search_inet_pton+y}
+then :
-else
+else $as_nop
ac_cv_search_inet_pton=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
-$as_echo "$ac_cv_search_inet_pton" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
ac_res=$ac_cv_search_inet_pton
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_inet_pton" in
'none required') ;;
@@ -18248,11 +18945,12 @@ if test "$ac_res" != no; then :
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
-$as_echo_n "checking for library containing inet_ntop... " >&6; }
-if ${ac_cv_search_inet_ntop+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
+printf %s "checking for library containing inet_ntop... " >&6; }
+if test ${ac_cv_search_inet_ntop+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18260,46 +18958,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inet_ntop ();
int
-main ()
+main (void)
{
return inet_ntop ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' resolv
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inet_ntop=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inet_ntop+:} false; then :
+ if test ${ac_cv_search_inet_ntop+y}
+then :
break
fi
done
-if ${ac_cv_search_inet_ntop+:} false; then :
+if test ${ac_cv_search_inet_ntop+y}
+then :
-else
+else $as_nop
ac_cv_search_inet_ntop=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
-$as_echo "$ac_cv_search_inet_ntop" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
+printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
ac_res=$ac_cv_search_inet_ntop
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_inet_ntop" in
'none required') ;;
@@ -18317,11 +19017,12 @@ fi
# functions there and never add libsocket. See also [Bug 660]
# http://bugs.ntp.org/show_bug.cgi?id=660#c9
saved_LIBS=$LIBS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
-$as_echo_n "checking for library containing setsockopt... " >&6; }
-if ${ac_cv_search_setsockopt+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+printf %s "checking for library containing setsockopt... " >&6; }
+if test ${ac_cv_search_setsockopt+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18329,46 +19030,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char setsockopt ();
int
-main ()
+main (void)
{
return setsockopt ();
;
return 0;
}
_ACEOF
-for ac_lib in '' socket; do
+for ac_lib in '' socket
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_setsockopt=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_setsockopt+:} false; then :
+ if test ${ac_cv_search_setsockopt+y}
+then :
break
fi
done
-if ${ac_cv_search_setsockopt+:} false; then :
+if test ${ac_cv_search_setsockopt+y}
+then :
-else
+else $as_nop
ac_cv_search_setsockopt=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
-$as_echo "$ac_cv_search_setsockopt" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
+printf "%s\n" "$ac_cv_search_setsockopt" >&6; }
ac_res=$ac_cv_search_setsockopt
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_setsockopt" in
'none required') ;;
@@ -18381,11 +19084,12 @@ fi
case "$ac_cv_search_setsockopt" in
-lsocket)
LIBS="$saved_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
-$as_echo_n "checking for library containing getsockopt... " >&6; }
-if ${ac_cv_search_getsockopt+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
+printf %s "checking for library containing getsockopt... " >&6; }
+if test ${ac_cv_search_getsockopt+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18393,46 +19097,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char getsockopt ();
int
-main ()
+main (void)
{
return getsockopt ();
;
return 0;
}
_ACEOF
-for ac_lib in '' xnet; do
+for ac_lib in '' xnet
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_getsockopt=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_getsockopt+:} false; then :
+ if test ${ac_cv_search_getsockopt+y}
+then :
break
fi
done
-if ${ac_cv_search_getsockopt+:} false; then :
+if test ${ac_cv_search_getsockopt+y}
+then :
-else
+else $as_nop
ac_cv_search_getsockopt=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
-$as_echo "$ac_cv_search_getsockopt" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
+printf "%s\n" "$ac_cv_search_getsockopt" >&6; }
ac_res=$ac_cv_search_getsockopt
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_getsockopt" in
'none required') ;;
@@ -18458,44 +19164,42 @@ esac
{ saved_LIBS=; unset saved_LIBS;}
# Bug 2427 - look for recvmsg here.
-for ac_func in recvmsg
-do :
- ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
-if test "x$ac_cv_func_recvmsg" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_RECVMSG 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
+if test "x$ac_cv_func_recvmsg" = xyes
+then :
+ printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
fi
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_inline=$ac_kw
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
test "$ac_cv_c_inline" != no && break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -18518,61 +19222,37 @@ case "$ac_cv_c_inline" in
;;
*)
-$as_echo "#define HAVE_INLINE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
+# End of obsolete code.
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if ${ac_cv_sizeof_time_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+printf %s "checking size of time_t... " >&6; }
+if test ${ac_cv_sizeof_time_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (time_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -18581,26 +19261,25 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
-$as_echo_n "checking whether char is unsigned... " >&6; }
-if ${ac_cv_c_char_unsigned+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
+printf %s "checking whether char is unsigned... " >&6; }
+if test ${ac_cv_c_char_unsigned+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(((char) -1) < 0)];
test_array [0] = 0;
@@ -18610,34 +19289,37 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_char_unsigned=no
-else
+else $as_nop
ac_cv_c_char_unsigned=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
-$as_echo "$ac_cv_c_char_unsigned" >&6; }
-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
+printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
+if test $ac_cv_c_char_unsigned = yes; then
+ printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
fi
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
-$as_echo_n "checking size of signed char... " >&6; }
-if ${ac_cv_sizeof_signed_char+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
+printf %s "checking size of signed char... " >&6; }
+if test ${ac_cv_sizeof_signed_char+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_signed_char" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (signed char)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -18646,31 +19328,27 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
-$as_echo "$ac_cv_sizeof_signed_char" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
+printf "%s\n" "$ac_cv_sizeof_signed_char" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
-_ACEOF
+printf "%s\n" "#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char" >>confdefs.h
ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
-if test "x$ac_cv_type_s_char" = xyes; then :
+if test "x$ac_cv_type_s_char" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_S_CHAR 1
-_ACEOF
+printf "%s\n" "#define HAVE_S_CHAR 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
-if test "x$ac_cv_type_long_long" = xyes; then :
+if test "x$ac_cv_type_long_long" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_LONG 1
-_ACEOF
+printf "%s\n" "#define HAVE_LONG_LONG 1" >>confdefs.h
fi
@@ -18679,17 +19357,19 @@ fi
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+printf %s "checking size of short... " >&6; }
+if test ${ac_cv_sizeof_short+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -18698,31 +19378,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+printf "%s\n" "$ac_cv_sizeof_short" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
+printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+printf %s "checking size of int... " >&6; }
+if test ${ac_cv_sizeof_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -18731,31 +19411,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+printf "%s\n" "$ac_cv_sizeof_int" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
+printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+printf %s "checking size of long... " >&6; }
+if test ${ac_cv_sizeof_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -18764,14 +19444,12 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
@@ -18783,17 +19461,19 @@ case "$ac_cv_type_long_long" in
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if ${ac_cv_sizeof_long_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+printf %s "checking size of long long... " >&6; }
+if test ${ac_cv_sizeof_long_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -18802,14 +19482,12 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
;;
@@ -18822,13 +19500,13 @@ case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
no0no)
# We have signed chars, can't say 'signed char', no s_char typedef.
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
;;
no1no)
# We have signed chars, can say 'signed char', no s_char typedef.
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
;;
yes0no)
@@ -18838,38 +19516,40 @@ $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
yes1no)
# We have unsigned chars, can say 'signed char', no s_char typedef.
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+printf %s "checking for uid_t in sys/types.h... " >&6; }
+if test ${ac_cv_type_uid_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then :
+ $EGREP "uid_t" >/dev/null 2>&1
+then :
ac_cv_type_uid_t=yes
-else
+else $as_nop
ac_cv_type_uid_t=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+printf "%s\n" "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
-$as_echo "#define uid_t int" >>confdefs.h
+printf "%s\n" "#define uid_t int" >>confdefs.h
-$as_echo "#define gid_t int" >>confdefs.h
+printf "%s\n" "#define gid_t int" >>confdefs.h
fi
@@ -18878,12 +19558,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
-$as_echo_n "checking if we're including debugging code... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
+printf %s "checking if we're including debugging code... " >&6; }
# Check whether --enable-debugging was given.
-if test "${enable_debugging+set}" = set; then :
+if test ${enable_debugging+y}
+then :
enableval=$enable_debugging; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=yes
fi
@@ -18891,42 +19572,34 @@ fi
case "$ntp_ok" in
yes)
-$as_echo "#define DEBUG 1" >>confdefs.h
+printf "%s\n" "#define DEBUG 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# check if we can compile with pthreads
-for ac_header in semaphore.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
-if test "x$ac_cv_header_semaphore_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SEMAPHORE_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
+if test "x$ac_cv_header_semaphore_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h
fi
-done
-
-for ac_func in socketpair
-do :
- ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
-if test "x$ac_cv_func_socketpair" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SOCKETPAIR 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
+if test "x$ac_cv_func_socketpair" = xyes
+then :
+ printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
fi
-done
# Check whether --enable-thread-support was given.
-if test "${enable_thread_support+set}" = set; then :
+if test ${enable_thread_support+y}
+then :
enableval=$enable_thread_support;
-else
+else $as_nop
enable_thread_support=yes
fi
@@ -18948,7 +19621,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# OpenLDAP --with-threads
# Check whether --with-threads was given.
-if test "${with_threads+set}" = set; then :
+if test ${with_threads+y}
+then :
withval=$with_threads;
ol_arg=invalid
for ol_val in auto nt posix mach pth lwp yes no manual ; do
@@ -18961,7 +19635,7 @@ if test "${with_threads+set}" = set; then :
fi
ol_with_threads="$ol_arg"
-else
+else $as_nop
ol_with_threads="auto"
fi
# end --with-threads
@@ -18990,11 +19664,12 @@ if test $ol_aix_threads = yes ; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -19002,11 +19677,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -19017,11 +19696,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -19033,8 +19712,8 @@ done
if test $ol_with_threads != auto ; then
as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
-$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
+printf "%s\n" "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
fi
ol_with_threads=no
fi
@@ -19051,7 +19730,8 @@ ol_link_threads=no
# OpenLDAP --with-yielding_select
# Check whether --with-yielding_select was given.
-if test "${with_yielding_select+set}" = set; then :
+if test ${with_yielding_select+y}
+then :
withval=$with_yielding_select;
ol_arg=invalid
for ol_val in auto yes no manual ; do
@@ -19064,7 +19744,7 @@ if test "${with_yielding_select+set}" = set; then :
fi
ol_with_yielding_select="$ol_arg"
-else
+else $as_nop
ol_with_yielding_select="auto"
fi
# end --with-yielding_select
@@ -19074,14 +19754,15 @@ case $ol_with_threads in auto | yes | nt)
ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
-if test "x$ac_cv_func__beginthread" = xyes; then :
+if test "x$ac_cv_func__beginthread" = xyes
+then :
fi
if test $ac_cv_func__beginthread = yes ; then
-$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NT_THREADS 1" >>confdefs.h
ol_cv_nt_threads=yes
fi
@@ -19093,10 +19774,10 @@ $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
ol_with_yielding_select=yes
-$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
-$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
fi
@@ -19108,25 +19789,21 @@ esac
case $ol_with_threads in auto | yes | posix)
- for ac_header in pthread.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
fi
-done
-
if test $ac_cv_header_pthread_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
-$as_echo_n "checking POSIX thread version... " >&6; }
-if ${ol_cv_pthread_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
+printf %s "checking POSIX thread version... " >&6; }
+if test ${ol_cv_pthread_version+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19134,7 +19811,7 @@ else
# include <pthread.h>
int
-main ()
+main (void)
{
int i = PTHREAD_CREATE_JOINABLE;
@@ -19143,7 +19820,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19151,14 +19829,15 @@ if ac_fn_c_try_compile "$LINENO"; then :
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_detach" >/dev/null 2>&1; then :
+ $EGREP "pthread_detach" >/dev/null 2>&1
+then :
ol_cv_pthread_version=10
-else
+else $as_nop
ol_cv_pthread_version=8
fi
-rm -f conftest*
+rm -rf conftest*
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19170,9 +19849,10 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft7" >/dev/null 2>&1; then :
+ $EGREP "draft7" >/dev/null 2>&1
+then :
ol_cv_pthread_version=7
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19180,9 +19860,10 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
+ $EGREP "pthread_attr_init" >/dev/null 2>&1
+then :
ol_cv_pthread_version=6
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19194,32 +19875,31 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft5" >/dev/null 2>&1; then :
+ $EGREP "draft5" >/dev/null 2>&1
+then :
ol_cv_pthread_version=5
-else
+else $as_nop
ol_cv_pthread_version=4
fi
-rm -f conftest*
+rm -rf conftest*
fi
-rm -f conftest*
+rm -rf conftest*
fi
-rm -f conftest*
+rm -rf conftest*
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
-$as_echo "$ol_cv_pthread_version" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
+printf "%s\n" "$ol_cv_pthread_version" >&6; }
if test $ol_cv_pthread_version != 0 ; then
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREADS $ol_cv_pthread_version
-_ACEOF
+printf "%s\n" "#define HAVE_PTHREADS $ol_cv_pthread_version" >>confdefs.h
else
as_fn_error $? "unknown pthread version" "$LINENO" 5
@@ -19229,39 +19909,42 @@ _ACEOF
ol_with_threads=found
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+printf %s "checking for LinuxThreads pthread.h... " >&6; }
+if test ${ol_cv_header_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
+then :
ol_cv_header_linux_threads=yes
-else
+else $as_nop
ol_cv_header_linux_threads=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
if test $ol_cv_header_linux_threads = yes; then
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
-$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
-if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
+printf %s "checking for GNU Pth pthread.h... " >&6; }
+if test ${ol_cv_header_gnu_pth_pthread_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
@@ -19271,42 +19954,40 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
+ $EGREP "__gnu_pth__" >/dev/null 2>&1
+then :
ol_cv_header_gnu_pth_pthread_h=yes
-else
+else $as_nop
ol_cv_header_gnu_pth_pthread_h=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
-$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
+printf "%s\n" "$ol_cv_header_gnu_pth_pthread_h" >&6; }
if test $ol_cv_header_gnu_pth_pthread_h = no ; then
- for ac_header in sched.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
-if test "x$ac_cv_header_sched_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SCHED_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
fi
-done
-
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
-$as_echo_n "checking for pthread_create in default libraries... " >&6; }
-if ${ol_cv_pthread_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
+printf %s "checking for pthread_create in default libraries... " >&6; }
+if test ${ol_cv_pthread_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19326,7 +20007,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -19379,14 +20060,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_create=yes
-else
+else $as_nop
ol_cv_pthread_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19461,9 +20143,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_create=yes
-else
+else $as_nop
ol_cv_pthread_create=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -19471,8 +20154,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
-$as_echo "$ol_cv_pthread_create" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
+printf "%s\n" "$ol_cv_pthread_create" >&6; }
if test $ol_cv_pthread_create != no ; then
ol_link_threads=posix
@@ -19482,17 +20165,19 @@ $as_echo "$ol_cv_pthread_create" >&6; }
# Pthread try link: -kthread (ol_cv_pthread_kthread)
if test "$ol_link_threads" = no ; then
# try -kthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
-$as_echo_n "checking for pthread link with -kthread... " >&6; }
-if ${ol_cv_pthread_kthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
+printf %s "checking for pthread link with -kthread... " >&6; }
+if test ${ol_cv_pthread_kthread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-kthread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19512,7 +20197,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -19565,14 +20250,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_kthread=yes
-else
+else $as_nop
ol_cv_pthread_kthread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19647,9 +20333,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_kthread=yes
-else
+else $as_nop
ol_cv_pthread_kthread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -19661,8 +20348,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
-$as_echo "$ol_cv_pthread_kthread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
+printf "%s\n" "$ol_cv_pthread_kthread" >&6; }
if test $ol_cv_pthread_kthread = yes ; then
ol_link_pthreads="-kthread"
@@ -19673,17 +20360,19 @@ fi
# Pthread try link: -pthread (ol_cv_pthread_pthread)
if test "$ol_link_threads" = no ; then
# try -pthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
-$as_echo_n "checking for pthread link with -pthread... " >&6; }
-if ${ol_cv_pthread_pthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
+printf %s "checking for pthread link with -pthread... " >&6; }
+if test ${ol_cv_pthread_pthread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-pthread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19703,7 +20392,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -19756,14 +20445,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_pthread=yes
-else
+else $as_nop
ol_cv_pthread_pthread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19838,9 +20528,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_pthread=yes
-else
+else $as_nop
ol_cv_pthread_pthread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -19852,8 +20543,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
-$as_echo "$ol_cv_pthread_pthread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
+printf "%s\n" "$ol_cv_pthread_pthread" >&6; }
if test $ol_cv_pthread_pthread = yes ; then
ol_link_pthreads="-pthread"
@@ -19864,17 +20555,19 @@ fi
# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
if test "$ol_link_threads" = no ; then
# try -pthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
-$as_echo_n "checking for pthread link with -pthreads... " >&6; }
-if ${ol_cv_pthread_pthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
+printf %s "checking for pthread link with -pthreads... " >&6; }
+if test ${ol_cv_pthread_pthreads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-pthreads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19894,7 +20587,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -19947,14 +20640,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_pthreads=yes
-else
+else $as_nop
ol_cv_pthread_pthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20029,9 +20723,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_pthreads=yes
-else
+else $as_nop
ol_cv_pthread_pthreads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -20043,8 +20738,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
-$as_echo "$ol_cv_pthread_pthreads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
+printf "%s\n" "$ol_cv_pthread_pthreads" >&6; }
if test $ol_cv_pthread_pthreads = yes ; then
ol_link_pthreads="-pthreads"
@@ -20055,17 +20750,19 @@ fi
# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
if test "$ol_link_threads" = no ; then
# try -mthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
-$as_echo_n "checking for pthread link with -mthreads... " >&6; }
-if ${ol_cv_pthread_mthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
+printf %s "checking for pthread link with -mthreads... " >&6; }
+if test ${ol_cv_pthread_mthreads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-mthreads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20085,7 +20782,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -20138,14 +20835,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_mthreads=yes
-else
+else $as_nop
ol_cv_pthread_mthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20220,9 +20918,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_mthreads=yes
-else
+else $as_nop
ol_cv_pthread_mthreads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -20234,8 +20933,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
-$as_echo "$ol_cv_pthread_mthreads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
+printf "%s\n" "$ol_cv_pthread_mthreads" >&6; }
if test $ol_cv_pthread_mthreads = yes ; then
ol_link_pthreads="-mthreads"
@@ -20246,17 +20945,19 @@ fi
# Pthread try link: -thread (ol_cv_pthread_thread)
if test "$ol_link_threads" = no ; then
# try -thread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
-$as_echo_n "checking for pthread link with -thread... " >&6; }
-if ${ol_cv_pthread_thread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
+printf %s "checking for pthread link with -thread... " >&6; }
+if test ${ol_cv_pthread_thread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-thread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20276,7 +20977,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -20329,14 +21030,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_thread=yes
-else
+else $as_nop
ol_cv_pthread_thread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20411,9 +21113,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_thread=yes
-else
+else $as_nop
ol_cv_pthread_thread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -20425,8 +21128,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
-$as_echo "$ol_cv_pthread_thread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
+printf "%s\n" "$ol_cv_pthread_thread" >&6; }
if test $ol_cv_pthread_thread = yes ; then
ol_link_pthreads="-thread"
@@ -20438,17 +21141,19 @@ fi
# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
if test "$ol_link_threads" = no ; then
# try -lpthread -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+printf %s "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
+if test ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20468,7 +21173,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -20521,14 +21226,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20603,9 +21309,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -20617,8 +21324,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
+printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
@@ -20629,17 +21336,19 @@ fi
# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
if test "$ol_link_threads" = no ; then
# try -lpthread -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
+printf %s "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
+if test ${ol_cv_pthread_lpthread_lmach_lexc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread -lmach -lexc $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20659,7 +21368,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -20712,14 +21421,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20794,9 +21504,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -20808,8 +21519,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
+printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
ol_link_pthreads="-lpthread -lmach -lexc"
@@ -20821,17 +21532,19 @@ fi
# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
if test "$ol_link_threads" = no ; then
# try -lpthread -Wl,-woff,85
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
-$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
-if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+printf %s "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
+if test ${ol_cv_pthread_lib_lpthread_woff+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread -Wl,-woff,85 $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20851,7 +21564,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -20904,14 +21617,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lib_lpthread_woff=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthread_woff=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20986,9 +21700,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lib_lpthread_woff=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthread_woff=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -21000,8 +21715,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
-$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
+printf "%s\n" "$ol_cv_pthread_lib_lpthread_woff" >&6; }
if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
ol_link_pthreads="-lpthread -Wl,-woff,85"
@@ -21013,17 +21728,19 @@ fi
# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
if test "$ol_link_threads" = no ; then
# try -lpthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
-$as_echo_n "checking for pthread link with -lpthread... " >&6; }
-if ${ol_cv_pthread_lpthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
+printf %s "checking for pthread link with -lpthread... " >&6; }
+if test ${ol_cv_pthread_lpthread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21043,7 +21760,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -21096,14 +21813,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthread=yes
-else
+else $as_nop
ol_cv_pthread_lpthread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21178,9 +21896,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthread=yes
-else
+else $as_nop
ol_cv_pthread_lpthread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -21192,8 +21911,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
-$as_echo "$ol_cv_pthread_lpthread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
+printf "%s\n" "$ol_cv_pthread_lpthread" >&6; }
if test $ol_cv_pthread_lpthread = yes ; then
ol_link_pthreads="-lpthread"
@@ -21204,17 +21923,19 @@ fi
# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
if test "$ol_link_threads" = no ; then
# try -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
-$as_echo_n "checking for pthread link with -lc_r... " >&6; }
-if ${ol_cv_pthread_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
+printf %s "checking for pthread link with -lc_r... " >&6; }
+if test ${ol_cv_pthread_lc_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21234,7 +21955,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -21287,14 +22008,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21369,9 +22091,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lc_r=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -21383,8 +22106,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
-$as_echo "$ol_cv_pthread_lc_r" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
+printf "%s\n" "$ol_cv_pthread_lc_r" >&6; }
if test $ol_cv_pthread_lc_r = yes ; then
ol_link_pthreads="-lc_r"
@@ -21396,17 +22119,19 @@ fi
# Pthread try link: -threads (ol_cv_pthread_threads)
if test "$ol_link_threads" = no ; then
# try -threads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
-$as_echo_n "checking for pthread link with -threads... " >&6; }
-if ${ol_cv_pthread_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
+printf %s "checking for pthread link with -threads... " >&6; }
+if test ${ol_cv_pthread_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-threads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21426,7 +22151,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -21479,14 +22204,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_threads=yes
-else
+else $as_nop
ol_cv_pthread_threads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21561,9 +22287,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_threads=yes
-else
+else $as_nop
ol_cv_pthread_threads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -21575,8 +22302,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
-$as_echo "$ol_cv_pthread_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
+printf "%s\n" "$ol_cv_pthread_threads" >&6; }
if test $ol_cv_pthread_threads = yes ; then
ol_link_pthreads="-threads"
@@ -21588,17 +22315,19 @@ fi
# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
if test "$ol_link_threads" = no ; then
# try -lpthreads -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+printf %s "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
+if test ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21618,7 +22347,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -21671,14 +22400,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21753,9 +22483,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -21767,8 +22498,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
+printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
@@ -21779,17 +22510,19 @@ fi
# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
if test "$ol_link_threads" = no ; then
# try -lpthreads -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
+printf %s "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
+if test ${ol_cv_pthread_lpthreads_lmach_lexc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads -lmach -lexc $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21809,7 +22542,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -21862,14 +22595,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21944,9 +22678,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -21958,8 +22693,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
+printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
ol_link_pthreads="-lpthreads -lmach -lexc"
@@ -21970,17 +22705,19 @@ fi
# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
if test "$ol_link_threads" = no ; then
# try -lpthreads -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
+printf %s "checking for pthread link with -lpthreads -lexc... " >&6; }
+if test ${ol_cv_pthread_lpthreads_lexc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads -lexc $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22000,7 +22737,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -22053,14 +22790,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthreads_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22135,9 +22873,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthreads_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lexc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -22149,8 +22888,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
+printf "%s\n" "$ol_cv_pthread_lpthreads_lexc" >&6; }
if test $ol_cv_pthread_lpthreads_lexc = yes ; then
ol_link_pthreads="-lpthreads -lexc"
@@ -22162,17 +22901,19 @@ fi
# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
if test "$ol_link_threads" = no ; then
# try -lpthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
-$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
-if ${ol_cv_pthread_lib_lpthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
+printf %s "checking for pthread link with -lpthreads... " >&6; }
+if test ${ol_cv_pthread_lib_lpthreads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22192,7 +22933,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -22245,14 +22986,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lib_lpthreads=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22327,9 +23069,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lib_lpthreads=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthreads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -22341,8 +23084,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
-$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
+printf "%s\n" "$ol_cv_pthread_lib_lpthreads" >&6; }
if test $ol_cv_pthread_lib_lpthreads = yes ; then
ol_link_pthreads="-lpthreads"
@@ -22351,8 +23094,8 @@ $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
-$as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
+printf "%s\n" "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
if test $ol_link_threads != no ; then
LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
@@ -22361,27 +23104,35 @@ $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link
save_LIBS="$LIBS"
LIBS="$LTHREAD_LIBS $LIBS"
- for ac_func in sched_yield pthread_yield thr_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
+if test "x$ac_cv_func_sched_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
+if test "x$ac_cv_func_pthread_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "thr_yield" "ac_cv_func_thr_yield"
+if test "x$ac_cv_func_thr_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_YIELD 1" >>confdefs.h
fi
-done
if test $ac_cv_func_sched_yield = no &&
test $ac_cv_func_pthread_yield = no &&
test $ac_cv_func_thr_yield = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
-$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_yield+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+printf %s "checking for sched_yield in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_sched_yield+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22390,36 +23141,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sched_yield ();
int
-main ()
+main (void)
{
return sched_yield ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_rt_sched_yield=yes
-else
+else $as_nop
ac_cv_lib_rt_sched_yield=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
-$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes
+then :
LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
-$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
ac_cv_func_sched_yield=yes
-else
+else $as_nop
ac_cv_func_sched_yield=no
fi
@@ -22427,27 +23177,24 @@ fi
if test $ac_cv_func_sched_yield = no &&
test $ac_cv_func_pthread_yield = no &&
test "$ac_cv_func_thr_yield" = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
-$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
+printf "%s\n" "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
fi
- for ac_func in pthread_kill
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
-if test "x$ac_cv_func_pthread_kill" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
+if test "x$ac_cv_func_pthread_kill" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
fi
-done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
-$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
+printf %s "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
+if test ${ol_cv_func_pthread_rwlock_destroy+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22456,35 +23203,37 @@ else
pthread_rwlock_t rwlock;
int
-main ()
+main (void)
{
pthread_rwlock_destroy(&rwlock);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_func_pthread_rwlock_destroy=yes
-else
+else $as_nop
ol_cv_func_pthread_rwlock_destroy=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
-$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
+printf "%s\n" "$ol_cv_func_pthread_rwlock_destroy" >&6; }
if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
-$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
-$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_detach+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
+printf %s "checking for pthread_detach with <pthread.h>... " >&6; }
+if test ${ol_cv_func_pthread_detach+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22495,81 +23244,88 @@ else
#endif
int
-main ()
+main (void)
{
pthread_detach(NULL);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_func_pthread_detach=yes
-else
+else $as_nop
ol_cv_func_pthread_detach=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
-$as_echo "$ol_cv_func_pthread_detach" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
+printf "%s\n" "$ol_cv_func_pthread_detach" >&6; }
if test $ol_cv_func_pthread_detach = no ; then
as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
fi
-$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
- for ac_func in \
- pthread_setconcurrency \
- pthread_getconcurrency \
- thr_setconcurrency \
- thr_getconcurrency \
+ ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
+if test "x$ac_cv_func_pthread_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_func "$LINENO" "pthread_getconcurrency" "ac_cv_func_pthread_getconcurrency"
+if test "x$ac_cv_func_pthread_getconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_GETCONCURRENCY 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
+if test "x$ac_cv_func_thr_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
+if test "x$ac_cv_func_thr_getconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
+
+fi
- for ac_func in pthread_kill_other_threads_np
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
-if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
-_ACEOF
+
+ ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
+if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1" >>confdefs.h
fi
-done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
-$as_echo_n "checking for LinuxThreads implementation... " >&6; }
-if ${ol_cv_sys_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
+printf %s "checking for LinuxThreads implementation... " >&6; }
+if test ${ol_cv_sys_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
-$as_echo "$ol_cv_sys_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
+printf "%s\n" "$ol_cv_sys_linux_threads" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
-$as_echo_n "checking for LinuxThreads consistency... " >&6; }
-if ${ol_cv_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
+printf %s "checking for LinuxThreads consistency... " >&6; }
+if test ${ol_cv_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test $ol_cv_header_linux_threads = yes &&
test $ol_cv_sys_linux_threads = yes; then
@@ -22582,23 +23338,25 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
-$as_echo "$ol_cv_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
+printf "%s\n" "$ol_cv_linux_threads" >&6; }
if test $ol_cv_linux_threads = error; then
as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
-$as_echo_n "checking if pthread_create() works... " >&6; }
-if ${ol_cv_pthread_create_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
+printf %s "checking if pthread_create() works... " >&6; }
+if test ${ol_cv_pthread_create_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
ol_cv_pthread_create_works=yes
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22673,9 +23431,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_create_works=yes
-else
+else $as_nop
ol_cv_pthread_create_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -22683,8 +23442,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
-$as_echo "$ol_cv_pthread_create_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
+printf "%s\n" "$ol_cv_pthread_create_works" >&6; }
if test $ol_cv_pthread_create_works = no ; then
as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
@@ -22694,20 +23453,22 @@ $as_echo "$ol_cv_pthread_create_works" >&6; }
if test $ol_replace_broken_yield = yes ; then
-$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
+printf "%s\n" "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
fi
if test x$ol_with_yielding_select = xauto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
-$as_echo_n "checking if select yields when using pthreads... " >&6; }
-if ${ol_cv_pthread_select_yields+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
+printf %s "checking if select yields when using pthreads... " >&6; }
+if test ${ol_cv_pthread_select_yields+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ if test "$cross_compiling" = yes
+then :
ol_cv_pthread_select_yields=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22785,9 +23546,10 @@ int main(argc, argv)
exit(2);
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_select_yields=no
-else
+else $as_nop
ol_cv_pthread_select_yields=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -22795,8 +23557,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
-$as_echo "$ol_cv_pthread_select_yields" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
+printf "%s\n" "$ol_cv_pthread_select_yields" >&6; }
if test $ol_cv_pthread_select_yields = cross ; then
as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
@@ -22822,34 +23584,36 @@ esac
case $ol_with_threads in auto | yes | mach)
- for ac_header in mach/cthreads.h cthreads.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_cthreads_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_cthreads_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_CTHREADS_H 1" >>confdefs.h
-done
+fi
if test $ac_cv_header_mach_cthreads_h = yes ; then
ol_with_threads=found
ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
+if test "x$ac_cv_func_cthread_fork" = xyes
+then :
ol_link_threads=yes
fi
if test $ol_link_threads = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
-$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
-if ${ol_cv_cthread_all_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
+printf %s "checking for cthread_fork with -all_load... " >&6; }
+if test ${ol_cv_cthread_all_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
save_LIBS="$LIBS"
LIBS="-all_load $LIBS"
@@ -22857,7 +23621,7 @@ else
/* end confdefs.h. */
#include <mach/cthreads.h>
int
-main ()
+main (void)
{
cthread_fork((void *)0, (void *)0);
@@ -22866,18 +23630,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_cthread_all_load=yes
-else
+else $as_nop
ol_cv_cthread_all_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$save_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
-$as_echo "$ol_cv_cthread_all_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
+printf "%s\n" "$ol_cv_cthread_all_load" >&6; }
if test $ol_cv_cthread_all_load = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
@@ -22893,7 +23658,8 @@ $as_echo "$ol_cv_cthread_all_load" >&6; }
save_LIBS="$LIBS"
LIBS="$LIBS -lthreads"
ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
+if test "x$ac_cv_func_cthread_fork" = xyes
+then :
ol_link_threads=yes
fi
@@ -22913,7 +23679,7 @@ fi
if test $ol_link_threads = mach ; then
-$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
elif test $ol_with_threads = found ; then
as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
@@ -22923,25 +23689,21 @@ esac
case $ol_with_threads in auto | yes | pth)
- for ac_header in pth.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
-if test "x$ac_cv_header_pth_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTH_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTH_H 1" >>confdefs.h
fi
-done
-
if test $ac_cv_header_pth_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
-$as_echo_n "checking for pth_version in -lpth... " >&6; }
-if ${ac_cv_lib_pth_pth_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
+printf %s "checking for pth_version in -lpth... " >&6; }
+if test ${ac_cv_lib_pth_pth_version+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpth $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22950,39 +23712,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char pth_version ();
int
-main ()
+main (void)
{
return pth_version ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_pth_pth_version=yes
-else
+else $as_nop
ac_cv_lib_pth_pth_version=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
-$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
-if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
+printf "%s\n" "$ac_cv_lib_pth_pth_version" >&6; }
+if test "x$ac_cv_lib_pth_pth_version" = xyes
+then :
have_pth=yes
-else
+else $as_nop
have_pth=no
fi
if test $have_pth = yes ; then
-$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GNU_PTH 1" >>confdefs.h
LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
ol_link_threads=pth
@@ -22998,26 +23759,27 @@ esac
case $ol_with_threads in auto | yes | lwp)
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
+if test "x$ac_cv_header_thread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
+if test "x$ac_cv_header_synch_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
-done
+fi
if test $ac_cv_header_thread_h = yes &&
test $ac_cv_header_synch_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
-$as_echo_n "checking for thr_create in -lthread... " >&6; }
-if ${ac_cv_lib_thread_thr_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
+printf %s "checking for thr_create in -lthread... " >&6; }
+if test ${ac_cv_lib_thread_thr_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23026,39 +23788,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char thr_create ();
int
-main ()
+main (void)
{
return thr_create ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_thread_thr_create=yes
-else
+else $as_nop
ac_cv_lib_thread_thr_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
-$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
-if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
+printf "%s\n" "$ac_cv_lib_thread_thr_create" >&6; }
+if test "x$ac_cv_lib_thread_thr_create" = xyes
+then :
have_thr=yes
-else
+else $as_nop
have_thr=no
fi
if test $have_thr = yes ; then
-$as_echo "#define HAVE_THR 1" >>confdefs.h
+printf "%s\n" "#define HAVE_THR 1" >>confdefs.h
LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
ol_link_threads=thr
@@ -23067,42 +23828,36 @@ $as_echo "#define HAVE_THR 1" >>confdefs.h
ol_with_yielding_select=yes
fi
- for ac_func in \
- thr_setconcurrency \
- thr_getconcurrency \
+ ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
+if test "x$ac_cv_func_thr_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
+if test "x$ac_cv_func_thr_getconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
fi
-done
fi
fi
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
fi
-done
-
if test $ac_cv_header_lwp_lwp_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
-$as_echo_n "checking for lwp_create in -llwp... " >&6; }
-if ${ac_cv_lib_lwp_lwp_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
+printf %s "checking for lwp_create in -llwp... " >&6; }
+if test ${ac_cv_lib_lwp_lwp_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-llwp $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23111,39 +23866,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char lwp_create ();
int
-main ()
+main (void)
{
return lwp_create ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_lwp_lwp_create=yes
-else
+else $as_nop
ac_cv_lib_lwp_lwp_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
-$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
-if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
+printf "%s\n" "$ac_cv_lib_lwp_lwp_create" >&6; }
+if test "x$ac_cv_lib_lwp_lwp_create" = xyes
+then :
have_lwp=yes
-else
+else $as_nop
have_lwp=no
fi
if test $have_lwp = yes ; then
-$as_echo "#define HAVE_LWP 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LWP 1" >>confdefs.h
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
ol_link_threads=lwp
@@ -23158,189 +23912,186 @@ esac
if test $ol_with_yielding_select = yes ; then
-$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
fi
if test $ol_with_threads = manual ; then
ol_link_threads=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
-$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
+printf "%s\n" "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
- for ac_header in pthread.h sched.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
-done
+fi
- for ac_func in sched_yield pthread_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
+if test "x$ac_cv_func_sched_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
+if test "x$ac_cv_func_pthread_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+printf %s "checking for LinuxThreads pthread.h... " >&6; }
+if test ${ol_cv_header_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
+then :
ol_cv_header_linux_threads=yes
-else
+else $as_nop
ol_cv_header_linux_threads=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
if test $ol_cv_header_linux_threads = yes; then
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
fi
- for ac_header in mach/cthreads.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
-if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MACH_CTHREADS_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_cthreads_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
fi
-done
-
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
fi
-done
-
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
+if test "x$ac_cv_header_thread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
+if test "x$ac_cv_header_synch_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
-done
+fi
fi
if test $ol_link_threads != no && test $ol_link_threads != nt ; then
-$as_echo "#define REENTRANT 1" >>confdefs.h
+printf "%s\n" "#define REENTRANT 1" >>confdefs.h
-$as_echo "#define _REENTRANT 1" >>confdefs.h
+printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
-$as_echo "#define THREAD_SAFE 1" >>confdefs.h
+printf "%s\n" "#define THREAD_SAFE 1" >>confdefs.h
-$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+printf "%s\n" "#define _THREAD_SAFE 1" >>confdefs.h
-$as_echo "#define THREADSAFE 1" >>confdefs.h
+printf "%s\n" "#define THREADSAFE 1" >>confdefs.h
-$as_echo "#define _THREADSAFE 1" >>confdefs.h
+printf "%s\n" "#define _THREADSAFE 1" >>confdefs.h
-$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define _SGI_MP_SOURCE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
-$as_echo_n "checking for thread specific errno... " >&6; }
-if ${ol_cv_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
+printf %s "checking for thread specific errno... " >&6; }
+if test ${ol_cv_errno_thread_specific+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <errno.h>
int
-main ()
+main (void)
{
errno = 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_errno_thread_specific=yes
-else
+else $as_nop
ol_cv_errno_thread_specific=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
-$as_echo "$ol_cv_errno_thread_specific" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
+printf "%s\n" "$ol_cv_errno_thread_specific" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
-$as_echo_n "checking for thread specific h_errno... " >&6; }
-if ${ol_cv_h_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
+printf %s "checking for thread specific h_errno... " >&6; }
+if test ${ol_cv_h_errno_thread_specific+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
-main ()
+main (void)
{
h_errno = 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_h_errno_thread_specific=yes
-else
+else $as_nop
ol_cv_h_errno_thread_specific=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
-$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
+printf "%s\n" "$ol_cv_h_errno_thread_specific" >&6; }
if test $ol_cv_errno_thread_specific != yes ||
test $ol_cv_h_errno_thread_specific != yes ; then
@@ -23356,13 +24107,13 @@ if test $ol_link_threads = no ; then
fi
if test $ol_with_threads = auto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
-$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
+printf "%s\n" "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
ol_with_threads=no
fi
-$as_echo "#define NO_THREADS 1" >>confdefs.h
+printf "%s\n" "#define NO_THREADS 1" >>confdefs.h
LTHREAD_LIBS=""
BUILD_THREAD=no
@@ -23372,7 +24123,7 @@ fi
if test $ol_link_threads != no ; then
-$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
+printf "%s\n" "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
fi
@@ -23404,16 +24155,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
LIBS="$LTHREAD_LIBS $LIBS"
saved_CFLAGS="$CFLAGS"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
- for ac_func in sem_timedwait
-do :
- ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
-if test "x$ac_cv_func_sem_timedwait" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SEM_TIMEDWAIT 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
+if test "x$ac_cv_func_sem_timedwait" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
fi
-done
LIBS="$saved_LIBS"
{ saved_LIBS=; unset saved_LIBS;}
@@ -23438,22 +24185,24 @@ case "$have_pthreads" in
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
-$as_echo_n "checking size of pthread_t... " >&6; }
-if ${ac_cv_sizeof_pthread_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+printf %s "checking size of pthread_t... " >&6; }
+if test ${ac_cv_sizeof_pthread_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
$ac_includes_default
#include <pthread.h>
-"; then :
+"
+then :
-else
+else $as_nop
if test "$ac_cv_type_pthread_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (pthread_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -23462,32 +24211,32 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
-$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
LIBISC_PTHREADS_NOTHREADS=pthreads
-$as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
#
# We'd like to use sigwait() too
#
ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
-if test "x$ac_cv_func_sigwait" = xyes; then :
+if test "x$ac_cv_func_sigwait" = xyes
+then :
have_sigwait=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
-$as_echo_n "checking for sigwait in -lc... " >&6; }
-if ${ac_cv_lib_c_sigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
+printf %s "checking for sigwait in -lc... " >&6; }
+if test ${ac_cv_lib_c_sigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23496,37 +24245,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sigwait ();
int
-main ()
+main (void)
{
return sigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_c_sigwait=yes
-else
+else $as_nop
ac_cv_lib_c_sigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
-$as_echo "$ac_cv_lib_c_sigwait" >&6; }
-if test "x$ac_cv_lib_c_sigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
+printf "%s\n" "$ac_cv_lib_c_sigwait" >&6; }
+if test "x$ac_cv_lib_c_sigwait" = xyes
+then :
have_sigwait=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
-$as_echo_n "checking for sigwait in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_sigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
+printf %s "checking for sigwait in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_sigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23535,37 +24284,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sigwait ();
int
-main ()
+main (void)
{
return sigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_pthread_sigwait=yes
-else
+else $as_nop
ac_cv_lib_pthread_sigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
-$as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
-if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
+printf "%s\n" "$ac_cv_lib_pthread_sigwait" >&6; }
+if test "x$ac_cv_lib_pthread_sigwait" = xyes
+then :
have_sigwait=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
-$as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread__Psigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
+printf %s "checking for _Psigwait in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread__Psigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23574,32 +24323,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char _Psigwait ();
int
-main ()
+main (void)
{
return _Psigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_pthread__Psigwait=yes
-else
+else $as_nop
ac_cv_lib_pthread__Psigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
-$as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
-if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
+printf "%s\n" "$ac_cv_lib_pthread__Psigwait" >&6; }
+if test "x$ac_cv_lib_pthread__Psigwait" = xyes
+then :
have_sigwait=yes
-else
+else $as_nop
have_sigwait=no
fi
@@ -23615,11 +24363,12 @@ fi
case "$host:$have_sigwait" in
*-freebsd*:no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
-$as_echo_n "checking for sigwait in -lc_r... " >&6; }
-if ${ac_cv_lib_c_r_sigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
+printf %s "checking for sigwait in -lc_r... " >&6; }
+if test ${ac_cv_lib_c_r_sigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23628,30 +24377,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sigwait ();
int
-main ()
+main (void)
{
return sigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_c_r_sigwait=yes
-else
+else $as_nop
ac_cv_lib_c_r_sigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
-$as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
-if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
+printf "%s\n" "$ac_cv_lib_c_r_sigwait" >&6; }
+if test "x$ac_cv_lib_c_r_sigwait" = xyes
+then :
have_sigwait=yes
fi
@@ -23661,32 +24409,29 @@ fi
yes)
ac_cv_func_sigwait=yes
-$as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
esac
- for ac_func in pthread_attr_getstacksize
-do :
- ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
-if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
+if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1" >>confdefs.h
fi
-done
- for ac_func in pthread_attr_setstacksize sysconf
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize"
+if test "x$ac_cv_func_pthread_attr_setstacksize" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
+if test "x$ac_cv_func_sysconf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
fi
-done
case "$host" in
@@ -23694,43 +24439,39 @@ done
;;
*-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
-$as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
+printf "%s\n" "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
;;
*-bsdi3.*|*-bsdi4.0*)
-$as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
+printf "%s\n" "#define NEED_PTHREAD_INIT 1" >>confdefs.h
;;
*-linux*)
-$as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUXTHREADS 1" >>confdefs.h
;;
*-solaris*)
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
- for ac_func in pthread_setconcurrency
-do :
- ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
-if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_SETCONCURRENCY 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
+if test "x$ac_cv_func_pthread_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
fi
-done
case "$ac_cv_func_pthread_setconcurrency" in
yes)
-$as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
+printf "%s\n" "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
esac
;;
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
-$as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
;;
esac
@@ -23743,18 +24484,19 @@ $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
hack_shutup_pthreadonceinit=yes
;;
*-solaris2.1[0-9])
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
-$as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
-if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
+printf %s "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
+if test ${ntp_cv_braces_around_pthread_once_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
-main ()
+main (void)
{
static pthread_once_t once_test =
@@ -23765,17 +24507,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_braces_around_pthread_once_init=no
-else
+else $as_nop
ntp_cv_braces_around_pthread_once_init=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
-$as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
+printf "%s\n" "$ntp_cv_braces_around_pthread_once_init" >&6; }
case "$ntp_cv_braces_around_pthread_once_init" in
yes)
hack_shutup_pthreadonceinit=yes
@@ -23785,7 +24528,7 @@ $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
case "$hack_shutup_pthreadonceinit" in
yes)
-$as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
esac
LIBS="$saved_LIBS"
@@ -23814,15 +24557,17 @@ fi
case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
no:yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
-$as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
-if ${ntp_cv_vsnprintf_percent_m+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
+printf %s "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
+if test ${ntp_cv_vsnprintf_percent_m+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ntp_cv_vsnprintf_percent_m=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23856,7 +24601,7 @@ else
}
int
-main ()
+main (void)
{
char sbuf[512];
@@ -23874,9 +24619,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ntp_cv_vsnprintf_percent_m=yes
-else
+else $as_nop
ntp_cv_vsnprintf_percent_m=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -23885,60 +24631,56 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
-$as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
+printf "%s\n" "$ntp_cv_vsnprintf_percent_m" >&6; }
case "$ntp_cv_vsnprintf_percent_m" in
yes)
-$as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
+printf "%s\n" "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
esac
esac
-for ac_header in sys/clockctl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_CLOCKCTL_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_clockctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_CLOCKCTL_H 1" >>confdefs.h
fi
-done
-
# Check whether --enable-clockctl was given.
-if test "${enable_clockctl+set}" = set; then :
+if test ${enable_clockctl+y}
+then :
enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
-else
+else $as_nop
ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
-$as_echo_n "checking if we should use /dev/clockctl... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
-$as_echo "$ntp_use_dev_clockctl" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
+printf %s "checking if we should use /dev/clockctl... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
+printf "%s\n" "$ntp_use_dev_clockctl" >&6; }
-for ac_header in sys/capability.h sys/prctl.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_capability_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_CAPABILITY_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_prctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h
-done
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
-$as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
+printf %s "checking if we have linux capabilities (libcap)... " >&6; }
case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
yesyes)
@@ -23956,45 +24698,42 @@ case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
esac
# Check whether --enable-linuxcaps was given.
-if test "${enable_linuxcaps+set}" = set; then :
+if test ${enable_linuxcaps+y}
+then :
enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
-$as_echo "$ntp_have_linuxcaps" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
+printf "%s\n" "$ntp_have_linuxcaps" >&6; }
case "$ntp_have_linuxcaps" in
yes)
-$as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
LIBS="$LIBS -lcap"
;;
esac
-for ac_header in priv.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
-if test "x$ac_cv_header_priv_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PRIV_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
+if test "x$ac_cv_header_priv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PRIV_H 1" >>confdefs.h
fi
-done
-
case "$ac_cv_header_priv_h" in
yes)
case "$host" in
*-solaris*)
ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
-if test "x$ac_cv_func_setppriv" = xyes; then :
+if test "x$ac_cv_func_setppriv" = xyes
+then :
ntp_have_solarisprivs=yes
-else
+else $as_nop
ntp_have_solarisprivs=no
fi
@@ -24004,78 +24743,76 @@ fi
esac
# Check whether --enable-solarisprivs was given.
-if test "${enable_solarisprivs+set}" = set; then :
+if test ${enable_solarisprivs+y}
+then :
enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
-$as_echo_n "checking if we have solaris privileges... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
+printf %s "checking if we have solaris privileges... " >&6; }
case "$ntp_have_solarisprivs" in
yes)
-$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
;;
'') ntp_have_solarisprivs="no"
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
-$as_echo "$ntp_have_solarisprivs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
+printf "%s\n" "$ntp_have_solarisprivs" >&6; }
-for ac_header in sys/mac.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_mac_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_MAC_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MAC_H 1" >>confdefs.h
fi
-done
-
# Check whether --enable-trustedbsd_mac was given.
-if test "${enable_trustedbsd_mac+set}" = set; then :
+if test ${enable_trustedbsd_mac+y}
+then :
enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
-$as_echo_n "checking if we should use TrustedBSD MAC privileges... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
+printf %s "checking if we should use TrustedBSD MAC privileges... " >&6; }
case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
yesyes)
-$as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
;;
*) ntp_use_trustedbsd_mac="no";
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
-$as_echo "$ntp_use_trustedbsd_mac" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
+printf "%s\n" "$ntp_use_trustedbsd_mac" >&6; }
case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
*yes*)
-$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DROPROOT 1" >>confdefs.h
esac
case "$host" in
*-*-darwin*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
-$as_echo_n "checking for library containing res_9_init... " >&6; }
-if ${ac_cv_search_res_9_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
+printf %s "checking for library containing res_9_init... " >&6; }
+if test ${ac_cv_search_res_9_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24083,56 +24820,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char res_9_init ();
int
-main ()
+main (void)
{
return res_9_init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' resolv
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_res_9_init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_res_9_init+:} false; then :
+ if test ${ac_cv_search_res_9_init+y}
+then :
break
fi
done
-if ${ac_cv_search_res_9_init+:} false; then :
+if test ${ac_cv_search_res_9_init+y}
+then :
-else
+else $as_nop
ac_cv_search_res_9_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
-$as_echo "$ac_cv_search_res_9_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
+printf "%s\n" "$ac_cv_search_res_9_init" >&6; }
ac_res=$ac_cv_search_res_9_init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
-$as_echo_n "checking for library containing res_init... " >&6; }
-if ${ac_cv_search_res_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
+printf %s "checking for library containing res_init... " >&6; }
+if test ${ac_cv_search_res_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24140,56 +24880,55 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char res_init ();
int
-main ()
+main (void)
{
return res_init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' resolv
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_res_init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_res_init+:} false; then :
+ if test ${ac_cv_search_res_init+y}
+then :
break
fi
done
-if ${ac_cv_search_res_init+:} false; then :
+if test ${ac_cv_search_res_init+y}
+then :
-else
+else $as_nop
ac_cv_search_res_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
-$as_echo "$ac_cv_search_res_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
+printf "%s\n" "$ac_cv_search_res_init" >&6; }
ac_res=$ac_cv_search_res_init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
;;
esac
-for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
+ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
@@ -24202,85 +24941,149 @@ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE
# include <netdb.h>
#endif
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_sys_types_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_arpa_nameser_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_resolv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
+
+fi
#HMS: Why do we do this check so "early"?
-for ac_func in res_init
+
+ for ac_func in res_init
do :
ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
-if test "x$ac_cv_func_res_init" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_RES_INIT 1
-_ACEOF
+if test "x$ac_cv_func_res_init" = xyes
+then :
+ printf "%s\n" "#define HAVE_RES_INIT 1" >>confdefs.h
-else
- for ac_func in __res_init
-do :
+else $as_nop
ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
-if test "x$ac_cv_func___res_init" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE___RES_INIT 1
-_ACEOF
+if test "x$ac_cv_func___res_init" = xyes
+then :
+ printf "%s\n" "#define HAVE___RES_INIT 1" >>confdefs.h
fi
-done
fi
-done
+done
# We also need -lsocket, but we have tested for that already.
ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
-if test "x$ac_cv_func_inet_ntop" = xyes; then :
+if test "x$ac_cv_func_inet_ntop" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-if test "x$ac_cv_func_inet_pton" = xyes; then :
+if test "x$ac_cv_func_inet_pton" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
-if test "x$ac_cv_type_int32" = xyes; then :
+if test "x$ac_cv_type_int32" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT32 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
-if test "x$ac_cv_type_u_int32" = xyes; then :
+if test "x$ac_cv_type_u_int32" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT32 1
-_ACEOF
+printf "%s\n" "#define HAVE_U_INT32 1" >>confdefs.h
fi
@@ -24290,11 +25093,12 @@ fi
case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
no::yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
-$as_echo_n "checking for int32 with DNS headers included... " >&6; }
-if ${ntp_cv_type_int32_with_dns+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
+printf %s "checking for int32 with DNS headers included... " >&6; }
+if test ${ntp_cv_type_int32_with_dns+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24304,7 +25108,7 @@ else
#include <resolv.h>
int
-main ()
+main (void)
{
size_t cb = sizeof(int32);
@@ -24314,32 +25118,34 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_type_int32_with_dns=yes
-else
+else $as_nop
ntp_cv_type_int32_with_dns=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
-$as_echo "$ntp_cv_type_int32_with_dns" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
+printf "%s\n" "$ntp_cv_type_int32_with_dns" >&6; }
case "$ntp_cv_type_int32_with_dns" in
yes)
-$as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
esac
esac
case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
no::yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
-$as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
-if ${ntp_cv_type_u_int32_with_dns+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
+printf %s "checking for u_int32 with DNS headers included... " >&6; }
+if test ${ntp_cv_type_u_int32_with_dns+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24349,7 +25155,7 @@ else
#include <resolv.h>
int
-main ()
+main (void)
{
size_t cb = sizeof(u_int32);
@@ -24359,28 +25165,27 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_type_u_int32_with_dns=yes
-else
+else $as_nop
ntp_cv_type_u_int32_with_dns=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
-$as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
+printf "%s\n" "$ntp_cv_type_u_int32_with_dns" >&6; }
case "$ntp_cv_type_u_int32_with_dns" in
yes)
-$as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
esac
esac
-for ac_header in sys/timepps.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -24390,21 +25195,19 @@ do :
"
-if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEPPS_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_timepps_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIMEPPS_H 1" >>confdefs.h
fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
-$as_echo_n "checking for struct timespec... " >&6; }
-if ${ntp_cv_struct_timespec+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
+printf %s "checking for struct timespec... " >&6; }
+if test ${ntp_cv_struct_timespec+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24420,7 +25223,7 @@ else
#endif
int
-main ()
+main (void)
{
struct timespec n;
@@ -24430,29 +25233,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_timespec=yes
-else
+else $as_nop
ntp_cv_struct_timespec=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
-$as_echo "$ntp_cv_struct_timespec" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
+printf "%s\n" "$ntp_cv_struct_timespec" >&6; }
case "$ntp_cv_struct_timespec" in
yes)
-$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
-$as_echo_n "checking for struct ntptimeval... " >&6; }
-if ${ntp_cv_struct_ntptimeval+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
+printf %s "checking for struct ntptimeval... " >&6; }
+if test ${ntp_cv_struct_ntptimeval+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24460,7 +25265,7 @@ else
#include <sys/timex.h>
int
-main ()
+main (void)
{
struct ntptimeval n;
@@ -24470,48 +25275,45 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_ntptimeval=yes
-else
+else $as_nop
ntp_cv_struct_ntptimeval=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
-$as_echo "$ntp_cv_struct_ntptimeval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
+printf "%s\n" "$ntp_cv_struct_ntptimeval" >&6; }
case "$ntp_cv_struct_ntptimeval" in
yes)
-$as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
esac
-for ac_header in md5.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
+ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
"
-if test "x$ac_cv_header_md5_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MD5_H 1
-_ACEOF
+if test "x$ac_cv_header_md5_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MD5_H 1" >>confdefs.h
fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
-$as_echo_n "checking for library containing MD5Init... " >&6; }
-if ${ac_cv_search_MD5Init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
+printf %s "checking for library containing MD5Init... " >&6; }
+if test ${ac_cv_search_MD5Init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24519,78 +25321,107 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char MD5Init ();
int
-main ()
+main (void)
{
return MD5Init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' md5 md; do
+for ac_lib in '' md5 md
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_MD5Init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_MD5Init+:} false; then :
+ if test ${ac_cv_search_MD5Init+y}
+then :
break
fi
done
-if ${ac_cv_search_MD5Init+:} false; then :
+if test ${ac_cv_search_MD5Init+y}
+then :
-else
+else $as_nop
ac_cv_search_MD5Init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
-$as_echo "$ac_cv_search_MD5Init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
+printf "%s\n" "$ac_cv_search_MD5Init" >&6; }
ac_res=$ac_cv_search_MD5Init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "MD5Init" "ac_cv_func_MD5Init"
+if test "x$ac_cv_func_MD5Init" = xyes
+then :
+ printf "%s\n" "#define HAVE_MD5INIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
+if test "x$ac_cv_func_sysconf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
+if test "x$ac_cv_func_getdtablesize" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
+if test "x$ac_cv_func_sigaction" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
+if test "x$ac_cv_func_sigset" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
+if test "x$ac_cv_func_sigvec" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
fi
-done
# HMS: does this need to be a cached variable?
# Check whether --enable-signalled-io was given.
-if test "${enable_signalled_io+set}" = set; then :
+if test ${enable_signalled_io+y}
+then :
enableval=$enable_signalled_io; use_signalled_io=$enableval
-else
+else $as_nop
use_signalled_io=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
-$as_echo_n "checking for SIGIO... " >&6; }
-if ${ntp_cv_hdr_def_sigio+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
+printf %s "checking for SIGIO... " >&6; }
+if test ${ntp_cv_hdr_def_sigio+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24601,20 +25432,21 @@ else
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_cv_hdr_def_sigio=yes
-else
+else $as_nop
ntp_cv_hdr_def_sigio=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
-$as_echo "$ntp_cv_hdr_def_sigio" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
+printf "%s\n" "$ntp_cv_hdr_def_sigio" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
-$as_echo_n "checking if we want to use SIGIO... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
+printf %s "checking if we want to use SIGIO... " >&6; }
ans=no
case "$ntp_cv_hdr_def_sigio" in
yes)
@@ -24672,21 +25504,22 @@ case "$ans" in
case "$use_signalled_io" in
yes)
-$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SIGNALED_IO 1" >>confdefs.h
;;
*) ans="Allowed for $host but --disable-signalled-io was given"
;;
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
-$as_echo_n "checking for SIGPOLL... " >&6; }
-if ${ntp_cv_hdr_def_sigpoll+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
+printf %s "checking for SIGPOLL... " >&6; }
+if test ${ntp_cv_hdr_def_sigpoll+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24697,20 +25530,21 @@ else
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_cv_hdr_def_sigpoll=yes
-else
+else $as_nop
ntp_cv_hdr_def_sigpoll=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
-$as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
+printf "%s\n" "$ntp_cv_hdr_def_sigpoll" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
-$as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
+printf %s "checking if we can use SIGPOLL for UDP I/O... " >&6; }
ans=no
case "$ntp_cv_hdr_def_sigpoll" in
yes)
@@ -24769,14 +25603,14 @@ esac
case "$ans" in
yes)
-$as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
+printf "%s\n" "#define USE_UDP_SIGPOLL 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
-$as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
+printf %s "checking if we can use SIGPOLL for TTY I/O... " >&6; }
ans=no
case "$ntp_cv_hdr_def_sigpoll" in
yes)
@@ -24832,24 +25666,25 @@ esac
case "$ans" in
yes)
-$as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
+printf "%s\n" "#define USE_TTY_SIGPOLL 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
-$as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
-if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
+printf %s "checking number of arguments to gettimeofday()... " >&6; }
+if test ${ntp_cv_func_Xettimeofday_nargs+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
int
-main ()
+main (void)
{
gettimeofday(0, 0);
@@ -24860,44 +25695,45 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_func_Xettimeofday_nargs=2
-else
+else $as_nop
ntp_cv_func_Xettimeofday_nargs=1
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
-$as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
+printf "%s\n" "$ntp_cv_func_Xettimeofday_nargs" >&6; }
case "$ntp_cv_func_Xettimeofday_nargs" in
1)
-$as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
+printf "%s\n" "#define SYSV_TIMEOFDAY 1" >>confdefs.h
esac
-for ac_func in settimeofday
+
+ for ac_func in settimeofday
do :
ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
-if test "x$ac_cv_func_settimeofday" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETTIMEOFDAY 1
-_ACEOF
+if test "x$ac_cv_func_settimeofday" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETTIMEOFDAY 1" >>confdefs.h
-else
+else $as_nop
case "$host" in
*-*-mpeix*) ac_cv_func_settimeofday=yes
esac
fi
-done
+done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
-$as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
+printf %s "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
ntp_warning='GRONK'
ans=none
case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
@@ -24919,14 +25755,14 @@ case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
ntp_warning='Which leaves us with nothing to use!'
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ntp_warning" in
'')
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
-$as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
+printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
;;
esac
@@ -24937,23 +25773,24 @@ LIBS=$__LIBS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
-$as_echo_n "checking for deprecated --with-arlib... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
+printf %s "checking for deprecated --with-arlib... " >&6; }
# Check whether --with-arlib was given.
-if test "${with_arlib+set}" = set; then :
+if test ${with_arlib+y}
+then :
withval=$with_arlib; ans=$withval
-else
+else $as_nop
ans=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&5
-$as_echo "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&5
+printf "%s\n" "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&2;}
;;
esac
@@ -24961,11 +25798,12 @@ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
@@ -24973,11 +25811,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -24988,11 +25830,11 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -25000,13 +25842,14 @@ fi
done
{ ac_cv_prog_AWK=; unset ac_cv_prog_AWK;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@@ -25022,12 +25865,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -25035,22 +25878,23 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
-$as_echo_n "checking for library containing strerror... " >&6; }
-if ${ac_cv_search_strerror+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+printf %s "checking for library containing strerror... " >&6; }
+if test ${ac_cv_search_strerror+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25058,46 +25902,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char strerror ();
int
-main ()
+main (void)
{
return strerror ();
;
return 0;
}
_ACEOF
-for ac_lib in '' cposix; do
+for ac_lib in '' cposix
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_strerror=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_strerror+:} false; then :
+ if test ${ac_cv_search_strerror+y}
+then :
break
fi
done
-if ${ac_cv_search_strerror+:} false; then :
+if test ${ac_cv_search_strerror+y}
+then :
-else
+else $as_nop
ac_cv_search_strerror=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
-$as_echo "$ac_cv_search_strerror" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
+printf "%s\n" "$ac_cv_search_strerror" >&6; }
ac_res=$ac_cv_search_strerror
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -25106,11 +25952,12 @@ fi
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_PERL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_PERL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PATH_PERL in
[\\/]* | ?:[\\/]*)
ac_cv_path_PATH_PERL="$PATH_PERL" # Let the user override the test with a path.
@@ -25120,11 +25967,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PATH_PERL="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_PERL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -25136,22 +25987,23 @@ esac
fi
PATH_PERL=$ac_cv_path_PATH_PERL
if test -n "$PATH_PERL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PERL" >&5
-$as_echo "$PATH_PERL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_PERL" >&5
+printf "%s\n" "$PATH_PERL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
{ ac_cv_path_PATH_PERL=; unset ac_cv_path_PATH_PERL;}
# Extract the first word of "test", so it can be a program name with args.
set dummy test; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_TEST+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_TEST+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PATH_TEST in
[\\/]* | ?:[\\/]*)
ac_cv_path_PATH_TEST="$PATH_TEST" # Let the user override the test with a path.
@@ -25161,11 +26013,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PATH_TEST="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_TEST="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -25177,11 +26033,11 @@ esac
fi
PATH_TEST=$ac_cv_path_PATH_TEST
if test -n "$PATH_TEST"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_TEST" >&5
-$as_echo "$PATH_TEST" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_TEST" >&5
+printf "%s\n" "$PATH_TEST" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -25190,9 +26046,10 @@ test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
# Check whether --with-net-snmp-config was given.
-if test "${with_net_snmp_config+set}" = set; then :
+if test ${with_net_snmp_config+y}
+then :
withval=$with_net_snmp_config; ans=$withval
-else
+else $as_nop
ans=yes
fi
@@ -25220,11 +26077,12 @@ case "$PROG_NET_SNMP_CONFIG" in
*)
# Extract the first word of "$PROG_NET_SNMP_CONFIG", so it can be a program name with args.
set dummy $PROG_NET_SNMP_CONFIG; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_NET_SNMP_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_NET_SNMP_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PATH_NET_SNMP_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PATH_NET_SNMP_CONFIG="$PATH_NET_SNMP_CONFIG" # Let the user override the test with a path.
@@ -25234,11 +26092,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PATH_NET_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_NET_SNMP_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -25250,33 +26112,34 @@ esac
fi
PATH_NET_SNMP_CONFIG=$ac_cv_path_PATH_NET_SNMP_CONFIG
if test -n "$PATH_NET_SNMP_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
-$as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
+printf "%s\n" "$PATH_NET_SNMP_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
{ ac_cv_path_PATH_NET_SNMP_CONFIG=; unset ac_cv_path_PATH_NET_SNMP_CONFIG;}
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for net-snmp-config path" >&5
-$as_echo_n "checking for net-snmp-config path... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
-$as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for net-snmp-config path" >&5
+printf %s "checking for net-snmp-config path... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
+printf "%s\n" "$PATH_NET_SNMP_CONFIG" >&6; }
case "$PATH_NET_SNMP_CONFIG" in
- /*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net-snmp version" >&5
-$as_echo_n "checking for net-snmp version... " >&6; }
-if ${ntp_cv_net_snmp_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ /*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for net-snmp version" >&5
+printf %s "checking for net-snmp version... " >&6; }
+if test ${ntp_cv_net_snmp_version+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ntp_cv_net_snmp_version=`$PATH_NET_SNMP_CONFIG --version`
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_net_snmp_version" >&5
-$as_echo "$ntp_cv_net_snmp_version" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_net_snmp_version" >&5
+printf "%s\n" "$ntp_cv_net_snmp_version" >&6; }
;;
esac
@@ -25287,11 +26150,12 @@ case "$host" in
esac
# HMS: a check for -lnsl used to be here - now being done in NTP_LIBNTP
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
-$as_echo_n "checking for library containing openlog... " >&6; }
-if ${ac_cv_search_openlog+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
+printf %s "checking for library containing openlog... " >&6; }
+if test ${ac_cv_search_openlog+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25299,46 +26163,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char openlog ();
int
-main ()
+main (void)
{
return openlog ();
;
return 0;
}
_ACEOF
-for ac_lib in '' gen syslog; do
+for ac_lib in '' gen syslog
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_openlog=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_openlog+:} false; then :
+ if test ${ac_cv_search_openlog+y}
+then :
break
fi
done
-if ${ac_cv_search_openlog+:} false; then :
+if test ${ac_cv_search_openlog+y}
+then :
-else
+else $as_nop
ac_cv_search_openlog=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
-$as_echo "$ac_cv_search_openlog" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
+printf "%s\n" "$ac_cv_search_openlog" >&6; }
ac_res=$ac_cv_search_openlog
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -25347,25 +26213,27 @@ fi
# LIBSECCOMP is off by default -- needs testing with all the features
# Please send bug reports to loganaden@gmail.com
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use libseccomp sandboxing (EXPERIMENTAL)" >&5
-$as_echo_n "checking if we want to use libseccomp sandboxing (EXPERIMENTAL)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use libseccomp sandboxing (EXPERIMENTAL)" >&5
+printf %s "checking if we want to use libseccomp sandboxing (EXPERIMENTAL)... " >&6; }
# Check whether --enable-libseccomp was given.
-if test "${enable_libseccomp+set}" = set; then :
+if test ${enable_libseccomp+y}
+then :
enableval=$enable_libseccomp; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing seccomp_init" >&5
-$as_echo_n "checking for library containing seccomp_init... " >&6; }
-if ${ac_cv_search_seccomp_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing seccomp_init" >&5
+printf %s "checking for library containing seccomp_init... " >&6; }
+if test ${ac_cv_search_seccomp_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25373,59 +26241,62 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char seccomp_init ();
int
-main ()
+main (void)
{
return seccomp_init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' seccomp; do
+for ac_lib in '' seccomp
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_seccomp_init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_seccomp_init+:} false; then :
+ if test ${ac_cv_search_seccomp_init+y}
+then :
break
fi
done
-if ${ac_cv_search_seccomp_init+:} false; then :
+if test ${ac_cv_search_seccomp_init+y}
+then :
-else
+else $as_nop
ac_cv_search_seccomp_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_seccomp_init" >&5
-$as_echo "$ac_cv_search_seccomp_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_seccomp_init" >&5
+printf "%s\n" "$ac_cv_search_seccomp_init" >&6; }
ac_res=$ac_cv_search_seccomp_init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-$as_echo "#define LIBSECCOMP 1" >>confdefs.h
+printf "%s\n" "#define LIBSECCOMP 1" >>confdefs.h
fi
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25466,9 +26337,10 @@ return 1;
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
-$as_echo "#define KERN_SECCOMP 1" >>confdefs.h
+printf "%s\n" "#define KERN_SECCOMP 1" >>confdefs.h
fi
@@ -25480,11 +26352,12 @@ fi
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
-$as_echo_n "checking for facilitynames in syslog.h... " >&6; }
-if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
+printf %s "checking for facilitynames in syslog.h... " >&6; }
+if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25494,35 +26367,36 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <syslog.h>
int
-main ()
+main (void)
{
void *fnames; fnames = facilitynames;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
-else
+else $as_nop
ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
-$as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
+printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
yes)
-$as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
;;
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
-$as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
+printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
;;
cross)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
-$as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
+printf "%s\n" "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
;;
esac
@@ -25537,11 +26411,12 @@ case "$host" in
case "$ac_cv_search_clock_gettime" in
'') as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!" "$LINENO" 5 ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
-$as_echo_n "checking for library containing sched_setscheduler... " >&6; }
-if ${ac_cv_search_sched_setscheduler+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
+printf %s "checking for library containing sched_setscheduler... " >&6; }
+if test ${ac_cv_search_sched_setscheduler+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25549,46 +26424,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sched_setscheduler ();
int
-main ()
+main (void)
{
return sched_setscheduler ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt posix4; do
+for ac_lib in '' rt posix4
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_sched_setscheduler=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_sched_setscheduler+:} false; then :
+ if test ${ac_cv_search_sched_setscheduler+y}
+then :
break
fi
done
-if ${ac_cv_search_sched_setscheduler+:} false; then :
+if test ${ac_cv_search_sched_setscheduler+y}
+then :
-else
+else $as_nop
ac_cv_search_sched_setscheduler=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_setscheduler" >&5
-$as_echo "$ac_cv_search_sched_setscheduler" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_setscheduler" >&5
+printf "%s\n" "$ac_cv_search_sched_setscheduler" >&6; }
ac_res=$ac_cv_search_sched_setscheduler
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -25596,25 +26473,22 @@ fi
;;
esac
-for ac_header in bstring.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
-if test "x$ac_cv_header_bstring_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_BSTRING_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
+if test "x$ac_cv_header_bstring_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_BSTRING_H 1" >>confdefs.h
fi
-done
-
-ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
-if test "x$ac_cv_header_dns_sd_h" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRegister" >&5
-$as_echo_n "checking for library containing DNSServiceRegister... " >&6; }
-if ${ac_cv_search_DNSServiceRegister+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_fn_c_check_header_compile "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
+if test "x$ac_cv_header_dns_sd_h" = xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRegister" >&5
+printf %s "checking for library containing DNSServiceRegister... " >&6; }
+if test ${ac_cv_search_DNSServiceRegister+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25622,49 +26496,51 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char DNSServiceRegister ();
int
-main ()
+main (void)
{
return DNSServiceRegister ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dns_sd; do
+for ac_lib in '' dns_sd
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_DNSServiceRegister=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_DNSServiceRegister+:} false; then :
+ if test ${ac_cv_search_DNSServiceRegister+y}
+then :
break
fi
done
-if ${ac_cv_search_DNSServiceRegister+:} false; then :
+if test ${ac_cv_search_DNSServiceRegister+y}
+then :
-else
+else $as_nop
ac_cv_search_DNSServiceRegister=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRegister" >&5
-$as_echo "$ac_cv_search_DNSServiceRegister" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRegister" >&5
+printf "%s\n" "$ac_cv_search_DNSServiceRegister" >&6; }
ac_res=$ac_cv_search_DNSServiceRegister
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-$as_echo "#define HAVE_DNSREGISTRATION 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DNSREGISTRATION 1" >>confdefs.h
fi
@@ -25672,213 +26548,299 @@ fi
fi
+ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcntl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
-for ac_header in fcntl.h fnmatch.h ieeefp.h inttypes.h kvm.h math.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
+if test "x$ac_cv_header_fnmatch_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_FNMATCH_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
+if test "x$ac_cv_header_ieeefp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "kvm.h" "ac_cv_header_kvm_h" "$ac_includes_default"
+if test "x$ac_cv_header_kvm_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_KVM_H 1" >>confdefs.h
-for ac_header in memory.h netdb.h poll.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
+if test "x$ac_cv_header_math_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
fi
-done
-for ac_header in sgtty.h stdatomic.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
+if test "x$ac_cv_header_memory_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
+if test "x$ac_cv_header_poll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
-$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if ${ac_cv_header_stdbool_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+fi
+
+ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
+if test "x$ac_cv_header_sgtty_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdatomic_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes
+then :
+
+printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+printf %s "checking for stdbool.h that conforms to C99... " >&6; }
+if test ${ac_cv_header_stdbool_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdbool.h>
- #include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
+ #ifndef __bool_true_false_are_defined
+ #error "__bool_true_false_are_defined is not defined"
#endif
- #ifndef true
- "error: true is not defined"
+ char a[__bool_true_false_are_defined == 1 ? 1 : -1];
+
+ /* Regardless of whether this is C++ or "_Bool" is a
+ valid type name, "true" and "false" should be usable
+ in #if expressions and integer constant expressions,
+ and "bool" should be a valid type name. */
+
+ #if !true
+ #error "'true' is not true"
#endif
#if true != 1
- "error: true is not 1"
+ #error "'true' is not equal to 1"
#endif
- #ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
+ char b[true == 1 ? 1 : -1];
+ char c[true];
+
+ #if false
+ #error "'false' is not false"
+ #endif
+ #if false != 0
+ #error "'false' is not equal to 0"
#endif
+ char d[false == 0 ? 1 : -1];
+
+ enum { e = false, f = true, g = false * true, h = true * 256 };
+
+ char i[(bool) 0.5 == true ? 1 : -1];
+ char j[(bool) 0.0 == false ? 1 : -1];
+ char k[sizeof (bool) > 0 ? 1 : -1];
+
+ struct sb { bool s: 1; bool t; } s;
+ char l[sizeof s.t > 0 ? 1 : -1];
- struct s { _Bool s: 1; _Bool t; } s;
-
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- /* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ bool m[h];
+ char n[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char o[-1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
*/
- _Bool q = true;
- _Bool *pq = &q;
+ bool p = true;
+ bool *pp = &p;
+
+ /* C 1999 specifies that bool, true, and false are to be
+ macros, but C++ 2011 and later overrule this. */
+ #if __cplusplus < 201103
+ #ifndef bool
+ #error "bool is not defined"
+ #endif
+ #ifndef false
+ #error "false is not defined"
+ #endif
+ #ifndef true
+ #error "true is not defined"
+ #endif
+ #endif
+
+ /* If _Bool is available, repeat with it all the tests
+ above that used bool. */
+ #ifdef HAVE__BOOL
+ struct sB { _Bool s: 1; _Bool t; } t;
+
+ char q[(_Bool) 0.5 == true ? 1 : -1];
+ char r[(_Bool) 0.0 == false ? 1 : -1];
+ char u[sizeof (_Bool) > 0 ? 1 : -1];
+ char v[sizeof t.t > 0 ? 1 : -1];
+
+ _Bool w[h];
+ char x[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
+ _Bool z = true;
+ _Bool *pz = &p;
+ #endif
int
-main ()
+main (void)
{
- bool e = &s;
- *pq |= q;
- *pq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ bool ps = &s;
+ *pp |= p;
+ *pp |= ! p;
+
+ #ifdef HAVE__BOOL
+ _Bool pt = &t;
+ *pz |= z;
+ *pz |= ! z;
+ #endif
+
+ /* Refer to every declared value, so they cannot be
+ discarded as unused. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
+ + !l + !m + !n + !o + !p + !pp + !ps
+ #ifdef HAVE__BOOL
+ + !q + !r + !u + !v + !w + !x + !y + !z + !pt
+ #endif
+ );
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_header_stdbool_h=yes
-else
+else $as_nop
ac_cv_header_stdbool_h=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
-$as_echo "$ac_cv_header_stdbool_h" >&6; }
- ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define HAVE__BOOL 1
-_ACEOF
+if test $ac_cv_header_stdbool_h = yes; then
+printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
-if test $ac_cv_header_stdbool_h = yes; then
+fi
+ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
-$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
+if test "x$ac_cv_header_termio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
fi
-for ac_header in stdlib.h string.h termio.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
+if test "x$ac_cv_header_termios_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "timepps.h" "ac_cv_header_timepps_h" "$ac_includes_default"
+if test "x$ac_cv_header_timepps_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIMEPPS_H 1" >>confdefs.h
-done
-
-for ac_header in termios.h timepps.h timex.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "timex.h" "ac_cv_header_timex_h" "$ac_includes_default"
+if test "x$ac_cv_header_timex_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIMEX_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
-done
+fi
case "$host" in
*-*-aix*)
- for ac_header in utmpx.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
-if test "x$ac_cv_header_utmpx_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_UTMPX_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmpx_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h
fi
-done
-
case "$ac_cv_header_utmpx_h" in
yes)
;;
*)
- for ac_header in utmp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
-if test "x$ac_cv_header_utmp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_UTMP_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h
fi
-done
-
;;
esac
;;
*)
- for ac_header in utmp.h utmpx.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmpx_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h
-done
+fi
;;
esac
@@ -25893,273 +26855,303 @@ esac
#
case "$host" in
*-*-sunos*|*-*-solaris*)
- for ac_func in getpassphrase
-do :
- ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
-if test "x$ac_cv_func_getpassphrase" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETPASSPHRASE 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
+if test "x$ac_cv_func_getpassphrase" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPASSPHRASE 1" >>confdefs.h
fi
-done
esac
-for ac_header in net/if6.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "net/if6.h" "ac_cv_header_net_if6_h" "$ac_includes_default"
-if test "x$ac_cv_header_net_if6_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF6_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "net/if6.h" "ac_cv_header_net_if6_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_if6_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF6_H 1" >>confdefs.h
fi
-done
-
-for ac_header in net/route.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "
+ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
"
-if test "x$ac_cv_header_net_route_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_ROUTE_H 1
-_ACEOF
+if test "x$ac_cv_header_net_route_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_ROUTE_H 1" >>confdefs.h
fi
-done
-
-for ac_header in netinfo/ni.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "netinfo/ni.h" "ac_cv_header_netinfo_ni_h" "$ac_includes_default"
-if test "x$ac_cv_header_netinfo_ni_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINFO_NI_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "netinfo/ni.h" "ac_cv_header_netinfo_ni_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinfo_ni_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINFO_NI_H 1" >>confdefs.h
fi
-done
-
case "$ac_cv_header_netinfo_ni_h" in
yes)
-$as_echo "#define HAVE_NETINFO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NETINFO 1" >>confdefs.h
esac
-for ac_header in sun/audioio.h sys/audioio.h sys/file.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sun/audioio.h" "ac_cv_header_sun_audioio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sun_audioio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SUN_AUDIOIO_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_audioio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_file_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
+
+fi
case "$host" in
*-*-sunos4*)
;;
*)
- for ac_header in sys/ioctl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_IOCTL_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ioctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
fi
-done
-
;;
esac
-for ac_header in sys/ipc.h sys/lock.h sys/mman.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ipc_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_lock_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mman_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
+
+fi
# HMS: Check sys/proc.h and sys/resource.h after some others
-for ac_header in sys/modem.h sys/ppsclock.h sys/ppstime.h sched.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_modem_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/ppsclock.h" "ac_cv_header_sys_ppsclock_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ppsclock_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PPSCLOCK_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/ppstime.h" "ac_cv_header_sys_ppstime_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ppstime_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PPSTIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
+
+fi
case "$ac_cv_header_sched_h" in
yes)
;;
*)
- for ac_header in sys/sched.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/sched.h" "ac_cv_header_sys_sched_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sched_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SCHED_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "sys/sched.h" "ac_cv_header_sys_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sched_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SCHED_H 1" >>confdefs.h
fi
-done
-
;;
esac
# HMS: Check sys/shm.h after some others
-for ac_header in sys/select.h sys/signal.h sys/sockio.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_select_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/signal.h" "ac_cv_header_sys_signal_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_signal_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SIGNAL_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sockio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
+
+fi
# HMS: Checked sys/socket.h earlier
case "$host" in
*-*-netbsd*)
;;
*)
- for ac_header in machine/soundcard.h sys/soundcard.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "machine/soundcard.h" "ac_cv_header_machine_soundcard_h" "$ac_includes_default"
+if test "x$ac_cv_header_machine_soundcard_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACHINE_SOUNDCARD_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_soundcard_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOUNDCARD_H 1" >>confdefs.h
-done
+fi
;;
esac
-for ac_header in sys/stat.h sys/stream.h stropts.h sys/stropts.h sys/syssgi.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stream_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
+if test "x$ac_cv_header_stropts_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
-for ac_header in sys/systune.h sys/termios.h sys/tpro.h sys/wait.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stropts_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/syssgi.h" "ac_cv_header_sys_syssgi_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_syssgi_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSSGI_H 1" >>confdefs.h
-done
+fi
-for ac_func in waitpid
-do :
- ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
-if test "x$ac_cv_func_waitpid" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WAITPID 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/systune.h" "ac_cv_header_sys_systune_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_systune_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSTUNE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_termios_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TERMIOS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/tpro.h" "ac_cv_header_sys_tpro_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_tpro_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TPRO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
+if test "x$ac_cv_func_waitpid" = xyes
+then :
+ printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
fi
-done
case "$host" in
*-convex-*)
- for ac_header in /sys/sync/queue.h /sys/sync/sema.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "/sys/sync/queue.h" "ac_cv_header__sys_sync_queue_h" "$ac_includes_default"
+if test "x$ac_cv_header__sys_sync_queue_h" = xyes
+then :
+ printf "%s\n" "#define HAVE__SYS_SYNC_QUEUE_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "/sys/sync/sema.h" "ac_cv_header__sys_sync_sema_h" "$ac_includes_default"
+if test "x$ac_cv_header__sys_sync_sema_h" = xyes
+then :
+ printf "%s\n" "#define HAVE__SYS_SYNC_SEMA_H 1" >>confdefs.h
-done
+fi
;;
*-*-bsdi*)
- for ac_header in machine/inline.h sys/pcl720.h sys/i8253.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "machine/inline.h" "ac_cv_header_machine_inline_h" "$ac_includes_default"
+if test "x$ac_cv_header_machine_inline_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACHINE_INLINE_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/pcl720.h" "ac_cv_header_sys_pcl720_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_pcl720_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PCL720_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/i8253.h" "ac_cv_header_sys_i8253_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_i8253_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_I8253_H 1" >>confdefs.h
+
+fi
;;
esac
case "$ac_cv_header_stdatomic_h" in
yes)
- for ac_func in atomic_thread_fence
-do :
- ac_fn_c_check_func "$LINENO" "atomic_thread_fence" "ac_cv_func_atomic_thread_fence"
-if test "x$ac_cv_func_atomic_thread_fence" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ATOMIC_THREAD_FENCE 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "atomic_thread_fence" "ac_cv_func_atomic_thread_fence"
+if test "x$ac_cv_func_atomic_thread_fence" = xyes
+then :
+ printf "%s\n" "#define HAVE_ATOMIC_THREAD_FENCE 1" >>confdefs.h
fi
-done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atomic_thread_fence()" >&5
-$as_echo_n "checking for atomic_thread_fence()... " >&6; }
-if ${ntp_cv_func_atomic_thread_fence+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for atomic_thread_fence()" >&5
+printf %s "checking for atomic_thread_fence()... " >&6; }
+if test ${ntp_cv_func_atomic_thread_fence+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdatomic.h>
int
-main ()
+main (void)
{
atomic_thread_fence(memory_order_seq_cst);
@@ -26168,17 +27160,19 @@ main ()
;
return 0;
}
- ntp_cv_func_atomic_thread_fence=yes
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_func_atomic_thread_fence=yes
+else $as_nop
ntp_cv_func_atomic_thread_fence=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_atomic_thread_fence" >&5
-$as_echo "$ntp_cv_func_atomic_thread_fence" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_atomic_thread_fence" >&5
+printf "%s\n" "$ntp_cv_func_atomic_thread_fence" >&6; }
;;
esac
@@ -26187,17 +27181,18 @@ case "$host" in
# Broken...
;;
*)
- for ac_func in ntp_adjtime ntp_gettime
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "ntp_adjtime" "ac_cv_func_ntp_adjtime"
+if test "x$ac_cv_func_ntp_adjtime" = xyes
+then :
+ printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "ntp_gettime" "ac_cv_func_ntp_gettime"
+if test "x$ac_cv_func_ntp_gettime" = xyes
+then :
+ printf "%s\n" "#define HAVE_NTP_GETTIME 1" >>confdefs.h
fi
-done
;;
esac
@@ -26208,74 +27203,62 @@ case "$host" in
yes)
;;
*)
- for ac_func in __ntp_gettime
-do :
- ac_fn_c_check_func "$LINENO" "__ntp_gettime" "ac_cv_func___ntp_gettime"
-if test "x$ac_cv_func___ntp_gettime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE___NTP_GETTIME 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "__ntp_gettime" "ac_cv_func___ntp_gettime"
+if test "x$ac_cv_func___ntp_gettime" = xyes
+then :
+ printf "%s\n" "#define HAVE___NTP_GETTIME 1" >>confdefs.h
fi
-done
case "$ac_cv_func___ntp_gettime" in
yes)
-$as_echo "#define ntp_gettime __ntp_gettime" >>confdefs.h
+printf "%s\n" "#define ntp_gettime __ntp_gettime" >>confdefs.h
-$as_echo "#define HAVE_NTP_GETTIME 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NTP_GETTIME 1" >>confdefs.h
esac
;;
esac
- for ac_func in adjtimex
-do :
- ac_fn_c_check_func "$LINENO" "adjtimex" "ac_cv_func_adjtimex"
-if test "x$ac_cv_func_adjtimex" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ADJTIMEX 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "adjtimex" "ac_cv_func_adjtimex"
+if test "x$ac_cv_func_adjtimex" = xyes
+then :
+ printf "%s\n" "#define HAVE_ADJTIMEX 1" >>confdefs.h
fi
-done
case "$ac_cv_func_adjtimex" in
yes)
-$as_echo "#define ntp_adjtime adjtimex" >>confdefs.h
+printf "%s\n" "#define ntp_adjtime adjtimex" >>confdefs.h
-$as_echo "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
have_adjtimex=1
;;
*)
- for ac_func in __adjtimex
-do :
- ac_fn_c_check_func "$LINENO" "__adjtimex" "ac_cv_func___adjtimex"
-if test "x$ac_cv_func___adjtimex" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE___ADJTIMEX 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "__adjtimex" "ac_cv_func___adjtimex"
+if test "x$ac_cv_func___adjtimex" = xyes
+then :
+ printf "%s\n" "#define HAVE___ADJTIMEX 1" >>confdefs.h
fi
-done
case "$ac_cv_func___adjtimex" in
yes)
-$as_echo "#define ntp_adjtime __adjtimex" >>confdefs.h
+printf "%s\n" "#define ntp_adjtime __adjtimex" >>confdefs.h
-$as_echo "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
-$as_echo "#define adjtimex __adjtimex" >>confdefs.h
+printf "%s\n" "#define adjtimex __adjtimex" >>confdefs.h
-$as_echo "#define HAVE_ADJTIMEX 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ADJTIMEX 1" >>confdefs.h
have_adjtimex=1
esac
@@ -26287,11 +27270,12 @@ case "$have_adjtimex" in
# nlist stuff is only needed for tickadj.
saved_LIBS="$LIBS"
LIBS=
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nlist" >&5
-$as_echo_n "checking for library containing nlist... " >&6; }
-if ${ac_cv_search_nlist+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nlist" >&5
+printf %s "checking for library containing nlist... " >&6; }
+if test ${ac_cv_search_nlist+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26299,56 +27283,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char nlist ();
int
-main ()
+main (void)
{
return nlist ();
;
return 0;
}
_ACEOF
-for ac_lib in '' elf ld mld; do
+for ac_lib in '' elf ld mld
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_nlist=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_nlist+:} false; then :
+ if test ${ac_cv_search_nlist+y}
+then :
break
fi
done
-if ${ac_cv_search_nlist+:} false; then :
+if test ${ac_cv_search_nlist+y}
+then :
-else
+else $as_nop
ac_cv_search_nlist=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nlist" >&5
-$as_echo "$ac_cv_search_nlist" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nlist" >&5
+printf "%s\n" "$ac_cv_search_nlist" >&6; }
ac_res=$ac_cv_search_nlist
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
# XXX ac_cv_search_nlist will be 'none required', 'no', or '-l...'
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open" >&5
-$as_echo_n "checking for library containing kvm_open... " >&6; }
-if ${ac_cv_search_kvm_open+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open" >&5
+printf %s "checking for library containing kvm_open... " >&6; }
+if test ${ac_cv_search_kvm_open+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26356,80 +27343,83 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char kvm_open ();
int
-main ()
+main (void)
{
return kvm_open ();
;
return 0;
}
_ACEOF
-for ac_lib in '' kvm; do
+for ac_lib in '' kvm
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_kvm_open=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_kvm_open+:} false; then :
+ if test ${ac_cv_search_kvm_open+y}
+then :
break
fi
done
-if ${ac_cv_search_kvm_open+:} false; then :
+if test ${ac_cv_search_kvm_open+y}
+then :
-else
+else $as_nop
ac_cv_search_kvm_open=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kvm_open" >&5
-$as_echo "$ac_cv_search_kvm_open" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kvm_open" >&5
+printf "%s\n" "$ac_cv_search_kvm_open" >&6; }
ac_res=$ac_cv_search_kvm_open
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
# XXX ac_cv_search_kvm_open will be 'none required', 'no', or '-l...'
- for ac_header in nlist.h sys/var.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
+if test "x$ac_cv_header_nlist_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NLIST_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/var.h" "ac_cv_header_sys_var_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_var_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_VAR_H 1" >>confdefs.h
-done
+fi
case "$ac_cv_header_nlist_h" in
yes)
-$as_echo "#define NLIST_STRUCT 1" >>confdefs.h
+printf "%s\n" "#define NLIST_STRUCT 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for n_un in struct nlist" >&5
-$as_echo_n "checking for n_un in struct nlist... " >&6; }
-if ${ntp_cv_struct_nlist_n_un+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for n_un in struct nlist" >&5
+printf %s "checking for n_un in struct nlist... " >&6; }
+if test ${ntp_cv_struct_nlist_n_un+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <nlist.h>
int
-main ()
+main (void)
{
struct nlist n;
@@ -26439,21 +27429,23 @@ main ()
;
return 0;
}
- ntp_cv_struct_nlist_n_un=yes
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_struct_nlist_n_un=yes
+else $as_nop
ntp_cv_struct_nlist_n_un=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_nlist_n_un" >&5
-$as_echo "$ntp_cv_struct_nlist_n_un" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_nlist_n_un" >&5
+printf "%s\n" "$ntp_cv_struct_nlist_n_un" >&6; }
case "$ntp_cv_struct_nlist_n_un" in
yes)
-$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
+printf "%s\n" "#define NLIST_NAME_UNION 1" >>confdefs.h
esac
esac
@@ -26463,9 +27455,7 @@ $as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
{ saved_LIBS=; unset saved_LIBS;}
esac
-for ac_header in sys/proc.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -26474,37 +27464,27 @@ do :
#endif
"
-if test "x$ac_cv_header_sys_proc_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_PROC_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_proc_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PROC_H 1" >>confdefs.h
fi
-done
-
-for ac_header in sys/resource.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
"
-if test "x$ac_cv_header_sys_resource_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_RESOURCE_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_resource_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
fi
-done
-
-for ac_header in sys/shm.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -26513,33 +27493,25 @@ do :
#endif
"
-if test "x$ac_cv_header_sys_shm_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SHM_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_shm_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
fi
-done
-
-for ac_header in sys/timex.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/timex.h" "ac_cv_header_sys_timex_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/timex.h" "ac_cv_header_sys_timex_h" "
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
"
-if test "x$ac_cv_header_sys_timex_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEX_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_timex_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIMEX_H 1" >>confdefs.h
fi
-done
-
@@ -26557,76 +27529,77 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#endif
int
-main ()
+main (void)
{
-{ $as_echo "$as_me:${as_lineno-$LINENO}: AF_UNSPEC is zero, as expected." >&5
-$as_echo "$as_me: AF_UNSPEC is zero, as expected." >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: AF_UNSPEC is zero, as expected." >&5
+printf "%s\n" "$as_me: AF_UNSPEC is zero, as expected." >&6;}
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+printf %s "checking return type of signal handlers... " >&6; }
+if test ${ac_cv_type_signal+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
int
-main ()
+main (void)
{
return *(signal (0, 0)) (0) == 1;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_type_signal=int
-else
+else $as_nop
ac_cv_type_signal=void
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+printf "%s\n" "$ac_cv_type_signal" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
+printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h
ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = xyes; then :
+if test "x$ac_cv_type_off_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define off_t long int
-_ACEOF
+printf "%s\n" "#define off_t long int" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if ${ac_cv_struct_tm+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test ${ac_cv_struct_tm+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <time.h>
int
-main ()
+main (void)
{
struct tm tm;
int *p = &tm.tm_sec;
@@ -26635,26 +27608,28 @@ struct tm tm;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_struct_tm=time.h
-else
+else $as_nop
ac_cv_struct_tm=sys/time.h
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+printf "%s\n" "$ac_cv_struct_tm" >&6; }
if test $ac_cv_struct_tm = sys/time.h; then
-$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback value for HZ" >&5
-$as_echo_n "checking for a fallback value for HZ... " >&6; }
-if ${ntp_cv_default_hz+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback value for HZ" >&5
+printf %s "checking for a fallback value for HZ... " >&6; }
+if test ${ntp_cv_default_hz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ntp_cv_default_hz=100
case "$host" in
@@ -26668,19 +27643,18 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_default_hz" >&5
-$as_echo "$ntp_cv_default_hz" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_default_hz" >&5
+printf "%s\n" "$ntp_cv_default_hz" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_HZ $ntp_cv_default_hz
-_ACEOF
+printf "%s\n" "#define DEFAULT_HZ $ntp_cv_default_hz" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to override the system's value for HZ" >&5
-$as_echo_n "checking if we need to override the system's value for HZ... " >&6; }
-if ${ntp_cv_override_hz+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to override the system's value for HZ" >&5
+printf %s "checking if we need to override the system's value for HZ... " >&6; }
+if test ${ntp_cv_override_hz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ntp_cv_override_hz=no
case "$host" in
@@ -26703,22 +27677,23 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_override_hz" >&5
-$as_echo "$ntp_cv_override_hz" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_override_hz" >&5
+printf "%s\n" "$ntp_cv_override_hz" >&6; }
case "$ntp_cv_override_hz" in
yes)
-$as_echo "#define OVERRIDE_HZ 1" >>confdefs.h
+printf "%s\n" "#define OVERRIDE_HZ 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rt_msghdr" >&5
-$as_echo_n "checking for struct rt_msghdr... " >&6; }
-if ${ntp_cv_struct_rt_msghdr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct rt_msghdr" >&5
+printf %s "checking for struct rt_msghdr... " >&6; }
+if test ${ntp_cv_struct_rt_msghdr+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26728,7 +27703,7 @@ else
#include <net/route.h>
int
-main ()
+main (void)
{
struct rt_msghdr p;
@@ -26738,23 +27713,25 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_rt_msghdr=yes
-else
+else $as_nop
ntp_cv_struct_rt_msghdr=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_rt_msghdr" >&5
-$as_echo "$ntp_cv_struct_rt_msghdr" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_rt_msghdr" >&5
+printf "%s\n" "$ntp_cv_struct_rt_msghdr" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rtattr" >&5
-$as_echo_n "checking for struct rtattr... " >&6; }
-if ${ntp_cv_rtattr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct rtattr" >&5
+printf %s "checking for struct rtattr... " >&6; }
+if test ${ntp_cv_rtattr+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26763,7 +27740,7 @@ else
#include <linux/rtnetlink.h>
int
-main ()
+main (void)
{
struct rtattr p;
@@ -26773,43 +27750,45 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_rtattr=yes
-else
+else $as_nop
ntp_cv_rtattr=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rtattr" >&5
-$as_echo "$ntp_cv_rtattr" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rtattr" >&5
+printf "%s\n" "$ntp_cv_rtattr" >&6; }
case "$ntp_cv_struct_rt_msghdr$ntp_cv_rtattr" in
*yes*)
-$as_echo "#define HAS_ROUTING_SOCKET 1" >>confdefs.h
+printf "%s\n" "#define HAS_ROUTING_SOCKET 1" >>confdefs.h
case "$ntp_cv_rtattr" in
yes)
-$as_echo "#define HAVE_RTNETLINK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_RTNETLINK 1" >>confdefs.h
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sigaction for sa_sigaction" >&5
-$as_echo_n "checking struct sigaction for sa_sigaction... " >&6; }
-if ${ntp_cv_struct_sigaction_has_sa_sigaction+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sigaction for sa_sigaction" >&5
+printf %s "checking struct sigaction for sa_sigaction... " >&6; }
+if test ${ntp_cv_struct_sigaction_has_sa_sigaction+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <signal.h>
int
-main ()
+main (void)
{
struct sigaction act;
@@ -26820,29 +27799,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_sigaction_has_sa_sigaction=yes
-else
+else $as_nop
ntp_cv_struct_sigaction_has_sa_sigaction=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_sigaction_has_sa_sigaction" >&5
-$as_echo "$ntp_cv_struct_sigaction_has_sa_sigaction" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_sigaction_has_sa_sigaction" >&5
+printf "%s\n" "$ntp_cv_struct_sigaction_has_sa_sigaction" >&6; }
case "$ntp_cv_struct_sigaction_has_sa_sigaction" in
yes)
-$as_echo "#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ppsclockev" >&5
-$as_echo_n "checking for struct ppsclockev... " >&6; }
-if ${ntp_cv_struct_ppsclockev+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ppsclockev" >&5
+printf %s "checking for struct ppsclockev... " >&6; }
+if test ${ntp_cv_struct_ppsclockev+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26860,7 +27841,7 @@ else
#endif
int
-main ()
+main (void)
{
extern struct ppsclockev *pce;
@@ -26871,31 +27852,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_ppsclockev=yes
-else
+else $as_nop
ntp_cv_struct_ppsclockev=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ppsclockev" >&5
-$as_echo "$ntp_cv_struct_ppsclockev" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ppsclockev" >&5
+printf "%s\n" "$ntp_cv_struct_ppsclockev" >&6; }
case "$ntp_cv_struct_ppsclockev" in
yes)
-$as_echo "#define HAVE_STRUCT_PPSCLOCKEV 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_PPSCLOCKEV 1" >>confdefs.h
esac
case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct snd_size" >&5
-$as_echo_n "checking for struct snd_size... " >&6; }
-if ${ntp_cv_struct_snd_size+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct snd_size" >&5
+printf %s "checking for struct snd_size... " >&6; }
+if test ${ntp_cv_struct_snd_size+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26907,7 +27890,7 @@ else
#endif
int
-main ()
+main (void)
{
extern struct snd_size *ss;
@@ -26918,37 +27901,39 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_snd_size=yes
-else
+else $as_nop
ntp_cv_struct_snd_size=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_snd_size" >&5
-$as_echo "$ntp_cv_struct_snd_size" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_snd_size" >&5
+printf "%s\n" "$ntp_cv_struct_snd_size" >&6; }
case "$ntp_cv_struct_snd_size" in
yes)
-$as_echo "#define HAVE_STRUCT_SND_SIZE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_SND_SIZE 1" >>confdefs.h
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for hz" >&5
-$as_echo_n "checking struct clockinfo for hz... " >&6; }
-if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for hz" >&5
+printf %s "checking struct clockinfo for hz... " >&6; }
+if test ${ntp_cv_struct_clockinfo_has_hz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
int
-main ()
+main (void)
{
extern struct clockinfo *pc;
@@ -26959,36 +27944,38 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_clockinfo_has_hz=yes
-else
+else $as_nop
ntp_cv_struct_clockinfo_has_hz=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
-$as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
+printf "%s\n" "$ntp_cv_struct_clockinfo_has_hz" >&6; }
case "$ntp_cv_struct_clockinfo_has_hz" in
yes)
-$as_echo "#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for tickadj" >&5
-$as_echo_n "checking struct clockinfo for tickadj... " >&6; }
-if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for tickadj" >&5
+printf %s "checking struct clockinfo for tickadj... " >&6; }
+if test ${ntp_cv_struct_clockinfo_has_hz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
int
-main ()
+main (void)
{
extern struct clockinfo *pc;
@@ -26999,21 +27986,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_clockinfo_has_hz=yes
-else
+else $as_nop
ntp_cv_struct_clockinfo_has_hz=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
-$as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
+printf "%s\n" "$ntp_cv_struct_clockinfo_has_hz" >&6; }
case "$ntp_cv_struct_clockinfo_has_hz" in
yes)
-$as_echo "#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
esac
@@ -27037,11 +28025,10 @@ case "$ntp_cv_struct_ntptimeval" in
"
-if test "x$ac_cv_member_struct_ntptimeval_time_tv_nsec" = xyes; then :
+if test "x$ac_cv_member_struct_ntptimeval_time_tv_nsec" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1" >>confdefs.h
fi
@@ -27050,58 +28037,50 @@ esac
####
-for ac_func in arc4random_buf
-do :
- ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
-if test "x$ac_cv_func_arc4random_buf" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ARC4RANDOM_BUF 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
+if test "x$ac_cv_func_arc4random_buf" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
fi
-done
####
saved_LIBS="$LIBS"
LIBS="$LIBS $LDADD_LIBNTP"
-for ac_func in daemon
-do :
- ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
-if test "x$ac_cv_func_daemon" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DAEMON 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
+if test "x$ac_cv_func_daemon" = xyes
+then :
+ printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
fi
-done
# XXX if we keep everything in LIBS and also keep separate lists, this simplifies.
LIBS="$saved_LIBS"
{ saved_LIBS=; unset saved_LIBS;}
-for ac_func in finite
+
+ for ac_func in finite
do :
ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
-if test "x$ac_cv_func_finite" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_FINITE 1
-_ACEOF
+if test "x$ac_cv_func_finite" = xyes
+then :
+ printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h
+
+else $as_nop
-else
for ac_func in isfinite
do :
ac_fn_c_check_func "$LINENO" "isfinite" "ac_cv_func_isfinite"
-if test "x$ac_cv_func_isfinite" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ISFINITE 1
-_ACEOF
+if test "x$ac_cv_func_isfinite" = xyes
+then :
+ printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite with <math.h>" >&5
-$as_echo_n "checking for isfinite with <math.h>... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isfinite with <math.h>" >&5
+printf %s "checking for isfinite with <math.h>... " >&6; }
_libs=$LIBS
# XXX
LIBS="$LIBS -lm"
@@ -27111,7 +28090,7 @@ $as_echo_n "checking for isfinite with <math.h>... " >&6; }
#include <math.h>
int
-main ()
+main (void)
{
float f = 0.0;
@@ -27122,58 +28101,99 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ans=yes
-else
+else $as_nop
ans=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$_libs
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
- $as_echo "#define HAVE_ISFINITE 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h
esac
fi
-done
+done
fi
+
done
+ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch"
+if test "x$ac_cv_func_fnmatch" = xyes
+then :
+ printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h
-for ac_func in fnmatch getbootfile getuid getrusage nanosleep strsignal
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_func "$LINENO" "getbootfile" "ac_cv_func_getbootfile"
+if test "x$ac_cv_func_getbootfile" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETBOOTFILE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid"
+if test "x$ac_cv_func_getuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
+if test "x$ac_cv_func_getrusage" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
+if test "x$ac_cv_func_strsignal" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
+if test "x$ac_cv_func_strsignal" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom"
+if test "x$ac_cv_func_closefrom" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOSEFROM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
+if test "x$ac_cv_func_getdtablesize" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
fi
-done
+
# kvm_open() is only used by tickadj. Also see above.
case "$ac_cv_header_kvm_h" in
yes)
- for ac_func in kvm_open
-do :
- ac_fn_c_check_func "$LINENO" "kvm_open" "ac_cv_func_kvm_open"
-if test "x$ac_cv_func_kvm_open" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KVM_OPEN 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "kvm_open" "ac_cv_func_kvm_open"
+if test "x$ac_cv_func_kvm_open" = xyes
+then :
+ printf "%s\n" "#define HAVE_KVM_OPEN 1" >>confdefs.h
fi
-done
;;
esac
@@ -27182,29 +28202,21 @@ case "$host" in
*-*-sco3.2v5.0.*)
# Just stubs. Sigh.
;;
- *) for ac_func in mkstemp
-do :
- ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
-if test "x$ac_cv_func_mkstemp" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MKSTEMP 1
-_ACEOF
+ *) ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
+if test "x$ac_cv_func_mkstemp" = xyes
+then :
+ printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h
fi
-done
;;
esac
-for ac_func in mktime
-do :
- ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
-if test "x$ac_cv_func_mktime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MKTIME 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
+if test "x$ac_cv_func_mktime" = xyes
+then :
+ printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h
fi
-done
case "$host" in
*-*-aix[4-9]*)
@@ -27227,53 +28239,122 @@ case "$host" in
alpha*-dec-osf4*|alpha*-dec-osf5*)
# mlockall is there, as a #define calling memlk via <sys/mman.h>
# Not easy to test for - cheat.
- for ac_func in memlk
+
+ for ac_func in memlk
do :
ac_fn_c_check_func "$LINENO" "memlk" "ac_cv_func_memlk"
-if test "x$ac_cv_func_memlk" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MEMLK 1
-_ACEOF
+if test "x$ac_cv_func_memlk" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMLK 1" >>confdefs.h
ac_cv_func_mlockall=yes
fi
-done
- for ac_func in mlockall
-do :
- ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
-if test "x$ac_cv_func_mlockall" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MLOCKALL 1
-_ACEOF
+done
+ ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
+if test "x$ac_cv_func_mlockall" = xyes
+then :
+ printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h
fi
-done
;;
- *) for ac_func in mlockall
-do :
- ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
-if test "x$ac_cv_func_mlockall" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MLOCKALL 1
-_ACEOF
+ *) ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
+if test "x$ac_cv_func_mlockall" = xyes
+then :
+ printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h
fi
-done
;;
esac
-for ac_func in nice plock pututline pututxline readlink rtprio
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
+if test "x$ac_cv_func_nice" = xyes
+then :
+ printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
+if test "x$ac_cv_func_plock" = xyes
+then :
+ printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pututline" "ac_cv_func_pututline"
+if test "x$ac_cv_func_pututline" = xyes
+then :
+ printf "%s\n" "#define HAVE_PUTUTLINE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pututxline" "ac_cv_func_pututxline"
+if test "x$ac_cv_func_pututxline" = xyes
+then :
+ printf "%s\n" "#define HAVE_PUTUTXLINE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
+if test "x$ac_cv_func_readlink" = xyes
+then :
+ printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "rtprio" "ac_cv_func_rtprio"
+if test "x$ac_cv_func_rtprio" = xyes
+then :
+ printf "%s\n" "#define HAVE_RTPRIO 1" >>confdefs.h
+
+fi
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-2008 compliant realpath()" >&5
+printf %s "checking for a POSIX-2008 compliant realpath()... " >&6; }
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ if test "$cross_compiling" = yes
+then :
+ ans="CROSS COMPILE!"
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/param.h>
+ #include <stdlib.h>
+ int main() { return (NULL == realpath(".", NULL)); }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ans="yes"
+else $as_nop
+ ans="no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
+ case "$ans" in
+ yes)
+
+printf "%s\n" "#define HAVE_FUNC_POSIX_REALPATH 1" >>confdefs.h
+
+ ;;
+ esac
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
case "$host" in
*-*-aix[4-9]*)
@@ -27283,42 +28364,82 @@ case "$host" in
*-*-solaris2.5*)
# Just stubs in solaris2.5. Sigh.
;;
- *) for ac_func in sched_setscheduler
-do :
- ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
-if test "x$ac_cv_func_sched_setscheduler" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SCHED_SETSCHEDULER 1
-_ACEOF
+ *) ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
+if test "x$ac_cv_func_sched_setscheduler" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
fi
-done
;;
esac
-for ac_func in setlinebuf setpgid setpriority setsid setvbuf
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
+if test "x$ac_cv_func_setlinebuf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
+if test "x$ac_cv_func_setpgid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
-for ac_func in strdup strnlen memchr strerror setrlimit strchr
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
+if test "x$ac_cv_func_setpriority" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
+if test "x$ac_cv_func_setsid" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
+if test "x$ac_cv_func_setvbuf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
+if test "x$ac_cv_func_strnlen" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
+if test "x$ac_cv_func_memchr" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMCHR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
+if test "x$ac_cv_func_strerror" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
+if test "x$ac_cv_func_setrlimit" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
+if test "x$ac_cv_func_strchr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
fi
-done
case "$host" in
*-*-aix[4-9]*)
@@ -27335,27 +28456,24 @@ case "$host" in
# Just stubs. Sigh.
;;
*)
- for ac_func in timer_create
-do :
- ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
-if test "x$ac_cv_func_timer_create" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_TIMER_CREATE 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
+if test "x$ac_cv_func_timer_create" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
fi
-done
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_MEMLOCK" >&5
-$as_echo_n "checking for RLIMIT_MEMLOCK... " >&6; }
-if ${ntp_cv_rlimit_memlock+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_MEMLOCK" >&5
+printf %s "checking for RLIMIT_MEMLOCK... " >&6; }
+if test ${ntp_cv_rlimit_memlock+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -27370,7 +28488,7 @@ else
#endif
int
-main ()
+main (void)
{
getrlimit(RLIMIT_MEMLOCK, 0);
@@ -27380,17 +28498,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_rlimit_memlock=yes
-else
+else $as_nop
ntp_cv_rlimit_memlock=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_memlock" >&5
-$as_echo "$ntp_cv_rlimit_memlock" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_memlock" >&5
+printf "%s\n" "$ntp_cv_rlimit_memlock" >&6; }
case "$host" in
*-*-*linux*)
ntp_dflt_rlimit_memlock="-1" ;;
@@ -27402,11 +28521,12 @@ case "$ntp_cv_rlimit_memlock" in
HAVE_RLIMIT_MEMLOCK=" memlock $ntp_dflt_rlimit_memlock" ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_STACK" >&5
-$as_echo_n "checking for RLIMIT_STACK... " >&6; }
-if ${ntp_cv_rlimit_stack+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_STACK" >&5
+printf %s "checking for RLIMIT_STACK... " >&6; }
+if test ${ntp_cv_rlimit_stack+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -27421,7 +28541,7 @@ else
#endif
int
-main ()
+main (void)
{
getrlimit(RLIMIT_STACK, 0);
@@ -27431,17 +28551,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_rlimit_stack=yes
-else
+else $as_nop
ntp_cv_rlimit_stack=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_stack" >&5
-$as_echo "$ntp_cv_rlimit_stack" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_stack" >&5
+printf "%s\n" "$ntp_cv_rlimit_stack" >&6; }
case "$ntp_cv_rlimit_stack" in
yes)
@@ -27449,13 +28570,14 @@ case "$ntp_cv_rlimit_stack" in
esac
# HMS: Only if we are doing the MLOCKALL stuff...
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default number of 4k stack pages" >&5
-$as_echo_n "checking for the default number of 4k stack pages... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the default number of 4k stack pages" >&5
+printf %s "checking for the default number of 4k stack pages... " >&6; }
# Check whether --with-stack-limit was given.
-if test "${with_stack_limit+set}" = set; then :
+if test ${with_stack_limit+y}
+then :
withval=$with_stack_limit; ans=$withval
-else
+else $as_nop
ans=yes
fi
@@ -27475,22 +28597,21 @@ case "$ans" in
*) as_fn_error $? "\"--with-stack-limit requires an integer argument.\"" "$LINENO" 5
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DFLT_RLIMIT_STACK $ans
-_ACEOF
+printf "%s\n" "#define DFLT_RLIMIT_STACK $ans" >>confdefs.h
# HMS: only if we have RLIMIT_MEMLOCK
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default number of megabytes to MEMLOCK" >&5
-$as_echo_n "checking for the default number of megabytes to MEMLOCK... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the default number of megabytes to MEMLOCK" >&5
+printf %s "checking for the default number of megabytes to MEMLOCK... " >&6; }
# Check whether --with-memlock was given.
-if test "${with_memlock+set}" = set; then :
+if test ${with_memlock+y}
+then :
withval=$with_memlock; ans=$withval
-else
+else $as_nop
ans=yes
fi
@@ -27503,27 +28624,21 @@ case "$ans" in
*) as_fn_error $? "\"--with-memlock requires an integer argument.\"" "$LINENO" 5
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DFLT_RLIMIT_MEMLOCK $ans
-_ACEOF
+printf "%s\n" "#define DFLT_RLIMIT_MEMLOCK $ans" >>confdefs.h
# some OSes prefer _exit() in forked children to exit()
-for ac_func in _exit
-do :
- ac_fn_c_check_func "$LINENO" "_exit" "ac_cv_func__exit"
-if test "x$ac_cv_func__exit" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE__EXIT 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "_exit" "ac_cv_func__exit"
+if test "x$ac_cv_func__exit" = xyes
+then :
+ printf "%s\n" "#define HAVE__EXIT 1" >>confdefs.h
fi
-done
ntp_worker_child_exit=exit
case "$ac_cv_func__exit::$host_os" in
@@ -27535,22 +28650,33 @@ case "$ac_cv_func__exit::$host_os" in
;;
esac
-cat >>confdefs.h <<_ACEOF
-#define WORKER_CHILD_EXIT $ntp_worker_child_exit
-_ACEOF
+printf "%s\n" "#define WORKER_CHILD_EXIT $ntp_worker_child_exit" >>confdefs.h
-for ac_func in umask uname updwtmp updwtmpx
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "umask" "ac_cv_func_umask"
+if test "x$ac_cv_func_umask" = xyes
+then :
+ printf "%s\n" "#define HAVE_UMASK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
+if test "x$ac_cv_func_uname" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "updwtmp" "ac_cv_func_updwtmp"
+if test "x$ac_cv_func_updwtmp" = xyes
+then :
+ printf "%s\n" "#define HAVE_UPDWTMP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "updwtmpx" "ac_cv_func_updwtmpx"
+if test "x$ac_cv_func_updwtmpx" = xyes
+then :
+ printf "%s\n" "#define HAVE_UPDWTMPX 1" >>confdefs.h
fi
-done
###
@@ -27558,11 +28684,12 @@ done
# http://bugs.ntp.org/737
case "$ac_cv_func_recvmsg" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need extra help to define struct iovec" >&5
-$as_echo_n "checking if we need extra help to define struct iovec... " >&6; }
-if ${ntp_cv_struct_iovec_help+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need extra help to define struct iovec" >&5
+printf %s "checking if we need extra help to define struct iovec... " >&6; }
+if test ${ntp_cv_struct_iovec_help+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
compiled=no
for ntp_cv_struct_iovec_help in '0' '1'; do
@@ -27580,7 +28707,7 @@ else
#endif
int
-main ()
+main (void)
{
void foo(void) {
@@ -27599,10 +28726,11 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
compiled=yes ; break 1
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case "$compiled" in
no)
@@ -27612,21 +28740,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_iovec_help" >&5
-$as_echo "$ntp_cv_struct_iovec_help" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_iovec_help" >&5
+printf "%s\n" "$ntp_cv_struct_iovec_help" >&6; }
case "$ntp_cv_struct_iovec_help" in
1)
-$as_echo "#define HAVE_SYS_UIO_H 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments taken by setpgrp()" >&5
-$as_echo_n "checking number of arguments taken by setpgrp()... " >&6; }
-if ${ntp_cv_func_setpgrp_nargs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments taken by setpgrp()" >&5
+printf %s "checking number of arguments taken by setpgrp()... " >&6; }
+if test ${ntp_cv_func_setpgrp_nargs+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -27638,7 +28767,7 @@ else
#endif
int
-main ()
+main (void)
{
setpgrp(0, 0);
@@ -27648,29 +28777,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_func_setpgrp_nargs=2
-else
+else $as_nop
ntp_cv_func_setpgrp_nargs=0
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_setpgrp_nargs" >&5
-$as_echo "$ntp_cv_func_setpgrp_nargs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_setpgrp_nargs" >&5
+printf "%s\n" "$ntp_cv_func_setpgrp_nargs" >&6; }
case "$ntp_cv_func_setpgrp_nargs" in
0)
-$as_echo "#define HAVE_SETPGRP_0 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SETPGRP_0 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to declare 'errno'" >&5
-$as_echo_n "checking if we need to declare 'errno'... " >&6; }
-if ${ntp_cv_decl_errno+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to declare 'errno'" >&5
+printf %s "checking if we need to declare 'errno'... " >&6; }
+if test ${ntp_cv_decl_errno+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -27679,7 +28810,7 @@ else
#endif
int
-main ()
+main (void)
{
errno = 0;
@@ -27689,29 +28820,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_decl_errno=no
-else
+else $as_nop
ntp_cv_decl_errno=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_errno" >&5
-$as_echo "$ntp_cv_decl_errno" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_errno" >&5
+printf "%s\n" "$ntp_cv_decl_errno" >&6; }
case "$ntp_cv_decl_errno" in
yes)
-$as_echo "#define DECL_ERRNO 1" >>confdefs.h
+printf "%s\n" "#define DECL_ERRNO 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we may declare 'h_errno'" >&5
-$as_echo_n "checking if we may declare 'h_errno'... " >&6; }
-if ${ntp_cv_decl_h_errno+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we may declare 'h_errno'" >&5
+printf %s "checking if we may declare 'h_errno'... " >&6; }
+if test ${ntp_cv_decl_h_errno+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -27730,7 +28863,7 @@ else
#endif
int
-main ()
+main (void)
{
extern int h_errno;
@@ -27740,29 +28873,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_decl_h_errno=yes
-else
+else $as_nop
ntp_cv_decl_h_errno=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_h_errno" >&5
-$as_echo "$ntp_cv_decl_h_errno" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_h_errno" >&5
+printf "%s\n" "$ntp_cv_decl_h_errno" >&6; }
case "$ntp_cv_decl_h_errno" in
yes)
-$as_echo "#define DECL_H_ERRNO 1" >>confdefs.h
+printf "%s\n" "#define DECL_H_ERRNO 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if declaring 'syscall()' is ok" >&5
-$as_echo_n "checking if declaring 'syscall()' is ok... " >&6; }
-if ${ntp_cv_decl_syscall+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if declaring 'syscall()' is ok" >&5
+printf %s "checking if declaring 'syscall()' is ok... " >&6; }
+if test ${ntp_cv_decl_syscall+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -27774,7 +28909,7 @@ else
#endif
int
-main ()
+main (void)
{
extern int syscall (int, ...);
@@ -27783,242 +28918,244 @@ main ()
;
return 0;
}
- ntp_cv_decl_syscall=yes
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_decl_syscall=yes
+else $as_nop
ntp_cv_decl_syscall=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_syscall" >&5
-$as_echo "$ntp_cv_decl_syscall" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_syscall" >&5
+printf "%s\n" "$ntp_cv_decl_syscall" >&6; }
case "$ntp_cv_decl_syscall" in
yes)
-$as_echo "#define DECL_SYSCALL 1" >>confdefs.h
+printf "%s\n" "#define DECL_SYSCALL 1" >>confdefs.h
esac
case "$host" in
*-*-aix4.3.*)
-$as_echo "#define DECL_HSTRERROR_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_HSTRERROR_0 1" >>confdefs.h
# Needed for XLC under AIX 4.3.2
;;
*-*-mpeix*)
-$as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
-$as_echo "#define DECL_INET_NTOA_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_INET_NTOA_0 1" >>confdefs.h
-$as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
-$as_echo "#define DECL_SELECT_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
-$as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
-$as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
-$as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
;;
*-*-osf[45]*)
-$as_echo "#define DECL_PLOCK_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_PLOCK_0 1" >>confdefs.h
-$as_echo "#define DECL_STIME_1 1" >>confdefs.h
+printf "%s\n" "#define DECL_STIME_1 1" >>confdefs.h
;;
*-*-qnx*)
-$as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
;;
*-*-riscos4*)
-$as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
-$as_echo "#define DECL_BZERO_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
-$as_echo "#define DECL_IOCTL_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
-$as_echo "#define DECL_IPC_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
-$as_echo "#define DECL_MEMMOVE_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MEMMOVE_0 1" >>confdefs.h
-$as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
-$as_echo "#define DECL_RENAME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_RENAME_0 1" >>confdefs.h
-$as_echo "#define DECL_SELECT_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
-$as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
-$as_echo "#define DECL_SETPRIORITY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
-$as_echo "#define DECL_STDIO_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_STDIO_0 1" >>confdefs.h
-$as_echo "#define DECL_STRTOL_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_STRTOL_0 1" >>confdefs.h
-$as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
-$as_echo "#define DECL_TIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TIME_0 1" >>confdefs.h
-$as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
-$as_echo "#define DECL_TOLOWER_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TOLOWER_0 1" >>confdefs.h
;;
*-*-solaris2*)
-$as_echo "#define DECL_MKSTEMP_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MKSTEMP_0 1" >>confdefs.h
-$as_echo "#define DECL_SETPRIORITY_1 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETPRIORITY_1 1" >>confdefs.h
case "$host" in
*-*-solaris2.4)
-$as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
;;
esac
;;
*-*-sunos4*)
-$as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
-$as_echo "#define DECL_BCOPY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_BCOPY_0 1" >>confdefs.h
-$as_echo "#define DECL_BZERO_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
-$as_echo "#define DECL_IOCTL_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
-$as_echo "#define DECL_IPC_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
-$as_echo "#define DECL_MEMMOVE_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MEMMOVE_0 1" >>confdefs.h
-$as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
-$as_echo "#define DECL_MKSTEMP_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MKSTEMP_0 1" >>confdefs.h
-$as_echo "#define DECL_RENAME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_RENAME_0 1" >>confdefs.h
-$as_echo "#define DECL_SELECT_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
-$as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
-$as_echo "#define DECL_SETPRIORITY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
-$as_echo "#define DECL_SIGVEC_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SIGVEC_0 1" >>confdefs.h
case "`basename $ac_cv_prog_CC`" in
acc*) ;;
*)
-$as_echo "#define DECL_STDIO_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_STDIO_0 1" >>confdefs.h
;;
esac
-$as_echo "#define DECL_STRTOL_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_STRTOL_0 1" >>confdefs.h
-$as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
-$as_echo "#define DECL_TIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TIME_0 1" >>confdefs.h
-$as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
-$as_echo "#define DECL_TOLOWER_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TOLOWER_0 1" >>confdefs.h
-$as_echo "#define DECL_TOUPPER_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TOUPPER_0 1" >>confdefs.h
-$as_echo "#define DECL_STRERROR_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_STRERROR_0 1" >>confdefs.h
;;
*-*-ultrix4*)
-$as_echo "#define DECL_ADJTIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
-$as_echo "#define DECL_BZERO_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
-$as_echo "#define DECL_CFSETISPEED_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_CFSETISPEED_0 1" >>confdefs.h
-$as_echo "#define DECL_IOCTL_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
-$as_echo "#define DECL_IPC_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
-$as_echo "#define DECL_MKTEMP_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
-$as_echo "#define DECL_NLIST_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_NLIST_0 1" >>confdefs.h
-$as_echo "#define DECL_PLOCK_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_PLOCK_0 1" >>confdefs.h
-$as_echo "#define DECL_SELECT_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
-$as_echo "#define DECL_SETITIMER_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
-$as_echo "#define DECL_SETPRIORITY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
-$as_echo "#define DECL_STIME_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_STIME_0 1" >>confdefs.h
-$as_echo "#define DECL_SYSLOG_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
-$as_echo "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
+printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
;;
esac
@@ -28026,7 +29163,7 @@ esac
case "$host" in
*-*-sco3.2*)
-$as_echo "#define TERMIOS_NEEDS__SVID3 1" >>confdefs.h
+printf "%s\n" "#define TERMIOS_NEEDS__SVID3 1" >>confdefs.h
;;
esac
@@ -28034,15 +29171,16 @@ esac
case "$host" in
*-*-hpux[567]*)
-$as_echo "#define NEED_RCVBUF_SLOP 1" >>confdefs.h
+printf "%s\n" "#define NEED_RCVBUF_SLOP 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will open the broadcast socket" >&5
-$as_echo_n "checking if we will open the broadcast socket... " >&6; }
-if ${ntp_cv_var_open_bcast_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will open the broadcast socket" >&5
+printf %s "checking if we will open the broadcast socket... " >&6; }
+if test ${ntp_cv_var_open_bcast_socket+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=yes
case "$host" in
@@ -28053,27 +29191,28 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_open_bcast_socket" >&5
-$as_echo "$ntp_cv_var_open_bcast_socket" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_open_bcast_socket" >&5
+printf "%s\n" "$ntp_cv_var_open_bcast_socket" >&6; }
case "$ntp_cv_var_open_bcast_socket" in
yes)
-$as_echo "#define OPEN_BCAST_SOCKET 1" >>confdefs.h
+printf "%s\n" "#define OPEN_BCAST_SOCKET 1" >>confdefs.h
esac
case "$host" in
*-*-hpux*)
-$as_echo "#define NEED_HPUX_FINDCONFIG 1" >>confdefs.h
+printf "%s\n" "#define NEED_HPUX_FINDCONFIG 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if process groups are set with -pid" >&5
-$as_echo_n "checking if process groups are set with -pid... " >&6; }
-if ${ntp_cv_arg_setpgrp_negpid+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if process groups are set with -pid" >&5
+printf %s "checking if process groups are set with -pid... " >&6; }
+if test ${ntp_cv_arg_setpgrp_negpid+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-*-hpux[567]*)
@@ -28099,20 +29238,21 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_arg_setpgrp_negpid" >&5
-$as_echo "$ntp_cv_arg_setpgrp_negpid" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_arg_setpgrp_negpid" >&5
+printf "%s\n" "$ntp_cv_arg_setpgrp_negpid" >&6; }
case "$ntp_cv_arg_setpgrp_negpid" in
yes)
-$as_echo "#define UDP_BACKWARDS_SETOWN 1" >>confdefs.h
+printf "%s\n" "#define UDP_BACKWARDS_SETOWN 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need a ctty for F_SETOWN" >&5
-$as_echo_n "checking if we need a ctty for F_SETOWN... " >&6; }
-if ${ntp_cv_func_ctty_for_f_setown+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need a ctty for F_SETOWN" >&5
+printf %s "checking if we need a ctty for F_SETOWN... " >&6; }
+if test ${ntp_cv_func_ctty_for_f_setown+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-*-bsdi[23]*)
@@ -28148,20 +29288,21 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_ctty_for_f_setown" >&5
-$as_echo "$ntp_cv_func_ctty_for_f_setown" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_ctty_for_f_setown" >&5
+printf "%s\n" "$ntp_cv_func_ctty_for_f_setown" >&6; }
case "$ntp_cv_func_ctty_for_f_setown" in
yes)
-$as_echo "#define USE_FSETOWNCTTY 1" >>confdefs.h
+printf "%s\n" "#define USE_FSETOWNCTTY 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the OS clears cached routes when more specifics become available" >&5
-$as_echo_n "checking if the OS clears cached routes when more specifics become available... " >&6; }
-if ${ntp_cv_os_routeupdates+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the OS clears cached routes when more specifics become available" >&5
+printf %s "checking if the OS clears cached routes when more specifics become available... " >&6; }
+if test ${ntp_cv_os_routeupdates+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-*-netbsd*)
@@ -28175,20 +29316,21 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_routeupdates" >&5
-$as_echo "$ntp_cv_os_routeupdates" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_routeupdates" >&5
+printf "%s\n" "$ntp_cv_os_routeupdates" >&6; }
case "$ntp_cv_os_routeupdates" in
yes)
-$as_echo "#define OS_MISSES_SPECIFIC_ROUTE_UPDATES 1" >>confdefs.h
+printf "%s\n" "#define OS_MISSES_SPECIFIC_ROUTE_UPDATES 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the wildcard socket needs REUSEADDR to bind other addresses" >&5
-$as_echo_n "checking if the wildcard socket needs REUSEADDR to bind other addresses... " >&6; }
-if ${ntp_cv_os_wildcardreuse+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the wildcard socket needs REUSEADDR to bind other addresses" >&5
+printf %s "checking if the wildcard socket needs REUSEADDR to bind other addresses... " >&6; }
+if test ${ntp_cv_os_wildcardreuse+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-*-*linux*)
@@ -28201,27 +29343,28 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_wildcardreuse" >&5
-$as_echo "$ntp_cv_os_wildcardreuse" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_wildcardreuse" >&5
+printf "%s\n" "$ntp_cv_os_wildcardreuse" >&6; }
case "$ntp_cv_os_wildcardreuse" in
yes)
-$as_echo "#define OS_NEEDS_REUSEADDR_FOR_IFADDRBIND 1" >>confdefs.h
+printf "%s\n" "#define OS_NEEDS_REUSEADDR_FOR_IFADDRBIND 1" >>confdefs.h
esac
case "$host" in
*-*-aix*)
-$as_echo "#define NLIST_EXTRA_INDIRECTION 1" >>confdefs.h
+printf "%s\n" "#define NLIST_EXTRA_INDIRECTION 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a minimum recommended value of tickadj" >&5
-$as_echo_n "checking for a minimum recommended value of tickadj... " >&6; }
-if ${ntp_cv_var_min_rec_tickadj+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a minimum recommended value of tickadj" >&5
+printf %s "checking for a minimum recommended value of tickadj... " >&6; }
+if test ${ntp_cv_var_min_rec_tickadj+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=no
case "$host" in
@@ -28233,24 +29376,23 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_min_rec_tickadj" >&5
-$as_echo "$ntp_cv_var_min_rec_tickadj" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_min_rec_tickadj" >&5
+printf "%s\n" "$ntp_cv_var_min_rec_tickadj" >&6; }
case "$ntp_cv_var_min_rec_tickadj" in
''|no)
;;
*)
-cat >>confdefs.h <<_ACEOF
-#define MIN_REC_TICKADJ $ntp_cv_var_min_rec_tickadj
-_ACEOF
+printf "%s\n" "#define MIN_REC_TICKADJ $ntp_cv_var_min_rec_tickadj" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the TTY code permits PARENB and IGNPAR" >&5
-$as_echo_n "checking if the TTY code permits PARENB and IGNPAR... " >&6; }
-if ${ntp_cv_no_parenb_ignpar+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the TTY code permits PARENB and IGNPAR" >&5
+printf %s "checking if the TTY code permits PARENB and IGNPAR... " >&6; }
+if test ${ntp_cv_no_parenb_ignpar+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=no
case "$host" in
@@ -28273,21 +29415,22 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_no_parenb_ignpar" >&5
-$as_echo "$ntp_cv_no_parenb_ignpar" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_no_parenb_ignpar" >&5
+printf "%s\n" "$ntp_cv_no_parenb_ignpar" >&6; }
case "$ntp_cv_no_parenb_ignpar" in
yes)
-$as_echo "#define NO_PARENB_IGNPAR 1" >>confdefs.h
+printf "%s\n" "#define NO_PARENB_IGNPAR 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including processing time debugging code" >&5
-$as_echo_n "checking if we're including processing time debugging code... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including processing time debugging code" >&5
+printf %s "checking if we're including processing time debugging code... " >&6; }
# Check whether --enable-debug-timing was given.
-if test "${enable_debug_timing+set}" = set; then :
+if test ${enable_debug_timing+y}
+then :
enableval=$enable_debug_timing; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
@@ -28295,36 +29438,36 @@ fi
case "$ntp_ok" in
yes)
-$as_echo "#define DEBUG_TIMING 1" >>confdefs.h
+printf "%s\n" "#define DEBUG_TIMING 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a the number of minutes in a DST adjustment" >&5
-$as_echo_n "checking for a the number of minutes in a DST adjustment... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a the number of minutes in a DST adjustment" >&5
+printf %s "checking for a the number of minutes in a DST adjustment... " >&6; }
# Check whether --enable-dst-minutes was given.
-if test "${enable_dst_minutes+set}" = set; then :
+if test ${enable_dst_minutes+y}
+then :
enableval=$enable_dst_minutes; ans=$enableval
-else
+else $as_nop
ans=60
fi
-cat >>confdefs.h <<_ACEOF
-#define DSTMINUTES $ans
-_ACEOF
+printf "%s\n" "#define DSTMINUTES $ans" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ntpd will retry permanent DNS failures" >&5
-$as_echo_n "checking if ntpd will retry permanent DNS failures... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ntpd will retry permanent DNS failures" >&5
+printf %s "checking if ntpd will retry permanent DNS failures... " >&6; }
# Check whether --enable-ignore-dns-errors was given.
-if test "${enable_ignore_dns_errors+set}" = set; then :
+if test ${enable_ignore_dns_errors+y}
+then :
enableval=$enable_ignore_dns_errors; ans=$enableval
-else
+else $as_nop
ans=no
fi
@@ -28332,17 +29475,18 @@ fi
case "$ans" in
yes)
-$as_echo "#define IGNORE_DNS_ERRORS 1" >>confdefs.h
+printf "%s\n" "#define IGNORE_DNS_ERRORS 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
-$as_echo_n "checking availability of ntp_{adj,get}time()... " >&6; }
-if ${ntp_cv_var_ntp_syscalls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
+printf %s "checking availability of ntp_{adj,get}time()... " >&6; }
+if test ${ntp_cv_var_ntp_syscalls+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ntp_cv_var_ntp_syscalls=no
case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in
@@ -28362,7 +29506,8 @@ else
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_cv_var_ntp_syscalls=kernel
fi
@@ -28372,26 +29517,27 @@ rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_ntp_syscalls" >&5
-$as_echo "$ntp_cv_var_ntp_syscalls" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_ntp_syscalls" >&5
+printf "%s\n" "$ntp_cv_var_ntp_syscalls" >&6; }
case "$ntp_cv_var_ntp_syscalls" in
libc)
-$as_echo "#define NTP_SYSCALLS_LIBC 1" >>confdefs.h
+printf "%s\n" "#define NTP_SYSCALLS_LIBC 1" >>confdefs.h
;;
kernel)
-$as_echo "#define NTP_SYSCALLS_STD 1" >>confdefs.h
+printf "%s\n" "#define NTP_SYSCALLS_STD 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sys/timex.h has STA_FLL" >&5
-$as_echo_n "checking if sys/timex.h has STA_FLL... " >&6; }
-if ${ntp_cv_var_sta_fll+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sys/timex.h has STA_FLL" >&5
+printf %s "checking if sys/timex.h has STA_FLL... " >&6; }
+if test ${ntp_cv_var_sta_fll+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28401,23 +29547,25 @@ else
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_cv_var_sta_fll=yes
-else
+else $as_nop
ntp_cv_var_sta_fll=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_sta_fll" >&5
-$as_echo "$ntp_cv_var_sta_fll" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_sta_fll" >&5
+printf "%s\n" "$ntp_cv_var_sta_fll" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have kernel PLL support" >&5
-$as_echo_n "checking if we have kernel PLL support... " >&6; }
-if ${ntp_cv_var_kernel_pll+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have kernel PLL support" >&5
+printf %s "checking if we have kernel PLL support... " >&6; }
+if test ${ntp_cv_var_kernel_pll+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$ac_cv_header_sys_timex_h$ntp_cv_struct_ntptimeval$ntp_cv_var_sta_fll$ntp_cv_var_ntp_syscalls" in
*no*)
ntp_cv_var_kernel_pll=no
@@ -28428,20 +29576,21 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_kernel_pll" >&5
-$as_echo "$ntp_cv_var_kernel_pll" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_kernel_pll" >&5
+printf "%s\n" "$ntp_cv_var_kernel_pll" >&6; }
case "$ntp_cv_var_kernel_pll" in
yes)
-$as_echo "#define KERNEL_PLL 1" >>confdefs.h
+printf "%s\n" "#define KERNEL_PLL 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIOCGIFCONF returns buffer size in the buffer" >&5
-$as_echo_n "checking if SIOCGIFCONF returns buffer size in the buffer... " >&6; }
-if ${ntp_cv_size_returned_in_buffer+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SIOCGIFCONF returns buffer size in the buffer" >&5
+printf %s "checking if SIOCGIFCONF returns buffer size in the buffer... " >&6; }
+if test ${ntp_cv_size_returned_in_buffer+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=no
case "$host" in
@@ -28459,18 +29608,18 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_size_returned_in_buffer" >&5
-$as_echo "$ntp_cv_size_returned_in_buffer" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_size_returned_in_buffer" >&5
+printf "%s\n" "$ntp_cv_size_returned_in_buffer" >&6; }
case "$ntp_cv_size_returned_in_buffer" in
yes)
-$as_echo "#define SIZE_RETURNED_IN_BUFFER 1" >>confdefs.h
+printf "%s\n" "#define SIZE_RETURNED_IN_BUFFER 1" >>confdefs.h
esac
# Check for ioctls TIOCGPPSEV
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCGPPSEV" >&5
-$as_echo_n "checking for TTY PPS ioctl TIOCGPPSEV... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCGPPSEV" >&5
+printf %s "checking for TTY PPS ioctl TIOCGPPSEV... " >&6; }
case "$ac_cv_header_termios_h" in
yes)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -28482,9 +29631,10 @@ case "$ac_cv_header_termios_h" in
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_ok=yes
-else
+else $as_nop
ntp_ok=no
fi
@@ -28497,15 +29647,15 @@ esac
case "$ntp_ok" in
yes)
-$as_echo "#define HAVE_TIOCGPPSEV 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TIOCGPPSEV 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# Check for ioctls TIOCSPPS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCSPPS" >&5
-$as_echo_n "checking for TTY PPS ioctl TIOCSPPS... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCSPPS" >&5
+printf %s "checking for TTY PPS ioctl TIOCSPPS... " >&6; }
case "$ac_cv_header_termios_h" in
yes)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -28517,9 +29667,10 @@ case "$ac_cv_header_termios_h" in
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_ok=yes
-else
+else $as_nop
ntp_ok=no
fi
@@ -28532,15 +29683,15 @@ esac
case "$ntp_ok" in
yes)
-$as_echo "#define HAVE_TIOCSPPS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TIOCSPPS 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# Check for ioctls CIOGETEV
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl CIOGETEV" >&5
-$as_echo_n "checking for TTY PPS ioctl CIOGETEV... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl CIOGETEV" >&5
+printf %s "checking for TTY PPS ioctl CIOGETEV... " >&6; }
case "$ac_cv_header_sys_ppsclock_h" in
yes)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -28552,9 +29703,10 @@ case "$ac_cv_header_sys_ppsclock_h" in
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_ok=yes
-else
+else $as_nop
ntp_ok=no
fi
@@ -28567,11 +29719,11 @@ esac
case "$ntp_ok" in
yes)
-$as_echo "#define HAVE_CIOGETEV 1" >>confdefs.h
+printf "%s\n" "#define HAVE_CIOGETEV 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# ATOM/PPSAPI stuff.
@@ -28588,7 +29740,7 @@ case "$ac_cv_c_inline$ntp_cv_struct_timespec" in
case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$host_os" in
*yes* | *sunos* | *solaris* | *sco* | *netbsd* )
-$as_echo "#define HAVE_PPSAPI 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PPSAPI 1" >>confdefs.h
ntp_jupiter_ok=yes
ntp_oncore_ok=yes
@@ -28600,16 +29752,16 @@ $as_echo "#define HAVE_PPSAPI 1" >>confdefs.h
esac
# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
-ac_fn_c_check_header_mongrel "$LINENO" "linux/serial.h" "ac_cv_header_linux_serial_h" "$ac_includes_default"
-if test "x$ac_cv_header_linux_serial_h" = xyes; then :
+ac_fn_c_check_header_compile "$LINENO" "linux/serial.h" "ac_cv_header_linux_serial_h" "$ac_includes_default"
+if test "x$ac_cv_header_linux_serial_h" = xyes
+then :
fi
-
case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG" >&5
-$as_echo_n "checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG" >&5
+printf %s "checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28635,15 +29787,16 @@ $as_echo_n "checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_ok=yes
-else
+else $as_nop
ntp_ok=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
;;
*)
ntp_ok=no
@@ -28652,13 +29805,13 @@ esac
case "$ntp_ok" in
yes)
-$as_echo "#define HAVE_TIO_SERIAL_STUFF 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TIO_SERIAL_STUFF 1" >>confdefs.h
esac
# Check for SHMEM_STATUS support
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHMEM_STATUS support" >&5
-$as_echo_n "checking SHMEM_STATUS support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHMEM_STATUS support" >&5
+printf %s "checking SHMEM_STATUS support... " >&6; }
case "$ac_cv_header_sys_mman_h" in
yes)
ntp_ok=yes
@@ -28670,21 +29823,22 @@ esac
case "$ntp_ok" in
yes)
-$as_echo "#define ONCORE_SHMEM_STATUS 1" >>confdefs.h
+printf "%s\n" "#define ONCORE_SHMEM_STATUS 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
ntp_refclock=no
# HPUX only, and by explicit request
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Datum/Bancomm bc635/VME interface" >&5
-$as_echo_n "checking Datum/Bancomm bc635/VME interface... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Datum/Bancomm bc635/VME interface" >&5
+printf %s "checking Datum/Bancomm bc635/VME interface... " >&6; }
# Check whether --enable-BANCOMM was given.
-if test "${enable_BANCOMM+set}" = set; then :
+if test ${enable_BANCOMM+y}
+then :
enableval=$enable_BANCOMM; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
@@ -28693,13 +29847,14 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_BANC 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_BANC 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bcStartPci" >&5
-$as_echo_n "checking for library containing bcStartPci... " >&6; }
-if ${ac_cv_search_bcStartPci+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing bcStartPci" >&5
+printf %s "checking for library containing bcStartPci... " >&6; }
+if test ${ac_cv_search_bcStartPci+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28707,67 +29862,70 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char bcStartPci ();
int
-main ()
+main (void)
{
return bcStartPci ();
;
return 0;
}
_ACEOF
-for ac_lib in '' bcsdk; do
+for ac_lib in '' bcsdk
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_bcStartPci=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_bcStartPci+:} false; then :
+ if test ${ac_cv_search_bcStartPci+y}
+then :
break
fi
done
-if ${ac_cv_search_bcStartPci+:} false; then :
+if test ${ac_cv_search_bcStartPci+y}
+then :
-else
+else $as_nop
ac_cv_search_bcStartPci=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bcStartPci" >&5
-$as_echo "$ac_cv_search_bcStartPci" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bcStartPci" >&5
+printf "%s\n" "$ac_cv_search_bcStartPci" >&6; }
ac_res=$ac_cv_search_bcStartPci
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$host" in
yes*-*-hpux*) ;;
- yes*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
+ yes*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
esac
#HPUX only, and only by explicit request
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking TrueTime GPS receiver/VME interface" >&5
-$as_echo_n "checking TrueTime GPS receiver/VME interface... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TrueTime GPS receiver/VME interface" >&5
+printf %s "checking TrueTime GPS receiver/VME interface... " >&6; }
# Check whether --enable-GPSVME was given.
-if test "${enable_GPSVME+set}" = set; then :
+if test ${enable_GPSVME+y}
+then :
enableval=$enable_GPSVME; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
@@ -28776,24 +29934,24 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_GPSVME 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_GPSVME 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$host" in
yes*-*-hpux*) ;;
- yes*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
+ yes*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCL720 clock support" >&5
-$as_echo_n "checking for PCL720 clock support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCL720 clock support" >&5
+printf %s "checking for PCL720 clock support... " >&6; }
case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
yesyesyes)
-$as_echo "#define CLOCK_PPS720 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_PPS720 1" >>confdefs.h
ans=yes
;;
@@ -28801,25 +29959,26 @@ $as_echo "#define CLOCK_PPS720 1" >>confdefs.h
ans=no
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable non-PARSE clocks" >&5
-$as_echo_n "checking for default inclusion of all suitable non-PARSE clocks... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable non-PARSE clocks" >&5
+printf %s "checking for default inclusion of all suitable non-PARSE clocks... " >&6; }
# Check whether --enable-all-clocks was given.
-if test "${enable_all_clocks+set}" = set; then :
+if test ${enable_all_clocks+y}
+then :
enableval=$enable_all_clocks; ntp_eac=$enableval
-else
+else $as_nop
ntp_eac=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_eac" >&5
-$as_echo "$ntp_eac" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_eac" >&5
+printf "%s\n" "$ntp_eac" >&6; }
# HMS: Should we also require ntp_parse_ok?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have support for PARSE clocks" >&5
-$as_echo_n "checking if we have support for PARSE clocks... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for PARSE clocks" >&5
+printf %s "checking if we have support for PARSE clocks... " >&6; }
case "$ntp_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
yes*yes*)
ntp_canparse=yes
@@ -28827,40 +29986,41 @@ case "$ntp_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
*) ntp_canparse=no
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_canparse" >&5
-$as_echo "$ntp_canparse" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canparse" >&5
+printf "%s\n" "$ntp_canparse" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have support for audio clocks" >&5
-$as_echo_n "checking if we have support for audio clocks... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for audio clocks" >&5
+printf %s "checking if we have support for audio clocks... " >&6; }
case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
ntp_canaudio=yes
-$as_echo "#define HAVE_AUDIO /**/" >>confdefs.h
+printf "%s\n" "#define HAVE_AUDIO /**/" >>confdefs.h
;;
*) ntp_canaudio=no ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_canaudio" >&5
-$as_echo "$ntp_canaudio" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canaudio" >&5
+printf "%s\n" "$ntp_canaudio" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have support for the SHM refclock interface" >&5
-$as_echo_n "checking if we have support for the SHM refclock interface... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for the SHM refclock interface" >&5
+printf %s "checking if we have support for the SHM refclock interface... " >&6; }
case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
yesyes)
ntp_canshm=yes
;;
*) ntp_canshm=no ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_canshm" >&5
-$as_echo "$ntp_canshm" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canshm" >&5
+printf "%s\n" "$ntp_canshm" >&6; }
# Test for termios TIOCMBIS modem control (ACTS, Heath, Palisade)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for termios modem control" >&5
-$as_echo_n "checking for termios modem control... " >&6; }
-if ${ntp_cv_modem_control+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for termios modem control" >&5
+printf %s "checking for termios modem control... " >&6; }
+if test ${ntp_cv_modem_control+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28875,7 +30035,7 @@ else
#endif
int
-main ()
+main (void)
{
int dtr = TIOCM_DTR;
@@ -28887,17 +30047,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_modem_control=yes
-else
+else $as_nop
ntp_cv_modem_control=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_modem_control" >&5
-$as_echo "$ntp_cv_modem_control" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_modem_control" >&5
+printf "%s\n" "$ntp_cv_modem_control" >&6; }
case "$ntp_eac::$ntp_cv_modem_control" in
yes::yes)
ntp_enable_all_modem_control_clocks=yes
@@ -28908,12 +30069,13 @@ case "$ntp_eac::$ntp_cv_modem_control" in
esac
# Requires modem control
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ACTS modem service" >&5
-$as_echo_n "checking ACTS modem service... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ACTS modem service" >&5
+printf %s "checking ACTS modem service... " >&6; }
# Check whether --enable-ACTS was given.
-if test "${enable_ACTS+set}" = set; then :
+if test ${enable_ACTS+y}
+then :
enableval=$enable_ACTS; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_enable_all_modem_control_clocks
fi
@@ -28922,19 +30084,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_ACTS 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_ACTS 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Arbiter 1088A/B GPS receiver" >&5
-$as_echo_n "checking Arbiter 1088A/B GPS receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Arbiter 1088A/B GPS receiver" >&5
+printf %s "checking Arbiter 1088A/B GPS receiver... " >&6; }
# Check whether --enable-ARBITER was given.
-if test "${enable_ARBITER+set}" = set; then :
+if test ${enable_ARBITER+y}
+then :
enableval=$enable_ARBITER; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -28943,19 +30106,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_ARBITER 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_ARBITER 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Arcron MSF receiver" >&5
-$as_echo_n "checking Arcron MSF receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Arcron MSF receiver" >&5
+printf %s "checking Arcron MSF receiver... " >&6; }
# Check whether --enable-ARCRON_MSF was given.
-if test "${enable_ARCRON_MSF+set}" = set; then :
+if test ${enable_ARCRON_MSF+y}
+then :
enableval=$enable_ARCRON_MSF; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -28964,19 +30128,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_ARCRON_MSF 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_ARCRON_MSF 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Austron 2200A/2201A GPS receiver" >&5
-$as_echo_n "checking Austron 2200A/2201A GPS receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Austron 2200A/2201A GPS receiver" >&5
+printf %s "checking Austron 2200A/2201A GPS receiver... " >&6; }
# Check whether --enable-AS2201 was given.
-if test "${enable_AS2201+set}" = set; then :
+if test ${enable_AS2201+y}
+then :
enableval=$enable_AS2201; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -28985,19 +30150,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_AS2201 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_AS2201 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ATOM PPS interface" >&5
-$as_echo_n "checking ATOM PPS interface... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ATOM PPS interface" >&5
+printf %s "checking ATOM PPS interface... " >&6; }
# Check whether --enable-ATOM was given.
-if test "${enable_ATOM+set}" = set; then :
+if test ${enable_ATOM+y}
+then :
enableval=$enable_ATOM; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29009,19 +30175,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_ATOM 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_ATOM 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Chrono-log K-series WWVB receiver" >&5
-$as_echo_n "checking Chrono-log K-series WWVB receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Chrono-log K-series WWVB receiver" >&5
+printf %s "checking Chrono-log K-series WWVB receiver... " >&6; }
# Check whether --enable-CHRONOLOG was given.
-if test "${enable_CHRONOLOG+set}" = set; then :
+if test ${enable_CHRONOLOG+y}
+then :
enableval=$enable_CHRONOLOG; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29030,19 +30197,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_CHRONOLOG 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_CHRONOLOG 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CHU modem/decoder" >&5
-$as_echo_n "checking CHU modem/decoder... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CHU modem/decoder" >&5
+printf %s "checking CHU modem/decoder... " >&6; }
# Check whether --enable-CHU was given.
-if test "${enable_CHU+set}" = set; then :
+if test ${enable_CHU+y}
+then :
enableval=$enable_CHU; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29051,20 +30219,21 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_CHU 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_CHU 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
ntp_refclock_chu=$ntp_ok
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CHU audio/decoder" >&5
-$as_echo_n "checking CHU audio/decoder... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CHU audio/decoder" >&5
+printf %s "checking CHU audio/decoder... " >&6; }
# Check whether --enable-AUDIO-CHU was given.
-if test "${enable_AUDIO_CHU+set}" = set; then :
+if test ${enable_AUDIO_CHU+y}
+then :
enableval=$enable_AUDIO_CHU; ntp_ok=$enableval
-else
+else $as_nop
case "$ntp_eac$ntp_refclock_chu$ntp_canaudio" in
*no*) ntp_ok=no ;;
@@ -29074,21 +30243,22 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# We used to check for sunos/solaris target...
case "$ntp_ok$ntp_refclock_chu$ntp_canaudio" in
- yes*no*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is...no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is...no ***" >&2;}
+ yes*no*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is...no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is...no ***" >&2;}
esac
# Not under HP-UX
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Datum Programmable Time System" >&5
-$as_echo_n "checking Datum Programmable Time System... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Datum Programmable Time System" >&5
+printf %s "checking Datum Programmable Time System... " >&6; }
# Check whether --enable-DATUM was given.
-if test "${enable_DATUM+set}" = set; then :
+if test ${enable_DATUM+y}
+then :
enableval=$enable_DATUM; ntp_ok=$enableval
-else
+else $as_nop
case "$ac_cv_header_termios_h" in
yes)
@@ -29105,19 +30275,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_DATUM 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_DATUM 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Dumb generic hh:mm:ss local clock" >&5
-$as_echo_n "checking Dumb generic hh:mm:ss local clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Dumb generic hh:mm:ss local clock" >&5
+printf %s "checking Dumb generic hh:mm:ss local clock... " >&6; }
# Check whether --enable-DUMBCLOCK was given.
-if test "${enable_DUMBCLOCK+set}" = set; then :
+if test ${enable_DUMBCLOCK+y}
+then :
enableval=$enable_DUMBCLOCK; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29126,19 +30297,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_DUMBCLOCK 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_DUMBCLOCK 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Forum Graphic GPS" >&5
-$as_echo_n "checking Forum Graphic GPS... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Forum Graphic GPS" >&5
+printf %s "checking Forum Graphic GPS... " >&6; }
# Check whether --enable-FG was given.
-if test "${enable_FG+set}" = set; then :
+if test ${enable_FG+y}
+then :
enableval=$enable_FG; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29147,20 +30319,21 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_FG 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_FG 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# Requires modem control
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Heath GC-1000 WWV/WWVH receiver" >&5
-$as_echo_n "checking Heath GC-1000 WWV/WWVH receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Heath GC-1000 WWV/WWVH receiver" >&5
+printf %s "checking Heath GC-1000 WWV/WWVH receiver... " >&6; }
# Check whether --enable-HEATH was given.
-if test "${enable_HEATH+set}" = set; then :
+if test ${enable_HEATH+y}
+then :
enableval=$enable_HEATH; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_enable_all_modem_control_clocks
fi
@@ -29169,19 +30342,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_HEATH 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_HEATH 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hopf serial clock device" >&5
-$as_echo_n "checking for hopf serial clock device... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hopf serial clock device" >&5
+printf %s "checking for hopf serial clock device... " >&6; }
# Check whether --enable-HOPFSERIAL was given.
-if test "${enable_HOPFSERIAL+set}" = set; then :
+if test ${enable_HOPFSERIAL+y}
+then :
enableval=$enable_HOPFSERIAL; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29190,19 +30364,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_HOPF_SERIAL 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_HOPF_SERIAL 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hopf PCI clock 6039" >&5
-$as_echo_n "checking for hopf PCI clock 6039... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hopf PCI clock 6039" >&5
+printf %s "checking for hopf PCI clock 6039... " >&6; }
# Check whether --enable-HOPFPCI was given.
-if test "${enable_HOPFPCI+set}" = set; then :
+if test ${enable_HOPFPCI+y}
+then :
enableval=$enable_HOPFPCI; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29211,19 +30386,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_HOPF_PCI 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_HOPF_PCI 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking HP 58503A GPS receiver" >&5
-$as_echo_n "checking HP 58503A GPS receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HP 58503A GPS receiver" >&5
+printf %s "checking HP 58503A GPS receiver... " >&6; }
# Check whether --enable-HPGPS was given.
-if test "${enable_HPGPS+set}" = set; then :
+if test ${enable_HPGPS+y}
+then :
enableval=$enable_HPGPS; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29232,19 +30408,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_HPGPS 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_HPGPS 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking IRIG audio decoder" >&5
-$as_echo_n "checking IRIG audio decoder... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking IRIG audio decoder" >&5
+printf %s "checking IRIG audio decoder... " >&6; }
# Check whether --enable-IRIG was given.
-if test "${enable_IRIG+set}" = set; then :
+if test ${enable_IRIG+y}
+then :
enableval=$enable_IRIG; ntp_ok=$enableval
-else
+else $as_nop
case "$ntp_eac$ntp_canaudio" in
*no*) ntp_ok=no ;;
@@ -29258,23 +30435,24 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_IRIG 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_IRIG 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canaudio" in
- yesno) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
+ yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JJY receiver" >&5
-$as_echo_n "checking for JJY receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JJY receiver" >&5
+printf %s "checking for JJY receiver... " >&6; }
# Check whether --enable-JJY was given.
-if test "${enable_JJY+set}" = set; then :
+if test ${enable_JJY+y}
+then :
enableval=$enable_JJY; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29283,19 +30461,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_JJY 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_JJY 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Rockwell Jupiter GPS receiver" >&5
-$as_echo_n "checking Rockwell Jupiter GPS receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Rockwell Jupiter GPS receiver" >&5
+printf %s "checking Rockwell Jupiter GPS receiver... " >&6; }
# Check whether --enable-JUPITER was given.
-if test "${enable_JUPITER+set}" = set; then :
+if test ${enable_JUPITER+y}
+then :
enableval=$enable_JUPITER; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29306,19 +30485,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_JUPITER 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_JUPITER 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Leitch CSD 5300 Master Clock System Driver" >&5
-$as_echo_n "checking Leitch CSD 5300 Master Clock System Driver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Leitch CSD 5300 Master Clock System Driver" >&5
+printf %s "checking Leitch CSD 5300 Master Clock System Driver... " >&6; }
# Check whether --enable-LEITCH was given.
-if test "${enable_LEITCH+set}" = set; then :
+if test ${enable_LEITCH+y}
+then :
enableval=$enable_LEITCH; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29327,19 +30507,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_LEITCH 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_LEITCH 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking local clock reference" >&5
-$as_echo_n "checking local clock reference... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking local clock reference" >&5
+printf %s "checking local clock reference... " >&6; }
# Check whether --enable-LOCAL-CLOCK was given.
-if test "${enable_LOCAL_CLOCK+set}" = set; then :
+if test ${enable_LOCAL_CLOCK+y}
+then :
enableval=$enable_LOCAL_CLOCK; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29348,21 +30529,22 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_LOCAL 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_LOCAL 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# Not Ultrix
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Magnavox MX4200 GPS receiver" >&5
-$as_echo_n "checking Magnavox MX4200 GPS receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Magnavox MX4200 GPS receiver" >&5
+printf %s "checking Magnavox MX4200 GPS receiver... " >&6; }
# Check whether --enable-MX4200 was given.
-if test "${enable_MX4200+set}" = set; then :
+if test ${enable_MX4200+y}
+then :
enableval=$enable_MX4200; ntp_ok=$enableval
-else
+else $as_nop
case "$ac_cv_var_ppsclock" in
yes)
@@ -29380,23 +30562,24 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_MX4200 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_MX4200 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$host" in
- yes*-*-ultrix*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
+ yes*-*-ultrix*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NeoClock4X receiver" >&5
-$as_echo_n "checking for NeoClock4X receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NeoClock4X receiver" >&5
+printf %s "checking for NeoClock4X receiver... " >&6; }
# Check whether --enable-NEOCLOCK4X was given.
-if test "${enable_NEOCLOCK4X+set}" = set; then :
+if test ${enable_NEOCLOCK4X+y}
+then :
enableval=$enable_NEOCLOCK4X; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29405,19 +30588,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_NEOCLOCK4X 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_NEOCLOCK4X 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking NMEA GPS receiver" >&5
-$as_echo_n "checking NMEA GPS receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking NMEA GPS receiver" >&5
+printf %s "checking NMEA GPS receiver... " >&6; }
# Check whether --enable-NMEA was given.
-if test "${enable_NMEA+set}" = set; then :
+if test ${enable_NMEA+y}
+then :
enableval=$enable_NMEA; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29426,30 +30610,27 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_NMEA 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_NMEA 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-for ac_func in strtoll
-do :
- ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
-if test "x$ac_cv_func_strtoll" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRTOLL 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
+if test "x$ac_cv_func_strtoll" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
fi
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPSD JSON receiver" >&5
-$as_echo_n "checking for GPSD JSON receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GPSD JSON receiver" >&5
+printf %s "checking for GPSD JSON receiver... " >&6; }
# Check whether --enable-GPSD was given.
-if test "${enable_GPSD+set}" = set; then :
+if test ${enable_GPSD+y}
+then :
enableval=$enable_GPSD; ntp_ok=$enableval
-else
+else $as_nop
case "$ac_cv_func_strtoll" in
yes) ntp_ok=$ntp_eac ;;
*) ntp_ok="no" ;;
@@ -29461,19 +30642,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_GPSDJSON 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_GPSDJSON 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ONCORE Motorola VP/UT Oncore GPS" >&5
-$as_echo_n "checking for ONCORE Motorola VP/UT Oncore GPS... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ONCORE Motorola VP/UT Oncore GPS" >&5
+printf %s "checking for ONCORE Motorola VP/UT Oncore GPS... " >&6; }
# Check whether --enable-ONCORE was given.
-if test "${enable_ONCORE+set}" = set; then :
+if test ${enable_ONCORE+y}
+then :
enableval=$enable_ONCORE; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29485,20 +30667,21 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_ONCORE 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_ONCORE 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# Requires modem control
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Palisade clock" >&5
-$as_echo_n "checking for Palisade clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Palisade clock" >&5
+printf %s "checking for Palisade clock... " >&6; }
# Check whether --enable-PALISADE was given.
-if test "${enable_PALISADE+set}" = set; then :
+if test ${enable_PALISADE+y}
+then :
enableval=$enable_PALISADE; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_enable_all_modem_control_clocks
fi
@@ -29507,19 +30690,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_PALISADE 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_PALISADE 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Conrad parallel port radio clock" >&5
-$as_echo_n "checking Conrad parallel port radio clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Conrad parallel port radio clock" >&5
+printf %s "checking Conrad parallel port radio clock... " >&6; }
# Check whether --enable-PCF was given.
-if test "${enable_PCF+set}" = set; then :
+if test ${enable_PCF+y}
+then :
enableval=$enable_PCF; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29528,19 +30712,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_PCF 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_PCF 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PST/Traconex 1020 WWV/WWVH receiver" >&5
-$as_echo_n "checking PST/Traconex 1020 WWV/WWVH receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PST/Traconex 1020 WWV/WWVH receiver" >&5
+printf %s "checking PST/Traconex 1020 WWV/WWVH receiver... " >&6; }
# Check whether --enable-PST was given.
-if test "${enable_PST+set}" = set; then :
+if test ${enable_PST+y}
+then :
enableval=$enable_PST; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29549,19 +30734,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_PST 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_PST 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking RIPENCC specific Trimble driver" >&5
-$as_echo_n "checking RIPENCC specific Trimble driver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RIPENCC specific Trimble driver" >&5
+printf %s "checking RIPENCC specific Trimble driver... " >&6; }
# Check whether --enable-RIPENCC was given.
-if test "${enable_RIPENCC+set}" = set; then :
+if test ${enable_RIPENCC+y}
+then :
enableval=$enable_RIPENCC; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
@@ -29574,21 +30760,22 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_RIPENCC /**/" >>confdefs.h
+printf "%s\n" "#define CLOCK_RIPENCC /**/" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# Danny Meyer says SHM compiles (with a few warnings) under Win32.
# For *IX, we need sys/ipc.h and sys/shm.h.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHM clock attached thru shared memory" >&5
-$as_echo_n "checking for SHM clock attached thru shared memory... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHM clock attached thru shared memory" >&5
+printf %s "checking for SHM clock attached thru shared memory... " >&6; }
# Check whether --enable-SHM was given.
-if test "${enable_SHM+set}" = set; then :
+if test ${enable_SHM+y}
+then :
enableval=$enable_SHM; ntp_ok=$enableval
-else
+else $as_nop
case "$ntp_eac$ntp_canshm" in
*no*) ntp_ok=no ;;
@@ -29602,19 +30789,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_SHM 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_SHM 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Spectracom 8170/Netclock/2 WWVB receiver" >&5
-$as_echo_n "checking Spectracom 8170/Netclock/2 WWVB receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Spectracom 8170/Netclock/2 WWVB receiver" >&5
+printf %s "checking Spectracom 8170/Netclock/2 WWVB receiver... " >&6; }
# Check whether --enable-SPECTRACOM was given.
-if test "${enable_SPECTRACOM+set}" = set; then :
+if test ${enable_SPECTRACOM+y}
+then :
enableval=$enable_SPECTRACOM; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29623,19 +30811,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_SPECTRACOM 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_SPECTRACOM 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" >&5
-$as_echo_n "checking KSI/Odetics TPRO/S GPS receiver/IRIG interface... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" >&5
+printf %s "checking KSI/Odetics TPRO/S GPS receiver/IRIG interface... " >&6; }
# Check whether --enable-TPRO was given.
-if test "${enable_TPRO+set}" = set; then :
+if test ${enable_TPRO+y}
+then :
enableval=$enable_TPRO; ntp_ok=$enableval
-else
+else $as_nop
case "$ac_cv_header_sys_tpro_h" in
yes)
@@ -29653,24 +30842,25 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_TPRO 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_TPRO 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ac_cv_header_sys_tpro" in
- yesno) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
+ yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
esac
# Not on a vax-dec-bsd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Kinemetrics/TrueTime receivers" >&5
-$as_echo_n "checking Kinemetrics/TrueTime receivers... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Kinemetrics/TrueTime receivers" >&5
+printf %s "checking Kinemetrics/TrueTime receivers... " >&6; }
# Check whether --enable-TRUETIME was given.
-if test "${enable_TRUETIME+set}" = set; then :
+if test ${enable_TRUETIME+y}
+then :
enableval=$enable_TRUETIME; ntp_ok=$enableval
-else
+else $as_nop
case "$host" in
vax-dec-bsd)
@@ -29688,23 +30878,24 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_TRUETIME 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_TRUETIME 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$host" in
- yesvax-dec-bsd) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
+ yesvax-dec-bsd) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking TrueTime 560 IRIG-B decoder" >&5
-$as_echo_n "checking TrueTime 560 IRIG-B decoder... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TrueTime 560 IRIG-B decoder" >&5
+printf %s "checking TrueTime 560 IRIG-B decoder... " >&6; }
# Check whether --enable-TT560 was given.
-if test "${enable_TT560+set}" = set; then :
+if test ${enable_TT560+y}
+then :
enableval=$enable_TT560; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
@@ -29713,19 +30904,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_TT560 /**/" >>confdefs.h
+printf "%s\n" "#define CLOCK_TT560 /**/" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Ultralink M320 WWVB receiver" >&5
-$as_echo_n "checking Ultralink M320 WWVB receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ultralink M320 WWVB receiver" >&5
+printf %s "checking Ultralink M320 WWVB receiver... " >&6; }
# Check whether --enable-ULINK was given.
-if test "${enable_ULINK+set}" = set; then :
+if test ${enable_ULINK+y}
+then :
enableval=$enable_ULINK; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29734,19 +30926,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_ULINK 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_ULINK 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Spectracom TSYNC PCI timing board" >&5
-$as_echo_n "checking Spectracom TSYNC PCI timing board... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Spectracom TSYNC PCI timing board" >&5
+printf %s "checking Spectracom TSYNC PCI timing board... " >&6; }
# Check whether --enable-TSYNCPCI was given.
-if test "${enable_TSYNCPCI+set}" = set; then :
+if test ${enable_TSYNCPCI+y}
+then :
enableval=$enable_TSYNCPCI; ntp_ok=$enableval
-else
+else $as_nop
case "$host" in
*-*-*linux*)
@@ -29763,19 +30956,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_TSYNCPCI 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_TSYNCPCI 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking WWV receiver" >&5
-$as_echo_n "checking WWV receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking WWV receiver" >&5
+printf %s "checking WWV receiver... " >&6; }
# Check whether --enable-WWV was given.
-if test "${enable_WWV+set}" = set; then :
+if test ${enable_WWV+y}
+then :
enableval=$enable_WWV; ntp_ok=$enableval
-else
+else $as_nop
case "$ntp_eac$ntp_canaudio" in
*no*) ntp_ok=no ;;
@@ -29789,23 +30983,24 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_WWV 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_WWV 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canaudio" in
- yesno) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
-$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
+ yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
+printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Zyfer receiver" >&5
-$as_echo_n "checking for Zyfer receiver... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Zyfer receiver" >&5
+printf %s "checking for Zyfer receiver... " >&6; }
# Check whether --enable-ZYFER was given.
-if test "${enable_ZYFER+set}" = set; then :
+if test ${enable_ZYFER+y}
+then :
enableval=$enable_ZYFER; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eac
fi
@@ -29814,19 +31009,20 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
-$as_echo "#define CLOCK_ZYFER 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_ZYFER 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable PARSE clocks" >&5
-$as_echo_n "checking for default inclusion of all suitable PARSE clocks... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable PARSE clocks" >&5
+printf %s "checking for default inclusion of all suitable PARSE clocks... " >&6; }
# Check whether --enable-parse-clocks was given.
-if test "${enable_parse_clocks+set}" = set; then :
+if test ${enable_parse_clocks+y}
+then :
enableval=$enable_parse_clocks; ntp_eapc=$enableval
-else
+else $as_nop
case "$ntp_eac" in
yes) ntp_eapc=$ntp_canparse ;;
@@ -29838,8 +31034,8 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_eapc" >&5
-$as_echo "$ntp_eapc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_eapc" >&5
+printf "%s\n" "$ntp_eapc" >&6; }
case "$ntp_eac$ntp_eapc$ntp_canparse" in
noyes*)
@@ -29854,12 +31050,13 @@ ntp_libparse=no
ntp_parseutil=no
ntp_rawdcf=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Diem Computime Radio Clock" >&5
-$as_echo_n "checking Diem Computime Radio Clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Diem Computime Radio Clock" >&5
+printf %s "checking Diem Computime Radio Clock... " >&6; }
# Check whether --enable-COMPUTIME was given.
-if test "${enable_COMPUTIME+set}" = set; then :
+if test ${enable_COMPUTIME+y}
+then :
enableval=$enable_COMPUTIME; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -29869,23 +31066,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_COMPUTIME 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_COMPUTIME 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ELV/DCF7000 clock" >&5
-$as_echo_n "checking ELV/DCF7000 clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ELV/DCF7000 clock" >&5
+printf %s "checking ELV/DCF7000 clock... " >&6; }
# Check whether --enable-DCF7000 was given.
-if test "${enable_DCF7000+set}" = set; then :
+if test ${enable_DCF7000+y}
+then :
enableval=$enable_DCF7000; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -29895,23 +31093,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_DCF7000 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_DCF7000 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking HOPF 6021 clock" >&5
-$as_echo_n "checking HOPF 6021 clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOPF 6021 clock" >&5
+printf %s "checking HOPF 6021 clock... " >&6; }
# Check whether --enable-HOPF6021 was given.
-if test "${enable_HOPF6021+set}" = set; then :
+if test ${enable_HOPF6021+y}
+then :
enableval=$enable_HOPF6021; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -29921,23 +31120,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_HOPF6021 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_HOPF6021 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Meinberg clocks" >&5
-$as_echo_n "checking Meinberg clocks... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Meinberg clocks" >&5
+printf %s "checking Meinberg clocks... " >&6; }
# Check whether --enable-MEINBERG was given.
-if test "${enable_MEINBERG+set}" = set; then :
+if test ${enable_MEINBERG+y}
+then :
enableval=$enable_MEINBERG; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -29947,23 +31147,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_MEINBERG 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_MEINBERG 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DCF77 raw time code" >&5
-$as_echo_n "checking DCF77 raw time code... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DCF77 raw time code" >&5
+printf %s "checking DCF77 raw time code... " >&6; }
# Check whether --enable-RAWDCF was given.
-if test "${enable_RAWDCF+set}" = set; then :
+if test ${enable_RAWDCF+y}
+then :
enableval=$enable_RAWDCF; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -29975,12 +31176,12 @@ case "$ntp_ok" in
ntp_refclock=yes
ntp_rawdcf=yes
-$as_echo "#define CLOCK_RAWDCF 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_RAWDCF 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
@@ -29988,11 +31189,12 @@ esac
case "$ntp_rawdcf" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we must enable parity for RAWDCF" >&5
-$as_echo_n "checking if we must enable parity for RAWDCF... " >&6; }
-if ${ntp_cv_rawdcf_parity+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we must enable parity for RAWDCF" >&5
+printf %s "checking if we must enable parity for RAWDCF... " >&6; }
+if test ${ntp_cv_rawdcf_parity+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=no
case "$host" in
@@ -30004,22 +31206,23 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rawdcf_parity" >&5
-$as_echo "$ntp_cv_rawdcf_parity" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rawdcf_parity" >&5
+printf "%s\n" "$ntp_cv_rawdcf_parity" >&6; }
case "$ntp_cv_rawdcf_parity" in
yes)
-$as_echo "#define RAWDCF_NO_IGNPAR 1" >>confdefs.h
+printf "%s\n" "#define RAWDCF_NO_IGNPAR 1" >>confdefs.h
;;
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking RCC 8000 clock" >&5
-$as_echo_n "checking RCC 8000 clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RCC 8000 clock" >&5
+printf %s "checking RCC 8000 clock... " >&6; }
# Check whether --enable-RCC8000 was given.
-if test "${enable_RCC8000+set}" = set; then :
+if test ${enable_RCC8000+y}
+then :
enableval=$enable_RCC8000; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -30029,23 +31232,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_RCC8000 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_RCC8000 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Schmid DCF77 clock" >&5
-$as_echo_n "checking Schmid DCF77 clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Schmid DCF77 clock" >&5
+printf %s "checking Schmid DCF77 clock... " >&6; }
# Check whether --enable-SCHMID was given.
-if test "${enable_SCHMID+set}" = set; then :
+if test ${enable_SCHMID+y}
+then :
enableval=$enable_SCHMID; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -30055,23 +31259,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_SCHMID 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_SCHMID 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TAIP protocol" >&5
-$as_echo_n "checking Trimble GPS receiver/TAIP protocol... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TAIP protocol" >&5
+printf %s "checking Trimble GPS receiver/TAIP protocol... " >&6; }
# Check whether --enable-TRIMTAIP was given.
-if test "${enable_TRIMTAIP+set}" = set; then :
+if test ${enable_TRIMTAIP+y}
+then :
enableval=$enable_TRIMTAIP; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -30081,23 +31286,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_TRIMTAIP 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_TRIMTAIP 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TSIP protocol" >&5
-$as_echo_n "checking Trimble GPS receiver/TSIP protocol... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TSIP protocol" >&5
+printf %s "checking Trimble GPS receiver/TSIP protocol... " >&6; }
# Check whether --enable-TRIMTSIP was given.
-if test "${enable_TRIMTSIP+set}" = set; then :
+if test ${enable_TRIMTSIP+y}
+then :
enableval=$enable_TRIMTSIP; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -30107,23 +31313,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_TRIMTSIP 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_TRIMTSIP 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking WHARTON 400A Series clock" >&5
-$as_echo_n "checking WHARTON 400A Series clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking WHARTON 400A Series clock" >&5
+printf %s "checking WHARTON 400A Series clock... " >&6; }
# Check whether --enable-WHARTON was given.
-if test "${enable_WHARTON+set}" = set; then :
+if test ${enable_WHARTON+y}
+then :
enableval=$enable_WHARTON; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -30133,23 +31340,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_WHARTON_400A 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_WHARTON_400A 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking VARITEXT clock" >&5
-$as_echo_n "checking VARITEXT clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking VARITEXT clock" >&5
+printf %s "checking VARITEXT clock... " >&6; }
# Check whether --enable-VARITEXT was given.
-if test "${enable_VARITEXT+set}" = set; then :
+if test ${enable_VARITEXT+y}
+then :
enableval=$enable_VARITEXT; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -30159,23 +31367,24 @@ case "$ntp_ok" in
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_VARITEXT 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_VARITEXT 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SEL240X clock" >&5
-$as_echo_n "checking SEL240X clock... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SEL240X clock" >&5
+printf %s "checking SEL240X clock... " >&6; }
# Check whether --enable-SEL240X was given.
-if test "${enable_SEL240X+set}" = set; then :
+if test ${enable_SEL240X+y}
+then :
enableval=$enable_SEL240X; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=$ntp_eapc
fi
@@ -30183,11 +31392,11 @@ if test "$ntp_ok" = "yes"; then
ntp_libparse=yes
ntp_refclock=yes
-$as_echo "#define CLOCK_SEL240X 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_SEL240X 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
@@ -30199,22 +31408,22 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to make and use the parse libraries" >&5
-$as_echo_n "checking if we need to make and use the parse libraries... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to make and use the parse libraries" >&5
+printf %s "checking if we need to make and use the parse libraries... " >&6; }
ans=no
case "$ntp_libparse" in
yes)
ans=yes
-$as_echo "#define CLOCK_PARSE 1" >>confdefs.h
+printf "%s\n" "#define CLOCK_PARSE 1" >>confdefs.h
LIBPARSE=../libparse/libparse.a
MAKE_LIBPARSE=libparse.a
# HMS: check_y2k trips the 34 year problem now...
false && MAKE_CHECK_Y2K=check_y2k
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
@@ -30225,25 +31434,29 @@ VER_SUFFIX=
# Check whether --with-crypto was given.
-if test "${with_crypto+set}" = set; then :
+if test ${with_crypto+y}
+then :
withval=$with_crypto;
fi
# Check whether --with-openssl-libdir was given.
-if test "${with_openssl_libdir+set}" = set; then :
+if test ${with_openssl_libdir+y}
+then :
withval=$with_openssl_libdir;
fi
# Check whether --with-openssl-incdir was given.
-if test "${with_openssl_incdir+set}" = set; then :
+if test ${with_openssl_incdir+y}
+then :
withval=$with_openssl_incdir;
fi
# Check whether --with-rpath was given.
-if test "${with_rpath+set}" = set; then :
+if test ${with_rpath+y}
+then :
withval=$with_rpath;
fi
@@ -30262,8 +31475,8 @@ case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${wit
no:*) ;;
*:notempty:notgiven:notgiven)
for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
-$as_echo_n "checking pkg-config for $pkg... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
+printf %s "checking pkg-config for $pkg... " >&6; }
if $PKG_CONFIG --exists $pkg ; then
CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
@@ -30278,13 +31491,13 @@ $as_echo_n "checking pkg-config for $pkg... " >&6; }
*.*) ;;
*) ntp_openssl_version='(unknown)' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
-$as_echo "yes, version $ntp_openssl_version" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
+printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
break
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
done
esac
case "$with_crypto:$ntp_openssl" in
@@ -30313,8 +31526,8 @@ case "$with_crypto:$ntp_openssl" in
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
-$as_echo_n "checking for openssl library directory... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
+printf %s "checking for openssl library directory... " >&6; }
with_openssl_libdir=${with_openssl_libdir-notgiven}
case "$with_openssl_libdir" in
notgiven)
@@ -30353,17 +31566,17 @@ $as_echo_n "checking for openssl library directory... " >&6; }
openssl_libdir=$i
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
-$as_echo "$openssl_libdir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
+printf "%s\n" "$openssl_libdir" >&6; }
case "$openssl_libdir" in
no)
openssl_libdir=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
-$as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
+printf "%s\n" "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
-$as_echo_n "checking for openssl include directory... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
+printf %s "checking for openssl include directory... " >&6; }
with_openssl_incdir=${with_openssl_incdir-notgiven}
case "$with_openssl_incdir" in
notgiven)
@@ -30384,13 +31597,13 @@ $as_echo_n "checking for openssl include directory... " >&6; }
;;
esac
{ i=; unset i;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
-$as_echo "$openssl_incdir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
+printf "%s\n" "$openssl_incdir" >&6; }
case "$openssl_incdir" in
no)
openssl_incdir=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
-$as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
+printf "%s\n" "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
esac
if test -z "$openssl_libdir" -o -z "$openssl_incdir"
then
@@ -30428,28 +31641,28 @@ $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_in
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
-$as_echo_n "checking if we will use crypto... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
-$as_echo "$ntp_openssl" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
+printf %s "checking if we will use crypto... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
+printf "%s\n" "$ntp_openssl" >&6; }
case "$ntp_openssl" in
yes)
- for ac_header in openssl/cmac.h openssl/hmac.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_cmac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_hmac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h
-done
+fi
-$as_echo "#define OPENSSL /**/" >>confdefs.h
+printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
case "$VER_SUFFIX" in
*o*) ;;
@@ -30469,11 +31682,12 @@ NTPO_SAVED_LIBS="$LIBS"
case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
yes:no)
LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
-$as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
-if ${ntp_cv_bare_lcrypto+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
+printf %s "checking if linking with -lcrypto alone works... " >&6; }
+if test ${ntp_cv_bare_lcrypto+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -30481,7 +31695,7 @@ else
#include "openssl/evp.h"
int
-main ()
+main (void)
{
ERR_load_crypto_strings();
@@ -30492,26 +31706,28 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_cv_bare_lcrypto=yes
-else
+else $as_nop
ntp_cv_bare_lcrypto=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
-$as_echo "$ntp_cv_bare_lcrypto" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
+printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
case "$ntp_cv_bare_lcrypto" in
no)
LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
-$as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
-if ${ntp_cv_lcrypto_lz+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
+printf %s "checking if linking with -lcrypto -lz works... " >&6; }
+if test ${ntp_cv_lcrypto_lz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -30519,7 +31735,7 @@ else
#include "openssl/evp.h"
int
-main ()
+main (void)
{
ERR_load_crypto_strings();
@@ -30530,18 +31746,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_cv_lcrypto_lz=yes
-else
+else $as_nop
ntp_cv_lcrypto_lz=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
-$as_echo "$ntp_cv_lcrypto_lz" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
+printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
case "$ntp_cv_lcrypto_lz" in
yes)
LDADD_NTP="$LDADD_NTP -lz"
@@ -30573,7 +31790,7 @@ case "$ntp_openssl:$GCC" in
int
-main ()
+main (void)
{
/* see if -Werror breaks gcc */
@@ -30583,13 +31800,14 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gcc_handles_Werror=yes
-else
+else $as_nop
gcc_handles_Werror=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
case "$gcc_handles_Werror" in
no)
# if this gcc doesn't do -Werror go ahead and use
@@ -30610,7 +31828,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include "openssl/x509v3.h"
int
-main ()
+main (void)
{
/* empty body */
@@ -30620,13 +31838,14 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
openssl_triggers_warnings=no
-else
+else $as_nop
openssl_triggers_warnings=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
esac
case "$openssl_triggers_warnings" in
yes)
@@ -30647,16 +31866,12 @@ CFLAGS="$NTPO_SAVED_CFLAGS"
case "$ntp_openssl" in
yes)
LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- for ac_func in EVP_MD_do_all_sorted
-do :
- ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
-if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVP_MD_DO_ALL_SORTED 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
+if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
fi
-done
;;
esac
@@ -30671,57 +31886,59 @@ LIBS="$NTPO_SAVED_LIBS"
{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5
-$as_echo_n "checking if we want to enable CMAC support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5
+printf %s "checking if we want to enable CMAC support... " >&6; }
case "$ac_cv_header_openssl_cmac_h" in
yes)
-$as_echo "#define ENABLE_CMAC 1" >>confdefs.h
+printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
ans="yes"
;;
*) ans="no"
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
-$as_echo_n "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
+printf %s "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
# Check whether --enable-openssl-random was given.
-if test "${enable_openssl_random+set}" = set; then :
+if test ${enable_openssl_random+y}
+then :
enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval
-else
+else $as_nop
ntp_use_openssl_random=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
-$as_echo "$ntp_use_openssl_random" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
+printf "%s\n" "$ntp_use_openssl_random" >&6; }
# The following might need extra libraries
NTPO_SAVED_LIBS="$LIBS"
LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
-for ac_func in RAND_bytes RAND_poll
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
+if test "x$ac_cv_func_RAND_bytes" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
+if test "x$ac_cv_func_RAND_poll" = xyes
+then :
+ printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
fi
-done
LIBS="$NTPO_SAVED_LIBS"
-case "$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
- yesyesyes)
+case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyesyes)
-$as_echo "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
+printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
;;
*) ntp_use_openssl_random=no ;;
@@ -30730,12 +31947,13 @@ esac
# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
-$as_echo_n "checking if we want to include NTP Autokey protocol support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
+printf %s "checking if we want to include NTP Autokey protocol support... " >&6; }
# Check whether --enable-autokey was given.
-if test "${enable_autokey+set}" = set; then :
+if test ${enable_autokey+y}
+then :
enableval=$enable_autokey; ntp_autokey=$enableval
-else
+else $as_nop
ntp_autokey=$ntp_openssl
fi
@@ -30746,25 +31964,25 @@ case "$ntp_autokey" in
*)
case "$ntp_openssl" in
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5
-$as_echo "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5
+printf "%s\n" "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;}
ntp_autokey=no
;;
*)
-$as_echo "#define AUTOKEY 1" >>confdefs.h
+printf "%s\n" "#define AUTOKEY 1" >>confdefs.h
ntp_autokey=yes
;;
esac
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
-$as_echo "$ntp_autokey" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
+printf "%s\n" "$ntp_autokey" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to run check-layout" >&5
-$as_echo_n "checking if we want to run check-layout... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to run check-layout" >&5
+printf %s "checking if we want to run check-layout... " >&6; }
case "$cross_compiling$PATH_PERL" in
no/*)
MAKE_CHECK_LAYOUT=check-layout
@@ -30774,13 +31992,13 @@ case "$cross_compiling$PATH_PERL" in
ans=no
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make dcf parse utilities" >&5
-$as_echo_n "checking if we can make dcf parse utilities... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make dcf parse utilities" >&5
+printf %s "checking if we can make dcf parse utilities... " >&6; }
ans=no
case "$ntp_parseutil" in
yes)
@@ -30792,12 +32010,12 @@ case "$ntp_parseutil" in
esac
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can build kernel streams modules for parse" >&5
-$as_echo_n "checking if we can build kernel streams modules for parse... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can build kernel streams modules for parse" >&5
+printf %s "checking if we can build kernel streams modules for parse... " >&6; }
ans=no
case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
yesyes)
@@ -30806,7 +32024,7 @@ case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
case "$ntp_cv_var_kernel_pll" in
yes)
-$as_echo "#define PPS_SYNC 1" >>confdefs.h
+printf "%s\n" "#define PPS_SYNC 1" >>confdefs.h
;;
esac
@@ -30816,43 +32034,38 @@ $as_echo "#define PPS_SYNC 1" >>confdefs.h
sparc-*-solaris2*)
ans=parsesolaris
MAKE_PARSEKMODULE=parse
- for ac_header in strings.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
-if test "x$ac_cv_header_strings_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRINGS_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
+if test "x$ac_cv_header_strings_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
fi
-done
-
;;
esac
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need basic refclock support" >&5
-$as_echo_n "checking if we need basic refclock support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need basic refclock support" >&5
+printf %s "checking if we need basic refclock support... " >&6; }
case "$ntp_refclock" in
yes)
-$as_echo "#define REFCLOCK 1" >>confdefs.h
+printf "%s\n" "#define REFCLOCK 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_refclock" >&5
-$as_echo "$ntp_refclock" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_refclock" >&5
+printf "%s\n" "$ntp_refclock" >&6; }
PROPDELAY=propdelay
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want HP-UX adjtimed support" >&5
-$as_echo_n "checking if we want HP-UX adjtimed support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want HP-UX adjtimed support" >&5
+printf %s "checking if we want HP-UX adjtimed support... " >&6; }
case "$host" in
*-*-hpux[56789]*)
ans=yes
@@ -30864,7 +32077,7 @@ case "$ans" in
yes)
MAKE_ADJTIMED=adjtimed
-$as_echo "#define NEED_HPUX_ADJTIME 1" >>confdefs.h
+printf "%s\n" "#define NEED_HPUX_ADJTIME 1" >>confdefs.h
;;
*) ADJTIMED_DB=
@@ -30873,11 +32086,11 @@ $as_echo "#define NEED_HPUX_ADJTIME 1" >>confdefs.h
ADJTIMED_MS=
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want QNX adjtime support" >&5
-$as_echo_n "checking if we want QNX adjtime support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want QNX adjtime support" >&5
+printf %s "checking if we want QNX adjtime support... " >&6; }
case "$host" in
*-*-qnx*)
ans=yes
@@ -30888,15 +32101,15 @@ esac
case "$ans" in
yes)
-$as_echo "#define NEED_QNX_ADJTIME 1" >>confdefs.h
+printf "%s\n" "#define NEED_QNX_ADJTIME 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can read kmem" >&5
-$as_echo_n "checking if we can read kmem... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can read kmem" >&5
+printf %s "checking if we can read kmem... " >&6; }
# the default is to enable it if the system has the capability
@@ -30931,14 +32144,15 @@ esac
# --enable-kmem / --disable-kmem controls if present
# Check whether --enable-kmem was given.
-if test "${enable_kmem+set}" = set; then :
+if test ${enable_kmem+y}
+then :
enableval=$enable_kmem; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
@@ -30947,13 +32161,13 @@ case "$ans" in
*)
can_kmem=no
-$as_echo "#define NOKMEM 1" >>confdefs.h
+printf "%s\n" "#define NOKMEM 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if adjtime is accurate" >&5
-$as_echo_n "checking if adjtime is accurate... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if adjtime is accurate" >&5
+printf %s "checking if adjtime is accurate... " >&6; }
# target-dependent defaults
@@ -30993,19 +32207,20 @@ esac
# --enable-accurate-adjtime / --disable-accurate-adjtime
# override the default
# Check whether --enable-accurate-adjtime was given.
-if test "${enable_accurate_adjtime+set}" = set; then :
+if test ${enable_accurate_adjtime+y}
+then :
enableval=$enable_accurate_adjtime; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define ADJTIME_IS_ACCURATE 1" >>confdefs.h
+printf "%s\n" "#define ADJTIME_IS_ACCURATE 1" >>confdefs.h
adjtime_is_accurate=yes
;;
@@ -31014,11 +32229,12 @@ $as_echo "#define ADJTIME_IS_ACCURATE 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name of 'tick' in the kernel" >&5
-$as_echo_n "checking the name of 'tick' in the kernel... " >&6; }
-if ${ntp_cv_nlist_tick+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name of 'tick' in the kernel" >&5
+printf %s "checking the name of 'tick' in the kernel... " >&6; }
+if test ${ntp_cv_nlist_tick+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=_tick
case "$host" in
@@ -31055,24 +32271,23 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tick" >&5
-$as_echo "$ntp_cv_nlist_tick" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tick" >&5
+printf "%s\n" "$ntp_cv_nlist_tick" >&6; }
case "$ntp_cv_nlist_tick" in
''|no)
;; # HMS: I think we can only get 'no' here...
*)
-cat >>confdefs.h <<_ACEOF
-#define K_TICK_NAME "$ntp_cv_nlist_tick"
-_ACEOF
+printf "%s\n" "#define K_TICK_NAME \"$ntp_cv_nlist_tick\"" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the units of 'tick'" >&5
-$as_echo_n "checking for the units of 'tick'... " >&6; }
-if ${ntp_cv_tick_nano+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the units of 'tick'" >&5
+printf %s "checking for the units of 'tick'... " >&6; }
+if test ${ntp_cv_tick_nano+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=usec
case "$host" in
@@ -31084,20 +32299,21 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tick_nano" >&5
-$as_echo "$ntp_cv_tick_nano" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tick_nano" >&5
+printf "%s\n" "$ntp_cv_tick_nano" >&6; }
case "$ntp_cv_tick_nano" in
nsec)
-$as_echo "#define TICK_NANO 1" >>confdefs.h
+printf "%s\n" "#define TICK_NANO 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name of 'tickadj' in the kernel" >&5
-$as_echo_n "checking the name of 'tickadj' in the kernel... " >&6; }
-if ${ntp_cv_nlist_tickadj+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name of 'tickadj' in the kernel" >&5
+printf %s "checking the name of 'tickadj' in the kernel... " >&6; }
+if test ${ntp_cv_nlist_tickadj+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=_tickadj
case "$host" in
@@ -31142,24 +32358,23 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tickadj" >&5
-$as_echo "$ntp_cv_nlist_tickadj" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tickadj" >&5
+printf "%s\n" "$ntp_cv_nlist_tickadj" >&6; }
case "$ntp_cv_nlist_tickadj" in
''|no)
;; # HMS: I think we can only get 'no' here...
*)
-cat >>confdefs.h <<_ACEOF
-#define K_TICKADJ_NAME "$ntp_cv_nlist_tickadj"
-_ACEOF
+printf "%s\n" "#define K_TICKADJ_NAME \"$ntp_cv_nlist_tickadj\"" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the units of 'tickadj'" >&5
-$as_echo_n "checking for the units of 'tickadj'... " >&6; }
-if ${ntp_cv_tickadj_nano+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the units of 'tickadj'" >&5
+printf %s "checking for the units of 'tickadj'... " >&6; }
+if test ${ntp_cv_tickadj_nano+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ans=usec
case "$host" in
@@ -31171,20 +32386,21 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tickadj_nano" >&5
-$as_echo "$ntp_cv_tickadj_nano" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tickadj_nano" >&5
+printf "%s\n" "$ntp_cv_tickadj_nano" >&6; }
case "$ntp_cv_tickadj_nano" in
nsec)
-$as_echo "#define TICKADJ_NANO 1" >>confdefs.h
+printf "%s\n" "#define TICKADJ_NANO 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'dosynctodr' in the kernel" >&5
-$as_echo_n "checking half-heartedly for 'dosynctodr' in the kernel... " >&6; }
-if ${ntp_cv_nlist_dosynctodr+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'dosynctodr' in the kernel" >&5
+printf %s "checking half-heartedly for 'dosynctodr' in the kernel... " >&6; }
+if test ${ntp_cv_nlist_dosynctodr+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-apple-aux[23]*)
@@ -31231,25 +32447,24 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_dosynctodr" >&5
-$as_echo "$ntp_cv_nlist_dosynctodr" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_dosynctodr" >&5
+printf "%s\n" "$ntp_cv_nlist_dosynctodr" >&6; }
case "$ntp_cv_nlist_dosynctodr" in
no)
;;
*)
-cat >>confdefs.h <<_ACEOF
-#define K_DOSYNCTODR_NAME "$ntp_cv_nlist_dosynctodr"
-_ACEOF
+printf "%s\n" "#define K_DOSYNCTODR_NAME \"$ntp_cv_nlist_dosynctodr\"" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'noprintf' in the kernel" >&5
-$as_echo_n "checking half-heartedly for 'noprintf' in the kernel... " >&6; }
-if ${ntp_cv_nlist_noprintf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'noprintf' in the kernel" >&5
+printf %s "checking half-heartedly for 'noprintf' in the kernel... " >&6; }
+if test ${ntp_cv_nlist_noprintf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-apple-aux[23]*)
@@ -31290,16 +32505,14 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_noprintf" >&5
-$as_echo "$ntp_cv_nlist_noprintf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_noprintf" >&5
+printf "%s\n" "$ntp_cv_nlist_noprintf" >&6; }
case "$ntp_cv_nlist_noprintf" in
no)
;;
*)
-cat >>confdefs.h <<_ACEOF
-#define K_NOPRINTF_NAME "$ntp_cv_nlist_noprintf"
-_ACEOF
+printf "%s\n" "#define K_NOPRINTF_NAME \"$ntp_cv_nlist_noprintf\"" >>confdefs.h
;;
esac
@@ -31307,8 +32520,8 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tick'" >&5
-$as_echo_n "checking for a default value for 'tick'... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tick'" >&5
+printf %s "checking for a default value for 'tick'... " >&6; }
# target-dependent default for tick
@@ -31340,28 +32553,27 @@ case "$host" in
esac
# Check whether --enable-tick was given.
-if test "${enable_tick+set}" = set; then :
+if test ${enable_tick+y}
+then :
enableval=$enable_tick; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
''|no)
;; # HMS: I think we can only get 'no' here...
*)
-cat >>confdefs.h <<_ACEOF
-#define PRESET_TICK $ans
-_ACEOF
+printf "%s\n" "#define PRESET_TICK $ans" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tickadj'" >&5
-$as_echo_n "checking for a default value for 'tickadj'... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tickadj'" >&5
+printf %s "checking for a default value for 'tickadj'... " >&6; }
# target-specific default
ans='500/hz'
@@ -31414,14 +32626,15 @@ case "$host" in
esac
# Check whether --enable-tickadj was given.
-if test "${enable_tickadj+set}" = set; then :
+if test ${enable_tickadj+y}
+then :
enableval=$enable_tickadj; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
default_tickadj=$ans
@@ -31430,9 +32643,7 @@ case "$default_tickadj" in
;; # HMS: I think we can only get 'no' here...
*)
-cat >>confdefs.h <<_ACEOF
-#define PRESET_TICKADJ $default_tickadj
-_ACEOF
+printf "%s\n" "#define PRESET_TICKADJ $default_tickadj" >>confdefs.h
;;
esac
@@ -31443,32 +32654,32 @@ esac
case "$host" in
mips-sni-sysv4*)
-$as_echo "#define RELIANTUNIX_CLOCK 1" >>confdefs.h
+printf "%s\n" "#define RELIANTUNIX_CLOCK 1" >>confdefs.h
esac
case "$host" in
*-*-sco3.2v5*)
-$as_echo "#define SCO5_CLOCK 1" >>confdefs.h
+printf "%s\n" "#define SCO5_CLOCK 1" >>confdefs.h
esac
ntp_cv_make_tickadj=yes
case "$can_kmem$ac_cv_var_tick$default_tickadj" in
nonono) # Don't read KMEM, no presets. Bogus.
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj." >&5
-$as_echo "$as_me: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj." >&5
+printf "%s\n" "$as_me: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj." >&2;}
ntp_cv_make_tickadj=no
;;
nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICK. No tickadj." >&5
-$as_echo "$as_me: WARNING: Can't read kmem but no PRESET_TICK. No tickadj." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICK. No tickadj." >&5
+printf "%s\n" "$as_me: WARNING: Can't read kmem but no PRESET_TICK. No tickadj." >&2;}
ntp_cv_make_tickadj=no
;;
no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICKADJ. No tickadj." >&5
-$as_echo "$as_me: WARNING: Can't read kmem but no PRESET_TICKADJ. No tickadj." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICKADJ. No tickadj." >&5
+printf "%s\n" "$as_me: WARNING: Can't read kmem but no PRESET_TICKADJ. No tickadj." >&2;}
ntp_cv_make_tickadj=no
;;
no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
@@ -31476,8 +32687,8 @@ $as_echo "$as_me: WARNING: Can't read kmem but no PRESET_TICKADJ. No tickadj."
yesnono) # Read KMEM, no presets. Cool.
;;
yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK. Please report this." >&5
-$as_echo "$as_me: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK. Please report this." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK. Please report this." >&5
+printf "%s\n" "$as_me: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK. Please report this." >&2;}
;;
yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
;;
@@ -31489,11 +32700,12 @@ $as_echo "$as_me: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK. Pleas
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want and can make the ntptime utility" >&5
-$as_echo_n "checking if we want and can make the ntptime utility... " >&6; }
-if ${ac_cv_make_ntptime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the ntptime utility" >&5
+printf %s "checking if we want and can make the ntptime utility... " >&6; }
+if test ${ac_cv_make_ntptime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*) case "$ntp_cv_struct_ntptimeval$ntp_cv_var_kernel_pll" in
yesyes)
@@ -31507,8 +32719,8 @@ else
esac
ac_cv_make_ntptime=$ans
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_make_ntptime" >&5
-$as_echo "$ac_cv_make_ntptime" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_make_ntptime" >&5
+printf "%s\n" "$ac_cv_make_ntptime" >&6; }
case "$ac_cv_make_ntptime" in
yes)
MAKE_NTPTIME=ntptime
@@ -31555,16 +32767,17 @@ esac
#
{ ntp_cv_make_tickadj=; unset ntp_cv_make_tickadj;}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want and can make the tickadj utility" >&5
-$as_echo_n "checking if we want and can make the tickadj utility... " >&6; }
-if ${ntp_cv_make_tickadj+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the tickadj utility" >&5
+printf %s "checking if we want and can make the tickadj utility... " >&6; }
+if test ${ntp_cv_make_tickadj+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ntp_cv_make_tickadj=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_tickadj" >&5
-$as_echo "$ntp_cv_make_tickadj" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_tickadj" >&5
+printf "%s\n" "$ntp_cv_make_tickadj" >&6; }
case "$ntp_cv_make_tickadj" in
yes)
MAKE_TICKADJ=tickadj
@@ -31582,11 +32795,12 @@ case "$ntp_cv_make_tickadj" in
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want and can make the timetrim utility" >&5
-$as_echo_n "checking if we want and can make the timetrim utility... " >&6; }
-if ${ntp_cv_make_timetrim+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the timetrim utility" >&5
+printf %s "checking if we want and can make the timetrim utility... " >&6; }
+if test ${ntp_cv_make_timetrim+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-*-irix*)
@@ -31602,8 +32816,8 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_timetrim" >&5
-$as_echo "$ntp_cv_make_timetrim" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_timetrim" >&5
+printf "%s\n" "$ntp_cv_make_timetrim" >&6; }
case "$ntp_cv_make_timetrim" in
yes)
MAKE_TIMETRIM=timetrim
@@ -31618,18 +32832,19 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to build the NTPD simulator" >&5
-$as_echo_n "checking if we want to build the NTPD simulator... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to build the NTPD simulator" >&5
+printf %s "checking if we want to build the NTPD simulator... " >&6; }
# Check whether --enable-simulator was given.
-if test "${enable_simulator+set}" = set; then :
+if test ${enable_simulator+y}
+then :
enableval=$enable_simulator; ans=$enableval
-else
+else $as_nop
ans=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
MAKE_NTPDSIM=ntpdsim
@@ -31656,13 +32871,14 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
-$as_echo_n "checking if sntp will be built... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
+printf %s "checking if sntp will be built... " >&6; }
# Check whether --with-sntp was given.
-if test "${with_sntp+set}" = set; then :
+if test ${with_sntp+y}
+then :
withval=$with_sntp;
-else
+else $as_nop
with_sntp="${withsntp=yes}"
fi
@@ -31684,18 +32900,19 @@ else
BUILD_SNTP_FALSE=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
-$as_echo "$with_sntp" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
+printf "%s\n" "$with_sntp" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to build ntpsnmpd" >&5
-$as_echo_n "checking if we want to build ntpsnmpd... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to build ntpsnmpd" >&5
+printf %s "checking if we want to build ntpsnmpd... " >&6; }
# Check whether --with-ntpsnmpd was given.
-if test "${with_ntpsnmpd+set}" = set; then :
+if test ${with_ntpsnmpd+y}
+then :
withval=$with_ntpsnmpd; ans=$withval
-else
+else $as_nop
case "$PATH_NET_SNMP_CONFIG" in
/*) ans=yes ;;
@@ -31705,8 +32922,8 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
case "$PATH_NET_SNMP_CONFIG" in
@@ -31740,25 +32957,26 @@ case "$ans" in
CFLAGS=$SNMP_CFLAGS
CPPFLAGS=$SNMP_CPPFLAGS
- ac_fn_c_check_header_mongrel "$LINENO" "net-snmp/net-snmp-config.h" "ac_cv_header_net_snmp_net_snmp_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = xyes; then :
+ ac_fn_c_check_header_compile "$LINENO" "net-snmp/net-snmp-config.h" "ac_cv_header_net_snmp_net_snmp_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = xyes
+then :
MAKE_NTPSNMPD=ntpsnmpd
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: net-snmp-config present but net-snmp headers are not available!" >&5
-$as_echo "$as_me: WARNING: net-snmp-config present but net-snmp headers are not available!" >&2;}
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: net-snmp-config present but net-snmp headers are not available!" >&5
+printf "%s\n" "$as_me: WARNING: net-snmp-config present but net-snmp headers are not available!" >&2;}
fi
-
# Do this last, as we're messing up LIBS.
# check -lnetsnmp for netsnmp_daemonize
LIBS=`$PATH_NET_SNMP_CONFIG --libs`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for netsnmp_daemonize in -lnetsnmp" >&5
-$as_echo_n "checking for netsnmp_daemonize in -lnetsnmp... " >&6; }
-if ${ac_cv_lib_netsnmp_netsnmp_daemonize+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for netsnmp_daemonize in -lnetsnmp" >&5
+printf %s "checking for netsnmp_daemonize in -lnetsnmp... " >&6; }
+if test ${ac_cv_lib_netsnmp_netsnmp_daemonize+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnetsnmp $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -31767,32 +32985,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char netsnmp_daemonize ();
int
-main ()
+main (void)
{
return netsnmp_daemonize ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_netsnmp_netsnmp_daemonize=yes
-else
+else $as_nop
ac_cv_lib_netsnmp_netsnmp_daemonize=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_netsnmp_daemonize" >&5
-$as_echo "$ac_cv_lib_netsnmp_netsnmp_daemonize" >&6; }
-if test "x$ac_cv_lib_netsnmp_netsnmp_daemonize" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_netsnmp_daemonize" >&5
+printf "%s\n" "$ac_cv_lib_netsnmp_netsnmp_daemonize" >&6; }
+if test "x$ac_cv_lib_netsnmp_netsnmp_daemonize" = xyes
+then :
ans=yes
-else
+else $as_nop
ans=no
fi
@@ -31800,7 +33017,7 @@ fi
case "$ans" in
no)
-$as_echo "#define NEED_NETSNMP_DAEMONIZE 1" >>confdefs.h
+printf "%s\n" "#define NEED_NETSNMP_DAEMONIZE 1" >>confdefs.h
esac
@@ -31812,8 +33029,8 @@ $as_echo "#define NEED_NETSNMP_DAEMONIZE 1" >>confdefs.h
{ save_LIBS=; unset save_LIBS;}
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&5
-$as_echo "$as_me: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&5
+printf "%s\n" "$as_me: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&2;}
;;
esac
;;
@@ -31829,8 +33046,8 @@ case "$MAKE_NTPSNMPD" in
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should always slew the time" >&5
-$as_echo_n "checking if we should always slew the time... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should always slew the time" >&5
+printf %s "checking if we should always slew the time... " >&6; }
# target-specific defaults
@@ -31854,24 +33071,25 @@ esac
# --enable-slew-always / --disable-slew-always overrides default
# Check whether --enable-slew-always was given.
-if test "${enable_slew_always+set}" = set; then :
+if test ${enable_slew_always+y}
+then :
enableval=$enable_slew_always; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define SLEWALWAYS 1" >>confdefs.h
+printf "%s\n" "#define SLEWALWAYS 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should step and slew the time" >&5
-$as_echo_n "checking if we should step and slew the time... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should step and slew the time" >&5
+printf %s "checking if we should step and slew the time... " >&6; }
case "$host" in
*-sni-sysv*)
@@ -31900,24 +33118,25 @@ case "$host" in
esac
# Check whether --enable-step-slew was given.
-if test "${enable_step_slew+set}" = set; then :
+if test ${enable_step_slew+y}
+then :
enableval=$enable_step_slew; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define STEP_SLEW 1" >>confdefs.h
+printf "%s\n" "#define STEP_SLEW 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ntpdate should step the time" >&5
-$as_echo_n "checking if ntpdate should step the time... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ntpdate should step the time" >&5
+printf %s "checking if ntpdate should step the time... " >&6; }
case "$host" in
*-apple-aux[23]*)
@@ -31928,25 +33147,26 @@ case "$host" in
esac
# Check whether --enable-ntpdate-step was given.
-if test "${enable_ntpdate_step+set}" = set; then :
+if test ${enable_ntpdate_step+y}
+then :
enableval=$enable_ntpdate_step; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define FORCE_NTPDATE_STEP 1" >>confdefs.h
+printf "%s\n" "#define FORCE_NTPDATE_STEP 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should sync TODR clock every hour" >&5
-$as_echo_n "checking if we should sync TODR clock every hour... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should sync TODR clock every hour" >&5
+printf %s "checking if we should sync TODR clock every hour... " >&6; }
case "$host" in
*-*-nextstep*)
@@ -31961,25 +33181,26 @@ case "$host" in
esac
# Check whether --enable-hourly-todr-sync was given.
-if test "${enable_hourly_todr_sync+set}" = set; then :
+if test ${enable_hourly_todr_sync+y}
+then :
enableval=$enable_hourly_todr_sync; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ac_cv_var_sync_todr" in
yes)
-$as_echo "#define DOSYNCTODR 1" >>confdefs.h
+printf "%s\n" "#define DOSYNCTODR 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should avoid kernel FLL bug" >&5
-$as_echo_n "checking if we should avoid kernel FLL bug... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should avoid kernel FLL bug" >&5
+printf %s "checking if we should avoid kernel FLL bug... " >&6; }
case "$host" in
*-*-solaris2.6)
@@ -32030,85 +33251,110 @@ case "$host" in
esac
# Check whether --enable-kernel-fll-bug was given.
-if test "${enable_kernel_fll_bug+set}" = set; then :
+if test ${enable_kernel_fll_bug+y}
+then :
enableval=$enable_kernel_fll_bug; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define KERNEL_FLL_BUG 1" >>confdefs.h
+printf "%s\n" "#define KERNEL_FLL_BUG 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want new session key behavior" >&5
-$as_echo_n "checking if we want new session key behavior... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want new session key behavior" >&5
+printf %s "checking if we want new session key behavior... " >&6; }
# Check whether --enable-bug1243-fix was given.
-if test "${enable_bug1243_fix+set}" = set; then :
+if test ${enable_bug1243_fix+y}
+then :
enableval=$enable_bug1243_fix; ans=$enableval
-else
+else $as_nop
ans=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
no)
-$as_echo "#define DISABLE_BUG1243_FIX 1" >>confdefs.h
+printf "%s\n" "#define DISABLE_BUG1243_FIX 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want the explicit 127.0.0.0/8 martian filter" >&5
-$as_echo_n "checking if we want the explicit 127.0.0.0/8 martian filter... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the explicit 127.0.0.0/8 martian filter" >&5
+printf %s "checking if we want the explicit 127.0.0.0/8 martian filter... " >&6; }
# Check whether --enable-bug3020-fix was given.
-if test "${enable_bug3020_fix+set}" = set; then :
+if test ${enable_bug3020_fix+y}
+then :
enableval=$enable_bug3020_fix; ans=$enableval
-else
+else $as_nop
ans=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define ENABLE_BUG3020_FIX 1" >>confdefs.h
+printf "%s\n" "#define ENABLE_BUG3020_FIX 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want correct mode7 fudgetime2 behavior" >&5
-$as_echo_n "checking if we want correct mode7 fudgetime2 behavior... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want correct mode7 fudgetime2 behavior" >&5
+printf %s "checking if we want correct mode7 fudgetime2 behavior... " >&6; }
# Check whether --enable-bug3527-fix was given.
-if test "${enable_bug3527_fix+set}" = set; then :
+if test ${enable_bug3527_fix+y}
+then :
enableval=$enable_bug3527_fix; ans=$enableval
-else
+else $as_nop
+ ans=yes
+
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
+case "$ans" in
+ no)
+
+printf "%s\n" "#define DISABLE_BUG3527_FIX 1" >>confdefs.h
+
+esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want a debug assert on an OOB KoD RATE value" >&5
+printf %s "checking if we want a debug assert on an OOB KoD RATE value... " >&6; }
+# Check whether --enable-bug3767-fix was given.
+if test ${enable_bug3767_fix+y}
+then :
+ enableval=$enable_bug3767_fix; ans=$enableval
+else $as_nop
ans=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
no)
-$as_echo "#define DISABLE_BUG3527_FIX 1" >>confdefs.h
+printf "%s\n" "#define DISABLE_BUG3767_FIX 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use the IRIG sawtooth filter" >&5
-$as_echo_n "checking if we should use the IRIG sawtooth filter... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use the IRIG sawtooth filter" >&5
+printf %s "checking if we should use the IRIG sawtooth filter... " >&6; }
case "$host" in
*-*-solaris2.[89])
@@ -32122,56 +33368,59 @@ case "$host" in
esac
# Check whether --enable-irig-sawtooth was given.
-if test "${enable_irig_sawtooth+set}" = set; then :
+if test ${enable_irig_sawtooth+y}
+then :
enableval=$enable_irig_sawtooth; ans=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define IRIG_SUCKS 1" >>confdefs.h
+printf "%s\n" "#define IRIG_SUCKS 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
-$as_echo_n "checking if we should enable NIST lockclock scheme... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
+printf %s "checking if we should enable NIST lockclock scheme... " >&6; }
# Check whether --enable-nist was given.
-if test "${enable_nist+set}" = set; then :
+if test ${enable_nist+y}
+then :
enableval=$enable_nist; ans=$enableval
-else
+else $as_nop
ans=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
yes)
-$as_echo "#define LOCKCLOCK 1" >>confdefs.h
+printf "%s\n" "#define LOCKCLOCK 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
-$as_echo_n "checking if we want support for Samba's signing daemon... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
+printf %s "checking if we want support for Samba's signing daemon... " >&6; }
# Check whether --enable-ntp-signd was given.
-if test "${enable_ntp_signd+set}" = set; then :
+if test ${enable_ntp_signd+y}
+then :
enableval=$enable_ntp_signd; ans=$enableval
-else
+else $as_nop
ans=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ans" in
no)
@@ -32189,27 +33438,60 @@ case "$ntp_signd_path" in
;;
*)
-$as_echo "#define HAVE_NTP_SIGND 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NTP_SIGND 1" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define NTP_SIGND_PATH "$ntp_signd_path"
-_ACEOF
+printf "%s\n" "#define NTP_SIGND_PATH \"$ntp_signd_path\"" >>confdefs.h
;;
esac
-for ac_header in libscf.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "libscf.h" "ac_cv_header_libscf_h" "$ac_includes_default"
-if test "x$ac_cv_header_libscf_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSCF_H 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want 'magic' PPS support" >&5
+printf %s "checking if we want 'magic' PPS support... " >&6; }
+# Check whether --enable-magicpps was given.
+if test ${enable_magicpps+y}
+then :
+ enableval=$enable_magicpps; ans=$enableval
+else $as_nop
+ ans=yes
fi
-done
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
+case "$ans" in
+ yes)
+
+printf "%s\n" "#define ENABLE_MAGICPPS 1" >>confdefs.h
+
+ ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
+if test "x$ac_cv_func_openat" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir"
+if test "x$ac_cv_func_fdopendir" = xyes
+then :
+ printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
+if test "x$ac_cv_func_fstatat" = xyes
+then :
+ printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
+
+fi
+
+ ;;
+esac
+
+ac_fn_c_check_header_compile "$LINENO" "libscf.h" "ac_cv_header_libscf_h" "$ac_includes_default"
+if test "x$ac_cv_header_libscf_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBSCF_H 1" >>confdefs.h
+
+fi
LSCF=
case "$ac_cv_header_libscf_h" in
@@ -32220,11 +33502,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
-$as_echo_n "checking for struct sockaddr_storage... " >&6; }
-if ${ntp_cv_sockaddr_storage+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
+printf %s "checking for struct sockaddr_storage... " >&6; }
+if test ${ntp_cv_sockaddr_storage+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32239,7 +33522,7 @@ else
#endif
int
-main ()
+main (void)
{
struct sockaddr_storage n;
@@ -32249,27 +33532,29 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_sockaddr_storage=yes
-else
+else $as_nop
ntp_cv_sockaddr_storage=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
-$as_echo "$ntp_cv_sockaddr_storage" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
+printf "%s\n" "$ntp_cv_sockaddr_storage" >&6; }
case "$ntp_cv_sockaddr_storage" in
yes)
-$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
-$as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
-if ${ntp_cv_have___ss_family+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
+printf %s "checking for sockaddr_storage.__ss_family... " >&6; }
+if test ${ntp_cv_have___ss_family+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32284,7 +33569,7 @@ else
#endif
int
-main ()
+main (void)
{
struct sockaddr_storage s;
@@ -32295,21 +33580,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_have___ss_family=yes
-else
+else $as_nop
ntp_cv_have___ss_family=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
-$as_echo "$ntp_cv_have___ss_family" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
+printf "%s\n" "$ntp_cv_have___ss_family" >&6; }
case "$ntp_cv_have___ss_family" in
yes)
-$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
+printf "%s\n" "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
esac
@@ -32319,11 +33605,12 @@ esac
#
# Look for in_port_t.
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
-$as_echo_n "checking for in_port_t... " >&6; }
-if ${isc_cv_have_in_port_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
+printf %s "checking for in_port_t... " >&6; }
+if test ${isc_cv_have_in_port_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32331,7 +33618,7 @@ else
#include <netinet/in.h>
int
-main ()
+main (void)
{
in_port_t port = 25;
@@ -32342,29 +33629,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_have_in_port_t=yes
-else
+else $as_nop
isc_cv_have_in_port_t=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
-$as_echo "$isc_cv_have_in_port_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
+printf "%s\n" "$isc_cv_have_in_port_t" >&6; }
case "$isc_cv_have_in_port_t" in
no)
-$as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
-$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
-if ${ntp_cv_getsockname_socklen_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
+printf %s "checking type of socklen arg for getsockname()... " >&6; }
+if test ${ntp_cv_getsockname_socklen_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
getsockname_socklen_type_found=no
for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
@@ -32380,7 +33669,7 @@ else
#endif
int
-main ()
+main (void)
{
extern
@@ -32392,10 +33681,11 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
getsockname_socklen_type_found=yes ; break 2
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
done
case "$getsockname_socklen_type_found" in
@@ -32407,19 +33697,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
-$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
+printf "%s\n" "$ntp_cv_getsockname_socklen_type" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
-_ACEOF
+printf "%s\n" "#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
-$as_echo_n "checking struct sockaddr for sa_len... " >&6; }
-if ${isc_cv_platform_havesalen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
+printf %s "checking struct sockaddr for sa_len... " >&6; }
+if test ${isc_cv_platform_havesalen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32427,7 +33716,7 @@ else
#include <sys/socket.h>
int
-main ()
+main (void)
{
extern struct sockaddr *ps;
@@ -32438,26 +33727,28 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_platform_havesalen=yes
-else
+else $as_nop
isc_cv_platform_havesalen=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
-$as_echo "$isc_cv_platform_havesalen" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
+printf "%s\n" "$isc_cv_platform_havesalen" >&6; }
case "$isc_cv_platform_havesalen" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
esac
# Check whether --enable-ipv6 was given.
-if test "${enable_ipv6+set}" = set; then :
+if test ${enable_ipv6+y}
+then :
enableval=$enable_ipv6;
fi
@@ -32469,7 +33760,7 @@ case "$enable_ipv6" in
;;
*)
-$as_echo "#define WANT_IPV6 1" >>confdefs.h
+printf "%s\n" "#define WANT_IPV6 1" >>confdefs.h
;;
esac
@@ -32482,16 +33773,17 @@ esac
case "$host" in
*-*-darwin*)
-$as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
+printf "%s\n" "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
-$as_echo_n "checking for IPv6 structures... " >&6; }
-if ${isc_cv_found_ipv6+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
+printf %s "checking for IPv6 structures... " >&6; }
+if test ${isc_cv_found_ipv6+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32500,7 +33792,7 @@ else
#include <netinet/in.h>
int
-main ()
+main (void)
{
struct sockaddr_in6 sin6;
@@ -32510,29 +33802,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_found_ipv6=yes
-else
+else $as_nop
isc_cv_found_ipv6=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
-$as_echo "$isc_cv_found_ipv6" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
+printf "%s\n" "$isc_cv_found_ipv6" >&6; }
#
# See whether IPv6 support is provided via a Kame add-on.
# This is done before other IPv6 linking tests so LIBS is properly set.
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
-$as_echo_n "checking for Kame IPv6 support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
+printf %s "checking for Kame IPv6 support... " >&6; }
# Check whether --with-kame was given.
-if test "${with_kame+set}" = set; then :
+if test ${with_kame+y}
+then :
withval=$with_kame; use_kame="$withval"
-else
+else $as_nop
use_kame="no"
fi
@@ -32549,13 +33843,13 @@ case "$use_kame" in
esac
case "$use_kame" in
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
*)
if test -f $kame_path/lib/libinet6.a; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
-$as_echo "$kame_path/lib/libinet6.a" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
+printf "%s\n" "$kame_path/lib/libinet6.a" >&6; }
LIBS="-L$kame_path/lib -linet6 $LIBS"
else
as_fn_error $? "$kame_path/lib/libinet6.a not found.
@@ -32579,7 +33873,7 @@ esac
case "$host" in
*-bsdi4.[01]*)
-$as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
isc_netinet6in6_hack="#include <netinet6/in6.h>"
;;
@@ -32594,7 +33888,7 @@ esac
case "$host" in
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
-$as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
isc_netinetin6_hack="#include <netinet/in6.h>"
;;
@@ -32607,13 +33901,14 @@ esac
case "$isc_cv_found_ipv6" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
-$as_echo_n "checking for in6_pktinfo... " >&6; }
-if ${isc_cv_have_in6_pktinfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
+printf %s "checking for in6_pktinfo... " >&6; }
+if test ${isc_cv_have_in6_pktinfo+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32624,7 +33919,7 @@ else
$isc_netinet6in6_hack
int
-main ()
+main (void)
{
struct in6_pktinfo xyzzy;
@@ -32634,31 +33929,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_have_in6_pktinfo=yes
-else
+else $as_nop
isc_cv_have_in6_pktinfo=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
-$as_echo "$isc_cv_have_in6_pktinfo" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
+printf "%s\n" "$isc_cv_have_in6_pktinfo" >&6; }
case "$isc_cv_have_in6_pktinfo" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
esac
# HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
-$as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
-if ${isc_cv_have_sin6_scope_id+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
+printf %s "checking for sockaddr_in6.sin6_scope_id... " >&6; }
+if test ${isc_cv_have_sin6_scope_id+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32669,7 +33966,7 @@ else
$isc_netinet6in6_hack
int
-main ()
+main (void)
{
struct sockaddr_in6 xyzzy;
@@ -32680,22 +33977,23 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_have_sin6_scope_id=yes
-else
+else $as_nop
isc_cv_have_sin6_scope_id=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
-$as_echo "$isc_cv_have_sin6_scope_id" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
+printf "%s\n" "$isc_cv_have_sin6_scope_id" >&6; }
case "$isc_cv_have_sin6_scope_id" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
esac
esac
@@ -32703,11 +34001,12 @@ esac
# We need this check run even without isc_cv_found_ipv6=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
-$as_echo_n "checking for in6addr_any... " >&6; }
-if ${isc_cv_in6addr_any_links+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
+printf %s "checking for in6addr_any... " >&6; }
+if test ${isc_cv_in6addr_any_links+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
SAVED_LIBS="$LIBS"
LIBS="$LDADD_LIBNTP $LIBS"
@@ -32720,7 +34019,7 @@ $ac_includes_default
$isc_netinet6in6_hack
int
-main ()
+main (void)
{
printf("%x", in6addr_any.s6_addr[15]);
@@ -32730,35 +34029,37 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
isc_cv_in6addr_any_links=yes
-else
+else $as_nop
isc_cv_in6addr_any_links=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$SAVED_LIBS"
{ SAVED_LIBS=; unset SAVED_LIBS;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
-$as_echo "$isc_cv_in6addr_any_links" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
+printf "%s\n" "$isc_cv_in6addr_any_links" >&6; }
case "$isc_cv_in6addr_any_links" in
no)
-$as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
-$as_echo_n "checking for struct if_laddrconf... " >&6; }
-if ${isc_cv_struct_if_laddrconf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
+printf %s "checking for struct if_laddrconf... " >&6; }
+if test ${isc_cv_struct_if_laddrconf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32766,7 +34067,7 @@ else
#include <net/if6.h>
int
-main ()
+main (void)
{
struct if_laddrconf a;
@@ -32776,30 +34077,32 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_struct_if_laddrconf=yes
-else
+else $as_nop
isc_cv_struct_if_laddrconf=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
-$as_echo "$isc_cv_struct_if_laddrconf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
+printf "%s\n" "$isc_cv_struct_if_laddrconf" >&6; }
case "$isc_cv_struct_if_laddrconf" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
-$as_echo_n "checking for struct if_laddrreq... " >&6; }
-if ${isc_cv_struct_if_laddrreq+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
+printf %s "checking for struct if_laddrreq... " >&6; }
+if test ${isc_cv_struct_if_laddrreq+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32807,7 +34110,7 @@ else
#include <net/if6.h>
int
-main ()
+main (void)
{
struct if_laddrreq a;
@@ -32817,30 +34120,32 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_struct_if_laddrreq=yes
-else
+else $as_nop
isc_cv_struct_if_laddrreq=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
-$as_echo "$isc_cv_struct_if_laddrreq" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
+printf "%s\n" "$isc_cv_struct_if_laddrreq" >&6; }
case "$isc_cv_struct_if_laddrreq" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
-$as_echo_n "checking for multicast IP support... " >&6; }
-if ${ntp_cv_multicast+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
+printf %s "checking for multicast IP support... " >&6; }
+if test ${ntp_cv_multicast+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ntp_cv_multicast=no
case "$host" in
@@ -32855,7 +34160,7 @@ else
#endif
int
-main ()
+main (void)
{
struct ip_mreq ipmr;
@@ -32866,27 +34171,29 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_multicast=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
-$as_echo "$ntp_cv_multicast" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
+printf "%s\n" "$ntp_cv_multicast" >&6; }
case "$ntp_cv_multicast" in
yes)
-$as_echo "#define MCAST 1" >>confdefs.h
+printf "%s\n" "#define MCAST 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
-$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
-if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
+printf %s "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
+if test ${ntp_cv_typeof_ip_multicast_loop+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-*-netbsd*|*-*-*linux*)
@@ -32899,19 +34206,18 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
-$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
+printf "%s\n" "$ntp_cv_typeof_ip_multicast_loop" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
-_ACEOF
+printf "%s\n" "#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop" >>confdefs.h
esac
# Check whether --enable-getifaddrs was given.
-if test "${enable_getifaddrs+set}" = set; then :
+if test ${enable_getifaddrs+y}
+then :
enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
-else
+else $as_nop
want_getifaddrs="yes"
fi
@@ -32919,8 +34225,8 @@ fi
case $want_getifaddrs in
glibc)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
-$as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
+printf "%s\n" "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
esac
case $want_getifaddrs in
no)
@@ -32928,16 +34234,12 @@ case $want_getifaddrs in
*)
SAVED_LIBS="$LIBS"
LIBS="$LDADD_LIBNTP $LIBS"
- for ac_func in getifaddrs
-do :
- ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
-if test "x$ac_cv_func_getifaddrs" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETIFADDRS 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
fi
-done
LIBS="$SAVED_LIBS"
{ SAVED_LIBS=; unset SAVED_LIBS;}
@@ -32949,11 +34251,12 @@ esac
#
case "$host" in
*-hp-hpux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
-$as_echo_n "checking for library containing if_nametoindex... " >&6; }
-if ${ac_cv_search_if_nametoindex+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
+printf %s "checking for library containing if_nametoindex... " >&6; }
+if test ${ac_cv_search_if_nametoindex+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32961,46 +34264,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char if_nametoindex ();
int
-main ()
+main (void)
{
return if_nametoindex ();
;
return 0;
}
_ACEOF
-for ac_lib in '' ipv6; do
+for ac_lib in '' ipv6
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_if_nametoindex=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_if_nametoindex+:} false; then :
+ if test ${ac_cv_search_if_nametoindex+y}
+then :
break
fi
done
-if ${ac_cv_search_if_nametoindex+:} false; then :
+if test ${ac_cv_search_if_nametoindex+y}
+then :
-else
+else $as_nop
ac_cv_search_if_nametoindex=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
-$as_echo "$ac_cv_search_if_nametoindex" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
+printf "%s\n" "$ac_cv_search_if_nametoindex" >&6; }
ac_res=$ac_cv_search_if_nametoindex
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -33008,23 +34313,19 @@ fi
esac
SAVED_LIBS="$LIBS"
LIBS="$LDADD_LIBNTP $LIBS"
-for ac_func in if_nametoindex
-do :
- ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
-if test "x$ac_cv_func_if_nametoindex" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_IF_NAMETOINDEX 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
+if test "x$ac_cv_func_if_nametoindex" = xyes
+then :
+ printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
fi
-done
LIBS="$SAVED_LIBS"
{ SAVED_LIBS=; unset SAVED_LIBS;}
case "$ac_cv_func_if_nametoindex" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
esac
@@ -33034,11 +34335,12 @@ esac
#
# Look for a sysctl call to get the list of network interfaces.
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for interface list sysctl" >&5
-$as_echo_n "checking for interface list sysctl... " >&6; }
-if ${ntp_cv_iflist_sysctl+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for interface list sysctl" >&5
+printf %s "checking for interface list sysctl... " >&6; }
+if test ${ntp_cv_iflist_sysctl+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -33050,32 +34352,34 @@ else
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_cv_iflist_sysctl=yes
-else
+else $as_nop
ntp_cv_iflist_sysctl=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_iflist_sysctl" >&5
-$as_echo "$ntp_cv_iflist_sysctl" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_iflist_sysctl" >&5
+printf "%s\n" "$ntp_cv_iflist_sysctl" >&6; }
case "$ntp_cv_iflist_sysctl" in
yes)
-$as_echo "#define HAVE_IFLIST_SYSCTL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_IFLIST_SYSCTL 1" >>confdefs.h
esac
###
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want the saveconfig mechanism" >&5
-$as_echo_n "checking if we want the saveconfig mechanism... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the saveconfig mechanism" >&5
+printf %s "checking if we want the saveconfig mechanism... " >&6; }
# Check whether --enable-saveconfig was given.
-if test "${enable_saveconfig+set}" = set; then :
+if test ${enable_saveconfig+y}
+then :
enableval=$enable_saveconfig; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=yes
fi
@@ -33085,7 +34389,7 @@ case "$ntp_ok" in
yes)
ntp_saveconfig_enabled=1
-$as_echo "#define SAVECONFIG 1" >>confdefs.h
+printf "%s\n" "#define SAVECONFIG 1" >>confdefs.h
;;
esac
@@ -33097,17 +34401,18 @@ else
SAVECONFIG_ENABLED_FALSE=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
###
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want the experimental leap smear code" >&5
-$as_echo_n "checking if we want the experimental leap smear code... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the experimental leap smear code" >&5
+printf %s "checking if we want the experimental leap smear code... " >&6; }
# Check whether --enable-leap-smear was given.
-if test "${enable_leap_smear+set}" = set; then :
+if test ${enable_leap_smear+y}
+then :
enableval=$enable_leap_smear; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
@@ -33117,23 +34422,24 @@ case "$ntp_ok" in
yes)
ntp_leap_smear_enabled=1
-$as_echo "#define LEAP_SMEAR 1" >>confdefs.h
+printf "%s\n" "#define LEAP_SMEAR 1" >>confdefs.h
HAVE_LEAPSMEARINTERVAL="leapsmearinterval 0"
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
###
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want dynamic interleave support" >&5
-$as_echo_n "checking if we want dynamic interleave support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want dynamic interleave support" >&5
+printf %s "checking if we want dynamic interleave support... " >&6; }
# Check whether --enable-dynamic-interleave was given.
-if test "${enable_dynamic_interleave+set}" = set; then :
+if test ${enable_dynamic_interleave+y}
+then :
enableval=$enable_dynamic_interleave; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=no
fi
@@ -33145,23 +34451,22 @@ case "$ntp_ok" in
;;
esac
-cat >>confdefs.h <<_ACEOF
-#define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave
-_ACEOF
+printf "%s\n" "#define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# We may not need have_unity
have_unity=false
# Extract the first word of "ruby", so it can be a program name with args.
set dummy ruby; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_RUBY+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_RUBY+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PATH_RUBY in
[\\/]* | ?:[\\/]*)
ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
@@ -33171,11 +34476,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_RUBY="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -33187,11 +34496,11 @@ esac
fi
PATH_RUBY=$ac_cv_path_PATH_RUBY
if test -n "$PATH_RUBY"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
-$as_echo "$PATH_RUBY" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
+printf "%s\n" "$PATH_RUBY" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -33215,126 +34524,27 @@ fi
-gta=false
-
-# Check whether --with-gtest was given.
-if test "${with_gtest+set}" = set; then :
- withval=$with_gtest; try_gtest=$withval
-else
- try_gtest=yes
-
-fi
-
-case "$try_gtest" in
- yes)
- # Extract the first word of "gtest-config", so it can be a program name with args.
-set dummy gtest-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GTEST_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $GTEST_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
-if test -n "$GTEST_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
-$as_echo "$GTEST_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
- case x${GTEST_CONFIG} in
- x) ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
-$as_echo_n "checking gtest version... " >&6; }
- gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
- case "$gtest_version_test" in
- toolow*)
- ;;
- *)
- GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
- GTEST_LIBS=`$GTEST_CONFIG --libs`
- GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
- GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
-
-
-
-
- gta=true
- ;;
- esac
- gtest_version=`$GTEST_CONFIG --version`
- case "$gta" in
- true)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
-$as_echo "($gtest_version) ok" >&6; }
- ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
-$as_echo "($gtest_version) not ok" >&6; }
- ;;
- esac
- { gtest_version_test=; unset gtest_version_test;}
- { gtest_version=; unset gtest_version;}
- esac
-esac
- if $gta; then
- GTEST_AVAILABLE_TRUE=
- GTEST_AVAILABLE_FALSE='#'
-else
- GTEST_AVAILABLE_TRUE='#'
- GTEST_AVAILABLE_FALSE=
-fi
-
-
-
-
-
case "$build" in
$host) cross=0 ;;
*) cross=1 ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
-$as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
+printf %s "checking if we want to enable tests with undiagnosed problems... " >&6; }
# Check whether --enable-problem-tests was given.
-if test "${enable_problem_tests+set}" = set; then :
+if test ${enable_problem_tests+y}
+then :
enableval=$enable_problem_tests; ntp_ept=$enableval
-else
+else $as_nop
ntp_ept=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ept" >&5
-$as_echo "$ntp_ept" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ept" >&5
+printf "%s\n" "$ntp_ept" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_restrict" >&5
-$as_echo_n "checking if we can run test-ntp_restrict... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_restrict" >&5
+printf %s "checking if we can run test-ntp_restrict... " >&6; }
ntp_test_ntp_restrict="no"
case "$ntp_ept:$cross:$host" in
no:0:*-*-freebsd6.4) ;;
@@ -33346,8 +34556,8 @@ case "$ntp_cv_gc_sections_runs" in
no) ntp_test_ntp_restrict="no" ;;
* ) ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_restrict" >&5
-$as_echo "$ntp_test_ntp_restrict" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_restrict" >&5
+printf "%s\n" "$ntp_test_ntp_restrict" >&6; }
if test x$ntp_test_ntp_restrict = xyes; then
BUILD_TEST_NTP_RESTRICT_TRUE=
BUILD_TEST_NTP_RESTRICT_FALSE='#'
@@ -33357,8 +34567,8 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_scanner" >&5
-$as_echo_n "checking if we can run test-ntp_scanner... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_scanner" >&5
+printf %s "checking if we can run test-ntp_scanner... " >&6; }
ntp_test_ntp_scanner="no"
case "$ntp_ept:$cross:$host" in
no:0:*-*-freebsd6.4) ;;
@@ -33369,8 +34579,8 @@ case "$ntp_cv_gc_sections_runs" in
no) ntp_test_ntp_scanner="no" ;;
* ) ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_scanner" >&5
-$as_echo "$ntp_test_ntp_scanner" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_scanner" >&5
+printf "%s\n" "$ntp_test_ntp_scanner" >&6; }
if test x$ntp_test_ntp_scanner = xyes; then
BUILD_TEST_NTP_SCANNER_TRUE=
BUILD_TEST_NTP_SCANNER_FALSE='#'
@@ -33380,8 +34590,8 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_signd" >&5
-$as_echo_n "checking if we can run test-ntp_signd... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_signd" >&5
+printf %s "checking if we can run test-ntp_signd... " >&6; }
ntp_test_ntp_signd="no"
case "$ntp_ept:$cross:$host" in
no:0:*-*-freebsd6.4) ;;
@@ -33392,8 +34602,8 @@ case "$ntp_cv_gc_sections_runs" in
no) ntp_test_ntp_signd="no" ;;
* ) ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_signd" >&5
-$as_echo "$ntp_test_ntp_signd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_signd" >&5
+printf "%s\n" "$ntp_test_ntp_signd" >&6; }
if test x$ntp_test_ntp_signd = xyes; then
BUILD_TEST_NTP_SIGND_TRUE=
BUILD_TEST_NTP_SIGND_FALSE='#'
@@ -33407,28 +34617,24 @@ fi
###
-ac_fn_c_check_decl "$LINENO" "sigsetjmp" "ac_cv_have_decl_sigsetjmp" "#include <setjmp.h>
-"
-if test "x$ac_cv_have_decl_sigsetjmp" = xyes; then :
+ac_fn_check_decl "$LINENO" "sigsetjmp" "ac_cv_have_decl_sigsetjmp" "#include <setjmp.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_sigsetjmp" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SIGSETJMP $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "siglongjmp" "ac_cv_have_decl_siglongjmp" "#include <setjmp.h>
-"
-if test "x$ac_cv_have_decl_siglongjmp" = xyes; then :
+printf "%s\n" "#define HAVE_DECL_SIGSETJMP $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "siglongjmp" "ac_cv_have_decl_siglongjmp" "#include <setjmp.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_siglongjmp" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SIGLONGJMP $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_SIGLONGJMP $ac_have_decl" >>confdefs.h
###
@@ -33443,9 +34649,7 @@ _ACEOF
NTP_KEYSDIR="$ac_define_dir"
-cat >>confdefs.h <<_ACEOF
-#define NTP_KEYSDIR "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define NTP_KEYSDIR \"$ac_define_dir\"" >>confdefs.h
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
@@ -33549,9 +34753,7 @@ perllibdir="${datadir}/ntp/lib"
PERLLIBDIR="$ac_define_dir"
-cat >>confdefs.h <<_ACEOF
-#define PERLLIBDIR "$ac_define_dir"
-_ACEOF
+printf "%s\n" "#define PERLLIBDIR \"$ac_define_dir\"" >>confdefs.h
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
@@ -33602,8 +34804,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -33633,15 +34835,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -33655,8 +34857,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -33673,7 +34875,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -33684,14 +34886,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -33761,10 +34963,6 @@ if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FAL
as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
- as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${BUILD_TEST_NTP_RESTRICT_TRUE}" && test -z "${BUILD_TEST_NTP_RESTRICT_FALSE}"; then
as_fn_error $? "conditional \"BUILD_TEST_NTP_RESTRICT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -33782,8 +34980,8 @@ fi
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -33806,14 +35004,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -33823,46 +35023,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -33871,13 +35071,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -33886,8 +35079,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -33899,30 +35096,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -33935,13 +35112,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -33968,18 +35146,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -33991,12 +35171,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -34027,7 +35208,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -34049,6 +35230,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -34062,6 +35247,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -34103,7 +35294,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -34112,7 +35303,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -34174,8 +35365,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ntp $as_me 4.2.8p15, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by ntp $as_me 4.2.8p16, which was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -34234,18 +35425,20 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <http://bugs.ntp.org./>.
-ntp home page: <http://www.ntp.org./>."
+Report bugs to <https://bugs.ntp.org/>.
+ntp home page: <https://www.ntp.org/>."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-ntp config.status 4.2.8p15
-configured by $0, generated by GNU Autoconf 2.69,
+ntp config.status 4.2.8p16
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -34285,15 +35478,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -34301,7 +35494,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -34310,7 +35503,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -34338,7 +35531,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -34352,7 +35545,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -34360,7 +35553,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -34710,9 +35903,9 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -35082,7 +36275,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -35090,17 +36283,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -35117,7 +36310,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -35141,9 +36334,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -35205,8 +36398,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -35255,9 +36448,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -35273,20 +36466,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
@@ -35306,7 +36499,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$_am_arg" : 'X\(//\)[^/]' \| \
X"$_am_arg" : 'X\(//\)$' \| \
X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
+printf "%s\n" X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -35326,8 +36519,8 @@ $as_echo X"$_am_arg" |
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -35337,29 +36530,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -35377,53 +36576,50 @@ $as_echo X"$mf" |
q
}
s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "$am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
- /^X\(\/\/\)$/{
+ /^X\/\(\/\/\)$/{
s//\1/
q
}
- /^X\(\/\).*/{
+ /^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
}
;;
"libtool":C)
@@ -35954,6 +37150,7 @@ _LT_EOF
esac
+
ltmain=$ac_aux_dir/ltmain.sh
@@ -36054,7 +37251,7 @@ if test "$no_recursion" != yes; then
;;
*)
case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
esac
@@ -36064,7 +37261,7 @@ if test "$no_recursion" != yes; then
# in subdir configurations.
ac_arg="--prefix=$prefix"
case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
@@ -36085,17 +37282,17 @@ if test "$no_recursion" != yes; then
test -d "$srcdir/$ac_dir" || continue
ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
- $as_echo "$ac_msg" >&6
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ printf "%s\n" "$ac_msg" >&6
as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -36125,17 +37322,15 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir"
- # Check for guested configure; otherwise get Cygnus style configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
ac_sub_configure=$ac_srcdir/configure.gnu
elif test -f "$ac_srcdir/configure"; then
ac_sub_configure=$ac_srcdir/configure
- elif test -f "$ac_srcdir/configure.in"; then
- # This should be Cygnus configure.
- ac_sub_configure=$ac_aux_dir/configure
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
ac_sub_configure=
fi
@@ -36148,8 +37343,8 @@ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
# The eval makes quoting arguments work.
eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
--cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
@@ -36160,7 +37355,8 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
done
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/contrib/ntp/configure.ac b/contrib/ntp/configure.ac
index 5dc6aee02edc..c2dce35e800d 100644
--- a/contrib/ntp/configure.ac
+++ b/contrib/ntp/configure.ac
@@ -5,9 +5,9 @@ AC_PREREQ([2.68])
AC_INIT(
[ntp],
[VERSION_NUMBER],
- [http://bugs.ntp.org./],
+ [https://bugs.ntp.org/],
[],
- [http://www.ntp.org./]dnl
+ [https://www.ntp.org/]dnl
)
AC_CONFIG_MACRO_DIR([sntp/m4])
AC_CONFIG_AUX_DIR([sntp/libevent/build-aux])
@@ -35,14 +35,14 @@ AC_PRESERVE_HELP_ORDER
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20120806
+ntp_configure_cache_version=20230326
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
NTP_CACHEVERSION([main], [$ntp_configure_cache_version])
-AM_INIT_AUTOMAKE([1.15 foreign -Wall -Wno-gnu])
+AM_INIT_AUTOMAKE([1.15 foreign subdir-objects -Wall -Wno-gnu])
AM_SILENT_RULES([yes])
@@ -64,8 +64,6 @@ ntp_jupiter_ok=${ntp_jupiter_ok=no}
NTP_PROG_CC
NTP_COMPILER
-dnl # Do we need CXX for anything besides google test?
-dnl AC_PROG_CXX
AC_PROG_YACC
dnl AC_PROG_CC_C_O # called by NTP_COMPILER
AX_C99_STRUCT_INIT
@@ -76,11 +74,7 @@ NTP_VPATH_HACK dnl used only by ntpd/Makefile.am
NTP_LOCINFO([sntp]) dnl takes over from NTP_BINDIR, in NTP_LIBNTP
-dnl AM_PROG_AR req. automake 1.12
-m4_ifdef(
- [AM_PROG_AR],
- [AM_PROG_AR]
-)
+AM_PROG_AR
# So far, the only shared library we might use is libopts.
# It's a small library - we might as well use a static version of it.
@@ -403,7 +397,7 @@ case "$ac_cv_header_stdatomic_h" in
[[
atomic_thread_fence(memory_order_seq_cst);
]]
- )]
+ )],
[ntp_cv_func_atomic_thread_fence=yes],
[ntp_cv_func_atomic_thread_fence=no]
)]
@@ -479,7 +473,7 @@ case "$have_adjtimex" in
struct nlist n;
n.n_un.n_name = 0;
]]
- )]
+ )],
[ntp_cv_struct_nlist_n_un=yes],
[ntp_cv_struct_nlist_n_un=no]
)]
@@ -855,7 +849,9 @@ AC_CHECK_FUNCS(
)]
)
-AC_CHECK_FUNCS([fnmatch getbootfile getuid getrusage nanosleep strsignal])
+AC_CHECK_FUNCS([fnmatch getbootfile getuid getrusage nanosleep strsignal ]dnl
+ [strsignal closefrom getdtablesize])
+
# kvm_open() is only used by tickadj. Also see above.
case "$ac_cv_header_kvm_h" in
@@ -900,6 +896,7 @@ case "$host" in
;;
esac
AC_CHECK_FUNCS([nice plock pututline pututxline readlink rtprio])
+NTP_FUNC_REALPATH
case "$host" in
*-*-aix[[4-9]]*)
# XXX only verified thru AIX6.
@@ -1109,7 +1106,7 @@ AC_CACHE_CHECK(
[[
extern int syscall (int, ...);
]]
- )]
+ )],
[ntp_cv_decl_syscall=yes],
[ntp_cv_decl_syscall=no]
)]
@@ -4211,6 +4208,24 @@ case "$ans" in
esac
+AC_MSG_CHECKING([if we want a debug assert on an OOB KoD RATE value])
+AC_ARG_ENABLE(
+ [bug3767-fix],
+ [AS_HELP_STRING(
+ [--enable-bug3767-fix],
+ [+ Disable debug assertion on OOB KoD RATE value]
+ )],
+ [ans=$enableval],
+ [ans=yes]
+)
+AC_MSG_RESULT([$ans])
+case "$ans" in
+ no)
+ AC_DEFINE([DISABLE_BUG3767_FIX], [1],
+ [Disable debug assertion on OOB KoD RATE value?])
+esac
+
+
AC_MSG_CHECKING([if we should use the IRIG sawtooth filter])
case "$host" in
@@ -4295,6 +4310,26 @@ case "$ntp_signd_path" in
;;
esac
+dnl check for 'magic pps' for Linux
+AC_MSG_CHECKING([if we want 'magic' PPS support])
+AC_ARG_ENABLE(
+ [magicpps],
+ [AS_HELP_STRING(
+ [--enable-magicpps],
+ [+ try to auto-instantiate PPS devices on Linux]
+ )],
+ [ans=$enableval],
+ [ans=yes]
+)
+AC_MSG_RESULT([$ans])
+case "$ans" in
+ yes)
+ AC_DEFINE([ENABLE_MAGICPPS], [1],
+ [auto-instantiate missing PPS devices on Linux])
+ AC_CHECK_FUNCS([openat fdopendir fstatat])
+ ;;
+esac
+
AC_CHECK_HEADERS([libscf.h])
LSCF=
case "$ac_cv_header_libscf_h" in
@@ -4399,11 +4434,6 @@ AC_MSG_RESULT([$ntp_ok])
NTP_UNITYBUILD
-dnl gtest is needed for our tests subdirs. It would be nice if we could
-dnl require a C++ compiler only if we will use gtest, but AC_PROG_CXX
-dnl can't be conditionalized.
-NTP_GOOGLETEST
-
NTP_PROBLEM_TESTS
###
diff --git a/contrib/ntp/deps-ver b/contrib/ntp/deps-ver
index 16d66a8bdb86..abd139968b25 100644
--- a/contrib/ntp/deps-ver
+++ b/contrib/ntp/deps-ver
@@ -1 +1 @@
-Fri Dec 30 11:24:57 UTC 2011
+Mon Jan 16 09:26:08 UTC 2023
diff --git a/contrib/ntp/depsver.mf b/contrib/ntp/depsver.mf
index 695f7303ce31..62c59c4f1d12 100644
--- a/contrib/ntp/depsver.mf
+++ b/contrib/ntp/depsver.mf
@@ -2,9 +2,9 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -22,7 +22,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -30,6 +30,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
BUILT_SOURCES += .deps-ver
CLEANFILES += .deps-ver
+DISTCLEANFILES += $(DEPDIR)/deps-ver
#
# depsver.mf included in Makefile.am for directories with .deps
@@ -55,6 +56,6 @@ CLEANFILES += .deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/html/authentic.html b/contrib/ntp/html/authentic.html
index 52703e4566e5..62066c3b5444 100644
--- a/contrib/ntp/html/authentic.html
+++ b/contrib/ntp/html/authentic.html
@@ -135,13 +135,14 @@
Ordinarily, the <tt>ntp.keys</tt> file is generated by
the <tt><a href="keygen.html">ntp-keygen</a></tt> program, but it can
be constructed and edited using an ordinary text editor.</p>
- <p> Each line of the keys file consists of three or four fields: a key
- ID in the range 1 to 65,535, inclusive, a key type, a message digest
- key consisting of a printable ASCII string less than 40 characters or
- a 40-character hex digit string, and an optional comma-separated list
- of IPs that are allowed to serve time. If the OpenSSL library is
- installed, the key type can be any message digest algorithm supported
- by the library. If the OpenSSL library is not installed, the only
+ <p> Each line of the keys file consists of three or four fields: a
+ key ID in the range 1 to 65,535, inclusive, a key type, a
+ message digest key consisting of a printable ASCII string up to
+ 20 characters or a hex digit string with more than 20
+ characters, and an optional comma-separated list of IPs that are
+ allowed to serve time. If the OpenSSL library is installed, the
+ key type can be any message digest algorithm supported by the
+ library. If the OpenSSL library is not installed, the only
permitted key type is MD5.</p>
<table>
<caption style="caption-side: bottom;">
diff --git a/contrib/ntp/html/clockopt.html b/contrib/ntp/html/clockopt.html
index 2c2d0a8fdfe9..5b2de7e58d6e 100644
--- a/contrib/ntp/html/clockopt.html
+++ b/contrib/ntp/html/clockopt.html
@@ -68,6 +68,45 @@
</dd>
</dl>
</dd>
+ <dt id="device"><tt>device 127.127.<i>t.u</i> [timedata <i>devpath</i>] [ppsdata <i>devpath</i>]</tt></dt>
+ <dd>
+ This command can be used to specify the devices a reference
+ clocks should use. Every clock has a special hard-coded builtin
+ name to use, and while it is possible to make a symlink from the
+ expected name to the real device, doing so is not always
+ convenient. On some platforms or setups it is much easier to
+ specify the real device name in <i>ntpd</i>'s configuration file.
+ </dd><dd>
+ Note: It is <i>not</i> necessary to specify device names
+ in the configuration file; in such a case the builtin name will be
+ used. But once a device name is given, it will be used as
+ specified. There's no fallback in case of errors.
+ </dd><dd>
+ The arguments are:
+ <dl>
+ <dt><tt>timedata <i>devpath</i></tt></dt>
+ <dd>
+ Defines the device that provides the time code data stream;
+ for e.g. NMEA, <i>devpath</i> could be "<tt>/dev/ttyS7</tt>" on a
+ POSIX-like system or "<tt>\\.\COM4</tt>" for another widely used OS.
+ </dd>
+ <dt><tt>ppsdata <i>devpath</i></tt></dt>
+ <dd>
+ Defines the device that provides the PPS timing stream. By
+ default, the time data stream is expected to be able to
+ provide the PPS data, too. (Proper wiring and hardware
+ assumed, of course.) This is true for all OSes that implement
+ the PPS API as originally designed for BSD variants.
+ <p/>
+ But on some hardware the PPS signal cannot not delivered to
+ the UART that handles the serial data; instead it might
+ be routed to a GPIO pin, and that means that we need a
+ way to define the device where the PPS data can be acquired
+ from. The <tt>ppsdata</tt> definition provides support for such
+ use cases.
+ </dd>
+ </dl>
+ </dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
diff --git a/contrib/ntp/html/copyright.html b/contrib/ntp/html/copyright.html
index 93604b7d0368..d00cf9712178 100644
--- a/contrib/ntp/html/copyright.html
+++ b/contrib/ntp/html/copyright.html
@@ -9,7 +9,7 @@
<h3>Copyright Notice</h3>
<img src="pic/sheepb.jpg" alt="jpg" align="left"> "Clone me," says Dolly sheepishly.
<p>Last update:
- <!-- #BeginDate format:En2m -->4-Feb-2020 23:47<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->2-Mar-2023 05:21<!-- #EndDate -->
UTC</p>
<br clear="left">
</p>
@@ -34,11 +34,11 @@
* *
***********************************************************************
</pre>
-<p>Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin Burnicki is:</p>
+<p>Content starting in 2011 from Harlan Stenn, Juergen Perlinger, Dave Hart, Danny Mayer, Martin Burnicki, and possibly others is:</p>
<pre>
***********************************************************************
* *
-* Copyright (c) Network Time Foundation 2011-2020 *
+* Copyright (c) Network Time Foundation 2011-2023 *
* *
* All Rights Reserved *
* *
@@ -82,12 +82,13 @@
<li><a href="mailto:%20reg@dwf.com">Reg Clemens &lt;reg@dwf.com&gt;</a> Oncore driver (Current maintainer)</li>
<li><a href="mailto:%20clift@ml.csiro.au">Steve Clift &lt;clift@ml.csiro.au&gt;</a> OMEGA clock driver</li>
<li><a href="mailto:%20casey@csc.co.za">Casey Crellin &lt;casey@csc.co.za&gt;</a> vxWorks (Tornado) port and help with target configuration</li>
+ <li><a href="mailto:%20phdm@macqel.be">Philippe De Muyter &lt;phdm@macqel.be&gt;</a> Wharton reference clock driver, sysV68 and AIX modifications.</li>
<li><a href="mailto:%20Sven_Dietrich@trimble.COM">Sven Dietrich &lt;sven_dietrich@trimble.com&gt;</a> Palisade reference clock driver, NT adj. residuals, integrated Greg's Winnt port.</li>
<li><a href="mailto:%20dundas@salt.jpl.nasa.gov">John A. Dundas III &lt;dundas@salt.jpl.nasa.gov&gt;</a> Apple A/UX port</li>
<li><a href="mailto:%20duwe@immd4.informatik.uni-erlangen.de">Torsten Duwe &lt;duwe@immd4.informatik.uni-erlangen.de&gt;</a> Linux port</li>
<li><a href="mailto:%20dennis@mrbill.canet.ca">Dennis Ferguson &lt;dennis@mrbill.canet.ca&gt;</a> foundation code for NTP Version 2 as specified in RFC-1119</li>
<li><a href="mailto:%20jhay@icomtek.csir.co.za">John Hay &lt;jhay@icomtek.csir.co.za&gt;</a> IPv6 support and testing</li>
- <li><a href="mailto:%20davehart@davehart.com">Dave Hart &lt;davehart@davehart.com&gt;</a> General maintenance, Windows port interpolation rewrite</li>
+ <li><a href="mailto:%20davehart@gmail.com">Dave Hart &lt;davehart@gmail.com&gt;</a> General maintenance, IPv6 cleanup, Windows PPSAPI</li>
<li><a href="mailto:%20neoclock4x@linum.com">Claas Hilbrecht &lt;neoclock4x@linum.com&gt;</a> NeoClock4X clock driver</li>
<li><a href="mailto:%20glenn@herald.usask.ca">Glenn Hollinger &lt;glenn@herald.usask.ca&gt;</a> GOES clock driver</li>
<li><a href="mailto:%20iglesias@uci.edu">Mike Iglesias &lt;iglesias@uci.edu&gt;</a> DEC Alpha port</li>
diff --git a/contrib/ntp/html/drivers/driver20.html b/contrib/ntp/html/drivers/driver20.html
index 1c3ac782f768..ea9aa01257fe 100644
--- a/contrib/ntp/html/drivers/driver20.html
+++ b/contrib/ntp/html/drivers/driver20.html
@@ -13,7 +13,7 @@
<body>
<h3>Generic NMEA GPS Receiver</h3>
<p>Last update:
- <!-- #BeginDate format:En2m -->13-Jan-2020 07:12<!-- #EndDate -->
+ <!-- #BeginDate format:En2m -->17-Oct-2020 16:00<!-- #EndDate -->
UTC</p>
<hr>
<h4>Synopsis</h4>
@@ -350,6 +350,15 @@
See <a href="#datetrust">below</a>. <strong>Caveat:</strong>
This (hitherto undocumented) bit has moved!
</td>
+ </tr><tr>
+ <td align="center">19</td>
+ <td align="center">524288</td>
+ <td align="center">0x80000</td>
+ <td>Ignore receiver status, assume time is always good as long
+ as it is present at all. A possible option for receivers
+ with a good hold-over characteristic, but most likely
+ harmful in general. Use at own risk.
+ </td>
</tr>
</tbody></table>
diff --git a/contrib/ntp/html/drivers/driver46.html b/contrib/ntp/html/drivers/driver46.html
index cdb0b6899e15..f0eb9cf07a0b 100644
--- a/contrib/ntp/html/drivers/driver46.html
+++ b/contrib/ntp/html/drivers/driver46.html
@@ -92,11 +92,11 @@
<br><h4>Naming a Device</h4>
<p>
- The <i>GPSD</i> driver uses the same device name as the NMEA
- driver, namely <tt>/dev/gps<i>u</i></tt>. There is a simple
- reason for that: While the NMEA driver and the <i>GPSD</i>
- driver can be active at the same time <b>for different
- devices</b>, they cannot access the same device at a
+ By default, the <i>GPSD</i> driver uses the same device name as
+ the NMEA driver, namely <tt>/dev/gps<i>u</i></tt>. There is a
+ simple reason for that: While the NMEA driver and
+ the <i>GPSD</i> driver can be active at the same time <b>for
+ different devices</b>, they cannot access the same device at a
time. Having the same name helps on that. It also eases
migration from using NMEA directly to using <i>GPSD</i>, as no
new links etc need to be created.
@@ -110,11 +110,18 @@
identification. This makes the migration from the built-in NMEA
driver a bit easier.
</p>
+ <p>
+ The driver also honors <tt>device</tt> statements for
+ the <tt>timedata</tt> channel. (PPS is handled
+ inside <i>GPSD</i>, so there's no need for that.) This permits a
+ more natural way to specify the link between <i>GPSD</i>
+ and <i>NTPD</i>: Simply name the device as it was given
+ to <i>GPSD</i>.
+ </p>
<p><b>Note:</b> <i>GPSD</i> (as of version 3.10) cannot use kernel
- mode PPS on devices that are hot-plugged. This would require to
- attach the PPS line discipline to the character special file,
- which is not possible when running with root privileges already
- dropped. This is not likely to change in the future.
+ mode PPS on devices that are hot-plugged or activated on demand.
+ This is not likely to change in the future. Have a look
+ at <i>GPSD</i>'s <tt>-n</tt> (<i>nowait</i>) option.
</p>
<!-- --------------------------------------------------------- -->
@@ -168,7 +175,7 @@
120s. Then it reverts to STI-only operation until the PPS
is stable again for 40s, when strict mode is engaged
again.
- <br><br><b>Important Notice: This is an expiremental
+ <br><br><b>Important Notice: This is an experimental
feature!</b><br> Switching between strict and STI-only
mode will cause changes in offset and jitter. Use this
mode only if STI-only works fairly well with your setup,
@@ -209,7 +216,7 @@
primary clock unit (u mod 128). A secondary unit processes only
the PPS data from <i>GPSD</i> and needs the corresponding master
unit to work<a href="#fn1" name="fn1bl"><sup>1</sup></a>. Use
- the 'noselect' keyword on the primary unit if you are not
+ the '<tt>noselect</tt>' keyword on the primary unit if you are not
interested in its data.
</p><p>The secondary unit employs the usual precautions before
feeding clock samples:</p>
@@ -225,7 +232,7 @@
only be used if the GPS receiver can be trusted for the quality
of its PPS signal<a href="fn2"
name="fn2bl"><sup>2</sup></a>. The PPS flag gets cleared if no
- PPS records can be aquired for some time. The unit also flushes
+ PPS records can be acquired for some time. The unit also flushes
the sample buffer at this point to avoid the use of stale PPS
data.</p>
<p><b>Attention:</b> This unit uses its own PPS fudge value
diff --git a/contrib/ntp/html/miscopt.html b/contrib/ntp/html/miscopt.html
index f5bce4b44ac3..ecbe25fc4add 100644
--- a/contrib/ntp/html/miscopt.html
+++ b/contrib/ntp/html/miscopt.html
@@ -110,9 +110,7 @@
For the JJY driver (type 40 mode 100 - 180), the argument is one telephone number used to dial the telephone JJY service.
The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
<dt id="pollskewlist"
- ><tt>pollskewlist</tt> <tt>[</tt><i>poll</i> <i>value</i><tt>
- | </tt><i>value</i><tt>]</tt> <tt>...</tt> <tt>[default </tt><i>value</i><tt>
- | </tt><i>value</i><tt>]</tt></dt>
+ ><tt>pollskewlist</tt> <tt>[</tt><i>poll</i> <i>early late</i><tt>]</tt> <tt>...</tt> <tt>[default </tt><i>early late</i><tt>]</tt></dt>
<dd>Enable skewing of our poll requests to our servers.
<i>poll</i>
is a number between 3 and 17 inclusive, identifying a specific poll interval.
@@ -123,9 +121,8 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
-while
-the second number specifies how late the poll may be delayed.
+<i>early</i> specifies how early the poll may start, while
+<i>late</i> specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.</dd>
<dt id="reset"><tt>reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer]</tt></dt>
<dd>Reset one or more groups of counters maintained by ntpd and exposed by <tt>ntpq</tt> and <tt>ntpdc</tt>.</dd>
diff --git a/contrib/ntp/html/ntpdc.html b/contrib/ntp/html/ntpdc.html
index 7a68dd2f7906..8a66a0d01118 100644
--- a/contrib/ntp/html/ntpdc.html
+++ b/contrib/ntp/html/ntpdc.html
@@ -75,7 +75,8 @@
<dt><tt>quit</tt></dt>
<dd>Exit <tt>ntpdc</tt>.</dd>
<dt><tt>passwd</tt></dt>
- <dd>This command prompts you to type in a password (which will not be echoed) which will be used to authenticate configuration requests. The password must correspond to the key configured for use by the NTP server for this purpose if such requests are to be successful.</dd>
+ <dd>This command prompts you to type in a password (which will not be echoed) which will be used to authenticate configuration requests. The password must correspond to the key configured for use by the NTP server for this purpose if such requests are to be successful.
+ It follows the same rules as a password entry in the keys file of <tt>ntpd</tt>.</dd>
<dt><tt>timeout <i>milliseconds</i></tt></dt>
<dd>Specify a timeout period for responses to server queries. The default is about 8000 milliseconds. Note that since <tt>ntpdc</tt> retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout value set.</dd>
</dl>
diff --git a/contrib/ntp/html/ntpq.html b/contrib/ntp/html/ntpq.html
index 4789c8ba9cdc..e143d8596755 100644
--- a/contrib/ntp/html/ntpq.html
+++ b/contrib/ntp/html/ntpq.html
@@ -75,7 +75,8 @@
<dt id="ntpversion"><tt>ntpversion 1 | 2 | 3 | 4</tt></dt>
<dd>Sets the NTP version number which <tt>ntpq</tt> claims in packets. Defaults to 2, Note that mode-6 control messages (and modes, for that matter) didn't exist in NTP version 1.</dd>
<dt id="passwd"><tt>passwd</tt></dt>
- <dd>This command prompts for a password to authenticate requests. The password must correspond to the key ID configured in <tt>ntp.conf</tt> for this purpose.</dd>
+ <dd>This command prompts for a password to authenticate requests. The password must correspond to the key ID configured in <tt>ntp.conf</tt> for this purpose.
+ It follows the same rules as a password entry in the keys file of <tt>ntpd</tt>.</dd>
<dt id="quit"><tt>quit</tt></dt>
<dd>Exit <tt>ntpq</tt>.</dd>
<dt id="raw"><tt>raw</tt></dt>
diff --git a/contrib/ntp/html/scripts/clockopt.txt b/contrib/ntp/html/scripts/clockopt.txt
index 1c76a1ce408c..873524dcac61 100644
--- a/contrib/ntp/html/scripts/clockopt.txt
+++ b/contrib/ntp/html/scripts/clockopt.txt
@@ -1,5 +1,6 @@
document.write("<p>Reference Clock Commands and Options</p><ul>\
<li class='inline'><a href='clockopt.html#fudge'>fudge - specify fudge parameters</a><br>\
+<li class='inline'><a href='clockopt.html#device'>device - specify I/O and PPS device(s) for reference clock</a><br>\
<li class='inline'><a href='clockopt.html#server'>server - specify reference clock server</a><br>\
<li class='inline'><a href='comdex.html'>Command Index</a></li>\
</ul>")
diff --git a/contrib/ntp/include/Makefile.in b/contrib/ntp/include/Makefile.in
index 9e75bb3df245..5bf244e81bd8 100644
--- a/contrib/ntp/include/Makefile.in
+++ b/contrib/ntp/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -128,6 +127,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -173,7 +173,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
+ distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -191,8 +191,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -238,6 +236,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -247,6 +246,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -259,14 +260,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -477,6 +474,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -589,8 +587,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -706,8 +704,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/include/isc/Makefile.in b/contrib/ntp/include/isc/Makefile.in
index c730b3a03cff..037cfbe354bf 100644
--- a/contrib/ntp/include/isc/Makefile.in
+++ b/contrib/ntp/include/isc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -128,6 +127,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -175,8 +175,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -196,6 +194,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -205,6 +204,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -217,14 +218,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -435,6 +432,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -469,8 +467,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -539,8 +537,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/include/ntp.h b/contrib/ntp/include/ntp.h
index 8e0ea2b202a7..c037f5986016 100644
--- a/contrib/ntp/include/ntp.h
+++ b/contrib/ntp/include/ntp.h
@@ -759,6 +759,7 @@ struct pkt {
#define LOOP_CODEC 13 /* set audio codec frequency */
#define LOOP_LEAP 14 /* insert leap after second 23:59 */
#define LOOP_TICK 15 /* sim. low precision clock */
+#define LOOP_NOFREQ 16 /* undo a previos LOOP_FREQ */
/*
* Configuration items for the stats printer
diff --git a/contrib/ntp/include/ntp_config.h b/contrib/ntp/include/ntp_config.h
index 53546df8d6ca..dbb64e3a2eee 100644
--- a/contrib/ntp/include/ntp_config.h
+++ b/contrib/ntp/include/ntp_config.h
@@ -234,6 +234,7 @@ struct config_tree_tag {
restrict_fifo * restrict_opts;
addr_opts_fifo *fudge;
+ addr_opts_fifo *device;
attr_val_fifo * rlimit;
attr_val_fifo * tinker;
attr_val_fifo * enable_opts;
diff --git a/contrib/ntp/include/ntp_fp.h b/contrib/ntp/include/ntp_fp.h
index afd1f827459e..fe6e390a1481 100644
--- a/contrib/ntp/include/ntp_fp.h
+++ b/contrib/ntp/include/ntp_fp.h
@@ -195,9 +195,9 @@ typedef u_int32 u_fp;
do { \
int32 add_f = (int32)(f); \
if (add_f >= 0) \
- M_ADD((r_i), (r_f), 0, (uint32)( add_f)); \
+ M_ADD((r_i), (r_f), 0, (u_int32)( add_f)); \
else \
- M_SUB((r_i), (r_f), 0, (uint32)(-add_f)); \
+ M_SUB((r_i), (r_f), 0, (u_int32)(-add_f)); \
} while(0)
#define M_ISNEG(v_i) /* v < 0 */ \
diff --git a/contrib/ntp/include/ntp_random.h b/contrib/ntp/include/ntp_random.h
index fa77f6553ec6..931b2199020e 100644
--- a/contrib/ntp/include/ntp_random.h
+++ b/contrib/ntp/include/ntp_random.h
@@ -5,6 +5,7 @@ void ntp_crypto_srandom(void);
int ntp_crypto_random_buf(void *buf, size_t nbytes);
long ntp_random (void);
+double ntp_uurandom(void);
void ntp_srandom (unsigned long);
void ntp_srandomdev (void);
char * ntp_initstate (unsigned long, /* seed for R.N.G. */
diff --git a/contrib/ntp/include/ntp_refclock.h b/contrib/ntp/include/ntp_refclock.h
index e74e77aa791a..1f19d7bddeed 100644
--- a/contrib/ntp/include/ntp_refclock.h
+++ b/contrib/ntp/include/ntp_refclock.h
@@ -213,13 +213,15 @@ struct refclock {
extern int io_addclock (struct refclockio *);
extern void io_closeclock (struct refclockio *);
+#define FDWRITE_ERROR ((size_t)-1)
+
#ifdef REFCLOCK
extern void refclock_buginfo(sockaddr_u *,
struct refclockbug *);
extern void refclock_control(sockaddr_u *,
const struct refclockstat *,
struct refclockstat *);
-extern int refclock_open (const char *, u_int, u_int);
+extern int refclock_open (const sockaddr_u *srcadr, const char *, u_int, u_int);
extern int refclock_setup (int, u_int, u_int);
extern void refclock_timer (struct peer *);
extern void refclock_transmit(struct peer *);
@@ -232,6 +234,10 @@ extern int refclock_samples_expire(struct refclockproc *, int);
extern void refclock_report (struct peer *, int);
extern int refclock_gtlin (struct recvbuf *, char *, int, l_fp *);
extern int refclock_gtraw (struct recvbuf *, char *, int, l_fp *);
+extern size_t refclock_write (const struct peer *, const void *, size_t,
+ const char * what);
+extern size_t refclock_fdwrite(const struct peer *, int, const void *, size_t,
+ const char * what);
extern int indicate_refclock_packet(struct refclockio *,
struct recvbuf *);
extern void process_refclock_packet(struct recvbuf *);
@@ -250,6 +256,11 @@ extern int refclock_ppsaugment(
const struct refclock_atom*, l_fp *rcvtime ,
double rcvfudge, double ppsfudge);
+extern int ppsdev_reopen(const sockaddr_u *srcadr,
+ int ttyfd, int ppsfd, const char *ppspath,
+ int mode, int flags);
+extern void ppsdev_close(int ttyfd, int ppsfd);
+
#endif /* REFCLOCK */
#endif /* NTP_REFCLOCK_H */
diff --git a/contrib/ntp/include/ntp_stdlib.h b/contrib/ntp/include/ntp_stdlib.h
index 265aafa73ebc..2d7c640565d5 100644
--- a/contrib/ntp/include/ntp_stdlib.h
+++ b/contrib/ntp/include/ntp_stdlib.h
@@ -40,6 +40,8 @@ extern void setup_logfile (const char *);
extern void errno_to_str(int, char *, size_t);
#endif
+extern char * ntp_realpath(const char * fsname);
+
extern int xvsbprintf(char**, char* const, char const*, va_list) NTP_PRINTF(3, 0);
extern int xsbprintf(char**, char* const, char const*, ...) NTP_PRINTF(3, 4);
@@ -67,8 +69,17 @@ extern int xsbprintf(char**, char* const, char const*, ...) NTP_PRINTF(3, 4);
typedef void (*ctrl_c_fn)(void);
/* authkeys.c */
+#define AUTHPWD_MAXSECLEN 64 /* max. length of secret blob */
+
+enum AuthPwdEnc {
+ AUTHPWD_UNSPEC, /* format unspecified, length used for discrimination */
+ AUTHPWD_PLAIN, /* plain text, used as is */
+ AUTHPWD_HEX /* hex-encoded string */
+};
+
extern void auth_delkeys (void);
extern int auth_havekey (keyid_t);
+extern size_t authdecodepw (u_char *dst, size_t dstlen, const char *src, enum AuthPwdEnc);
extern int authdecrypt (keyid_t, u_int32 *, size_t, size_t);
extern size_t authencrypt (keyid_t, u_int32 *, size_t);
extern int authhavekey (keyid_t);
@@ -100,7 +111,7 @@ extern void auth_prealloc_symkeys(int);
extern int ymd2yd (int, int, int);
/* a_md5encrypt.c */
-extern int MD5authdecrypt (int, const u_char *, size_t, u_int32 *, size_t, size_t);
+extern int MD5authdecrypt (int, const u_char *, size_t, u_int32 *, size_t, size_t, keyid_t);
extern size_t MD5authencrypt (int, const u_char *, size_t, u_int32 *, size_t);
extern void MD5auth_setkey (keyid_t, int, const u_char *, size_t, KeyAccT *c);
extern u_int32 addr2refid (sockaddr_u *);
@@ -174,7 +185,7 @@ extern int sockaddr_masktoprefixlen(const sockaddr_u *);
extern const char * socktohost (const sockaddr_u *);
extern int octtoint (const char *, u_long *);
extern u_long ranp2 (int);
-extern const char *refnumtoa (sockaddr_u *);
+extern const char *refnumtoa (const sockaddr_u *);
extern const char *refid_str (u_int32, int);
extern int decodenetnum (const char *, sockaddr_u *);
diff --git a/contrib/ntp/include/ntp_types.h b/contrib/ntp/include/ntp_types.h
index 969b325b5db7..c3cf2c196521 100644
--- a/contrib/ntp/include/ntp_types.h
+++ b/contrib/ntp/include/ntp_types.h
@@ -168,11 +168,11 @@ typedef unsigned long long u_int64;
/*
* and here the trouble starts: We need a representation with more than
- * 64 bits. If a scalar of that size is not available, we need a struct
+ * 32 bits. If a scalar of that size is not available, we need a struct
* that holds the value in split representation.
*
* To ease the usage a bit, we alwys use a union that is in processor
- * byte order and might or might not contain a 64bit scalar.
+ * byte order and might or might not contain a 64-bit scalar.
*/
#if SIZEOF_SHORT != 2
@@ -258,10 +258,11 @@ aligned_ptr(
* Macro to use in otherwise-empty source files to comply with ANSI C
* requirement that each translation unit (source file) contain some
* declaration. This has commonly been done by declaring an unused
- * global variable of type int or char. An extern reference to exit()
- * serves the same purpose without bloat.
+ * global variable of type int or char. An extern reference to abs()
+ * serves the same purpose without bloat. We once used exit() but
+ * that can produce warnings on systems that declare exit() noreturn.
*/
-#define NONEMPTY_TRANSLATION_UNIT extern void exit(int);
+#define NONEMPTY_TRANSLATION_UNIT extern int abs(int);
/*
* On Unix struct sock_timeval is equivalent to struct timeval.
diff --git a/contrib/ntp/include/ntpd.h b/contrib/ntp/include/ntpd.h
index de9283360a46..ad3e30fbb889 100644
--- a/contrib/ntp/include/ntpd.h
+++ b/contrib/ntp/include/ntpd.h
@@ -483,6 +483,7 @@ extern struct peer *sys_peer; /* current peer */
* Nonspecified system state variables.
*/
extern int sys_bclient; /* we set our time to broadcasts */
+extern int sys_mclient; /* we set our time to manycasts */
extern double sys_bdelay; /* broadcast client default delay */
extern int sys_authenticate; /* requre authentication for config */
extern l_fp sys_authdelay; /* authentication delay */
diff --git a/contrib/ntp/include/ssl_applink.c b/contrib/ntp/include/ssl_applink.c
index 693380f01051..993d6f664e3b 100644
--- a/contrib/ntp/include/ssl_applink.c
+++ b/contrib/ntp/include/ssl_applink.c
@@ -14,7 +14,7 @@
# include "msvc_ssl_autolib.h"
# endif
# endif
-# if OPENSSL_VERSION_NUMBER < 0x10100000L
+# if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_VERSION_NUMBER >= 0x10101000L
# include <openssl/applink.c>
# endif
# ifdef _MSC_VER
diff --git a/contrib/ntp/include/vint64ops.h b/contrib/ntp/include/vint64ops.h
index 2c3deffb3813..888d342781fb 100644
--- a/contrib/ntp/include/vint64ops.h
+++ b/contrib/ntp/include/vint64ops.h
@@ -23,6 +23,6 @@ extern vint64 subv64i32(const vint64 * lhs, int32_t rhs);
extern vint64 subv64u32(const vint64 * lhs, uint32_t rhs);
/* parsing. works like strtoul() or strtoull() */
-extern vint64 strtouv64(const char * begp, char ** endp, int base);
+extern vint64 strtouv64(char const * begp, char const ** const endp, int base);
#endif /*!defined(VINT64OPS_H)*/
diff --git a/contrib/ntp/includes.mf b/contrib/ntp/includes.mf
index e868ba470b75..e34b908cc149 100644
--- a/contrib/ntp/includes.mf
+++ b/contrib/ntp/includes.mf
@@ -1,6 +1,6 @@
## includes.mf - automake fragment
NTP_INCS = -I$(top_srcdir)/include
-NTP_INCS += -I$(top_srcdir)/lib/isc/include
-NTP_INCS += -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include
-NTP_INCS += -I$(top_srcdir)/lib/isc/unix/include
+NTP_INCS += -I$(top_srcdir)/libntp/lib/isc/include
+NTP_INCS += -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include
+NTP_INCS += -I$(top_srcdir)/libntp/lib/isc/unix/include
diff --git a/contrib/ntp/kernel/Makefile.in b/contrib/ntp/kernel/Makefile.in
index e88b256d6447..f0cf22e84381 100644
--- a/contrib/ntp/kernel/Makefile.in
+++ b/contrib/ntp/kernel/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -107,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -127,6 +126,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -170,7 +170,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
+ distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -188,8 +188,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -235,6 +233,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -244,6 +243,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -256,14 +257,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -474,6 +471,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -504,8 +502,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -621,8 +619,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/kernel/sys/Makefile.in b/contrib/ntp/kernel/sys/Makefile.in
index 684023c29e7c..447e32e2cc8e 100644
--- a/contrib/ntp/kernel/sys/Makefile.in
+++ b/contrib/ntp/kernel/sys/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -128,6 +127,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -175,8 +175,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -196,6 +194,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -205,6 +204,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -217,14 +218,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -435,6 +432,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -467,8 +465,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -537,8 +535,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/lib/isc/Atffile b/contrib/ntp/lib/isc/Atffile
deleted file mode 100644
index 1edb838c66cc..000000000000
--- a/contrib/ntp/lib/isc/Atffile
+++ /dev/null
@@ -1,5 +0,0 @@
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = bind9
-
-tp: tests
diff --git a/contrib/ntp/lib/isc/alpha/include/isc/atomic.h b/contrib/ntp/lib/isc/alpha/include/isc/atomic.h
deleted file mode 100644
index ab3de5de7aa9..000000000000
--- a/contrib/ntp/lib/isc/alpha/include/isc/atomic.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (C) 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: atomic.h,v 1.7 2009/04/08 06:48:23 tbox Exp $ */
-
-/*
- * This code was written based on FreeBSD's kernel source whose copyright
- * follows:
- */
-
-/*-
- * Copyright (c) 1998 Doug Rabson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: 258945 2013-12-04 21:33:17Z roberto $
- */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-#include <isc/platform.h>
-#include <isc/types.h>
-
-#ifdef ISC_PLATFORM_USEOSFASM
-#include <c_asm.h>
-
-#pragma intrinsic(asm)
-
-/*
- * This routine atomically increments the value stored in 'p' by 'val', and
- * returns the previous value. Memory access ordering around this function
- * can be critical, so we add explicit memory block instructions at the
- * beginning and the end of it (same for other functions).
- */
-static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- return (asm("mb;"
- "1:"
- "ldl_l %t0, 0(%a0);" /* load old value */
- "mov %t0, %v0;" /* copy the old value */
- "addl %t0, %a1, %t0;" /* calculate new value */
- "stl_c %t0, 0(%a0);" /* attempt to store */
- "beq %t0, 1b;" /* spin if failed */
- "mb;",
- p, val));
-}
-
-/*
- * This routine atomically stores the value 'val' in 'p'.
- */
-static inline void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
- (void)asm("mb;"
- "1:"
- "ldl_l %t0, 0(%a0);" /* load old value */
- "mov %a1, %t0;" /* value to store */
- "stl_c %t0, 0(%a0);" /* attempt to store */
- "beq %t0, 1b;" /* spin if failed */
- "mb;",
- p, val);
-}
-
-/*
- * This routine atomically replaces the value in 'p' with 'val', if the
- * original value is equal to 'cmpval'. The original value is returned in any
- * case.
- */
-static inline isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
-
- return(asm("mb;"
- "1:"
- "ldl_l %t0, 0(%a0);" /* load old value */
- "mov %t0, %v0;" /* copy the old value */
- "cmpeq %t0, %a1, %t0;" /* compare */
- "beq %t0, 2f;" /* exit if not equal */
- "mov %a2, %t0;" /* value to store */
- "stl_c %t0, 0(%a0);" /* attempt to store */
- "beq %t0, 1b;" /* if it failed, spin */
- "2:"
- "mb;",
- p, cmpval, val));
-}
-#elif defined (ISC_PLATFORM_USEGCCASM)
-static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- isc_int32_t temp, prev;
-
- __asm__ volatile(
- "mb;"
- "1:"
- "ldl_l %0, %1;" /* load old value */
- "mov %0, %2;" /* copy the old value */
- "addl %0, %3, %0;" /* calculate new value */
- "stl_c %0, %1;" /* attempt to store */
- "beq %0, 1b;" /* spin if failed */
- "mb;"
- : "=&r"(temp), "+m"(*p), "=&r"(prev)
- : "r"(val)
- : "memory");
-
- return (prev);
-}
-
-static inline void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
- isc_int32_t temp;
-
- __asm__ volatile(
- "mb;"
- "1:"
- "ldl_l %0, %1;" /* load old value */
- "mov %2, %0;" /* value to store */
- "stl_c %0, %1;" /* attempt to store */
- "beq %0, 1b;" /* if it failed, spin */
- "mb;"
- : "=&r"(temp), "+m"(*p)
- : "r"(val)
- : "memory");
-}
-
-static inline isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
- isc_int32_t temp, prev;
-
- __asm__ volatile(
- "mb;"
- "1:"
- "ldl_l %0, %1;" /* load old value */
- "mov %0, %2;" /* copy the old value */
- "cmpeq %0, %3, %0;" /* compare */
- "beq %0, 2f;" /* exit if not equal */
- "mov %4, %0;" /* value to store */
- "stl_c %0, %1;" /* attempt to store */
- "beq %0, 1b;" /* if it failed, spin */
- "2:"
- "mb;"
- : "=&r"(temp), "+m"(*p), "=&r"(prev)
- : "r"(cmpval), "r"(val)
- : "memory");
-
- return (prev);
-}
-#else
-
-#error "unsupported compiler. disable atomic ops by --disable-atomic"
-
-#endif
-
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/lib/isc/api b/contrib/ntp/lib/isc/api
deleted file mode 100644
index ed4b69f8b8f7..000000000000
--- a/contrib/ntp/lib/isc/api
+++ /dev/null
@@ -1,8 +0,0 @@
-# LIBINTERFACE ranges
-# 9.6: 50-59, 110-119
-# 9.7: 60-79
-# 9.8: 80-89
-# 9.9: 90-109
-LIBINTERFACE = 91
-LIBREVISION = 1
-LIBAGE = 1
diff --git a/contrib/ntp/lib/isc/app_api.c b/contrib/ntp/lib/isc/app_api.c
deleted file mode 100644
index ce767d175053..000000000000
--- a/contrib/ntp/lib/isc/app_api.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: app_api.c,v 1.5 2009/09/02 23:48:02 tbox Exp $ */
-
-#include <config.h>
-
-#include <unistd.h>
-
-#include <isc/app.h>
-#include <isc/magic.h>
-#include <isc/mutex.h>
-#include <isc/once.h>
-#include <isc/util.h>
-
-static isc_mutex_t createlock;
-static isc_once_t once = ISC_ONCE_INIT;
-static isc_appctxcreatefunc_t appctx_createfunc = NULL;
-
-#define ISCAPI_APPMETHODS_VALID(m) ISC_MAGIC_VALID(m, ISCAPI_APPMETHODS_MAGIC)
-
-static void
-initialize(void) {
- RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_app_register(isc_appctxcreatefunc_t createfunc) {
- isc_result_t result = ISC_R_SUCCESS;
-
- RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
-
- LOCK(&createlock);
- if (appctx_createfunc == NULL)
- appctx_createfunc = createfunc;
- else
- result = ISC_R_EXISTS;
- UNLOCK(&createlock);
-
- return (result);
-}
-
-isc_result_t
-isc_appctx_create(isc_mem_t *mctx, isc_appctx_t **ctxp) {
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(appctx_createfunc != NULL);
- result = (*appctx_createfunc)(mctx, ctxp);
-
- UNLOCK(&createlock);
-
- return (result);
-}
-
-void
-isc_appctx_destroy(isc_appctx_t **ctxp) {
- REQUIRE(ctxp != NULL && ISCAPI_APPCTX_VALID(*ctxp));
-
- (*ctxp)->methods->ctxdestroy(ctxp);
-
- ENSURE(*ctxp == NULL);
-}
-
-isc_result_t
-isc_app_ctxstart(isc_appctx_t *ctx) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
-
- return (ctx->methods->ctxstart(ctx));
-}
-
-isc_result_t
-isc_app_ctxrun(isc_appctx_t *ctx) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
-
- return (ctx->methods->ctxrun(ctx));
-}
-
-isc_result_t
-isc_app_ctxsuspend(isc_appctx_t *ctx) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
-
- return (ctx->methods->ctxsuspend(ctx));
-}
-
-isc_result_t
-isc_app_ctxshutdown(isc_appctx_t *ctx) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
-
- return (ctx->methods->ctxshutdown(ctx));
-}
-
-void
-isc_app_ctxfinish(isc_appctx_t *ctx) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
-
- ctx->methods->ctxfinish(ctx);
-}
-
-void
-isc_appctx_settaskmgr(isc_appctx_t *ctx, isc_taskmgr_t *taskmgr) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
- REQUIRE(taskmgr != NULL);
-
- ctx->methods->settaskmgr(ctx, taskmgr);
-}
-
-void
-isc_appctx_setsocketmgr(isc_appctx_t *ctx, isc_socketmgr_t *socketmgr) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
- REQUIRE(socketmgr != NULL);
-
- ctx->methods->setsocketmgr(ctx, socketmgr);
-}
-
-void
-isc_appctx_settimermgr(isc_appctx_t *ctx, isc_timermgr_t *timermgr) {
- REQUIRE(ISCAPI_APPCTX_VALID(ctx));
- REQUIRE(timermgr != NULL);
-
- ctx->methods->settimermgr(ctx, timermgr);
-}
diff --git a/contrib/ntp/lib/isc/base32.c b/contrib/ntp/lib/isc/base32.c
deleted file mode 100644
index d25e3c4716bb..000000000000
--- a/contrib/ntp/lib/isc/base32.c
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: base32.c,v 1.6 2009/10/21 01:22:29 each Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/base32.h>
-#include <isc/buffer.h>
-#include <isc/lex.h>
-#include <isc/region.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-#define RETERR(x) do { \
- isc_result_t _r = (x); \
- if (_r != ISC_R_SUCCESS) \
- return (_r); \
- } while (0)
-
-
-/*@{*/
-/*!
- * These static functions are also present in lib/dns/rdata.c. I'm not
- * sure where they should go. -- bwelling
- */
-static isc_result_t
-str_totext(const char *source, isc_buffer_t *target);
-
-static isc_result_t
-mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length);
-
-/*@}*/
-
-static const char base32[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=abcdefghijklmnopqrstuvwxyz234567";
-static const char base32hex[] =
- "0123456789ABCDEFGHIJKLMNOPQRSTUV=0123456789abcdefghijklmnopqrstuv";
-
-static isc_result_t
-base32_totext(isc_region_t *source, int wordlength, const char *wordbreak,
- isc_buffer_t *target, const char base[])
-{
- char buf[9];
- unsigned int loops = 0;
-
- if (wordlength >= 0 && wordlength < 8)
- wordlength = 8;
-
- memset(buf, 0, sizeof(buf));
- while (source->length > 0) {
- buf[0] = base[((source->base[0]>>3)&0x1f)]; /* 5 + */
- if (source->length == 1) {
- buf[1] = base[(source->base[0]<<2)&0x1c];
- buf[2] = buf[3] = buf[4] = '=';
- buf[5] = buf[6] = buf[7] = '=';
- RETERR(str_totext(buf, target));
- break;
- }
- buf[1] = base[((source->base[0]<<2)&0x1c)| /* 3 = 8 */
- ((source->base[1]>>6)&0x03)]; /* 2 + */
- buf[2] = base[((source->base[1]>>1)&0x1f)]; /* 5 + */
- if (source->length == 2) {
- buf[3] = base[(source->base[1]<<4)&0x10];
- buf[4] = buf[5] = buf[6] = buf[7] = '=';
- RETERR(str_totext(buf, target));
- break;
- }
- buf[3] = base[((source->base[1]<<4)&0x10)| /* 1 = 8 */
- ((source->base[2]>>4)&0x0f)]; /* 4 + */
- if (source->length == 3) {
- buf[4] = base[(source->base[2]<<1)&0x1e];
- buf[5] = buf[6] = buf[7] = '=';
- RETERR(str_totext(buf, target));
- break;
- }
- buf[4] = base[((source->base[2]<<1)&0x1e)| /* 4 = 8 */
- ((source->base[3]>>7)&0x01)]; /* 1 + */
- buf[5] = base[((source->base[3]>>2)&0x1f)]; /* 5 + */
- if (source->length == 4) {
- buf[6] = base[(source->base[3]<<3)&0x18];
- buf[7] = '=';
- RETERR(str_totext(buf, target));
- break;
- }
- buf[6] = base[((source->base[3]<<3)&0x18)| /* 2 = 8 */
- ((source->base[4]>>5)&0x07)]; /* 3 + */
- buf[7] = base[source->base[4]&0x1f]; /* 5 = 8 */
- RETERR(str_totext(buf, target));
- isc_region_consume(source, 5);
-
- loops++;
- if (source->length != 0 && wordlength >= 0 &&
- (int)((loops + 1) * 8) >= wordlength)
- {
- loops = 0;
- RETERR(str_totext(wordbreak, target));
- }
- }
- if (source->length > 0)
- isc_region_consume(source, source->length);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_base32_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target)
-{
- return (base32_totext(source, wordlength, wordbreak, target, base32));
-}
-
-isc_result_t
-isc_base32hex_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target)
-{
- return (base32_totext(source, wordlength, wordbreak, target,
- base32hex));
-}
-
-/*%
- * State of a base32 decoding process in progress.
- */
-typedef struct {
- int length; /*%< Desired length of binary data or -1 */
- isc_buffer_t *target; /*%< Buffer for resulting binary data */
- int digits; /*%< Number of buffered base32 digits */
- isc_boolean_t seen_end; /*%< True if "=" end marker seen */
- int val[8];
- const char *base; /*%< Which encoding we are using */
- int seen_32; /*%< Number of significant bytes if non zero */
-} base32_decode_ctx_t;
-
-static inline void
-base32_decode_init(base32_decode_ctx_t *ctx, int length,
- const char base[], isc_buffer_t *target)
-{
- ctx->digits = 0;
- ctx->seen_end = ISC_FALSE;
- ctx->seen_32 = 0;
- ctx->length = length;
- ctx->target = target;
- ctx->base = base;
-}
-
-static inline isc_result_t
-base32_decode_char(base32_decode_ctx_t *ctx, int c) {
- char *s;
- unsigned int last;
-
- if (ctx->seen_end)
- return (ISC_R_BADBASE32);
- if ((s = strchr(ctx->base, c)) == NULL)
- return (ISC_R_BADBASE32);
- last = s - ctx->base;
- /*
- * Handle lower case.
- */
- if (last > 32)
- last -= 33;
- /*
- * Check that padding is contiguous.
- */
- if (last != 32 && ctx->seen_32 != 0)
- return (ISC_R_BADBASE32);
- /*
- * Check that padding starts at the right place and that
- * bits that should be zero are.
- * Record how many significant bytes in answer (seen_32).
- */
- if (last == 32 && ctx->seen_32 == 0)
- switch (ctx->digits) {
- case 0:
- case 1:
- return (ISC_R_BADBASE32);
- case 2:
- if ((ctx->val[1]&0x03) != 0)
- return (ISC_R_BADBASE32);
- ctx->seen_32 = 1;
- break;
- case 3:
- return (ISC_R_BADBASE32);
- case 4:
- if ((ctx->val[3]&0x0f) != 0)
- return (ISC_R_BADBASE32);
- ctx->seen_32 = 3;
- break;
- case 5:
- if ((ctx->val[4]&0x01) != 0)
- return (ISC_R_BADBASE32);
- ctx->seen_32 = 3;
- break;
- case 6:
- return (ISC_R_BADBASE32);
- case 7:
- if ((ctx->val[6]&0x07) != 0)
- return (ISC_R_BADBASE32);
- ctx->seen_32 = 4;
- break;
- }
- /*
- * Zero fill pad values.
- */
- ctx->val[ctx->digits++] = (last == 32) ? 0 : last;
-
- if (ctx->digits == 8) {
- int n = 5;
- unsigned char buf[5];
-
- if (ctx->seen_32 != 0) {
- ctx->seen_end = ISC_TRUE;
- n = ctx->seen_32;
- }
- buf[0] = (ctx->val[0]<<3)|(ctx->val[1]>>2);
- buf[1] = (ctx->val[1]<<6)|(ctx->val[2]<<1)|(ctx->val[3]>>4);
- buf[2] = (ctx->val[3]<<4)|(ctx->val[4]>>1);
- buf[3] = (ctx->val[4]<<7)|(ctx->val[5]<<2)|(ctx->val[6]>>3);
- buf[4] = (ctx->val[6]<<5)|(ctx->val[7]);
- RETERR(mem_tobuffer(ctx->target, buf, n));
- if (ctx->length >= 0) {
- if (n > ctx->length)
- return (ISC_R_BADBASE32);
- else
- ctx->length -= n;
- }
- ctx->digits = 0;
- }
- return (ISC_R_SUCCESS);
-}
-
-static inline isc_result_t
-base32_decode_finish(base32_decode_ctx_t *ctx) {
- if (ctx->length > 0)
- return (ISC_R_UNEXPECTEDEND);
- if (ctx->digits != 0)
- return (ISC_R_BADBASE32);
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-base32_tobuffer(isc_lex_t *lexer, const char base[], isc_buffer_t *target,
- int length)
-{
- base32_decode_ctx_t ctx;
- isc_textregion_t *tr;
- isc_token_t token;
- isc_boolean_t eol;
-
- base32_decode_init(&ctx, length, base, target);
-
- while (!ctx.seen_end && (ctx.length != 0)) {
- unsigned int i;
-
- if (length > 0)
- eol = ISC_FALSE;
- else
- eol = ISC_TRUE;
- RETERR(isc_lex_getmastertoken(lexer, &token,
- isc_tokentype_string, eol));
- if (token.type != isc_tokentype_string)
- break;
- tr = &token.value.as_textregion;
- for (i = 0; i < tr->length; i++)
- RETERR(base32_decode_char(&ctx, tr->base[i]));
- }
- if (ctx.length < 0 && !ctx.seen_end)
- isc_lex_ungettoken(lexer, &token);
- RETERR(base32_decode_finish(&ctx));
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_base32_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
- return (base32_tobuffer(lexer, base32, target, length));
-}
-
-isc_result_t
-isc_base32hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
- return (base32_tobuffer(lexer, base32hex, target, length));
-}
-
-static isc_result_t
-base32_decodestring(const char *cstr, const char base[], isc_buffer_t *target) {
- base32_decode_ctx_t ctx;
-
- base32_decode_init(&ctx, -1, base, target);
- for (;;) {
- int c = *cstr++;
- if (c == '\0')
- break;
- if (c == ' ' || c == '\t' || c == '\n' || c== '\r')
- continue;
- RETERR(base32_decode_char(&ctx, c));
- }
- RETERR(base32_decode_finish(&ctx));
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_base32_decodestring(const char *cstr, isc_buffer_t *target) {
- return (base32_decodestring(cstr, base32, target));
-}
-
-isc_result_t
-isc_base32hex_decodestring(const char *cstr, isc_buffer_t *target) {
- return (base32_decodestring(cstr, base32hex, target));
-}
-
-static isc_result_t
-base32_decoderegion(isc_region_t *source, const char base[], isc_buffer_t *target) {
- base32_decode_ctx_t ctx;
-
- base32_decode_init(&ctx, -1, base, target);
- while (source->length != 0) {
- int c = *source->base;
- RETERR(base32_decode_char(&ctx, c));
- isc_region_consume(source, 1);
- }
- RETERR(base32_decode_finish(&ctx));
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_base32_decoderegion(isc_region_t *source, isc_buffer_t *target) {
- return (base32_decoderegion(source, base32, target));
-}
-
-isc_result_t
-isc_base32hex_decoderegion(isc_region_t *source, isc_buffer_t *target) {
- return (base32_decoderegion(source, base32hex, target));
-}
-
-static isc_result_t
-str_totext(const char *source, isc_buffer_t *target) {
- unsigned int l;
- isc_region_t region;
-
- isc_buffer_availableregion(target, &region);
- l = strlen(source);
-
- if (l > region.length)
- return (ISC_R_NOSPACE);
-
- memcpy(region.base, source, l);
- isc_buffer_add(target, l);
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
- isc_region_t tr;
-
- isc_buffer_availableregion(target, &tr);
- if (length > tr.length)
- return (ISC_R_NOSPACE);
- memcpy(tr.base, base, length);
- isc_buffer_add(target, length);
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/base64.c b/contrib/ntp/lib/isc/base64.c
deleted file mode 100644
index bad1565bea7b..000000000000
--- a/contrib/ntp/lib/isc/base64.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: base64.c,v 1.34 2009/10/21 23:48:05 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/base64.h>
-#include <isc/buffer.h>
-#include <isc/lex.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-#define RETERR(x) do { \
- isc_result_t _r = (x); \
- if (_r != ISC_R_SUCCESS) \
- return (_r); \
- } while (0)
-
-
-/*@{*/
-/*!
- * These static functions are also present in lib/dns/rdata.c. I'm not
- * sure where they should go. -- bwelling
- */
-static isc_result_t
-str_totext(const char *source, isc_buffer_t *target);
-
-static isc_result_t
-mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length);
-
-static const char base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-/*@}*/
-
-isc_result_t
-isc_base64_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target)
-{
- char buf[5];
- unsigned int loops = 0;
-
- if (wordlength < 4)
- wordlength = 4;
-
- memset(buf, 0, sizeof(buf));
- while (source->length > 2) {
- buf[0] = base64[(source->base[0]>>2)&0x3f];
- buf[1] = base64[((source->base[0]<<4)&0x30)|
- ((source->base[1]>>4)&0x0f)];
- buf[2] = base64[((source->base[1]<<2)&0x3c)|
- ((source->base[2]>>6)&0x03)];
- buf[3] = base64[source->base[2]&0x3f];
- RETERR(str_totext(buf, target));
- isc_region_consume(source, 3);
-
- loops++;
- if (source->length != 0 &&
- (int)((loops + 1) * 4) >= wordlength)
- {
- loops = 0;
- RETERR(str_totext(wordbreak, target));
- }
- }
- if (source->length == 2) {
- buf[0] = base64[(source->base[0]>>2)&0x3f];
- buf[1] = base64[((source->base[0]<<4)&0x30)|
- ((source->base[1]>>4)&0x0f)];
- buf[2] = base64[((source->base[1]<<2)&0x3c)];
- buf[3] = '=';
- RETERR(str_totext(buf, target));
- isc_region_consume(source, 2);
- } else if (source->length == 1) {
- buf[0] = base64[(source->base[0]>>2)&0x3f];
- buf[1] = base64[((source->base[0]<<4)&0x30)];
- buf[2] = buf[3] = '=';
- RETERR(str_totext(buf, target));
- isc_region_consume(source, 1);
- }
- return (ISC_R_SUCCESS);
-}
-
-/*%
- * State of a base64 decoding process in progress.
- */
-typedef struct {
- int length; /*%< Desired length of binary data or -1 */
- isc_buffer_t *target; /*%< Buffer for resulting binary data */
- int digits; /*%< Number of buffered base64 digits */
- isc_boolean_t seen_end; /*%< True if "=" end marker seen */
- int val[4];
-} base64_decode_ctx_t;
-
-static inline void
-base64_decode_init(base64_decode_ctx_t *ctx, int length, isc_buffer_t *target)
-{
- ctx->digits = 0;
- ctx->seen_end = ISC_FALSE;
- ctx->length = length;
- ctx->target = target;
-}
-
-static inline isc_result_t
-base64_decode_char(base64_decode_ctx_t *ctx, int c) {
- char *s;
-
- if (ctx->seen_end)
- return (ISC_R_BADBASE64);
- if ((s = strchr(base64, c)) == NULL)
- return (ISC_R_BADBASE64);
- ctx->val[ctx->digits++] = s - base64;
- if (ctx->digits == 4) {
- int n;
- unsigned char buf[3];
- if (ctx->val[0] == 64 || ctx->val[1] == 64)
- return (ISC_R_BADBASE64);
- if (ctx->val[2] == 64 && ctx->val[3] != 64)
- return (ISC_R_BADBASE64);
- /*
- * Check that bits that should be zero are.
- */
- if (ctx->val[2] == 64 && (ctx->val[1] & 0xf) != 0)
- return (ISC_R_BADBASE64);
- /*
- * We don't need to test for ctx->val[2] != 64 as
- * the bottom two bits of 64 are zero.
- */
- if (ctx->val[3] == 64 && (ctx->val[2] & 0x3) != 0)
- return (ISC_R_BADBASE64);
- n = (ctx->val[2] == 64) ? 1 :
- (ctx->val[3] == 64) ? 2 : 3;
- if (n != 3) {
- ctx->seen_end = ISC_TRUE;
- if (ctx->val[2] == 64)
- ctx->val[2] = 0;
- if (ctx->val[3] == 64)
- ctx->val[3] = 0;
- }
- buf[0] = (ctx->val[0]<<2)|(ctx->val[1]>>4);
- buf[1] = (ctx->val[1]<<4)|(ctx->val[2]>>2);
- buf[2] = (ctx->val[2]<<6)|(ctx->val[3]);
- RETERR(mem_tobuffer(ctx->target, buf, n));
- if (ctx->length >= 0) {
- if (n > ctx->length)
- return (ISC_R_BADBASE64);
- else
- ctx->length -= n;
- }
- ctx->digits = 0;
- }
- return (ISC_R_SUCCESS);
-}
-
-static inline isc_result_t
-base64_decode_finish(base64_decode_ctx_t *ctx) {
- if (ctx->length > 0)
- return (ISC_R_UNEXPECTEDEND);
- if (ctx->digits != 0)
- return (ISC_R_BADBASE64);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
- base64_decode_ctx_t ctx;
- isc_textregion_t *tr;
- isc_token_t token;
- isc_boolean_t eol;
-
- base64_decode_init(&ctx, length, target);
-
- while (!ctx.seen_end && (ctx.length != 0)) {
- unsigned int i;
-
- if (length > 0)
- eol = ISC_FALSE;
- else
- eol = ISC_TRUE;
- RETERR(isc_lex_getmastertoken(lexer, &token,
- isc_tokentype_string, eol));
- if (token.type != isc_tokentype_string)
- break;
- tr = &token.value.as_textregion;
- for (i = 0; i < tr->length; i++)
- RETERR(base64_decode_char(&ctx, tr->base[i]));
- }
- if (ctx.length < 0 && !ctx.seen_end)
- isc_lex_ungettoken(lexer, &token);
- RETERR(base64_decode_finish(&ctx));
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_base64_decodestring(const char *cstr, isc_buffer_t *target) {
- base64_decode_ctx_t ctx;
-
- base64_decode_init(&ctx, -1, target);
- for (;;) {
- int c = *cstr++;
- if (c == '\0')
- break;
- if (c == ' ' || c == '\t' || c == '\n' || c== '\r')
- continue;
- RETERR(base64_decode_char(&ctx, c));
- }
- RETERR(base64_decode_finish(&ctx));
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-str_totext(const char *source, isc_buffer_t *target) {
- unsigned int l;
- isc_region_t region;
-
- isc_buffer_availableregion(target, &region);
- l = strlen(source);
-
- if (l > region.length)
- return (ISC_R_NOSPACE);
-
- memcpy(region.base, source, l);
- isc_buffer_add(target, l);
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
- isc_region_t tr;
-
- isc_buffer_availableregion(target, &tr);
- if (length > tr.length)
- return (ISC_R_NOSPACE);
- memcpy(tr.base, base, length);
- isc_buffer_add(target, length);
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/bitstring.c b/contrib/ntp/lib/isc/bitstring.c
deleted file mode 100644
index 33c7c1fa6d8b..000000000000
--- a/contrib/ntp/lib/isc/bitstring.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: bitstring.c,v 1.17 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/magic.h>
-#include <isc/bitstring.h>
-#include <isc/util.h>
-
-#define DIV8(x) ((x) >> 3)
-#define MOD8(x) ((x) & 0x00000007U)
-#define OCTETS(n) (((n) + 7) >> 3)
-#define PADDED(n) ((((n) + 7) >> 3) << 3)
-#define BITSET(bs, n) (((bs)->data[DIV8(n)] & \
- (1 << (7 - MOD8(n)))) != 0)
-#define SETBIT(bs, n) (bs)->data[DIV8(n)] |= (1 << (7 - MOD8(n)))
-#define CLEARBIT(bs, n) (bs)->data[DIV8(n)] &= ~(1 << (7 - MOD8(n)))
-
-#define BITSTRING_MAGIC ISC_MAGIC('B', 'S', 't', 'r')
-#define VALID_BITSTRING(b) ISC_MAGIC_VALID(b, BITSTRING_MAGIC)
-
-void
-isc_bitstring_init(isc_bitstring_t *bitstring, unsigned char *data,
- unsigned int length, unsigned int size, isc_boolean_t lsb0)
-{
- /*
- * Make 'bitstring' refer to the bitstring of 'size' bits starting
- * at 'data'. 'length' bits of the bitstring are valid. If 'lsb0'
- * is set then, bit 0 refers to the least significant bit of the
- * bitstring. Otherwise bit 0 is the most significant bit.
- */
-
- REQUIRE(bitstring != NULL);
- REQUIRE(data != NULL);
- REQUIRE(length <= size);
-
- bitstring->magic = BITSTRING_MAGIC;
- bitstring->data = data;
- bitstring->length = length;
- bitstring->size = size;
- bitstring->lsb0 = lsb0;
-}
-
-void
-isc_bitstring_invalidate(isc_bitstring_t *bitstring) {
-
- /*
- * Invalidate 'bitstring'.
- */
-
- REQUIRE(VALID_BITSTRING(bitstring));
-
- bitstring->magic = 0;
- bitstring->data = NULL;
- bitstring->length = 0;
- bitstring->size = 0;
- bitstring->lsb0 = ISC_FALSE;
-}
-
-void
-isc_bitstring_copy(isc_bitstring_t *source, unsigned int sbitpos,
- isc_bitstring_t *target, unsigned int tbitpos,
- unsigned int n)
-{
- unsigned int tlast;
-
- /*
- * Starting at bit 'sbitpos', copy 'n' bits from 'source' to
- * the 'n' bits of 'target' starting at 'tbitpos'.
- */
-
- REQUIRE(VALID_BITSTRING(source));
- REQUIRE(VALID_BITSTRING(target));
- REQUIRE(source->lsb0 == target->lsb0);
- if (source->lsb0) {
- REQUIRE(sbitpos <= source->length);
- sbitpos = PADDED(source->size) - sbitpos;
- REQUIRE(sbitpos >= n);
- sbitpos -= n;
- } else
- REQUIRE(sbitpos + n <= source->length);
- tlast = tbitpos + n;
- if (target->lsb0) {
- REQUIRE(tbitpos <= target->length);
- tbitpos = PADDED(target->size) - tbitpos;
- REQUIRE(tbitpos >= n);
- tbitpos -= n;
- } else
- REQUIRE(tlast <= target->size);
-
- if (tlast > target->length)
- target->length = tlast;
-
- /*
- * This is far from optimal...
- */
-
- while (n > 0) {
- if (BITSET(source, sbitpos))
- SETBIT(target, tbitpos);
- else
- CLEARBIT(target, tbitpos);
- sbitpos++;
- tbitpos++;
- n--;
- }
-}
diff --git a/contrib/ntp/lib/isc/bufferlist.c b/contrib/ntp/lib/isc/bufferlist.c
deleted file mode 100644
index 0e5c1251bf04..000000000000
--- a/contrib/ntp/lib/isc/bufferlist.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: bufferlist.c,v 1.17 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/buffer.h>
-#include <isc/bufferlist.h>
-#include <isc/util.h>
-
-unsigned int
-isc_bufferlist_usedcount(isc_bufferlist_t *bl) {
- isc_buffer_t *buffer;
- unsigned int length;
-
- REQUIRE(bl != NULL);
-
- length = 0;
- buffer = ISC_LIST_HEAD(*bl);
- while (buffer != NULL) {
- REQUIRE(ISC_BUFFER_VALID(buffer));
- length += isc_buffer_usedlength(buffer);
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- return (length);
-}
-
-unsigned int
-isc_bufferlist_availablecount(isc_bufferlist_t *bl) {
- isc_buffer_t *buffer;
- unsigned int length;
-
- REQUIRE(bl != NULL);
-
- length = 0;
- buffer = ISC_LIST_HEAD(*bl);
- while (buffer != NULL) {
- REQUIRE(ISC_BUFFER_VALID(buffer));
- length += isc_buffer_availablelength(buffer);
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- return (length);
-}
diff --git a/contrib/ntp/lib/isc/commandline.c b/contrib/ntp/lib/isc/commandline.c
deleted file mode 100644
index aca1203ce338..000000000000
--- a/contrib/ntp/lib/isc/commandline.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Portions Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * Copyright (c) 1987, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* $Id: commandline.c,v 1.22 2008/09/25 04:02:39 tbox Exp $ */
-
-/*! \file
- * This file was adapted from the NetBSD project's source tree, RCS ID:
- * NetBSD: getopt.c,v 1.15 1999/09/20 04:39:37 lukem Exp
- *
- * The primary change has been to rename items to the ISC namespace
- * and format in the ISC coding style.
- */
-
-/*
- * \author Principal Authors: Computer Systems Research Group at UC Berkeley
- * \author Principal ISC caretaker: DCL
- */
-
-#include <config.h>
-
-#include <stdio.h>
-
-#include <isc/commandline.h>
-#include <isc/msgs.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-/*% Index into parent argv vector. */
-LIBISC_EXTERNAL_DATA int isc_commandline_index = 1;
-/*% Character checked for validity. */
-LIBISC_EXTERNAL_DATA int isc_commandline_option;
-/*% Argument associated with option. */
-LIBISC_EXTERNAL_DATA char *isc_commandline_argument;
-/*% For printing error messages. */
-LIBISC_EXTERNAL_DATA char *isc_commandline_progname;
-/*% Print error messages. */
-LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_errprint = ISC_TRUE;
-/*% Reset processing. */
-LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_reset = ISC_TRUE;
-
-static char endopt = '\0';
-
-#define BADOPT '?'
-#define BADARG ':'
-#define ENDOPT &endopt
-
-/*!
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-isc_commandline_parse(int argc, char * const *argv, const char *options) {
- static char *place = ENDOPT;
- char *option; /* Index into *options of option. */
-
- REQUIRE(argc >= 0 && argv != NULL && options != NULL);
-
- /*
- * Update scanning pointer, either because a reset was requested or
- * the previous argv was finished.
- */
- if (isc_commandline_reset || *place == '\0') {
- if (isc_commandline_reset) {
- isc_commandline_index = 1;
- isc_commandline_reset = ISC_FALSE;
- }
-
- if (isc_commandline_progname == NULL)
- isc_commandline_progname = argv[0];
-
- if (isc_commandline_index >= argc ||
- *(place = argv[isc_commandline_index]) != '-') {
- /*
- * Index out of range or points to non-option.
- */
- place = ENDOPT;
- return (-1);
- }
-
- if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
- /*
- * Found '--' to signal end of options. Advance
- * index to next argv, the first non-option.
- */
- isc_commandline_index++;
- place = ENDOPT;
- return (-1);
- }
- }
-
- isc_commandline_option = *place++;
- option = strchr(options, isc_commandline_option);
-
- /*
- * Ensure valid option has been passed as specified by options string.
- * '-:' is never a valid command line option because it could not
- * distinguish ':' from the argument specifier in the options string.
- */
- if (isc_commandline_option == ':' || option == NULL) {
- if (*place == '\0')
- isc_commandline_index++;
-
- if (isc_commandline_errprint && *options != ':')
- fprintf(stderr, "%s: %s -- %c\n",
- isc_commandline_progname,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_COMMANDLINE,
- ISC_MSG_ILLEGALOPT,
- "illegal option"),
- isc_commandline_option);
-
- return (BADOPT);
- }
-
- if (*++option != ':') {
- /*
- * Option does not take an argument.
- */
- isc_commandline_argument = NULL;
-
- /*
- * Skip to next argv if at the end of the current argv.
- */
- if (*place == '\0')
- ++isc_commandline_index;
-
- } else {
- /*
- * Option needs an argument.
- */
- if (*place != '\0')
- /*
- * Option is in this argv, -D1 style.
- */
- isc_commandline_argument = place;
-
- else if (argc > ++isc_commandline_index)
- /*
- * Option is next argv, -D 1 style.
- */
- isc_commandline_argument = argv[isc_commandline_index];
-
- else {
- /*
- * Argument needed, but no more argv.
- */
- place = ENDOPT;
-
- /*
- * Silent failure with "missing argument" return
- * when ':' starts options string, per historical spec.
- */
- if (*options == ':')
- return (BADARG);
-
- if (isc_commandline_errprint)
- fprintf(stderr, "%s: %s -- %c\n",
- isc_commandline_progname,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_COMMANDLINE,
- ISC_MSG_OPTNEEDARG,
- "option requires "
- "an argument"),
- isc_commandline_option);
-
- return (BADOPT);
- }
-
- place = ENDOPT;
-
- /*
- * Point to argv that follows argument.
- */
- isc_commandline_index++;
- }
-
- return (isc_commandline_option);
-}
diff --git a/contrib/ntp/lib/isc/entropy.c b/contrib/ntp/lib/isc/entropy.c
deleted file mode 100644
index da9e81fb3129..000000000000
--- a/contrib/ntp/lib/isc/entropy.c
+++ /dev/null
@@ -1,1277 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: entropy.c,v 1.22 2010/08/10 23:48:19 tbox Exp $ */
-
-/*! \file
- * \brief
- * This is the system independent part of the entropy module. It is
- * compiled via inclusion from the relevant OS source file, ie,
- * \link unix/entropy.c unix/entropy.c \endlink or win32/entropy.c.
- *
- * \author Much of this code is modeled after the NetBSD /dev/random implementation,
- * written by Michael Graff <explorer@netbsd.org>.
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-
-#include <isc/buffer.h>
-#include <isc/entropy.h>
-#include <isc/keyboard.h>
-#include <isc/list.h>
-#include <isc/magic.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/mutex.h>
-#include <isc/platform.h>
-#include <isc/region.h>
-#include <isc/sha1.h>
-#include <isc/string.h>
-#include <isc/time.h>
-#include <isc/util.h>
-
-
-#define ENTROPY_MAGIC ISC_MAGIC('E', 'n', 't', 'e')
-#define SOURCE_MAGIC ISC_MAGIC('E', 'n', 't', 's')
-
-#define VALID_ENTROPY(e) ISC_MAGIC_VALID(e, ENTROPY_MAGIC)
-#define VALID_SOURCE(s) ISC_MAGIC_VALID(s, SOURCE_MAGIC)
-
-/***
- *** "constants." Do not change these unless you _really_ know what
- *** you are doing.
- ***/
-
-/*%
- * Size of entropy pool in 32-bit words. This _MUST_ be a power of 2.
- */
-#define RND_POOLWORDS 128
-/*% Pool in bytes. */
-#define RND_POOLBYTES (RND_POOLWORDS * 4)
-/*% Pool in bits. */
-#define RND_POOLBITS (RND_POOLWORDS * 32)
-
-/*%
- * Number of bytes returned per hash. This must be true:
- * threshold * 2 <= digest_size_in_bytes
- */
-#define RND_ENTROPY_THRESHOLD 10
-#define THRESHOLD_BITS (RND_ENTROPY_THRESHOLD * 8)
-
-/*%
- * Size of the input event queue in samples.
- */
-#define RND_EVENTQSIZE 32
-
-/*%
- * The number of times we'll "reseed" for pseudorandom seeds. This is an
- * extremely weak pseudorandom seed. If the caller is using lots of
- * pseudorandom data and they cannot provide a stronger random source,
- * there is little we can do other than hope they're smart enough to
- * call _adddata() with something better than we can come up with.
- */
-#define RND_INITIALIZE 128
-
-/*% Entropy Pool */
-typedef struct {
- isc_uint32_t cursor; /*%< current add point in the pool */
- isc_uint32_t entropy; /*%< current entropy estimate in bits */
- isc_uint32_t pseudo; /*%< bits extracted in pseudorandom */
- isc_uint32_t rotate; /*%< how many bits to rotate by */
- isc_uint32_t pool[RND_POOLWORDS]; /*%< random pool data */
-} isc_entropypool_t;
-
-struct isc_entropy {
- unsigned int magic;
- isc_mem_t *mctx;
- isc_mutex_t lock;
- unsigned int refcnt;
- isc_uint32_t initialized;
- isc_uint32_t initcount;
- isc_entropypool_t pool;
- unsigned int nsources;
- isc_entropysource_t *nextsource;
- ISC_LIST(isc_entropysource_t) sources;
-};
-
-/*% Sample Queue */
-typedef struct {
- isc_uint32_t last_time; /*%< last time recorded */
- isc_uint32_t last_delta; /*%< last delta value */
- isc_uint32_t last_delta2; /*%< last delta2 value */
- isc_uint32_t nsamples; /*%< number of samples filled in */
- isc_uint32_t *samples; /*%< the samples */
- isc_uint32_t *extra; /*%< extra samples added in */
-} sample_queue_t;
-
-typedef struct {
- sample_queue_t samplequeue;
-} isc_entropysamplesource_t;
-
-typedef struct {
- isc_boolean_t start_called;
- isc_entropystart_t startfunc;
- isc_entropyget_t getfunc;
- isc_entropystop_t stopfunc;
- void *arg;
- sample_queue_t samplequeue;
-} isc_cbsource_t;
-
-typedef struct {
- FILESOURCE_HANDLE_TYPE handle;
-} isc_entropyfilesource_t;
-
-struct isc_entropysource {
- unsigned int magic;
- unsigned int type;
- isc_entropy_t *ent;
- isc_uint32_t total; /*%< entropy from this source */
- ISC_LINK(isc_entropysource_t) link;
- char name[32];
- isc_boolean_t bad;
- isc_boolean_t warn_keyboard;
- isc_keyboard_t kbd;
- union {
- isc_entropysamplesource_t sample;
- isc_entropyfilesource_t file;
- isc_cbsource_t callback;
- isc_entropyusocketsource_t usocket;
- } sources;
-};
-
-#define ENTROPY_SOURCETYPE_SAMPLE 1 /*%< Type is a sample source */
-#define ENTROPY_SOURCETYPE_FILE 2 /*%< Type is a file source */
-#define ENTROPY_SOURCETYPE_CALLBACK 3 /*%< Type is a callback source */
-#define ENTROPY_SOURCETYPE_USOCKET 4 /*%< Type is a Unix socket source */
-
-/*@{*/
-/*%
- * The random pool "taps"
- */
-#define TAP1 99
-#define TAP2 59
-#define TAP3 31
-#define TAP4 9
-#define TAP5 7
-/*@}*/
-
-/*@{*/
-/*%
- * Declarations for function provided by the system dependent sources that
- * include this file.
- */
-static void
-fillpool(isc_entropy_t *, unsigned int, isc_boolean_t);
-
-static int
-wait_for_sources(isc_entropy_t *);
-
-static void
-destroyfilesource(isc_entropyfilesource_t *source);
-
-static void
-destroyusocketsource(isc_entropyusocketsource_t *source);
-
-/*@}*/
-
-static void
-samplequeue_release(isc_entropy_t *ent, sample_queue_t *sq) {
- REQUIRE(sq->samples != NULL);
- REQUIRE(sq->extra != NULL);
-
- isc_mem_put(ent->mctx, sq->samples, RND_EVENTQSIZE * 4);
- isc_mem_put(ent->mctx, sq->extra, RND_EVENTQSIZE * 4);
- sq->samples = NULL;
- sq->extra = NULL;
-}
-
-static isc_result_t
-samplesource_allocate(isc_entropy_t *ent, sample_queue_t *sq) {
- sq->samples = isc_mem_get(ent->mctx, RND_EVENTQSIZE * 4);
- if (sq->samples == NULL)
- return (ISC_R_NOMEMORY);
-
- sq->extra = isc_mem_get(ent->mctx, RND_EVENTQSIZE * 4);
- if (sq->extra == NULL) {
- isc_mem_put(ent->mctx, sq->samples, RND_EVENTQSIZE * 4);
- sq->samples = NULL;
- return (ISC_R_NOMEMORY);
- }
-
- sq->nsamples = 0;
-
- return (ISC_R_SUCCESS);
-}
-
-/*%
- * Add in entropy, even when the value we're adding in could be
- * very large.
- */
-static inline void
-add_entropy(isc_entropy_t *ent, isc_uint32_t entropy) {
- /* clamp input. Yes, this must be done. */
- entropy = ISC_MIN(entropy, RND_POOLBITS);
- /* Add in the entropy we already have. */
- entropy += ent->pool.entropy;
- /* Clamp. */
- ent->pool.entropy = ISC_MIN(entropy, RND_POOLBITS);
-}
-
-/*%
- * Decrement the amount of entropy the pool has.
- */
-static inline void
-subtract_entropy(isc_entropy_t *ent, isc_uint32_t entropy) {
- entropy = ISC_MIN(entropy, ent->pool.entropy);
- ent->pool.entropy -= entropy;
-}
-
-/*!
- * Add in entropy, even when the value we're adding in could be
- * very large.
- */
-static inline void
-add_pseudo(isc_entropy_t *ent, isc_uint32_t pseudo) {
- /* clamp input. Yes, this must be done. */
- pseudo = ISC_MIN(pseudo, RND_POOLBITS * 8);
- /* Add in the pseudo we already have. */
- pseudo += ent->pool.pseudo;
- /* Clamp. */
- ent->pool.pseudo = ISC_MIN(pseudo, RND_POOLBITS * 8);
-}
-
-/*!
- * Decrement the amount of pseudo the pool has.
- */
-static inline void
-subtract_pseudo(isc_entropy_t *ent, isc_uint32_t pseudo) {
- pseudo = ISC_MIN(pseudo, ent->pool.pseudo);
- ent->pool.pseudo -= pseudo;
-}
-
-/*!
- * Add one word to the pool, rotating the input as needed.
- */
-static inline void
-entropypool_add_word(isc_entropypool_t *rp, isc_uint32_t val) {
- /*
- * Steal some values out of the pool, and xor them into the
- * word we were given.
- *
- * Mix the new value into the pool using xor. This will
- * prevent the actual values from being known to the caller
- * since the previous values are assumed to be unknown as well.
- */
- val ^= rp->pool[(rp->cursor + TAP1) & (RND_POOLWORDS - 1)];
- val ^= rp->pool[(rp->cursor + TAP2) & (RND_POOLWORDS - 1)];
- val ^= rp->pool[(rp->cursor + TAP3) & (RND_POOLWORDS - 1)];
- val ^= rp->pool[(rp->cursor + TAP4) & (RND_POOLWORDS - 1)];
- val ^= rp->pool[(rp->cursor + TAP5) & (RND_POOLWORDS - 1)];
- if (rp->rotate == 0)
- rp->pool[rp->cursor++] ^= val;
- else
- rp->pool[rp->cursor++] ^=
- ((val << rp->rotate) | (val >> (32 - rp->rotate)));
-
- /*
- * If we have looped around the pool, increment the rotate
- * variable so the next value will get xored in rotated to
- * a different position.
- * Increment by a value that is relatively prime to the word size
- * to try to spread the bits throughout the pool quickly when the
- * pool is empty.
- */
- if (rp->cursor == RND_POOLWORDS) {
- rp->cursor = 0;
- rp->rotate = (rp->rotate + 7) & 31;
- }
-}
-
-/*!
- * Add a buffer's worth of data to the pool.
- *
- * Requires that the lock is held on the entropy pool.
- */
-static void
-entropypool_adddata(isc_entropy_t *ent, void *p, unsigned int len,
- isc_uint32_t entropy)
-{
- isc_uint32_t val;
- unsigned long addr;
- isc_uint8_t *buf;
-
- addr = (unsigned long)p;
- buf = p;
-
- if ((addr & 0x03U) != 0U) {
- val = 0;
- switch (len) {
- case 3:
- val = *buf++;
- len--;
- case 2:
- val = val << 8 | *buf++;
- len--;
- case 1:
- val = val << 8 | *buf++;
- len--;
- }
-
- entropypool_add_word(&ent->pool, val);
- }
-
- for (; len > 3; len -= 4) {
- val = *((isc_uint32_t *)buf);
-
- entropypool_add_word(&ent->pool, val);
- buf += 4;
- }
-
- if (len != 0) {
- val = 0;
- switch (len) {
- case 3:
- val = *buf++;
- case 2:
- val = val << 8 | *buf++;
- case 1:
- val = val << 8 | *buf++;
- }
-
- entropypool_add_word(&ent->pool, val);
- }
-
- add_entropy(ent, entropy);
- subtract_pseudo(ent, entropy);
-}
-
-static inline void
-reseed(isc_entropy_t *ent) {
- isc_time_t t;
- pid_t pid;
-
- if (ent->initcount == 0) {
- pid = getpid();
- entropypool_adddata(ent, &pid, sizeof(pid), 0);
- pid = getppid();
- entropypool_adddata(ent, &pid, sizeof(pid), 0);
- }
-
- /*!
- * After we've reseeded 100 times, only add new timing info every
- * 50 requests. This will keep us from using lots and lots of
- * CPU just to return bad pseudorandom data anyway.
- */
- if (ent->initcount > 100)
- if ((ent->initcount % 50) != 0)
- return;
-
- TIME_NOW(&t);
- entropypool_adddata(ent, &t, sizeof(t), 0);
- ent->initcount++;
-}
-
-static inline unsigned int
-estimate_entropy(sample_queue_t *sq, isc_uint32_t t) {
- isc_int32_t delta;
- isc_int32_t delta2;
- isc_int32_t delta3;
-
- /*!
- * If the time counter has overflowed, calculate the real difference.
- * If it has not, it is simpler.
- */
- if (t < sq->last_time)
- delta = UINT_MAX - sq->last_time + t;
- else
- delta = sq->last_time - t;
-
- if (delta < 0)
- delta = -delta;
-
- /*
- * Calculate the second and third order differentials
- */
- delta2 = sq->last_delta - delta;
- if (delta2 < 0)
- delta2 = -delta2;
-
- delta3 = sq->last_delta2 - delta2;
- if (delta3 < 0)
- delta3 = -delta3;
-
- sq->last_time = t;
- sq->last_delta = delta;
- sq->last_delta2 = delta2;
-
- /*
- * If any delta is 0, we got no entropy. If all are non-zero, we
- * might have something.
- */
- if (delta == 0 || delta2 == 0 || delta3 == 0)
- return 0;
-
- /*
- * We could find the smallest delta and claim we got log2(delta)
- * bits, but for now return that we found 1 bit.
- */
- return 1;
-}
-
-static unsigned int
-crunchsamples(isc_entropy_t *ent, sample_queue_t *sq) {
- unsigned int ns;
- unsigned int added;
-
- if (sq->nsamples < 6)
- return (0);
-
- added = 0;
- sq->last_time = sq->samples[0];
- sq->last_delta = 0;
- sq->last_delta2 = 0;
-
- /*
- * Prime the values by adding in the first 4 samples in. This
- * should completely initialize the delta calculations.
- */
- for (ns = 0; ns < 4; ns++)
- (void)estimate_entropy(sq, sq->samples[ns]);
-
- for (ns = 4; ns < sq->nsamples; ns++)
- added += estimate_entropy(sq, sq->samples[ns]);
-
- entropypool_adddata(ent, sq->samples, sq->nsamples * 4, added);
- entropypool_adddata(ent, sq->extra, sq->nsamples * 4, 0);
-
- /*
- * Move the last 4 samples into the first 4 positions, and start
- * adding new samples from that point.
- */
- for (ns = 0; ns < 4; ns++) {
- sq->samples[ns] = sq->samples[sq->nsamples - 4 + ns];
- sq->extra[ns] = sq->extra[sq->nsamples - 4 + ns];
- }
-
- sq->nsamples = 4;
-
- return (added);
-}
-
-static unsigned int
-get_from_callback(isc_entropysource_t *source, unsigned int desired,
- isc_boolean_t blocking)
-{
- isc_entropy_t *ent = source->ent;
- isc_cbsource_t *cbs = &source->sources.callback;
- unsigned int added;
- unsigned int got;
- isc_result_t result;
-
- if (desired == 0)
- return (0);
-
- if (source->bad)
- return (0);
-
- if (!cbs->start_called && cbs->startfunc != NULL) {
- result = cbs->startfunc(source, cbs->arg, blocking);
- if (result != ISC_R_SUCCESS)
- return (0);
- cbs->start_called = ISC_TRUE;
- }
-
- added = 0;
- result = ISC_R_SUCCESS;
- while (desired > 0 && result == ISC_R_SUCCESS) {
- result = cbs->getfunc(source, cbs->arg, blocking);
- if (result == ISC_R_QUEUEFULL) {
- got = crunchsamples(ent, &cbs->samplequeue);
- added += got;
- desired -= ISC_MIN(got, desired);
- result = ISC_R_SUCCESS;
- } else if (result != ISC_R_SUCCESS &&
- result != ISC_R_NOTBLOCKING)
- source->bad = ISC_TRUE;
-
- }
-
- return (added);
-}
-
-/*
- * Extract some number of bytes from the random pool, decreasing the
- * estimate of randomness as each byte is extracted.
- *
- * Do this by stiring the pool and returning a part of hash as randomness.
- * Note that no secrets are given away here since parts of the hash are
- * xored together before returned.
- *
- * Honor the request from the caller to only return good data, any data,
- * etc.
- */
-isc_result_t
-isc_entropy_getdata(isc_entropy_t *ent, void *data, unsigned int length,
- unsigned int *returned, unsigned int flags)
-{
- unsigned int i;
- isc_sha1_t hash;
- unsigned char digest[ISC_SHA1_DIGESTLENGTH];
- isc_uint32_t remain, deltae, count, total;
- isc_uint8_t *buf;
- isc_boolean_t goodonly, partial, blocking;
-
- REQUIRE(VALID_ENTROPY(ent));
- REQUIRE(data != NULL);
- REQUIRE(length > 0);
-
- goodonly = ISC_TF((flags & ISC_ENTROPY_GOODONLY) != 0);
- partial = ISC_TF((flags & ISC_ENTROPY_PARTIAL) != 0);
- blocking = ISC_TF((flags & ISC_ENTROPY_BLOCKING) != 0);
-
- REQUIRE(!partial || returned != NULL);
-
- LOCK(&ent->lock);
-
- remain = length;
- buf = data;
- total = 0;
- while (remain != 0) {
- count = ISC_MIN(remain, RND_ENTROPY_THRESHOLD);
-
- /*
- * If we are extracting good data only, make certain we
- * have enough data in our pool for this pass. If we don't,
- * get some, and fail if we can't, and partial returns
- * are not ok.
- */
- if (goodonly) {
- unsigned int fillcount;
-
- fillcount = ISC_MAX(remain * 8, count * 8);
-
- /*
- * If, however, we have at least THRESHOLD_BITS
- * of entropy in the pool, don't block here. It is
- * better to drain the pool once in a while and
- * then refill it than it is to constantly keep the
- * pool full.
- */
- if (ent->pool.entropy >= THRESHOLD_BITS)
- fillpool(ent, fillcount, ISC_FALSE);
- else
- fillpool(ent, fillcount, blocking);
-
- /*
- * Verify that we got enough entropy to do one
- * extraction. If we didn't, bail.
- */
- if (ent->pool.entropy < THRESHOLD_BITS) {
- if (!partial)
- goto zeroize;
- else
- goto partial_output;
- }
- } else {
- /*
- * If we've extracted half our pool size in bits
- * since the last refresh, try to refresh here.
- */
- if (ent->initialized < THRESHOLD_BITS)
- fillpool(ent, THRESHOLD_BITS, blocking);
- else
- fillpool(ent, 0, ISC_FALSE);
-
- /*
- * If we've not initialized with enough good random
- * data, seed with our crappy code.
- */
- if (ent->initialized < THRESHOLD_BITS)
- reseed(ent);
- }
-
- isc_sha1_init(&hash);
- isc_sha1_update(&hash, (void *)(ent->pool.pool),
- RND_POOLBYTES);
- isc_sha1_final(&hash, digest);
-
- /*
- * Stir the extracted data (all of it) back into the pool.
- */
- entropypool_adddata(ent, digest, ISC_SHA1_DIGESTLENGTH, 0);
-
- for (i = 0; i < count; i++)
- buf[i] = digest[i] ^ digest[i + RND_ENTROPY_THRESHOLD];
-
- buf += count;
- remain -= count;
-
- deltae = count * 8;
- deltae = ISC_MIN(deltae, ent->pool.entropy);
- total += deltae;
- subtract_entropy(ent, deltae);
- add_pseudo(ent, count * 8);
- }
-
- partial_output:
- memset(digest, 0, sizeof(digest));
-
- if (returned != NULL)
- *returned = (length - remain);
-
- UNLOCK(&ent->lock);
-
- return (ISC_R_SUCCESS);
-
- zeroize:
- /* put the entropy we almost extracted back */
- add_entropy(ent, total);
- memset(data, 0, length);
- memset(digest, 0, sizeof(digest));
- if (returned != NULL)
- *returned = 0;
-
- UNLOCK(&ent->lock);
-
- return (ISC_R_NOENTROPY);
-}
-
-static void
-isc_entropypool_init(isc_entropypool_t *pool) {
- pool->cursor = RND_POOLWORDS - 1;
- pool->entropy = 0;
- pool->pseudo = 0;
- pool->rotate = 0;
- memset(pool->pool, 0, RND_POOLBYTES);
-}
-
-static void
-isc_entropypool_invalidate(isc_entropypool_t *pool) {
- pool->cursor = 0;
- pool->entropy = 0;
- pool->pseudo = 0;
- pool->rotate = 0;
- memset(pool->pool, 0, RND_POOLBYTES);
-}
-
-isc_result_t
-isc_entropy_create(isc_mem_t *mctx, isc_entropy_t **entp) {
- isc_result_t result;
- isc_entropy_t *ent;
-
- REQUIRE(mctx != NULL);
- REQUIRE(entp != NULL && *entp == NULL);
-
- ent = isc_mem_get(mctx, sizeof(isc_entropy_t));
- if (ent == NULL)
- return (ISC_R_NOMEMORY);
-
- /*
- * We need a lock.
- */
- result = isc_mutex_init(&ent->lock);
- if (result != ISC_R_SUCCESS)
- goto errout;
-
- /*
- * From here down, no failures will/can occur.
- */
- ISC_LIST_INIT(ent->sources);
- ent->nextsource = NULL;
- ent->nsources = 0;
- ent->mctx = NULL;
- isc_mem_attach(mctx, &ent->mctx);
- ent->refcnt = 1;
- ent->initialized = 0;
- ent->initcount = 0;
- ent->magic = ENTROPY_MAGIC;
-
- isc_entropypool_init(&ent->pool);
-
- *entp = ent;
- return (ISC_R_SUCCESS);
-
- errout:
- isc_mem_put(mctx, ent, sizeof(isc_entropy_t));
-
- return (result);
-}
-
-/*!
- * Requires "ent" be locked.
- */
-static void
-destroysource(isc_entropysource_t **sourcep) {
- isc_entropysource_t *source;
- isc_entropy_t *ent;
- isc_cbsource_t *cbs;
-
- source = *sourcep;
- *sourcep = NULL;
- ent = source->ent;
-
- ISC_LIST_UNLINK(ent->sources, source, link);
- ent->nextsource = NULL;
- REQUIRE(ent->nsources > 0);
- ent->nsources--;
-
- switch (source->type) {
- case ENTROPY_SOURCETYPE_FILE:
- if (! source->bad)
- destroyfilesource(&source->sources.file);
- break;
- case ENTROPY_SOURCETYPE_USOCKET:
- if (! source->bad)
- destroyusocketsource(&source->sources.usocket);
- break;
- case ENTROPY_SOURCETYPE_SAMPLE:
- samplequeue_release(ent, &source->sources.sample.samplequeue);
- break;
- case ENTROPY_SOURCETYPE_CALLBACK:
- cbs = &source->sources.callback;
- if (cbs->start_called && cbs->stopfunc != NULL) {
- cbs->stopfunc(source, cbs->arg);
- cbs->start_called = ISC_FALSE;
- }
- samplequeue_release(ent, &cbs->samplequeue);
- break;
- }
-
- memset(source, 0, sizeof(isc_entropysource_t));
-
- isc_mem_put(ent->mctx, source, sizeof(isc_entropysource_t));
-}
-
-static inline isc_boolean_t
-destroy_check(isc_entropy_t *ent) {
- isc_entropysource_t *source;
-
- if (ent->refcnt > 0)
- return (ISC_FALSE);
-
- source = ISC_LIST_HEAD(ent->sources);
- while (source != NULL) {
- switch (source->type) {
- case ENTROPY_SOURCETYPE_FILE:
- case ENTROPY_SOURCETYPE_USOCKET:
- break;
- default:
- return (ISC_FALSE);
- }
- source = ISC_LIST_NEXT(source, link);
- }
-
- return (ISC_TRUE);
-}
-
-static void
-destroy(isc_entropy_t **entp) {
- isc_entropy_t *ent;
- isc_entropysource_t *source;
- isc_mem_t *mctx;
-
- REQUIRE(entp != NULL && *entp != NULL);
- ent = *entp;
- *entp = NULL;
-
- LOCK(&ent->lock);
-
- REQUIRE(ent->refcnt == 0);
-
- /*
- * Here, detach non-sample sources.
- */
- source = ISC_LIST_HEAD(ent->sources);
- while (source != NULL) {
- switch(source->type) {
- case ENTROPY_SOURCETYPE_FILE:
- case ENTROPY_SOURCETYPE_USOCKET:
- destroysource(&source);
- break;
- }
- source = ISC_LIST_HEAD(ent->sources);
- }
-
- /*
- * If there are other types of sources, we've found a bug.
- */
- REQUIRE(ISC_LIST_EMPTY(ent->sources));
-
- mctx = ent->mctx;
-
- isc_entropypool_invalidate(&ent->pool);
-
- UNLOCK(&ent->lock);
-
- DESTROYLOCK(&ent->lock);
-
- memset(ent, 0, sizeof(isc_entropy_t));
- isc_mem_put(mctx, ent, sizeof(isc_entropy_t));
- isc_mem_detach(&mctx);
-}
-
-void
-isc_entropy_destroysource(isc_entropysource_t **sourcep) {
- isc_entropysource_t *source;
- isc_entropy_t *ent;
- isc_boolean_t killit;
-
- REQUIRE(sourcep != NULL);
- REQUIRE(VALID_SOURCE(*sourcep));
-
- source = *sourcep;
- *sourcep = NULL;
-
- ent = source->ent;
- REQUIRE(VALID_ENTROPY(ent));
-
- LOCK(&ent->lock);
-
- destroysource(&source);
-
- killit = destroy_check(ent);
-
- UNLOCK(&ent->lock);
-
- if (killit)
- destroy(&ent);
-}
-
-isc_result_t
-isc_entropy_createcallbacksource(isc_entropy_t *ent,
- isc_entropystart_t start,
- isc_entropyget_t get,
- isc_entropystop_t stop,
- void *arg,
- isc_entropysource_t **sourcep)
-{
- isc_result_t result;
- isc_entropysource_t *source;
- isc_cbsource_t *cbs;
-
- REQUIRE(VALID_ENTROPY(ent));
- REQUIRE(get != NULL);
- REQUIRE(sourcep != NULL && *sourcep == NULL);
-
- LOCK(&ent->lock);
-
- source = isc_mem_get(ent->mctx, sizeof(isc_entropysource_t));
- if (source == NULL) {
- result = ISC_R_NOMEMORY;
- goto errout;
- }
- source->bad = ISC_FALSE;
-
- cbs = &source->sources.callback;
-
- result = samplesource_allocate(ent, &cbs->samplequeue);
- if (result != ISC_R_SUCCESS)
- goto errout;
-
- cbs->start_called = ISC_FALSE;
- cbs->startfunc = start;
- cbs->getfunc = get;
- cbs->stopfunc = stop;
- cbs->arg = arg;
-
- /*
- * From here down, no failures can occur.
- */
- source->magic = SOURCE_MAGIC;
- source->type = ENTROPY_SOURCETYPE_CALLBACK;
- source->ent = ent;
- source->total = 0;
- memset(source->name, 0, sizeof(source->name));
- ISC_LINK_INIT(source, link);
-
- /*
- * Hook it into the entropy system.
- */
- ISC_LIST_APPEND(ent->sources, source, link);
- ent->nsources++;
-
- *sourcep = source;
-
- UNLOCK(&ent->lock);
- return (ISC_R_SUCCESS);
-
- errout:
- if (source != NULL)
- isc_mem_put(ent->mctx, source, sizeof(isc_entropysource_t));
-
- UNLOCK(&ent->lock);
-
- return (result);
-}
-
-void
-isc_entropy_stopcallbacksources(isc_entropy_t *ent) {
- isc_entropysource_t *source;
- isc_cbsource_t *cbs;
-
- REQUIRE(VALID_ENTROPY(ent));
-
- LOCK(&ent->lock);
-
- source = ISC_LIST_HEAD(ent->sources);
- while (source != NULL) {
- if (source->type == ENTROPY_SOURCETYPE_CALLBACK) {
- cbs = &source->sources.callback;
- if (cbs->start_called && cbs->stopfunc != NULL) {
- cbs->stopfunc(source, cbs->arg);
- cbs->start_called = ISC_FALSE;
- }
- }
-
- source = ISC_LIST_NEXT(source, link);
- }
-
- UNLOCK(&ent->lock);
-}
-
-isc_result_t
-isc_entropy_createsamplesource(isc_entropy_t *ent,
- isc_entropysource_t **sourcep)
-{
- isc_result_t result;
- isc_entropysource_t *source;
- sample_queue_t *sq;
-
- REQUIRE(VALID_ENTROPY(ent));
- REQUIRE(sourcep != NULL && *sourcep == NULL);
-
- LOCK(&ent->lock);
-
- source = isc_mem_get(ent->mctx, sizeof(isc_entropysource_t));
- if (source == NULL) {
- result = ISC_R_NOMEMORY;
- goto errout;
- }
-
- sq = &source->sources.sample.samplequeue;
- result = samplesource_allocate(ent, sq);
- if (result != ISC_R_SUCCESS)
- goto errout;
-
- /*
- * From here down, no failures can occur.
- */
- source->magic = SOURCE_MAGIC;
- source->type = ENTROPY_SOURCETYPE_SAMPLE;
- source->ent = ent;
- source->total = 0;
- memset(source->name, 0, sizeof(source->name));
- ISC_LINK_INIT(source, link);
-
- /*
- * Hook it into the entropy system.
- */
- ISC_LIST_APPEND(ent->sources, source, link);
- ent->nsources++;
-
- *sourcep = source;
-
- UNLOCK(&ent->lock);
- return (ISC_R_SUCCESS);
-
- errout:
- if (source != NULL)
- isc_mem_put(ent->mctx, source, sizeof(isc_entropysource_t));
-
- UNLOCK(&ent->lock);
-
- return (result);
-}
-
-/*!
- * Add a sample, and return ISC_R_SUCCESS if the queue has become full,
- * ISC_R_NOENTROPY if it has space remaining, and ISC_R_NOMORE if the
- * queue was full when this function was called.
- */
-static isc_result_t
-addsample(sample_queue_t *sq, isc_uint32_t sample, isc_uint32_t extra) {
- if (sq->nsamples >= RND_EVENTQSIZE)
- return (ISC_R_NOMORE);
-
- sq->samples[sq->nsamples] = sample;
- sq->extra[sq->nsamples] = extra;
- sq->nsamples++;
-
- if (sq->nsamples >= RND_EVENTQSIZE)
- return (ISC_R_QUEUEFULL);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_entropy_addsample(isc_entropysource_t *source, isc_uint32_t sample,
- isc_uint32_t extra)
-{
- isc_entropy_t *ent;
- sample_queue_t *sq;
- unsigned int entropy;
- isc_result_t result;
-
- REQUIRE(VALID_SOURCE(source));
-
- ent = source->ent;
-
- LOCK(&ent->lock);
-
- sq = &source->sources.sample.samplequeue;
- result = addsample(sq, sample, extra);
- if (result == ISC_R_QUEUEFULL) {
- entropy = crunchsamples(ent, sq);
- add_entropy(ent, entropy);
- }
-
- UNLOCK(&ent->lock);
-
- return (result);
-}
-
-isc_result_t
-isc_entropy_addcallbacksample(isc_entropysource_t *source, isc_uint32_t sample,
- isc_uint32_t extra)
-{
- sample_queue_t *sq;
- isc_result_t result;
-
- REQUIRE(VALID_SOURCE(source));
- REQUIRE(source->type == ENTROPY_SOURCETYPE_CALLBACK);
-
- sq = &source->sources.callback.samplequeue;
- result = addsample(sq, sample, extra);
-
- return (result);
-}
-
-void
-isc_entropy_putdata(isc_entropy_t *ent, void *data, unsigned int length,
- isc_uint32_t entropy)
-{
- REQUIRE(VALID_ENTROPY(ent));
-
- LOCK(&ent->lock);
-
- entropypool_adddata(ent, data, length, entropy);
-
- if (ent->initialized < THRESHOLD_BITS)
- ent->initialized = THRESHOLD_BITS;
-
- UNLOCK(&ent->lock);
-}
-
-static void
-dumpstats(isc_entropy_t *ent, FILE *out) {
- fprintf(out,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_ENTROPY,
- ISC_MSG_ENTROPYSTATS,
- "Entropy pool %p: refcnt %u cursor %u,"
- " rotate %u entropy %u pseudo %u nsources %u"
- " nextsource %p initialized %u initcount %u\n"),
- ent, ent->refcnt,
- ent->pool.cursor, ent->pool.rotate,
- ent->pool.entropy, ent->pool.pseudo,
- ent->nsources, ent->nextsource, ent->initialized,
- ent->initcount);
-}
-
-/*
- * This function ignores locking. Use at your own risk.
- */
-void
-isc_entropy_stats(isc_entropy_t *ent, FILE *out) {
- REQUIRE(VALID_ENTROPY(ent));
-
- LOCK(&ent->lock);
- dumpstats(ent, out);
- UNLOCK(&ent->lock);
-}
-
-unsigned int
-isc_entropy_status(isc_entropy_t *ent) {
- unsigned int estimate;
-
- LOCK(&ent->lock);
- estimate = ent->pool.entropy;
- UNLOCK(&ent->lock);
-
- return estimate;
-}
-
-void
-isc_entropy_attach(isc_entropy_t *ent, isc_entropy_t **entp) {
- REQUIRE(VALID_ENTROPY(ent));
- REQUIRE(entp != NULL && *entp == NULL);
-
- LOCK(&ent->lock);
-
- ent->refcnt++;
- *entp = ent;
-
- UNLOCK(&ent->lock);
-}
-
-void
-isc_entropy_detach(isc_entropy_t **entp) {
- isc_entropy_t *ent;
- isc_boolean_t killit;
-
- REQUIRE(entp != NULL && VALID_ENTROPY(*entp));
- ent = *entp;
- *entp = NULL;
-
- LOCK(&ent->lock);
-
- REQUIRE(ent->refcnt > 0);
- ent->refcnt--;
-
- killit = destroy_check(ent);
-
- UNLOCK(&ent->lock);
-
- if (killit)
- destroy(&ent);
-}
-
-static isc_result_t
-kbdstart(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
- /*
- * The intent of "first" is to provide a warning message only once
- * during the run of a program that might try to gather keyboard
- * entropy multiple times.
- */
- static isc_boolean_t first = ISC_TRUE;
-
- UNUSED(arg);
-
- if (! blocking)
- return (ISC_R_NOENTROPY);
-
- if (first) {
- if (source->warn_keyboard)
- fprintf(stderr, "You must use the keyboard to create "
- "entropy, since your system is lacking\n"
- "/dev/random (or equivalent)\n\n");
- first = ISC_FALSE;
- }
- fprintf(stderr, "start typing:\n");
-
- return (isc_keyboard_open(&source->kbd));
-}
-
-static void
-kbdstop(isc_entropysource_t *source, void *arg) {
-
- UNUSED(arg);
-
- if (! isc_keyboard_canceled(&source->kbd))
- fprintf(stderr, "stop typing.\r\n");
-
- (void)isc_keyboard_close(&source->kbd, 3);
-}
-
-static isc_result_t
-kbdget(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
- isc_result_t result;
- isc_time_t t;
- isc_uint32_t sample;
- isc_uint32_t extra;
- unsigned char c;
-
- UNUSED(arg);
-
- if (!blocking)
- return (ISC_R_NOTBLOCKING);
-
- result = isc_keyboard_getchar(&source->kbd, &c);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- TIME_NOW(&t);
-
- sample = isc_time_nanoseconds(&t);
- extra = c;
-
- result = isc_entropy_addcallbacksample(source, sample, extra);
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "\r\n");
- return (result);
- }
-
- fprintf(stderr, ".");
- fflush(stderr);
-
- return (result);
-}
-
-isc_result_t
-isc_entropy_usebestsource(isc_entropy_t *ectx, isc_entropysource_t **source,
- const char *randomfile, int use_keyboard)
-{
- isc_result_t result;
- isc_result_t final_result = ISC_R_NOENTROPY;
- isc_boolean_t userfile = ISC_TRUE;
-
- REQUIRE(VALID_ENTROPY(ectx));
- REQUIRE(source != NULL && *source == NULL);
- REQUIRE(use_keyboard == ISC_ENTROPY_KEYBOARDYES ||
- use_keyboard == ISC_ENTROPY_KEYBOARDNO ||
- use_keyboard == ISC_ENTROPY_KEYBOARDMAYBE);
-
-#ifdef PATH_RANDOMDEV
- if (randomfile == NULL) {
- randomfile = PATH_RANDOMDEV;
- userfile = ISC_FALSE;
- }
-#endif
-
- if (randomfile != NULL && use_keyboard != ISC_ENTROPY_KEYBOARDYES) {
- result = isc_entropy_createfilesource(ectx, randomfile);
- if (result == ISC_R_SUCCESS &&
- use_keyboard == ISC_ENTROPY_KEYBOARDMAYBE)
- use_keyboard = ISC_ENTROPY_KEYBOARDNO;
- if (result != ISC_R_SUCCESS && userfile)
- return (result);
-
- final_result = result;
- }
-
- if (use_keyboard != ISC_ENTROPY_KEYBOARDNO) {
- result = isc_entropy_createcallbacksource(ectx, kbdstart,
- kbdget, kbdstop,
- NULL, source);
- if (result == ISC_R_SUCCESS)
- (*source)->warn_keyboard =
- ISC_TF(use_keyboard ==
- ISC_ENTROPY_KEYBOARDMAYBE);
-
- if (final_result != ISC_R_SUCCESS)
- final_result = result;
- }
-
- /*
- * final_result is ISC_R_SUCCESS if at least one source of entropy
- * could be started, otherwise it is the error from the most recently
- * failed operation (or ISC_R_NOENTROPY if PATH_RANDOMDEV is not
- * defined and use_keyboard is ISC_ENTROPY_KEYBOARDNO).
- */
- return (final_result);
-}
diff --git a/contrib/ntp/lib/isc/fsaccess.c b/contrib/ntp/lib/isc/fsaccess.c
deleted file mode 100644
index 5c9718318eae..000000000000
--- a/contrib/ntp/lib/isc/fsaccess.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: fsaccess.c,v 1.10 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file
- * \brief
- * This file contains the OS-independent functionality of the API.
- */
-#include <isc/fsaccess.h>
-#include <isc/result.h>
-#include <isc/util.h>
-
-/*!
- * Shorthand. Maybe ISC__FSACCESS_PERMISSIONBITS should not even be in
- * <isc/fsaccess.h>. Could check consistency with sizeof(isc_fsaccess_t)
- * and the number of bits in each function.
- */
-#define STEP (ISC__FSACCESS_PERMISSIONBITS)
-#define GROUP (STEP)
-#define OTHER (STEP * 2)
-
-void
-isc_fsaccess_add(int trustee, int permission, isc_fsaccess_t *access) {
- REQUIRE(trustee <= 0x7);
- REQUIRE(permission <= 0xFF);
-
- if ((trustee & ISC_FSACCESS_OWNER) != 0)
- *access |= permission;
-
- if ((trustee & ISC_FSACCESS_GROUP) != 0)
- *access |= (permission << GROUP);
-
- if ((trustee & ISC_FSACCESS_OTHER) != 0)
- *access |= (permission << OTHER);
-}
-
-void
-isc_fsaccess_remove(int trustee, int permission, isc_fsaccess_t *access) {
- REQUIRE(trustee <= 0x7);
- REQUIRE(permission <= 0xFF);
-
-
- if ((trustee & ISC_FSACCESS_OWNER) != 0)
- *access &= ~permission;
-
- if ((trustee & ISC_FSACCESS_GROUP) != 0)
- *access &= ~(permission << GROUP);
-
- if ((trustee & ISC_FSACCESS_OTHER) != 0)
- *access &= ~(permission << OTHER);
-}
-
-static isc_result_t
-check_bad_bits(isc_fsaccess_t access, isc_boolean_t is_dir) {
- isc_fsaccess_t bits;
-
- /*
- * Check for disallowed user bits.
- */
- if (is_dir)
- bits = ISC_FSACCESS_READ |
- ISC_FSACCESS_WRITE |
- ISC_FSACCESS_EXECUTE;
- else
- bits = ISC_FSACCESS_CREATECHILD |
- ISC_FSACCESS_ACCESSCHILD |
- ISC_FSACCESS_DELETECHILD |
- ISC_FSACCESS_LISTDIRECTORY;
-
- /*
- * Set group bad bits.
- */
- bits |= bits << STEP;
- /*
- * Set other bad bits.
- */
- bits |= bits << STEP;
-
- if ((access & bits) != 0) {
- if (is_dir)
- return (ISC_R_NOTFILE);
- else
- return (ISC_R_NOTDIRECTORY);
- }
-
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/hash.c b/contrib/ntp/lib/isc/hash.c
deleted file mode 100644
index f1d68c7700f5..000000000000
--- a/contrib/ntp/lib/isc/hash.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: hash.c,v 1.16 2009/09/01 00:22:28 jinmei Exp $ */
-
-/*! \file
- * Some portion of this code was derived from universal hash function
- * libraries of Rice University.
-\section license UH Universal Hashing Library
-
-Copyright ((c)) 2002, Rice University
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- * Neither the name of Rice University (RICE) nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-
-This software is provided by RICE and the contributors on an "as is"
-basis, without any representations or warranties of any kind, express
-or implied including, but not limited to, representations or
-warranties of non-infringement, merchantability or fitness for a
-particular purpose. In no event shall RICE or contributors be liable
-for any direct, indirect, incidental, special, exemplary, or
-consequential damages (including, but not limited to, procurement of
-substitute goods or services; loss of use, data, or profits; or
-business interruption) however caused and on any theory of liability,
-whether in contract, strict liability, or tort (including negligence
-or otherwise) arising in any way out of the use of this software, even
-if advised of the possibility of such damage.
-*/
-
-#include <config.h>
-
-#include <isc/entropy.h>
-#include <isc/hash.h>
-#include <isc/mem.h>
-#include <isc/magic.h>
-#include <isc/mutex.h>
-#include <isc/once.h>
-#include <isc/random.h>
-#include <isc/refcount.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-#define HASH_MAGIC ISC_MAGIC('H', 'a', 's', 'h')
-#define VALID_HASH(h) ISC_MAGIC_VALID((h), HASH_MAGIC)
-
-/*%
- * A large 32-bit prime number that specifies the range of the hash output.
- */
-#define PRIME32 0xFFFFFFFB /* 2^32 - 5 */
-
-/*@{*/
-/*%
- * Types of random seed and hash accumulator. Perhaps they can be system
- * dependent.
- */
-typedef isc_uint32_t hash_accum_t;
-typedef isc_uint16_t hash_random_t;
-/*@}*/
-
-/*% isc hash structure */
-struct isc_hash {
- unsigned int magic;
- isc_mem_t *mctx;
- isc_mutex_t lock;
- isc_boolean_t initialized;
- isc_refcount_t refcnt;
- isc_entropy_t *entropy; /*%< entropy source */
- unsigned int limit; /*%< upper limit of key length */
- size_t vectorlen; /*%< size of the vector below */
- hash_random_t *rndvector; /*%< random vector for universal hashing */
-};
-
-static isc_mutex_t createlock;
-static isc_once_t once = ISC_ONCE_INIT;
-static isc_hash_t *hash = NULL;
-
-static unsigned char maptolower[] = {
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
- 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
- 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
- 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
- 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
- 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
- 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
- 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
- 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
- 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
- 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
- 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
- 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
-};
-
-isc_result_t
-isc_hash_ctxcreate(isc_mem_t *mctx, isc_entropy_t *entropy,
- unsigned int limit, isc_hash_t **hctxp)
-{
- isc_result_t result;
- isc_hash_t *hctx;
- size_t vlen;
- hash_random_t *rv;
- hash_accum_t overflow_limit;
-
- REQUIRE(mctx != NULL);
- REQUIRE(hctxp != NULL && *hctxp == NULL);
-
- /*
- * Overflow check. Since our implementation only does a modulo
- * operation at the last stage of hash calculation, the accumulator
- * must not overflow.
- */
- overflow_limit =
- 1 << (((sizeof(hash_accum_t) - sizeof(hash_random_t))) * 8);
- if (overflow_limit < (limit + 1) * 0xff)
- return (ISC_R_RANGE);
-
- hctx = isc_mem_get(mctx, sizeof(isc_hash_t));
- if (hctx == NULL)
- return (ISC_R_NOMEMORY);
-
- vlen = sizeof(hash_random_t) * (limit + 1);
- rv = isc_mem_get(mctx, vlen);
- if (rv == NULL) {
- result = ISC_R_NOMEMORY;
- goto errout;
- }
-
- /*
- * We need a lock.
- */
- result = isc_mutex_init(&hctx->lock);
- if (result != ISC_R_SUCCESS)
- goto errout;
-
- /*
- * From here down, no failures will/can occur.
- */
- hctx->magic = HASH_MAGIC;
- hctx->mctx = NULL;
- isc_mem_attach(mctx, &hctx->mctx);
- hctx->initialized = ISC_FALSE;
- result = isc_refcount_init(&hctx->refcnt, 1);
- if (result != ISC_R_SUCCESS)
- goto cleanup_lock;
- hctx->entropy = NULL;
- hctx->limit = limit;
- hctx->vectorlen = vlen;
- hctx->rndvector = rv;
-
-#ifdef BIND9
- if (entropy != NULL)
- isc_entropy_attach(entropy, &hctx->entropy);
-#else
- UNUSED(entropy);
-#endif
-
- *hctxp = hctx;
- return (ISC_R_SUCCESS);
-
- cleanup_lock:
- DESTROYLOCK(&hctx->lock);
- errout:
- isc_mem_put(mctx, hctx, sizeof(isc_hash_t));
- if (rv != NULL)
- isc_mem_put(mctx, rv, vlen);
-
- return (result);
-}
-
-static void
-initialize_lock(void) {
- RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_hash_create(isc_mem_t *mctx, isc_entropy_t *entropy, size_t limit) {
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(mctx != NULL);
- INSIST(hash == NULL);
-
- RUNTIME_CHECK(isc_once_do(&once, initialize_lock) == ISC_R_SUCCESS);
-
- LOCK(&createlock);
-
- if (hash == NULL)
- result = isc_hash_ctxcreate(mctx, entropy, limit, &hash);
-
- UNLOCK(&createlock);
-
- return (result);
-}
-
-void
-isc_hash_ctxinit(isc_hash_t *hctx) {
- LOCK(&hctx->lock);
-
- if (hctx->initialized == ISC_TRUE)
- goto out;
-
- if (hctx->entropy) {
-#ifdef BIND9
- isc_result_t result;
-
- result = isc_entropy_getdata(hctx->entropy,
- hctx->rndvector, hctx->vectorlen,
- NULL, 0);
- INSIST(result == ISC_R_SUCCESS);
-#else
- INSIST(0);
-#endif
- } else {
- isc_uint32_t pr;
- unsigned int i, copylen;
- unsigned char *p;
-
- p = (unsigned char *)hctx->rndvector;
- for (i = 0; i < hctx->vectorlen; i += copylen, p += copylen) {
- isc_random_get(&pr);
- if (i + sizeof(pr) <= hctx->vectorlen)
- copylen = sizeof(pr);
- else
- copylen = hctx->vectorlen - i;
-
- memcpy(p, &pr, copylen);
- }
- INSIST(p == (unsigned char *)hctx->rndvector +
- hctx->vectorlen);
- }
-
- hctx->initialized = ISC_TRUE;
-
- out:
- UNLOCK(&hctx->lock);
-}
-
-void
-isc_hash_init() {
- INSIST(hash != NULL && VALID_HASH(hash));
-
- isc_hash_ctxinit(hash);
-}
-
-void
-isc_hash_ctxattach(isc_hash_t *hctx, isc_hash_t **hctxp) {
- REQUIRE(VALID_HASH(hctx));
- REQUIRE(hctxp != NULL && *hctxp == NULL);
-
- isc_refcount_increment(&hctx->refcnt, NULL);
- *hctxp = hctx;
-}
-
-static void
-destroy(isc_hash_t **hctxp) {
- isc_hash_t *hctx;
- isc_mem_t *mctx;
- unsigned char canary0[4], canary1[4];
-
- REQUIRE(hctxp != NULL && *hctxp != NULL);
- hctx = *hctxp;
- *hctxp = NULL;
-
- LOCK(&hctx->lock);
-
- isc_refcount_destroy(&hctx->refcnt);
-
- mctx = hctx->mctx;
-#ifdef BIND9
- if (hctx->entropy != NULL)
- isc_entropy_detach(&hctx->entropy);
-#endif
- if (hctx->rndvector != NULL)
- isc_mem_put(mctx, hctx->rndvector, hctx->vectorlen);
-
- UNLOCK(&hctx->lock);
-
- DESTROYLOCK(&hctx->lock);
-
- memcpy(canary0, hctx + 1, sizeof(canary0));
- memset(hctx, 0, sizeof(isc_hash_t));
- memcpy(canary1, hctx + 1, sizeof(canary1));
- INSIST(memcmp(canary0, canary1, sizeof(canary0)) == 0);
- isc_mem_put(mctx, hctx, sizeof(isc_hash_t));
- isc_mem_detach(&mctx);
-}
-
-void
-isc_hash_ctxdetach(isc_hash_t **hctxp) {
- isc_hash_t *hctx;
- unsigned int refs;
-
- REQUIRE(hctxp != NULL && VALID_HASH(*hctxp));
- hctx = *hctxp;
-
- isc_refcount_decrement(&hctx->refcnt, &refs);
- if (refs == 0)
- destroy(&hctx);
-
- *hctxp = NULL;
-}
-
-void
-isc_hash_destroy() {
- unsigned int refs;
-
- INSIST(hash != NULL && VALID_HASH(hash));
-
- isc_refcount_decrement(&hash->refcnt, &refs);
- INSIST(refs == 0);
-
- destroy(&hash);
-}
-
-static inline unsigned int
-hash_calc(isc_hash_t *hctx, const unsigned char *key, unsigned int keylen,
- isc_boolean_t case_sensitive)
-{
- hash_accum_t partial_sum = 0;
- hash_random_t *p = hctx->rndvector;
- unsigned int i = 0;
-
- /* Make it sure that the hash context is initialized. */
- if (hctx->initialized == ISC_FALSE)
- isc_hash_ctxinit(hctx);
-
- if (case_sensitive) {
- for (i = 0; i < keylen; i++)
- partial_sum += key[i] * (hash_accum_t)p[i];
- } else {
- for (i = 0; i < keylen; i++)
- partial_sum += maptolower[key[i]] * (hash_accum_t)p[i];
- }
-
- partial_sum += p[i];
-
- return ((unsigned int)(partial_sum % PRIME32));
-}
-
-unsigned int
-isc_hash_ctxcalc(isc_hash_t *hctx, const unsigned char *key,
- unsigned int keylen, isc_boolean_t case_sensitive)
-{
- REQUIRE(hctx != NULL && VALID_HASH(hctx));
- REQUIRE(keylen <= hctx->limit);
-
- return (hash_calc(hctx, key, keylen, case_sensitive));
-}
-
-unsigned int
-isc_hash_calc(const unsigned char *key, unsigned int keylen,
- isc_boolean_t case_sensitive)
-{
- INSIST(hash != NULL && VALID_HASH(hash));
- REQUIRE(keylen <= hash->limit);
-
- return (hash_calc(hash, key, keylen, case_sensitive));
-}
diff --git a/contrib/ntp/lib/isc/heap.c b/contrib/ntp/lib/isc/heap.c
deleted file mode 100644
index ebadd2fd807c..000000000000
--- a/contrib/ntp/lib/isc/heap.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1997-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file
- * Heap implementation of priority queues adapted from the following:
- *
- * \li "Introduction to Algorithms," Cormen, Leiserson, and Rivest,
- * MIT Press / McGraw Hill, 1990, ISBN 0-262-03141-8, chapter 7.
- *
- * \li "Algorithms," Second Edition, Sedgewick, Addison-Wesley, 1988,
- * ISBN 0-201-06673-4, chapter 11.
- */
-
-#include <config.h>
-
-#include <isc/heap.h>
-#include <isc/magic.h>
-#include <isc/mem.h>
-#include <isc/string.h> /* Required for memcpy. */
-#include <isc/util.h>
-
-/*@{*/
-/*%
- * Note: to make heap_parent and heap_left easy to compute, the first
- * element of the heap array is not used; i.e. heap subscripts are 1-based,
- * not 0-based. The parent is index/2, and the left-child is index*2.
- * The right child is index*2+1.
- */
-#define heap_parent(i) ((i) >> 1)
-#define heap_left(i) ((i) << 1)
-/*@}*/
-
-#define SIZE_INCREMENT 1024
-
-#define HEAP_MAGIC ISC_MAGIC('H', 'E', 'A', 'P')
-#define VALID_HEAP(h) ISC_MAGIC_VALID(h, HEAP_MAGIC)
-
-/*%
- * When the heap is in a consistent state, the following invariant
- * holds true: for every element i > 1, heap_parent(i) has a priority
- * higher than or equal to that of i.
- */
-#define HEAPCONDITION(i) ((i) == 1 || \
- ! heap->compare(heap->array[(i)], \
- heap->array[heap_parent(i)]))
-
-/*% ISC heap structure. */
-struct isc_heap {
- unsigned int magic;
- isc_mem_t * mctx;
- unsigned int size;
- unsigned int size_increment;
- unsigned int last;
- void **array;
- isc_heapcompare_t compare;
- isc_heapindex_t index;
-};
-
-isc_result_t
-isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
- isc_heapindex_t index, unsigned int size_increment,
- isc_heap_t **heapp)
-{
- isc_heap_t *heap;
-
- REQUIRE(heapp != NULL && *heapp == NULL);
- REQUIRE(compare != NULL);
-
- heap = isc_mem_get(mctx, sizeof(*heap));
- if (heap == NULL)
- return (ISC_R_NOMEMORY);
- heap->magic = HEAP_MAGIC;
- heap->size = 0;
- heap->mctx = NULL;
- isc_mem_attach(mctx, &heap->mctx);
- if (size_increment == 0)
- heap->size_increment = SIZE_INCREMENT;
- else
- heap->size_increment = size_increment;
- heap->last = 0;
- heap->array = NULL;
- heap->compare = compare;
- heap->index = index;
-
- *heapp = heap;
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_heap_destroy(isc_heap_t **heapp) {
- isc_heap_t *heap;
-
- REQUIRE(heapp != NULL);
- heap = *heapp;
- REQUIRE(VALID_HEAP(heap));
-
- if (heap->array != NULL)
- isc_mem_put(heap->mctx, heap->array,
- heap->size * sizeof(void *));
- heap->magic = 0;
- isc_mem_putanddetach(&heap->mctx, heap, sizeof(*heap));
-
- *heapp = NULL;
-}
-
-static isc_boolean_t
-resize(isc_heap_t *heap) {
- void **new_array;
- size_t new_size;
-
- REQUIRE(VALID_HEAP(heap));
-
- new_size = heap->size + heap->size_increment;
- new_array = isc_mem_get(heap->mctx, new_size * sizeof(void *));
- if (new_array == NULL)
- return (ISC_FALSE);
- if (heap->array != NULL) {
- memcpy(new_array, heap->array, heap->size * sizeof(void *));
- isc_mem_put(heap->mctx, heap->array,
- heap->size * sizeof(void *));
- }
- heap->size = new_size;
- heap->array = new_array;
-
- return (ISC_TRUE);
-}
-
-static void
-float_up(isc_heap_t *heap, unsigned int i, void *elt) {
- unsigned int p;
-
- for (p = heap_parent(i) ;
- i > 1 && heap->compare(elt, heap->array[p]) ;
- i = p, p = heap_parent(i)) {
- heap->array[i] = heap->array[p];
- if (heap->index != NULL)
- (heap->index)(heap->array[i], i);
- }
- heap->array[i] = elt;
- if (heap->index != NULL)
- (heap->index)(heap->array[i], i);
-
- INSIST(HEAPCONDITION(i));
-}
-
-static void
-sink_down(isc_heap_t *heap, unsigned int i, void *elt) {
- unsigned int j, size, half_size;
- size = heap->last;
- half_size = size / 2;
- while (i <= half_size) {
- /* Find the smallest of the (at most) two children. */
- j = heap_left(i);
- if (j < size && heap->compare(heap->array[j+1],
- heap->array[j]))
- j++;
- if (heap->compare(elt, heap->array[j]))
- break;
- heap->array[i] = heap->array[j];
- if (heap->index != NULL)
- (heap->index)(heap->array[i], i);
- i = j;
- }
- heap->array[i] = elt;
- if (heap->index != NULL)
- (heap->index)(heap->array[i], i);
-
- INSIST(HEAPCONDITION(i));
-}
-
-isc_result_t
-isc_heap_insert(isc_heap_t *heap, void *elt) {
- unsigned int new_last;
-
- REQUIRE(VALID_HEAP(heap));
-
- new_last = heap->last + 1;
- RUNTIME_CHECK(new_last > 0); /* overflow check */
- if (new_last >= heap->size && !resize(heap))
- return (ISC_R_NOMEMORY);
- heap->last = new_last;
-
- float_up(heap, new_last, elt);
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_heap_delete(isc_heap_t *heap, unsigned int index) {
- void *elt;
- isc_boolean_t less;
-
- REQUIRE(VALID_HEAP(heap));
- REQUIRE(index >= 1 && index <= heap->last);
-
- if (index == heap->last) {
- heap->array[heap->last] = NULL;
- heap->last--;
- } else {
- elt = heap->array[heap->last];
- heap->array[heap->last] = NULL;
- heap->last--;
-
- less = heap->compare(elt, heap->array[index]);
- heap->array[index] = elt;
- if (less)
- float_up(heap, index, heap->array[index]);
- else
- sink_down(heap, index, heap->array[index]);
- }
-}
-
-void
-isc_heap_increased(isc_heap_t *heap, unsigned int index) {
- REQUIRE(VALID_HEAP(heap));
- REQUIRE(index >= 1 && index <= heap->last);
-
- float_up(heap, index, heap->array[index]);
-}
-
-void
-isc_heap_decreased(isc_heap_t *heap, unsigned int index) {
- REQUIRE(VALID_HEAP(heap));
- REQUIRE(index >= 1 && index <= heap->last);
-
- sink_down(heap, index, heap->array[index]);
-}
-
-void *
-isc_heap_element(isc_heap_t *heap, unsigned int index) {
- REQUIRE(VALID_HEAP(heap));
- REQUIRE(index >= 1);
-
- if (index <= heap->last)
- return (heap->array[index]);
- return (NULL);
-}
-
-void
-isc_heap_foreach(isc_heap_t *heap, isc_heapaction_t action, void *uap) {
- unsigned int i;
-
- REQUIRE(VALID_HEAP(heap));
- REQUIRE(action != NULL);
-
- for (i = 1 ; i <= heap->last ; i++)
- (action)(heap->array[i], uap);
-}
diff --git a/contrib/ntp/lib/isc/hex.c b/contrib/ntp/lib/isc/hex.c
deleted file mode 100644
index 3fa0e699fa55..000000000000
--- a/contrib/ntp/lib/isc/hex.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: hex.c,v 1.20 2008/09/25 04:02:39 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <ctype.h>
-
-#include <isc/buffer.h>
-#include <isc/hex.h>
-#include <isc/lex.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-#define RETERR(x) do { \
- isc_result_t _r = (x); \
- if (_r != ISC_R_SUCCESS) \
- return (_r); \
- } while (0)
-
-
-/*
- * BEW: These static functions are copied from lib/dns/rdata.c.
- */
-static isc_result_t
-str_totext(const char *source, isc_buffer_t *target);
-
-static isc_result_t
-mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length);
-
-static const char hex[] = "0123456789ABCDEF";
-
-isc_result_t
-isc_hex_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target)
-{
- char buf[3];
- unsigned int loops = 0;
-
- if (wordlength < 2)
- wordlength = 2;
-
- memset(buf, 0, sizeof(buf));
- while (source->length > 0) {
- buf[0] = hex[(source->base[0] >> 4) & 0xf];
- buf[1] = hex[(source->base[0]) & 0xf];
- RETERR(str_totext(buf, target));
- isc_region_consume(source, 1);
-
- loops++;
- if (source->length != 0 &&
- (int)((loops + 1) * 2) >= wordlength)
- {
- loops = 0;
- RETERR(str_totext(wordbreak, target));
- }
- }
- return (ISC_R_SUCCESS);
-}
-
-/*%
- * State of a hex decoding process in progress.
- */
-typedef struct {
- int length; /*%< Desired length of binary data or -1 */
- isc_buffer_t *target; /*%< Buffer for resulting binary data */
- int digits; /*%< Number of buffered hex digits */
- int val[2];
-} hex_decode_ctx_t;
-
-static inline void
-hex_decode_init(hex_decode_ctx_t *ctx, int length, isc_buffer_t *target)
-{
- ctx->digits = 0;
- ctx->length = length;
- ctx->target = target;
-}
-
-static inline isc_result_t
-hex_decode_char(hex_decode_ctx_t *ctx, int c) {
- char *s;
-
- if ((s = strchr(hex, toupper(c))) == NULL)
- return (ISC_R_BADHEX);
- ctx->val[ctx->digits++] = s - hex;
- if (ctx->digits == 2) {
- unsigned char num;
-
- num = (ctx->val[0] << 4) + (ctx->val[1]);
- RETERR(mem_tobuffer(ctx->target, &num, 1));
- if (ctx->length >= 0) {
- if (ctx->length == 0)
- return (ISC_R_BADHEX);
- else
- ctx->length -= 1;
- }
- ctx->digits = 0;
- }
- return (ISC_R_SUCCESS);
-}
-
-static inline isc_result_t
-hex_decode_finish(hex_decode_ctx_t *ctx) {
- if (ctx->length > 0)
- return (ISC_R_UNEXPECTEDEND);
- if (ctx->digits != 0)
- return (ISC_R_BADHEX);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) {
- hex_decode_ctx_t ctx;
- isc_textregion_t *tr;
- isc_token_t token;
- isc_boolean_t eol;
-
- hex_decode_init(&ctx, length, target);
-
- while (ctx.length != 0) {
- unsigned int i;
-
- if (length > 0)
- eol = ISC_FALSE;
- else
- eol = ISC_TRUE;
- RETERR(isc_lex_getmastertoken(lexer, &token,
- isc_tokentype_string, eol));
- if (token.type != isc_tokentype_string)
- break;
- tr = &token.value.as_textregion;
- for (i = 0; i < tr->length; i++)
- RETERR(hex_decode_char(&ctx, tr->base[i]));
- }
- if (ctx.length < 0)
- isc_lex_ungettoken(lexer, &token);
- RETERR(hex_decode_finish(&ctx));
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_hex_decodestring(const char *cstr, isc_buffer_t *target) {
- hex_decode_ctx_t ctx;
-
- hex_decode_init(&ctx, -1, target);
- for (;;) {
- int c = *cstr++;
- if (c == '\0')
- break;
- if (c == ' ' || c == '\t' || c == '\n' || c== '\r')
- continue;
- RETERR(hex_decode_char(&ctx, c));
- }
- RETERR(hex_decode_finish(&ctx));
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-str_totext(const char *source, isc_buffer_t *target) {
- unsigned int l;
- isc_region_t region;
-
- isc_buffer_availableregion(target, &region);
- l = strlen(source);
-
- if (l > region.length)
- return (ISC_R_NOSPACE);
-
- memcpy(region.base, source, l);
- isc_buffer_add(target, l);
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
- isc_region_t tr;
-
- isc_buffer_availableregion(target, &tr);
- if (length > tr.length)
- return (ISC_R_NOSPACE);
- memcpy(tr.base, base, length);
- isc_buffer_add(target, length);
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/hmacmd5.c b/contrib/ntp/lib/isc/hmacmd5.c
deleted file mode 100644
index 0388b17083b7..000000000000
--- a/contrib/ntp/lib/isc/hmacmd5.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: hmacmd5.c,v 1.16 2009/02/06 23:47:42 tbox Exp $ */
-
-/*! \file
- * This code implements the HMAC-MD5 keyed hash algorithm
- * described in RFC2104.
- */
-
-#include "config.h"
-
-#include <isc/assertions.h>
-#include <isc/hmacmd5.h>
-#include <isc/md5.h>
-#include <isc/platform.h>
-#include <isc/string.h>
-#include <isc/types.h>
-#include <isc/util.h>
-
-#ifdef ISC_PLATFORM_OPENSSLHASH
-
-void
-isc_hmacmd5_init(isc_hmacmd5_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- HMAC_Init(ctx, (const void *) key, (int) len, EVP_md5());
-}
-
-void
-isc_hmacmd5_invalidate(isc_hmacmd5_t *ctx) {
- HMAC_CTX_cleanup(ctx);
-}
-
-void
-isc_hmacmd5_update(isc_hmacmd5_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- HMAC_Update(ctx, buf, (int) len);
-}
-
-void
-isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest) {
- HMAC_Final(ctx, digest, NULL);
- HMAC_CTX_cleanup(ctx);
-}
-
-#else
-
-#define PADLEN 64
-#define IPAD 0x36
-#define OPAD 0x5C
-
-/*!
- * Start HMAC-MD5 process. Initialize an md5 context and digest the key.
- */
-void
-isc_hmacmd5_init(isc_hmacmd5_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- unsigned char ipad[PADLEN];
- int i;
-
- memset(ctx->key, 0, sizeof(ctx->key));
- if (len > sizeof(ctx->key)) {
- isc_md5_t md5ctx;
- isc_md5_init(&md5ctx);
- isc_md5_update(&md5ctx, key, len);
- isc_md5_final(&md5ctx, ctx->key);
- } else
- memcpy(ctx->key, key, len);
-
- isc_md5_init(&ctx->md5ctx);
- memset(ipad, IPAD, sizeof(ipad));
- for (i = 0; i < PADLEN; i++)
- ipad[i] ^= ctx->key[i];
- isc_md5_update(&ctx->md5ctx, ipad, sizeof(ipad));
-}
-
-void
-isc_hmacmd5_invalidate(isc_hmacmd5_t *ctx) {
- isc_md5_invalidate(&ctx->md5ctx);
- memset(ctx->key, 0, sizeof(ctx->key));
-}
-
-/*!
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void
-isc_hmacmd5_update(isc_hmacmd5_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- isc_md5_update(&ctx->md5ctx, buf, len);
-}
-
-/*!
- * Compute signature - finalize MD5 operation and reapply MD5.
- */
-void
-isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest) {
- unsigned char opad[PADLEN];
- int i;
-
- isc_md5_final(&ctx->md5ctx, digest);
-
- memset(opad, OPAD, sizeof(opad));
- for (i = 0; i < PADLEN; i++)
- opad[i] ^= ctx->key[i];
-
- isc_md5_init(&ctx->md5ctx);
- isc_md5_update(&ctx->md5ctx, opad, sizeof(opad));
- isc_md5_update(&ctx->md5ctx, digest, ISC_MD5_DIGESTLENGTH);
- isc_md5_final(&ctx->md5ctx, digest);
- isc_hmacmd5_invalidate(ctx);
-}
-#endif /* !ISC_PLATFORM_OPENSSLHASH */
-
-/*!
- * Verify signature - finalize MD5 operation and reapply MD5, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacmd5_verify(isc_hmacmd5_t *ctx, unsigned char *digest) {
- return (isc_hmacmd5_verify2(ctx, digest, ISC_MD5_DIGESTLENGTH));
-}
-
-isc_boolean_t
-isc_hmacmd5_verify2(isc_hmacmd5_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_MD5_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_MD5_DIGESTLENGTH);
- isc_hmacmd5_sign(ctx, newdigest);
- return (ISC_TF(isc_tsmemcmp(digest, newdigest, len) == 0));
-}
diff --git a/contrib/ntp/lib/isc/hmacsha.c b/contrib/ntp/lib/isc/hmacsha.c
deleted file mode 100644
index 75b1cb14d29d..000000000000
--- a/contrib/ntp/lib/isc/hmacsha.c
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- * Copyright (C) 2005-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*
- * This code implements the HMAC-SHA1, HMAC-SHA224, HMAC-SHA256, HMAC-SHA384
- * and HMAC-SHA512 keyed hash algorithm described in RFC 2104 and
- * draft-ietf-dnsext-tsig-sha-01.txt.
- */
-
-#include "config.h"
-
-#include <isc/assertions.h>
-#include <isc/hmacsha.h>
-#include <isc/platform.h>
-#include <isc/sha1.h>
-#include <isc/sha2.h>
-#include <isc/string.h>
-#include <isc/types.h>
-#include <isc/util.h>
-
-#ifdef ISC_PLATFORM_OPENSSLHASH
-
-void
-isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha1());
-}
-
-void
-isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx) {
- HMAC_CTX_cleanup(ctx);
-}
-
-void
-isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- HMAC_Update(ctx, buf, (int) len);
-}
-
-void
-isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA1_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA1_DIGESTLENGTH);
-
- HMAC_Final(ctx, newdigest, NULL);
- HMAC_CTX_cleanup(ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-void
-isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha224());
-}
-
-void
-isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx) {
- HMAC_CTX_cleanup(ctx);
-}
-
-void
-isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- HMAC_Update(ctx, buf, (int) len);
-}
-
-void
-isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA224_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA224_DIGESTLENGTH);
-
- HMAC_Final(ctx, newdigest, NULL);
- HMAC_CTX_cleanup(ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-void
-isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha256());
-}
-
-void
-isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx) {
- HMAC_CTX_cleanup(ctx);
-}
-
-void
-isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- HMAC_Update(ctx, buf, (int) len);
-}
-
-void
-isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA256_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA256_DIGESTLENGTH);
-
- HMAC_Final(ctx, newdigest, NULL);
- HMAC_CTX_cleanup(ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-void
-isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha384());
-}
-
-void
-isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx) {
- HMAC_CTX_cleanup(ctx);
-}
-
-void
-isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- HMAC_Update(ctx, buf, (int) len);
-}
-
-void
-isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA384_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA384_DIGESTLENGTH);
-
- HMAC_Final(ctx, newdigest, NULL);
- HMAC_CTX_cleanup(ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-void
-isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha512());
-}
-
-void
-isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx) {
- HMAC_CTX_cleanup(ctx);
-}
-
-void
-isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- HMAC_Update(ctx, buf, (int) len);
-}
-
-void
-isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA512_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA512_DIGESTLENGTH);
-
- HMAC_Final(ctx, newdigest, NULL);
- HMAC_CTX_cleanup(ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-#else
-
-#define IPAD 0x36
-#define OPAD 0x5C
-
-/*
- * Start HMAC-SHA1 process. Initialize an sha1 context and digest the key.
- */
-void
-isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- unsigned char ipad[ISC_SHA1_BLOCK_LENGTH];
- unsigned int i;
-
- memset(ctx->key, 0, sizeof(ctx->key));
- if (len > sizeof(ctx->key)) {
- isc_sha1_t sha1ctx;
- isc_sha1_init(&sha1ctx);
- isc_sha1_update(&sha1ctx, key, len);
- isc_sha1_final(&sha1ctx, ctx->key);
- } else
- memcpy(ctx->key, key, len);
-
- isc_sha1_init(&ctx->sha1ctx);
- memset(ipad, IPAD, sizeof(ipad));
- for (i = 0; i < ISC_SHA1_BLOCK_LENGTH; i++)
- ipad[i] ^= ctx->key[i];
- isc_sha1_update(&ctx->sha1ctx, ipad, sizeof(ipad));
-}
-
-void
-isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx) {
- isc_sha1_invalidate(&ctx->sha1ctx);
- memset(ctx, 0, sizeof(*ctx));
-}
-
-/*
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void
-isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- isc_sha1_update(&ctx->sha1ctx, buf, len);
-}
-
-/*
- * Compute signature - finalize SHA1 operation and reapply SHA1.
- */
-void
-isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
- unsigned char opad[ISC_SHA1_BLOCK_LENGTH];
- unsigned char newdigest[ISC_SHA1_DIGESTLENGTH];
- unsigned int i;
-
- REQUIRE(len <= ISC_SHA1_DIGESTLENGTH);
- isc_sha1_final(&ctx->sha1ctx, newdigest);
-
- memset(opad, OPAD, sizeof(opad));
- for (i = 0; i < ISC_SHA1_BLOCK_LENGTH; i++)
- opad[i] ^= ctx->key[i];
-
- isc_sha1_init(&ctx->sha1ctx);
- isc_sha1_update(&ctx->sha1ctx, opad, sizeof(opad));
- isc_sha1_update(&ctx->sha1ctx, newdigest, ISC_SHA1_DIGESTLENGTH);
- isc_sha1_final(&ctx->sha1ctx, newdigest);
- isc_hmacsha1_invalidate(ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-/*
- * Start HMAC-SHA224 process. Initialize an sha224 context and digest the key.
- */
-void
-isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- unsigned char ipad[ISC_SHA224_BLOCK_LENGTH];
- unsigned int i;
-
- memset(ctx->key, 0, sizeof(ctx->key));
- if (len > sizeof(ctx->key)) {
- isc_sha224_t sha224ctx;
- isc_sha224_init(&sha224ctx);
- isc_sha224_update(&sha224ctx, key, len);
- isc_sha224_final(ctx->key, &sha224ctx);
- } else
- memcpy(ctx->key, key, len);
-
- isc_sha224_init(&ctx->sha224ctx);
- memset(ipad, IPAD, sizeof(ipad));
- for (i = 0; i < ISC_SHA224_BLOCK_LENGTH; i++)
- ipad[i] ^= ctx->key[i];
- isc_sha224_update(&ctx->sha224ctx, ipad, sizeof(ipad));
-}
-
-void
-isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx) {
- memset(ctx, 0, sizeof(*ctx));
-}
-
-/*
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void
-isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- isc_sha224_update(&ctx->sha224ctx, buf, len);
-}
-
-/*
- * Compute signature - finalize SHA224 operation and reapply SHA224.
- */
-void
-isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
- unsigned char opad[ISC_SHA224_BLOCK_LENGTH];
- unsigned char newdigest[ISC_SHA224_DIGESTLENGTH];
- unsigned int i;
-
- REQUIRE(len <= ISC_SHA224_DIGESTLENGTH);
- isc_sha224_final(newdigest, &ctx->sha224ctx);
-
- memset(opad, OPAD, sizeof(opad));
- for (i = 0; i < ISC_SHA224_BLOCK_LENGTH; i++)
- opad[i] ^= ctx->key[i];
-
- isc_sha224_init(&ctx->sha224ctx);
- isc_sha224_update(&ctx->sha224ctx, opad, sizeof(opad));
- isc_sha224_update(&ctx->sha224ctx, newdigest, ISC_SHA224_DIGESTLENGTH);
- isc_sha224_final(newdigest, &ctx->sha224ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-/*
- * Start HMAC-SHA256 process. Initialize an sha256 context and digest the key.
- */
-void
-isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- unsigned char ipad[ISC_SHA256_BLOCK_LENGTH];
- unsigned int i;
-
- memset(ctx->key, 0, sizeof(ctx->key));
- if (len > sizeof(ctx->key)) {
- isc_sha256_t sha256ctx;
- isc_sha256_init(&sha256ctx);
- isc_sha256_update(&sha256ctx, key, len);
- isc_sha256_final(ctx->key, &sha256ctx);
- } else
- memcpy(ctx->key, key, len);
-
- isc_sha256_init(&ctx->sha256ctx);
- memset(ipad, IPAD, sizeof(ipad));
- for (i = 0; i < ISC_SHA256_BLOCK_LENGTH; i++)
- ipad[i] ^= ctx->key[i];
- isc_sha256_update(&ctx->sha256ctx, ipad, sizeof(ipad));
-}
-
-void
-isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx) {
- memset(ctx, 0, sizeof(*ctx));
-}
-
-/*
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void
-isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- isc_sha256_update(&ctx->sha256ctx, buf, len);
-}
-
-/*
- * Compute signature - finalize SHA256 operation and reapply SHA256.
- */
-void
-isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
- unsigned char opad[ISC_SHA256_BLOCK_LENGTH];
- unsigned char newdigest[ISC_SHA256_DIGESTLENGTH];
- unsigned int i;
-
- REQUIRE(len <= ISC_SHA256_DIGESTLENGTH);
- isc_sha256_final(newdigest, &ctx->sha256ctx);
-
- memset(opad, OPAD, sizeof(opad));
- for (i = 0; i < ISC_SHA256_BLOCK_LENGTH; i++)
- opad[i] ^= ctx->key[i];
-
- isc_sha256_init(&ctx->sha256ctx);
- isc_sha256_update(&ctx->sha256ctx, opad, sizeof(opad));
- isc_sha256_update(&ctx->sha256ctx, newdigest, ISC_SHA256_DIGESTLENGTH);
- isc_sha256_final(newdigest, &ctx->sha256ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-/*
- * Start HMAC-SHA384 process. Initialize an sha384 context and digest the key.
- */
-void
-isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- unsigned char ipad[ISC_SHA384_BLOCK_LENGTH];
- unsigned int i;
-
- memset(ctx->key, 0, sizeof(ctx->key));
- if (len > sizeof(ctx->key)) {
- isc_sha384_t sha384ctx;
- isc_sha384_init(&sha384ctx);
- isc_sha384_update(&sha384ctx, key, len);
- isc_sha384_final(ctx->key, &sha384ctx);
- } else
- memcpy(ctx->key, key, len);
-
- isc_sha384_init(&ctx->sha384ctx);
- memset(ipad, IPAD, sizeof(ipad));
- for (i = 0; i < ISC_SHA384_BLOCK_LENGTH; i++)
- ipad[i] ^= ctx->key[i];
- isc_sha384_update(&ctx->sha384ctx, ipad, sizeof(ipad));
-}
-
-void
-isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx) {
- memset(ctx, 0, sizeof(*ctx));
-}
-
-/*
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void
-isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- isc_sha384_update(&ctx->sha384ctx, buf, len);
-}
-
-/*
- * Compute signature - finalize SHA384 operation and reapply SHA384.
- */
-void
-isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
- unsigned char opad[ISC_SHA384_BLOCK_LENGTH];
- unsigned char newdigest[ISC_SHA384_DIGESTLENGTH];
- unsigned int i;
-
- REQUIRE(len <= ISC_SHA384_DIGESTLENGTH);
- isc_sha384_final(newdigest, &ctx->sha384ctx);
-
- memset(opad, OPAD, sizeof(opad));
- for (i = 0; i < ISC_SHA384_BLOCK_LENGTH; i++)
- opad[i] ^= ctx->key[i];
-
- isc_sha384_init(&ctx->sha384ctx);
- isc_sha384_update(&ctx->sha384ctx, opad, sizeof(opad));
- isc_sha384_update(&ctx->sha384ctx, newdigest, ISC_SHA384_DIGESTLENGTH);
- isc_sha384_final(newdigest, &ctx->sha384ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-
-/*
- * Start HMAC-SHA512 process. Initialize an sha512 context and digest the key.
- */
-void
-isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
- unsigned int len)
-{
- unsigned char ipad[ISC_SHA512_BLOCK_LENGTH];
- unsigned int i;
-
- memset(ctx->key, 0, sizeof(ctx->key));
- if (len > sizeof(ctx->key)) {
- isc_sha512_t sha512ctx;
- isc_sha512_init(&sha512ctx);
- isc_sha512_update(&sha512ctx, key, len);
- isc_sha512_final(ctx->key, &sha512ctx);
- } else
- memcpy(ctx->key, key, len);
-
- isc_sha512_init(&ctx->sha512ctx);
- memset(ipad, IPAD, sizeof(ipad));
- for (i = 0; i < ISC_SHA512_BLOCK_LENGTH; i++)
- ipad[i] ^= ctx->key[i];
- isc_sha512_update(&ctx->sha512ctx, ipad, sizeof(ipad));
-}
-
-void
-isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx) {
- memset(ctx, 0, sizeof(*ctx));
-}
-
-/*
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void
-isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
- unsigned int len)
-{
- isc_sha512_update(&ctx->sha512ctx, buf, len);
-}
-
-/*
- * Compute signature - finalize SHA512 operation and reapply SHA512.
- */
-void
-isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
- unsigned char opad[ISC_SHA512_BLOCK_LENGTH];
- unsigned char newdigest[ISC_SHA512_DIGESTLENGTH];
- unsigned int i;
-
- REQUIRE(len <= ISC_SHA512_DIGESTLENGTH);
- isc_sha512_final(newdigest, &ctx->sha512ctx);
-
- memset(opad, OPAD, sizeof(opad));
- for (i = 0; i < ISC_SHA512_BLOCK_LENGTH; i++)
- opad[i] ^= ctx->key[i];
-
- isc_sha512_init(&ctx->sha512ctx);
- isc_sha512_update(&ctx->sha512ctx, opad, sizeof(opad));
- isc_sha512_update(&ctx->sha512ctx, newdigest, ISC_SHA512_DIGESTLENGTH);
- isc_sha512_final(newdigest, &ctx->sha512ctx);
- memcpy(digest, newdigest, len);
- memset(newdigest, 0, sizeof(newdigest));
-}
-#endif /* !ISC_PLATFORM_OPENSSLHASH */
-
-/*
- * Verify signature - finalize SHA1 operation and reapply SHA1, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA1_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA1_DIGESTLENGTH);
- isc_hmacsha1_sign(ctx, newdigest, ISC_SHA1_DIGESTLENGTH);
- return (ISC_TF(isc_tsmemcmp(digest, newdigest, len) == 0));
-}
-
-/*
- * Verify signature - finalize SHA224 operation and reapply SHA224, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA224_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA224_DIGESTLENGTH);
- isc_hmacsha224_sign(ctx, newdigest, ISC_SHA224_DIGESTLENGTH);
- return (ISC_TF(isc_tsmemcmp(digest, newdigest, len) == 0));
-}
-
-/*
- * Verify signature - finalize SHA256 operation and reapply SHA256, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA256_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA256_DIGESTLENGTH);
- isc_hmacsha256_sign(ctx, newdigest, ISC_SHA256_DIGESTLENGTH);
- return (ISC_TF(isc_tsmemcmp(digest, newdigest, len) == 0));
-}
-
-/*
- * Verify signature - finalize SHA384 operation and reapply SHA384, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA384_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA384_DIGESTLENGTH);
- isc_hmacsha384_sign(ctx, newdigest, ISC_SHA384_DIGESTLENGTH);
- return (ISC_TF(isc_tsmemcmp(digest, newdigest, len) == 0));
-}
-
-/*
- * Verify signature - finalize SHA512 operation and reapply SHA512, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA512_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA512_DIGESTLENGTH);
- isc_hmacsha512_sign(ctx, newdigest, ISC_SHA512_DIGESTLENGTH);
- return (ISC_TF(isc_tsmemcmp(digest, newdigest, len) == 0));
-}
diff --git a/contrib/ntp/lib/isc/httpd.c b/contrib/ntp/lib/isc/httpd.c
deleted file mode 100644
index 16a8c9fe142b..000000000000
--- a/contrib/ntp/lib/isc/httpd.c
+++ /dev/null
@@ -1,1028 +0,0 @@
-/*
- * Copyright (C) 2006-2008, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/buffer.h>
-#include <isc/httpd.h>
-#include <isc/mem.h>
-#include <isc/socket.h>
-#include <isc/string.h>
-#include <isc/task.h>
-#include <isc/util.h>
-
-#include <string.h>
-
-/*%
- * TODO:
- *
- * o Put in better checks to make certain things are passed in correctly.
- * This includes a magic number for externally-visible structures,
- * checking for NULL-ness before dereferencing, etc.
- * o Make the URL processing external functions which will fill-in a buffer
- * structure we provide, or return an error and we will render a generic
- * page and close the client.
- */
-
-#define MSHUTTINGDOWN(cm) ((cm->flags & ISC_HTTPDMGR_FLAGSHUTTINGDOWN) != 0)
-#define MSETSHUTTINGDOWN(cm) (cm->flags |= ISC_HTTPDMGR_FLAGSHUTTINGDOWN)
-
-#ifdef DEBUG_HTTPD
-#define ENTER(x) do { fprintf(stderr, "ENTER %s\n", (x)); } while (0)
-#define EXIT(x) do { fprintf(stderr, "EXIT %s\n", (x)); } while (0)
-#define NOTICE(x) do { fprintf(stderr, "NOTICE %s\n", (x)); } while (0)
-#else
-#define ENTER(x) do { } while(0)
-#define EXIT(x) do { } while(0)
-#define NOTICE(x) do { } while(0)
-#endif
-
-#define HTTP_RECVLEN 1024
-#define HTTP_SENDGROW 1024
-#define HTTP_SEND_MAXLEN 10240
-
-/*%
- * HTTP urls. These are the URLs we manage, and the function to call to
- * provide the data for it. We pass in the base url (so the same function
- * can handle multiple requests), and a structure to fill in to return a
- * result to the client. We also pass in a pointer to be filled in for
- * the data cleanup function.
- */
-struct isc_httpdurl {
- char *url;
- isc_httpdaction_t *action;
- void *action_arg;
- ISC_LINK(isc_httpdurl_t) link;
-};
-
-#define HTTPD_CLOSE 0x0001 /* Got a Connection: close header */
-#define HTTPD_FOUNDHOST 0x0002 /* Got a Host: header */
-
-/*% http client */
-struct isc_httpd {
- isc_httpdmgr_t *mgr; /*%< our parent */
- ISC_LINK(isc_httpd_t) link;
- unsigned int state;
- isc_socket_t *sock;
-
- /*%
- * Received data state.
- */
- char recvbuf[HTTP_RECVLEN]; /*%< receive buffer */
- isc_uint32_t recvlen; /*%< length recv'd */
- unsigned int method;
- char *url;
- char *querystring;
- char *protocol;
-
- /*
- * Flags on the httpd client.
- */
- int flags;
-
- /*%
- * Transmit data state.
- *
- * This is the data buffer we will transmit.
- *
- * This free function pointer is filled in by the rendering function
- * we call. The free function is called after the data is transmitted
- * to the client.
- *
- * The bufflist is the list of buffers we are currently transmitting.
- * The headerdata is where we render our headers to. If we run out of
- * space when rendering a header, we will change the size of our
- * buffer. We will not free it until we are finished, and will
- * allocate an additional HTTP_SENDGROW bytes per header space grow.
- *
- * We currently use two buffers total, one for the headers (which
- * we manage) and another for the client to fill in (which it manages,
- * it provides the space for it, etc) -- we will pass that buffer
- * structure back to the caller, who is responsible for managing the
- * space it may have allocated as backing store for it. This second
- * buffer is bodybuffer, and we only allocate the buffer itself, not
- * the backing store.
- */
- isc_bufferlist_t bufflist;
- char *headerdata; /*%< send header buf */
- unsigned int headerlen; /*%< current header buffer size */
- isc_buffer_t headerbuffer;
-
- const char *mimetype;
- unsigned int retcode;
- const char *retmsg;
- isc_buffer_t bodybuffer;
- isc_httpdfree_t *freecb;
- void *freecb_arg;
-};
-
-/*% lightweight socket manager for httpd output */
-struct isc_httpdmgr {
- isc_mem_t *mctx;
- isc_socket_t *sock; /*%< listening socket */
- isc_task_t *task; /*%< owning task */
- isc_timermgr_t *timermgr;
-
- isc_httpdclientok_t *client_ok; /*%< client validator */
- isc_httpdondestroy_t *ondestroy; /*%< cleanup callback */
- void *cb_arg; /*%< argument for the above */
-
- unsigned int flags;
- ISC_LIST(isc_httpd_t) running; /*%< running clients */
-
- isc_mutex_t lock;
-
- ISC_LIST(isc_httpdurl_t) urls; /*%< urls we manage */
- isc_httpdaction_t *render_404;
- isc_httpdaction_t *render_500;
-};
-
-/*%
- * HTTP methods.
- */
-#define ISC_HTTPD_METHODUNKNOWN 0
-#define ISC_HTTPD_METHODGET 1
-#define ISC_HTTPD_METHODPOST 2
-
-/*%
- * Client states.
- *
- * _IDLE The client is not doing anything at all. This state should
- * only occur just after creation, and just before being
- * destroyed.
- *
- * _RECV The client is waiting for data after issuing a socket recv().
- *
- * _RECVDONE Data has been received, and is being processed.
- *
- * _SEND All data for a response has completed, and a reply was
- * sent via a socket send() call.
- *
- * _SENDDONE Send is completed.
- *
- * Badly formatted state table:
- *
- * IDLE -> RECV when client has a recv() queued.
- *
- * RECV -> RECVDONE when recvdone event received.
- *
- * RECVDONE -> SEND if the data for a reply is at hand.
- *
- * SEND -> RECV when a senddone event was received.
- *
- * At any time -> RECV on error. If RECV fails, the client will
- * self-destroy, closing the socket and freeing memory.
- */
-#define ISC_HTTPD_STATEIDLE 0
-#define ISC_HTTPD_STATERECV 1
-#define ISC_HTTPD_STATERECVDONE 2
-#define ISC_HTTPD_STATESEND 3
-#define ISC_HTTPD_STATESENDDONE 4
-
-#define ISC_HTTPD_ISRECV(c) ((c)->state == ISC_HTTPD_STATERECV)
-#define ISC_HTTPD_ISRECVDONE(c) ((c)->state == ISC_HTTPD_STATERECVDONE)
-#define ISC_HTTPD_ISSEND(c) ((c)->state == ISC_HTTPD_STATESEND)
-#define ISC_HTTPD_ISSENDDONE(c) ((c)->state == ISC_HTTPD_STATESENDDONE)
-
-/*%
- * Overall magic test that means we're not idle.
- */
-#define ISC_HTTPD_SETRECV(c) ((c)->state = ISC_HTTPD_STATERECV)
-#define ISC_HTTPD_SETRECVDONE(c) ((c)->state = ISC_HTTPD_STATERECVDONE)
-#define ISC_HTTPD_SETSEND(c) ((c)->state = ISC_HTTPD_STATESEND)
-#define ISC_HTTPD_SETSENDDONE(c) ((c)->state = ISC_HTTPD_STATESENDDONE)
-
-static void isc_httpd_accept(isc_task_t *, isc_event_t *);
-static void isc_httpd_recvdone(isc_task_t *, isc_event_t *);
-static void isc_httpd_senddone(isc_task_t *, isc_event_t *);
-static void destroy_client(isc_httpd_t **);
-static isc_result_t process_request(isc_httpd_t *, int);
-static void httpdmgr_destroy(isc_httpdmgr_t *);
-static isc_result_t grow_headerspace(isc_httpd_t *);
-static void reset_client(isc_httpd_t *httpd);
-static isc_result_t render_404(const char *, const char *,
- void *,
- unsigned int *, const char **,
- const char **, isc_buffer_t *,
- isc_httpdfree_t **, void **);
-static isc_result_t render_500(const char *, const char *,
- void *,
- unsigned int *, const char **,
- const char **, isc_buffer_t *,
- isc_httpdfree_t **, void **);
-
-static void
-destroy_client(isc_httpd_t **httpdp)
-{
- isc_httpd_t *httpd = *httpdp;
- isc_httpdmgr_t *httpdmgr = httpd->mgr;
-
- *httpdp = NULL;
-
- LOCK(&httpdmgr->lock);
-
- isc_socket_detach(&httpd->sock);
- ISC_LIST_UNLINK(httpdmgr->running, httpd, link);
-
- if (httpd->headerlen > 0)
- isc_mem_put(httpdmgr->mctx, httpd->headerdata,
- httpd->headerlen);
-
- isc_mem_put(httpdmgr->mctx, httpd, sizeof(isc_httpd_t));
-
- UNLOCK(&httpdmgr->lock);
-
- httpdmgr_destroy(httpdmgr);
-}
-
-isc_result_t
-isc_httpdmgr_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
- isc_httpdclientok_t *client_ok,
- isc_httpdondestroy_t *ondestroy, void *cb_arg,
- isc_timermgr_t *tmgr, isc_httpdmgr_t **httpdp)
-{
- isc_result_t result;
- isc_httpdmgr_t *httpd;
-
- REQUIRE(mctx != NULL);
- REQUIRE(sock != NULL);
- REQUIRE(task != NULL);
- REQUIRE(tmgr != NULL);
- REQUIRE(httpdp != NULL && *httpdp == NULL);
-
- httpd = isc_mem_get(mctx, sizeof(isc_httpdmgr_t));
- if (httpd == NULL)
- return (ISC_R_NOMEMORY);
-
- result = isc_mutex_init(&httpd->lock);
- if (result != ISC_R_SUCCESS) {
- isc_mem_put(mctx, httpd, sizeof(isc_httpdmgr_t));
- return (result);
- }
- httpd->mctx = NULL;
- isc_mem_attach(mctx, &httpd->mctx);
- httpd->sock = NULL;
- isc_socket_attach(sock, &httpd->sock);
- httpd->task = NULL;
- isc_task_attach(task, &httpd->task);
- httpd->timermgr = tmgr; /* XXXMLG no attach function? */
- httpd->client_ok = client_ok;
- httpd->ondestroy = ondestroy;
- httpd->cb_arg = cb_arg;
-
- ISC_LIST_INIT(httpd->running);
- ISC_LIST_INIT(httpd->urls);
-
- /* XXXMLG ignore errors on isc_socket_listen() */
- result = isc_socket_listen(sock, SOMAXCONN);
- if (result != ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_socket_listen() failed: %s",
- isc_result_totext(result));
- goto cleanup;
- }
-
- (void)isc_socket_filter(sock, "httpready");
-
- result = isc_socket_accept(sock, task, isc_httpd_accept, httpd);
- if (result != ISC_R_SUCCESS)
- goto cleanup;
-
- httpd->render_404 = render_404;
- httpd->render_500 = render_500;
-
- *httpdp = httpd;
- return (ISC_R_SUCCESS);
-
- cleanup:
- isc_task_detach(&httpd->task);
- isc_socket_detach(&httpd->sock);
- isc_mem_detach(&httpd->mctx);
- (void)isc_mutex_destroy(&httpd->lock);
- isc_mem_put(mctx, httpd, sizeof(isc_httpdmgr_t));
- return (result);
-}
-
-static void
-httpdmgr_destroy(isc_httpdmgr_t *httpdmgr)
-{
- isc_mem_t *mctx;
- isc_httpdurl_t *url;
-
- ENTER("httpdmgr_destroy");
-
- LOCK(&httpdmgr->lock);
-
- if (!MSHUTTINGDOWN(httpdmgr)) {
- NOTICE("httpdmgr_destroy not shutting down yet");
- UNLOCK(&httpdmgr->lock);
- return;
- }
-
- /*
- * If all clients are not shut down, don't do anything yet.
- */
- if (!ISC_LIST_EMPTY(httpdmgr->running)) {
- NOTICE("httpdmgr_destroy clients still active");
- UNLOCK(&httpdmgr->lock);
- return;
- }
-
- NOTICE("httpdmgr_destroy detaching socket, task, and timermgr");
-
- isc_socket_detach(&httpdmgr->sock);
- isc_task_detach(&httpdmgr->task);
- httpdmgr->timermgr = NULL;
-
- /*
- * Clear out the list of all actions we know about. Just free the
- * memory.
- */
- url = ISC_LIST_HEAD(httpdmgr->urls);
- while (url != NULL) {
- isc_mem_free(httpdmgr->mctx, url->url);
- ISC_LIST_UNLINK(httpdmgr->urls, url, link);
- isc_mem_put(httpdmgr->mctx, url, sizeof(isc_httpdurl_t));
- url = ISC_LIST_HEAD(httpdmgr->urls);
- }
-
- UNLOCK(&httpdmgr->lock);
- (void)isc_mutex_destroy(&httpdmgr->lock);
-
- if (httpdmgr->ondestroy != NULL)
- (httpdmgr->ondestroy)(httpdmgr->cb_arg);
-
- mctx = httpdmgr->mctx;
- isc_mem_putanddetach(&mctx, httpdmgr, sizeof(isc_httpdmgr_t));
-
- EXIT("httpdmgr_destroy");
-}
-
-#define LENGTHOK(s) (httpd->recvbuf - (s) < (int)httpd->recvlen)
-#define BUFLENOK(s) (httpd->recvbuf - (s) < HTTP_RECVLEN)
-
-static isc_result_t
-process_request(isc_httpd_t *httpd, int length)
-{
- char *s;
- char *p;
- int delim;
-
- ENTER("request");
-
- httpd->recvlen += length;
-
- httpd->recvbuf[httpd->recvlen] = 0;
-
- /*
- * If we don't find a blank line in our buffer, return that we need
- * more data.
- */
- s = strstr(httpd->recvbuf, "\r\n\r\n");
- delim = 1;
- if (s == NULL) {
- s = strstr(httpd->recvbuf, "\n\n");
- delim = 2;
- }
- if (s == NULL)
- return (ISC_R_NOTFOUND);
-
- /*
- * Determine if this is a POST or GET method. Any other values will
- * cause an error to be returned.
- */
- if (strncmp(httpd->recvbuf, "GET ", 4) == 0) {
- httpd->method = ISC_HTTPD_METHODGET;
- p = httpd->recvbuf + 4;
- } else if (strncmp(httpd->recvbuf, "POST ", 5) == 0) {
- httpd->method = ISC_HTTPD_METHODPOST;
- p = httpd->recvbuf + 5;
- } else {
- return (ISC_R_RANGE);
- }
-
- /*
- * From now on, p is the start of our buffer.
- */
-
- /*
- * Extract the URL.
- */
- s = p;
- while (LENGTHOK(s) && BUFLENOK(s) &&
- (*s != '\n' && *s != '\r' && *s != '\0' && *s != ' '))
- s++;
- if (!LENGTHOK(s))
- return (ISC_R_NOTFOUND);
- if (!BUFLENOK(s))
- return (ISC_R_NOMEMORY);
- *s = 0;
-
- /*
- * Make the URL relative.
- */
- if ((strncmp(p, "http:/", 6) == 0)
- || (strncmp(p, "https:/", 7) == 0)) {
- /* Skip first / */
- while (*p != '/' && *p != 0)
- p++;
- if (*p == 0)
- return (ISC_R_RANGE);
- p++;
- /* Skip second / */
- while (*p != '/' && *p != 0)
- p++;
- if (*p == 0)
- return (ISC_R_RANGE);
- p++;
- /* Find third / */
- while (*p != '/' && *p != 0)
- p++;
- if (*p == 0) {
- p--;
- *p = '/';
- }
- }
-
- httpd->url = p;
- p = s + delim;
- s = p;
-
- /*
- * Now, see if there is a ? mark in the URL. If so, this is
- * part of the query string, and we will split it from the URL.
- */
- httpd->querystring = strchr(httpd->url, '?');
- if (httpd->querystring != NULL) {
- *(httpd->querystring) = 0;
- httpd->querystring++;
- }
-
- /*
- * Extract the HTTP/1.X protocol. We will bounce on anything but
- * HTTP/1.1 for now.
- */
- while (LENGTHOK(s) && BUFLENOK(s) &&
- (*s != '\n' && *s != '\r' && *s != '\0'))
- s++;
- if (!LENGTHOK(s))
- return (ISC_R_NOTFOUND);
- if (!BUFLENOK(s))
- return (ISC_R_NOMEMORY);
- *s = 0;
- if ((strncmp(p, "HTTP/1.0", 8) != 0)
- && (strncmp(p, "HTTP/1.1", 8) != 0))
- return (ISC_R_RANGE);
- httpd->protocol = p;
- p = s + 1;
- s = p;
-
- if (strstr(s, "Connection: close") != NULL)
- httpd->flags |= HTTPD_CLOSE;
-
- if (strstr(s, "Host: ") != NULL)
- httpd->flags |= HTTPD_FOUNDHOST;
-
- /*
- * Standards compliance hooks here.
- */
- if (strcmp(httpd->protocol, "HTTP/1.1") == 0
- && ((httpd->flags & HTTPD_FOUNDHOST) == 0))
- return (ISC_R_RANGE);
-
- EXIT("request");
-
- return (ISC_R_SUCCESS);
-}
-
-static void
-isc_httpd_accept(isc_task_t *task, isc_event_t *ev)
-{
- isc_result_t result;
- isc_httpdmgr_t *httpdmgr = ev->ev_arg;
- isc_httpd_t *httpd;
- isc_region_t r;
- isc_socket_newconnev_t *nev = (isc_socket_newconnev_t *)ev;
- isc_sockaddr_t peeraddr;
-
- ENTER("accept");
-
- LOCK(&httpdmgr->lock);
- if (MSHUTTINGDOWN(httpdmgr)) {
- NOTICE("accept shutting down, goto out");
- goto out;
- }
-
- if (nev->result == ISC_R_CANCELED) {
- NOTICE("accept canceled, goto out");
- goto out;
- }
-
- if (nev->result != ISC_R_SUCCESS) {
- /* XXXMLG log failure */
- NOTICE("accept returned failure, goto requeue");
- goto requeue;
- }
-
- (void)isc_socket_getpeername(nev->newsocket, &peeraddr);
- if (httpdmgr->client_ok != NULL &&
- !(httpdmgr->client_ok)(&peeraddr, httpdmgr->cb_arg)) {
- isc_socket_detach(&nev->newsocket);
- goto requeue;
- }
-
- httpd = isc_mem_get(httpdmgr->mctx, sizeof(isc_httpd_t));
- if (httpd == NULL) {
- /* XXXMLG log failure */
- NOTICE("accept failed to allocate memory, goto requeue");
- isc_socket_detach(&nev->newsocket);
- goto requeue;
- }
-
- httpd->mgr = httpdmgr;
- ISC_LINK_INIT(httpd, link);
- ISC_LIST_APPEND(httpdmgr->running, httpd, link);
- ISC_HTTPD_SETRECV(httpd);
- httpd->sock = nev->newsocket;
- isc_socket_setname(httpd->sock, "httpd", NULL);
- httpd->flags = 0;
-
- /*
- * Initialize the buffer for our headers.
- */
- httpd->headerdata = isc_mem_get(httpdmgr->mctx, HTTP_SENDGROW);
- if (httpd->headerdata == NULL) {
- isc_mem_put(httpdmgr->mctx, httpd, sizeof(isc_httpd_t));
- isc_socket_detach(&nev->newsocket);
- goto requeue;
- }
- httpd->headerlen = HTTP_SENDGROW;
- isc_buffer_init(&httpd->headerbuffer, httpd->headerdata,
- httpd->headerlen);
-
- ISC_LIST_INIT(httpd->bufflist);
-
- isc_buffer_initnull(&httpd->bodybuffer);
- reset_client(httpd);
-
- r.base = (unsigned char *)httpd->recvbuf;
- r.length = HTTP_RECVLEN - 1;
- result = isc_socket_recv(httpd->sock, &r, 1, task, isc_httpd_recvdone,
- httpd);
- /* FIXME!!! */
- POST(result);
- NOTICE("accept queued recv on socket");
-
- requeue:
- result = isc_socket_accept(httpdmgr->sock, task, isc_httpd_accept,
- httpdmgr);
- if (result != ISC_R_SUCCESS) {
- /* XXXMLG what to do? Log failure... */
- NOTICE("accept could not reaccept due to failure");
- }
-
- out:
- UNLOCK(&httpdmgr->lock);
-
- httpdmgr_destroy(httpdmgr);
-
- isc_event_free(&ev);
-
- EXIT("accept");
-}
-
-static isc_result_t
-render_404(const char *url, const char *querystring,
- void *arg,
- unsigned int *retcode, const char **retmsg,
- const char **mimetype, isc_buffer_t *b,
- isc_httpdfree_t **freecb, void **freecb_args)
-{
- static char msg[] = "No such URL.";
-
- UNUSED(url);
- UNUSED(querystring);
- UNUSED(arg);
-
- *retcode = 404;
- *retmsg = "No such URL";
- *mimetype = "text/plain";
- isc_buffer_reinit(b, msg, strlen(msg));
- isc_buffer_add(b, strlen(msg));
- *freecb = NULL;
- *freecb_args = NULL;
-
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-render_500(const char *url, const char *querystring,
- void *arg,
- unsigned int *retcode, const char **retmsg,
- const char **mimetype, isc_buffer_t *b,
- isc_httpdfree_t **freecb, void **freecb_args)
-{
- static char msg[] = "Internal server failure.";
-
- UNUSED(url);
- UNUSED(querystring);
- UNUSED(arg);
-
- *retcode = 500;
- *retmsg = "Internal server failure";
- *mimetype = "text/plain";
- isc_buffer_reinit(b, msg, strlen(msg));
- isc_buffer_add(b, strlen(msg));
- *freecb = NULL;
- *freecb_args = NULL;
-
- return (ISC_R_SUCCESS);
-}
-
-static void
-isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
-{
- isc_region_t r;
- isc_result_t result;
- isc_httpd_t *httpd = ev->ev_arg;
- isc_socketevent_t *sev = (isc_socketevent_t *)ev;
- isc_httpdurl_t *url;
- isc_time_t now;
- char datebuf[32]; /* Only need 30, but safety first */
-
- ENTER("recv");
-
- INSIST(ISC_HTTPD_ISRECV(httpd));
-
- if (sev->result != ISC_R_SUCCESS) {
- NOTICE("recv destroying client");
- destroy_client(&httpd);
- goto out;
- }
-
- result = process_request(httpd, sev->n);
- if (result == ISC_R_NOTFOUND) {
- if (httpd->recvlen >= HTTP_RECVLEN - 1) {
- destroy_client(&httpd);
- goto out;
- }
- r.base = (unsigned char *)httpd->recvbuf + httpd->recvlen;
- r.length = HTTP_RECVLEN - httpd->recvlen - 1;
- /* check return code? */
- (void)isc_socket_recv(httpd->sock, &r, 1, task,
- isc_httpd_recvdone, httpd);
- goto out;
- } else if (result != ISC_R_SUCCESS) {
- destroy_client(&httpd);
- goto out;
- }
-
- ISC_HTTPD_SETSEND(httpd);
-
- /*
- * XXXMLG Call function here. Provide an add-header function
- * which will append the common headers to a response we generate.
- */
- isc_buffer_initnull(&httpd->bodybuffer);
- isc_time_now(&now);
- isc_time_formathttptimestamp(&now, datebuf, sizeof(datebuf));
- url = ISC_LIST_HEAD(httpd->mgr->urls);
- while (url != NULL) {
- if (strcmp(httpd->url, url->url) == 0)
- break;
- url = ISC_LIST_NEXT(url, link);
- }
- if (url == NULL)
- result = httpd->mgr->render_404(httpd->url, httpd->querystring,
- NULL,
- &httpd->retcode,
- &httpd->retmsg,
- &httpd->mimetype,
- &httpd->bodybuffer,
- &httpd->freecb,
- &httpd->freecb_arg);
- else
- result = url->action(httpd->url, httpd->querystring,
- url->action_arg,
- &httpd->retcode, &httpd->retmsg,
- &httpd->mimetype, &httpd->bodybuffer,
- &httpd->freecb, &httpd->freecb_arg);
- if (result != ISC_R_SUCCESS) {
- result = httpd->mgr->render_500(httpd->url, httpd->querystring,
- NULL, &httpd->retcode,
- &httpd->retmsg,
- &httpd->mimetype,
- &httpd->bodybuffer,
- &httpd->freecb,
- &httpd->freecb_arg);
- RUNTIME_CHECK(result == ISC_R_SUCCESS);
- }
-
- isc_httpd_response(httpd);
- isc_httpd_addheader(httpd, "Content-Type", httpd->mimetype);
- isc_httpd_addheader(httpd, "Date", datebuf);
- isc_httpd_addheader(httpd, "Expires", datebuf);
- isc_httpd_addheader(httpd, "Last-Modified", datebuf);
- isc_httpd_addheader(httpd, "Pragma: no-cache", NULL);
- isc_httpd_addheader(httpd, "Cache-Control: no-cache", NULL);
- isc_httpd_addheader(httpd, "Server: libisc", NULL);
- isc_httpd_addheaderuint(httpd, "Content-Length",
- isc_buffer_usedlength(&httpd->bodybuffer));
- isc_httpd_endheaders(httpd); /* done */
-
- ISC_LIST_APPEND(httpd->bufflist, &httpd->headerbuffer, link);
- /*
- * Link the data buffer into our send queue, should we have any data
- * rendered into it. If no data is present, we won't do anything
- * with the buffer.
- */
- if (isc_buffer_length(&httpd->bodybuffer) > 0)
- ISC_LIST_APPEND(httpd->bufflist, &httpd->bodybuffer, link);
-
- /* check return code? */
- (void)isc_socket_sendv(httpd->sock, &httpd->bufflist, task,
- isc_httpd_senddone, httpd);
-
- out:
- isc_event_free(&ev);
- EXIT("recv");
-}
-
-void
-isc_httpdmgr_shutdown(isc_httpdmgr_t **httpdmgrp)
-{
- isc_httpdmgr_t *httpdmgr;
- isc_httpd_t *httpd;
- httpdmgr = *httpdmgrp;
- *httpdmgrp = NULL;
-
- ENTER("isc_httpdmgr_shutdown");
-
- LOCK(&httpdmgr->lock);
-
- MSETSHUTTINGDOWN(httpdmgr);
-
- isc_socket_cancel(httpdmgr->sock, httpdmgr->task, ISC_SOCKCANCEL_ALL);
-
- httpd = ISC_LIST_HEAD(httpdmgr->running);
- while (httpd != NULL) {
- isc_socket_cancel(httpd->sock, httpdmgr->task,
- ISC_SOCKCANCEL_ALL);
- httpd = ISC_LIST_NEXT(httpd, link);
- }
-
- UNLOCK(&httpdmgr->lock);
-
- EXIT("isc_httpdmgr_shutdown");
-}
-
-static isc_result_t
-grow_headerspace(isc_httpd_t *httpd)
-{
- char *newspace;
- unsigned int newlen;
- isc_region_t r;
-
- newlen = httpd->headerlen + HTTP_SENDGROW;
- if (newlen > HTTP_SEND_MAXLEN)
- return (ISC_R_NOSPACE);
-
- newspace = isc_mem_get(httpd->mgr->mctx, newlen);
- if (newspace == NULL)
- return (ISC_R_NOMEMORY);
- isc_buffer_region(&httpd->headerbuffer, &r);
- isc_buffer_reinit(&httpd->headerbuffer, newspace, newlen);
-
- isc_mem_put(httpd->mgr->mctx, r.base, r.length);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_httpd_response(isc_httpd_t *httpd)
-{
- isc_result_t result;
- unsigned int needlen;
-
- needlen = strlen(httpd->protocol) + 1; /* protocol + space */
- needlen += 3 + 1; /* room for response code, always 3 bytes */
- needlen += strlen(httpd->retmsg) + 2; /* return msg + CRLF */
-
- while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
- result = grow_headerspace(httpd);
- if (result != ISC_R_SUCCESS)
- return (result);
- }
-
- sprintf(isc_buffer_used(&httpd->headerbuffer), "%s %03d %s\r\n",
- httpd->protocol, httpd->retcode, httpd->retmsg);
- isc_buffer_add(&httpd->headerbuffer, needlen);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_httpd_addheader(isc_httpd_t *httpd, const char *name,
- const char *val)
-{
- isc_result_t result;
- unsigned int needlen;
-
- needlen = strlen(name); /* name itself */
- if (val != NULL)
- needlen += 2 + strlen(val); /* :<space> and val */
- needlen += 2; /* CRLF */
-
- while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
- result = grow_headerspace(httpd);
- if (result != ISC_R_SUCCESS)
- return (result);
- }
-
- if (val != NULL)
- sprintf(isc_buffer_used(&httpd->headerbuffer),
- "%s: %s\r\n", name, val);
- else
- sprintf(isc_buffer_used(&httpd->headerbuffer),
- "%s\r\n", name);
-
- isc_buffer_add(&httpd->headerbuffer, needlen);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_httpd_endheaders(isc_httpd_t *httpd)
-{
- isc_result_t result;
-
- while (isc_buffer_availablelength(&httpd->headerbuffer) < 2) {
- result = grow_headerspace(httpd);
- if (result != ISC_R_SUCCESS)
- return (result);
- }
-
- sprintf(isc_buffer_used(&httpd->headerbuffer), "\r\n");
- isc_buffer_add(&httpd->headerbuffer, 2);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_httpd_addheaderuint(isc_httpd_t *httpd, const char *name, int val) {
- isc_result_t result;
- unsigned int needlen;
- char buf[sizeof "18446744073709551616"];
-
- sprintf(buf, "%d", val);
-
- needlen = strlen(name); /* name itself */
- needlen += 2 + strlen(buf); /* :<space> and val */
- needlen += 2; /* CRLF */
-
- while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
- result = grow_headerspace(httpd);
- if (result != ISC_R_SUCCESS)
- return (result);
- }
-
- sprintf(isc_buffer_used(&httpd->headerbuffer),
- "%s: %s\r\n", name, buf);
-
- isc_buffer_add(&httpd->headerbuffer, needlen);
-
- return (ISC_R_SUCCESS);
-}
-
-static void
-isc_httpd_senddone(isc_task_t *task, isc_event_t *ev)
-{
- isc_httpd_t *httpd = ev->ev_arg;
- isc_region_t r;
- isc_socketevent_t *sev = (isc_socketevent_t *)ev;
-
- ENTER("senddone");
- INSIST(ISC_HTTPD_ISSEND(httpd));
-
- /*
- * First, unlink our header buffer from the socket's bufflist. This
- * is sort of an evil hack, since we know our buffer will be there,
- * and we know it's address, so we can just remove it directly.
- */
- NOTICE("senddone unlinked header");
- ISC_LIST_UNLINK(sev->bufferlist, &httpd->headerbuffer, link);
-
- /*
- * We will always want to clean up our receive buffer, even if we
- * got an error on send or we are shutting down.
- *
- * We will pass in the buffer only if there is data in it. If
- * there is no data, we will pass in a NULL.
- */
- if (httpd->freecb != NULL) {
- isc_buffer_t *b = NULL;
- if (isc_buffer_length(&httpd->bodybuffer) > 0)
- b = &httpd->bodybuffer;
- httpd->freecb(b, httpd->freecb_arg);
- NOTICE("senddone free callback performed");
- }
- if (ISC_LINK_LINKED(&httpd->bodybuffer, link)) {
- ISC_LIST_UNLINK(sev->bufferlist, &httpd->bodybuffer, link);
- NOTICE("senddone body buffer unlinked");
- }
-
- if (sev->result != ISC_R_SUCCESS) {
- destroy_client(&httpd);
- goto out;
- }
-
- if ((httpd->flags & HTTPD_CLOSE) != 0) {
- destroy_client(&httpd);
- goto out;
- }
-
- ISC_HTTPD_SETRECV(httpd);
-
- NOTICE("senddone restarting recv on socket");
-
- reset_client(httpd);
-
- r.base = (unsigned char *)httpd->recvbuf;
- r.length = HTTP_RECVLEN - 1;
- /* check return code? */
- (void)isc_socket_recv(httpd->sock, &r, 1, task,
- isc_httpd_recvdone, httpd);
-
-out:
- isc_event_free(&ev);
- EXIT("senddone");
-}
-
-static void
-reset_client(isc_httpd_t *httpd)
-{
- /*
- * Catch errors here. We MUST be in RECV mode, and we MUST NOT have
- * any outstanding buffers. If we have buffers, we have a leak.
- */
- INSIST(ISC_HTTPD_ISRECV(httpd));
- INSIST(!ISC_LINK_LINKED(&httpd->headerbuffer, link));
- INSIST(!ISC_LINK_LINKED(&httpd->bodybuffer, link));
-
- httpd->recvbuf[0] = 0;
- httpd->recvlen = 0;
- httpd->method = ISC_HTTPD_METHODUNKNOWN;
- httpd->url = NULL;
- httpd->querystring = NULL;
- httpd->protocol = NULL;
- httpd->flags = 0;
-
- isc_buffer_clear(&httpd->headerbuffer);
- isc_buffer_invalidate(&httpd->bodybuffer);
-}
-
-isc_result_t
-isc_httpdmgr_addurl(isc_httpdmgr_t *httpdmgr, const char *url,
- isc_httpdaction_t *func, void *arg)
-{
- isc_httpdurl_t *item;
-
- if (url == NULL) {
- httpdmgr->render_404 = func;
- return (ISC_R_SUCCESS);
- }
-
- item = isc_mem_get(httpdmgr->mctx, sizeof(isc_httpdurl_t));
- if (item == NULL)
- return (ISC_R_NOMEMORY);
-
- item->url = isc_mem_strdup(httpdmgr->mctx, url);
- if (item->url == NULL) {
- isc_mem_put(httpdmgr->mctx, item, sizeof(isc_httpdurl_t));
- return (ISC_R_NOMEMORY);
- }
-
- item->action = func;
- item->action_arg = arg;
- ISC_LINK_INIT(item, link);
- ISC_LIST_APPEND(httpdmgr->urls, item, link);
-
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/ia64/include/isc/atomic.h b/contrib/ntp/lib/isc/ia64/include/isc/atomic.h
deleted file mode 100644
index 6c22f2a53e28..000000000000
--- a/contrib/ntp/lib/isc/ia64/include/isc/atomic.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: atomic.h,v 1.7 2009/06/24 02:22:50 marka Exp $ */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-#include <isc/platform.h>
-#include <isc/types.h>
-
-#ifdef ISC_PLATFORM_USEGCCASM
-/*
- * This routine atomically increments the value stored in 'p' by 'val', and
- * returns the previous value.
- *
- * Open issue: can 'fetchadd' make the code faster for some particular values
- * (e.g., 1 and -1)?
- */
-static inline isc_int32_t
-#ifdef __GNUC__
-__attribute__ ((unused))
-#endif
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
-{
- isc_int32_t prev, swapped;
-
- for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) {
- swapped = prev + val;
- __asm__ volatile(
- "mov ar.ccv=%2;"
- "cmpxchg4.acq %0=%4,%3,ar.ccv"
- : "=r" (swapped), "=m" (*p)
- : "r" (prev), "r" (swapped), "m" (*p)
- : "memory");
- if (swapped == prev)
- break;
- }
-
- return (prev);
-}
-
-/*
- * This routine atomically stores the value 'val' in 'p'.
- */
-static inline void
-#ifdef __GNUC__
-__attribute__ ((unused))
-#endif
-isc_atomic_store(isc_int32_t *p, isc_int32_t val)
-{
- __asm__ volatile(
- "st4.rel %0=%1"
- : "=m" (*p)
- : "r" (val)
- : "memory"
- );
-}
-
-/*
- * This routine atomically replaces the value in 'p' with 'val', if the
- * original value is equal to 'cmpval'. The original value is returned in any
- * case.
- */
-static inline isc_int32_t
-#ifdef __GNUC__
-__attribute__ ((unused))
-#endif
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
-{
- isc_int32_t ret;
-
- __asm__ volatile(
- "mov ar.ccv=%2;"
- "cmpxchg4.acq %0=%4,%3,ar.ccv"
- : "=r" (ret), "=m" (*p)
- : "r" (cmpval), "r" (val), "m" (*p)
- : "memory");
-
- return (ret);
-}
-#else /* !ISC_PLATFORM_USEGCCASM */
-
-#error "unsupported compiler. disable atomic ops by --disable-atomic"
-
-#endif
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/lib/isc/include/isc/base32.h b/contrib/ntp/lib/isc/include/isc/base32.h
deleted file mode 100644
index 978a8db463ae..000000000000
--- a/contrib/ntp/lib/isc/include/isc/base32.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: base32.h,v 1.3 2008/09/25 04:02:39 tbox Exp $ */
-
-#ifndef ISC_BASE32_H
-#define ISC_BASE32_H 1
-
-/*! \file */
-
-/*
- * Routines for manipulating base 32 and base 32 hex encoded data.
- * Based on RFC 4648.
- *
- * Base 32 hex preserves the sort order of data when it is encoded /
- * decoded.
- */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/***
- *** Functions
- ***/
-
-isc_result_t
-isc_base32_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target);
-isc_result_t
-isc_base32hex_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target);
-/*!<
- * \brief Convert data into base32 encoded text.
- *
- * Notes:
- *\li The base32 encoded text in 'target' will be divided into
- * words of at most 'wordlength' characters, separated by
- * the 'wordbreak' string. No parentheses will surround
- * the text.
- *
- * Requires:
- *\li 'source' is a region containing binary data
- *\li 'target' is a text buffer containing available space
- *\li 'wordbreak' points to a null-terminated string of
- * zero or more whitespace characters
- *
- * Ensures:
- *\li target will contain the base32 encoded version of the data
- * in source. The 'used' pointer in target will be advanced as
- * necessary.
- */
-
-isc_result_t
-isc_base32_decodestring(const char *cstr, isc_buffer_t *target);
-isc_result_t
-isc_base32hex_decodestring(const char *cstr, isc_buffer_t *target);
-/*!<
- * \brief Decode a null-terminated base32 string.
- *
- * Requires:
- *\li 'cstr' is non-null.
- *\li 'target' is a valid buffer.
- *
- * Returns:
- *\li #ISC_R_SUCCESS -- the entire decoded representation of 'cstring'
- * fit in 'target'.
- *\li #ISC_R_BADBASE32 -- 'cstr' is not a valid base32 encoding.
- *
- * Other error returns are any possible error code from:
- *\li isc_lex_create(),
- *\li isc_lex_openbuffer(),
- *\li isc_base32_tobuffer().
- */
-
-isc_result_t
-isc_base32_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
-isc_result_t
-isc_base32hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
-/*!<
- * \brief Convert base32 encoded text from a lexer context into data.
- *
- * Requires:
- *\li 'lex' is a valid lexer context
- *\li 'target' is a buffer containing binary data
- *\li 'length' is an integer
- *
- * Ensures:
- *\li target will contain the data represented by the base32 encoded
- * string parsed by the lexer. No more than length bytes will be read,
- * if length is positive. The 'used' pointer in target will be
- * advanced as necessary.
- */
-
-isc_result_t
-isc_base32_decoderegion(isc_region_t *source, isc_buffer_t *target);
-isc_result_t
-isc_base32hex_decoderegion(isc_region_t *source, isc_buffer_t *target);
-/*!<
- * \brief Decode a packed (no white space permitted) base32 region.
- *
- * Requires:
- *\li 'source' is a valid region.
- *\li 'target' is a valid buffer.
- *
- * Returns:
- *\li #ISC_R_SUCCESS -- the entire decoded representation of 'cstring'
- * fit in 'target'.
- *\li #ISC_R_BADBASE32 -- 'source' is not a valid base32 encoding.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_BASE32_H */
diff --git a/contrib/ntp/lib/isc/include/isc/base64.h b/contrib/ntp/lib/isc/include/isc/base64.h
deleted file mode 100644
index e48ef2a400cd..000000000000
--- a/contrib/ntp/lib/isc/include/isc/base64.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: base64.h,v 1.22 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_BASE64_H
-#define ISC_BASE64_H 1
-
-/*! \file isc/base64.h */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/***
- *** Functions
- ***/
-
-isc_result_t
-isc_base64_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target);
-/*!<
- * \brief Convert data into base64 encoded text.
- *
- * Notes:
- *\li The base64 encoded text in 'target' will be divided into
- * words of at most 'wordlength' characters, separated by
- * the 'wordbreak' string. No parentheses will surround
- * the text.
- *
- * Requires:
- *\li 'source' is a region containing binary data
- *\li 'target' is a text buffer containing available space
- *\li 'wordbreak' points to a null-terminated string of
- * zero or more whitespace characters
- *
- * Ensures:
- *\li target will contain the base64 encoded version of the data
- * in source. The 'used' pointer in target will be advanced as
- * necessary.
- */
-
-isc_result_t
-isc_base64_decodestring(const char *cstr, isc_buffer_t *target);
-/*!<
- * \brief Decode a null-terminated base64 string.
- *
- * Requires:
- *\li 'cstr' is non-null.
- *\li 'target' is a valid buffer.
- *
- * Returns:
- *\li #ISC_R_SUCCESS -- the entire decoded representation of 'cstring'
- * fit in 'target'.
- *\li #ISC_R_BADBASE64 -- 'cstr' is not a valid base64 encoding.
- *
- * Other error returns are any possible error code from:
- *\li isc_lex_create(),
- *\li isc_lex_openbuffer(),
- *\li isc_base64_tobuffer().
- */
-
-isc_result_t
-isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
-/*!<
- * \brief Convert base64 encoded text from a lexer context into data.
- *
- * Requires:
- *\li 'lex' is a valid lexer context
- *\li 'target' is a buffer containing binary data
- *\li 'length' is an integer
- *
- * Ensures:
- *\li target will contain the data represented by the base64 encoded
- * string parsed by the lexer. No more than length bytes will be read,
- * if length is positive. The 'used' pointer in target will be
- * advanced as necessary.
- */
-
-
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_BASE64_H */
diff --git a/contrib/ntp/lib/isc/include/isc/bitstring.h b/contrib/ntp/lib/isc/include/isc/bitstring.h
deleted file mode 100644
index 252d1117a782..000000000000
--- a/contrib/ntp/lib/isc/include/isc/bitstring.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: bitstring.h,v 1.14 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_BITSTRING_H
-#define ISC_BITSTRING_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/bitstring.h
- *
- * \brief Bitstring manipulation functions.
- *
- * A bitstring is a packed array of bits, stored in a contiguous
- * sequence of octets. The "most significant bit" (msb) of a bitstring
- * is the high bit of the first octet. The "least significant bit" of a
- * bitstring is the low bit of the last octet.
- *
- * Two bit numbering schemes are supported, "msb0" and "lsb0".
- *
- * In the "msb0" scheme, bit number 0 designates the most significant bit,
- * and any padding bits required to make the bitstring a multiple of 8 bits
- * long are added to the least significant end of the last octet.
- *
- * In the "lsb0" scheme, bit number 0 designates the least significant bit,
- * and any padding bits required to make the bitstring a multiple of 8 bits
- * long are added to the most significant end of the first octet.
- *
- * E.g., consider the bitstring "11010001111". This bitstring is 11 bits
- * long and will take two octets. Let "p" denote a pad bit. In the msb0
- * encoding, it would be
- *
- * \verbatim
- * Octet 0 Octet 1
- * |
- * 1 1 0 1 0 0 0 1 | 1 1 1 p p p p p
- * ^ | ^
- * | |
- * bit 0 bit 15
- * \endverbatim
- *
- * In the lsb0 encoding, it would be
- *
- * \verbatim
- * Octet 0 Octet 1
- * |
- * p p p p p 1 1 0 | 1 0 0 0 1 1 1 1
- * ^ | ^
- * | |
- * bit 15 bit 0
- * \endverbatim
- */
-
-/***
- *** Imports
- ***/
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/***
- *** Types
- ***/
-
-struct isc_bitstring {
- unsigned int magic;
- unsigned char * data;
- unsigned int length;
- unsigned int size;
- isc_boolean_t lsb0;
-};
-
-/***
- *** Functions
- ***/
-
-void
-isc_bitstring_init(isc_bitstring_t *bitstring, unsigned char *data,
- unsigned int length, unsigned int size, isc_boolean_t lsb0);
-/*!<
- * \brief Make 'bitstring' refer to the bitstring of 'size' bits starting
- * at 'data'. 'length' bits of the bitstring are valid. If 'lsb0'
- * is set then, bit 0 refers to the least significant bit of the
- * bitstring. Otherwise bit 0 is the most significant bit.
- *
- * Requires:
- *
- *\li 'bitstring' points to a isc_bitstring_t.
- *
- *\li 'data' points to an array of unsigned char large enough to hold
- * 'size' bits.
- *
- *\li 'length' <= 'size'.
- *
- * Ensures:
- *
- *\li 'bitstring' is a valid bitstring.
- */
-
-void
-isc_bitstring_invalidate(isc_bitstring_t *bitstring);
-/*!<
- * \brief Invalidate 'bitstring'.
- *
- * Requires:
- *
- *\li 'bitstring' is a valid bitstring.
- *
- * Ensures:
- *
- *\li 'bitstring' is not a valid bitstring.
- */
-
-void
-isc_bitstring_copy(isc_bitstring_t *source, unsigned int sbitpos,
- isc_bitstring_t *target, unsigned int tbitpos,
- unsigned int n);
-/*!<
- * \brief Starting at bit 'sbitpos', copy 'n' bits from 'source' to
- * the 'n' bits of 'target' starting at 'tbitpos'.
- *
- * Requires:
- *
- *\li 'source' and target are valid bitstrings with the same lsb0 setting.
- *
- *\li 'sbitpos' + 'n' is less than or equal to the length of 'source'.
- *
- *\li 'tbitpos' + 'n' is less than or equal to the size of 'target'.
- *
- * Ensures:
- *
- *\li The specified bits have been copied, and the length of 'target'
- * adjusted (if required).
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_BITSTRING_H */
diff --git a/contrib/ntp/lib/isc/include/isc/bufferlist.h b/contrib/ntp/lib/isc/include/isc/bufferlist.h
deleted file mode 100644
index 54e00c76f619..000000000000
--- a/contrib/ntp/lib/isc/include/isc/bufferlist.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: bufferlist.h,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_BUFFERLIST_H
-#define ISC_BUFFERLIST_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/bufferlist.h
- *
- *
- *\brief Buffer lists have no synchronization. Clients must ensure exclusive
- * access.
- *
- * \li Reliability:
- * No anticipated impact.
-
- * \li Security:
- * No anticipated impact.
- *
- * \li Standards:
- * None.
- */
-
-/***
- *** Imports
- ***/
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/***
- *** Functions
- ***/
-
-unsigned int
-isc_bufferlist_usedcount(isc_bufferlist_t *bl);
-/*!<
- * \brief Return the length of the sum of all used regions of all buffers in
- * the buffer list 'bl'
- *
- * Requires:
- *
- *\li 'bl' is not NULL.
- *
- * Returns:
- *\li sum of all used regions' lengths.
- */
-
-unsigned int
-isc_bufferlist_availablecount(isc_bufferlist_t *bl);
-/*!<
- * \brief Return the length of the sum of all available regions of all buffers in
- * the buffer list 'bl'
- *
- * Requires:
- *
- *\li 'bl' is not NULL.
- *
- * Returns:
- *\li sum of all available regions' lengths.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_BUFFERLIST_H */
diff --git a/contrib/ntp/lib/isc/include/isc/commandline.h b/contrib/ntp/lib/isc/include/isc/commandline.h
deleted file mode 100644
index 384640a45b5c..000000000000
--- a/contrib/ntp/lib/isc/include/isc/commandline.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: commandline.h,v 1.16 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_COMMANDLINE_H
-#define ISC_COMMANDLINE_H 1
-
-/*! \file isc/commandline.h */
-
-#include <isc/boolean.h>
-#include <isc/lang.h>
-#include <isc/platform.h>
-
-/*% Index into parent argv vector. */
-LIBISC_EXTERNAL_DATA extern int isc_commandline_index;
-/*% Character checked for validity. */
-LIBISC_EXTERNAL_DATA extern int isc_commandline_option;
-/*% Argument associated with option. */
-LIBISC_EXTERNAL_DATA extern char *isc_commandline_argument;
-/*% For printing error messages. */
-LIBISC_EXTERNAL_DATA extern char *isc_commandline_progname;
-/*% Print error message. */
-LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_errprint;
-/*% Reset getopt. */
-LIBISC_EXTERNAL_DATA extern isc_boolean_t isc_commandline_reset;
-
-ISC_LANG_BEGINDECLS
-
-/*% parse command line */
-int
-isc_commandline_parse(int argc, char * const *argv, const char *options);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_COMMANDLINE_H */
diff --git a/contrib/ntp/lib/isc/include/isc/entropy.h b/contrib/ntp/lib/isc/include/isc/entropy.h
deleted file mode 100644
index d28f29a56ecf..000000000000
--- a/contrib/ntp/lib/isc/include/isc/entropy.h
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: entropy.h,v 1.35 2009/10/19 02:37:08 marka Exp $ */
-
-#ifndef ISC_ENTROPY_H
-#define ISC_ENTROPY_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/entropy.h
- * \brief The entropy API
- *
- * \li MP:
- * The entropy object is locked internally. All callbacks into
- * application-provided functions (for setup, gathering, and
- * shutdown of sources) are guaranteed to be called with the
- * entropy API lock held. This means these functions are
- * not permitted to call back into the entropy API.
- *
- * \li Reliability:
- * No anticipated impact.
- *
- * \li Resources:
- * A buffer, used as an entropy pool.
- *
- * \li Security:
- * While this code is believed to implement good entropy gathering
- * and distribution, it has not been reviewed by a cryptographic
- * expert.
- * Since the added entropy is only as good as the sources used,
- * this module could hand out bad data and never know it.
- *
- * \li Standards:
- * None.
- */
-
-/***
- *** Imports
- ***/
-
-#include <stdio.h>
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-/*@{*/
-/*% Entropy callback function. */
-typedef isc_result_t (*isc_entropystart_t)(isc_entropysource_t *source,
- void *arg, isc_boolean_t blocking);
-typedef isc_result_t (*isc_entropyget_t)(isc_entropysource_t *source,
- void *arg, isc_boolean_t blocking);
-typedef void (*isc_entropystop_t)(isc_entropysource_t *source, void *arg);
-/*@}*/
-
-/***
- *** Flags.
- ***/
-
-/*!
- * \brief
- * Extract only "good" data; return failure if there is not enough
- * data available and there are no sources which we can poll to get
- * data, or those sources are empty.
- *
- *
- */
-#define ISC_ENTROPY_GOODONLY 0x00000001U
-/*!
- * \brief
- * Extract as much good data as possible, but if there isn't enough
- * at hand, return what is available. This flag only makes sense
- * when used with _GOODONLY.
- */
-#define ISC_ENTROPY_PARTIAL 0x00000002U
-/*!
- * \brief
- * Block the task until data is available. This is contrary to the
- * ISC task system, where tasks should never block. However, if
- * this is a special purpose application where blocking a task is
- * acceptable (say, an offline zone signer) this flag may be set.
- * This flag only makes sense when used with _GOODONLY, and will
- * block regardless of the setting for _PARTIAL.
- */
-#define ISC_ENTROPY_BLOCKING 0x00000004U
-
-/*!
- * \brief
- * Estimate the amount of entropy contained in the sample pool.
- * If this is not set, the source will be gathered and periodically
- * mixed into the entropy pool, but no increment in contained entropy
- * will be assumed. This flag only makes sense on sample sources.
- */
-#define ISC_ENTROPYSOURCE_ESTIMATE 0x00000001U
-
-/*
- * For use with isc_entropy_usebestsource().
- */
-/*!
- * \brief
- * Use the keyboard as the only entropy source.
- */
-#define ISC_ENTROPY_KEYBOARDYES 1
-/*!
- * \brief
- * Never use the keyboard as an entropy source.
- */
-#define ISC_ENTROPY_KEYBOARDNO 2
-/*!
- * \brief
- * Use the keyboard as an entropy source only if opening the
- * random device fails.
- */
-#define ISC_ENTROPY_KEYBOARDMAYBE 3
-
-ISC_LANG_BEGINDECLS
-
-/***
- *** Functions
- ***/
-
-isc_result_t
-isc_entropy_create(isc_mem_t *mctx, isc_entropy_t **entp);
-/*!<
- * \brief Create a new entropy object.
- */
-
-void
-isc_entropy_attach(isc_entropy_t *ent, isc_entropy_t **entp);
-/*!<
- * Attaches to an entropy object.
- */
-
-void
-isc_entropy_detach(isc_entropy_t **entp);
-/*!<
- * \brief Detaches from an entropy object.
- */
-
-isc_result_t
-isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname);
-/*!<
- * \brief Create a new entropy source from a file.
- *
- * The file is assumed to contain good randomness, and will be mixed directly
- * into the pool with every byte adding 8 bits of entropy.
- *
- * The file will be put into non-blocking mode, so it may be a device file,
- * such as /dev/random. /dev/urandom should not be used here if it can
- * be avoided, since it will always provide data even if it isn't good.
- * We will make as much pseudorandom data as we need internally if our
- * caller asks for it.
- *
- * If we hit end-of-file, we will stop reading from this source. Callers
- * who require strong random data will get failure when our pool drains.
- * The file will never be opened/read again once EOF is reached.
- */
-
-void
-isc_entropy_destroysource(isc_entropysource_t **sourcep);
-/*!<
- * \brief Removes an entropy source from the entropy system.
- */
-
-isc_result_t
-isc_entropy_createsamplesource(isc_entropy_t *ent,
- isc_entropysource_t **sourcep);
-/*!<
- * \brief Create an entropy source that consists of samples. Each sample is
- * added to the source via isc_entropy_addsamples(), below.
- */
-
-isc_result_t
-isc_entropy_createcallbacksource(isc_entropy_t *ent,
- isc_entropystart_t start,
- isc_entropyget_t get,
- isc_entropystop_t stop,
- void *arg,
- isc_entropysource_t **sourcep);
-/*!<
- * \brief Create an entropy source that is polled via a callback.
- *
- * This would
- * be used when keyboard input is used, or a GUI input method. It can
- * also be used to hook in any external entropy source.
- *
- * Samples are added via isc_entropy_addcallbacksample(), below.
- * _addcallbacksample() is the only function which may be called from
- * within an entropy API callback function.
- */
-
-void
-isc_entropy_stopcallbacksources(isc_entropy_t *ent);
-/*!<
- * \brief Call the stop functions for callback sources that have had their
- * start functions called.
- */
-
-/*@{*/
-isc_result_t
-isc_entropy_addcallbacksample(isc_entropysource_t *source, isc_uint32_t sample,
- isc_uint32_t extra);
-isc_result_t
-isc_entropy_addsample(isc_entropysource_t *source, isc_uint32_t sample,
- isc_uint32_t extra);
-/*!<
- * \brief Add a sample to the sample source.
- *
- * The sample MUST be a timestamp
- * that increases over time, with the exception of wrap-around for
- * extremely high resolution timers which will quickly wrap-around
- * a 32-bit integer.
- *
- * The "extra" parameter is used only to add a bit more unpredictable
- * data. It is not used other than included in the hash of samples.
- *
- * When in an entropy API callback function, _addcallbacksource() must be
- * used. At all other times, _addsample() must be used.
- */
-/*@}*/
-
-isc_result_t
-isc_entropy_getdata(isc_entropy_t *ent, void *data, unsigned int length,
- unsigned int *returned, unsigned int flags);
-/*!<
- * \brief Extract data from the entropy pool. This may load the pool from various
- * sources.
- *
- * Do this by stiring the pool and returning a part of hash as randomness.
- * Note that no secrets are given away here since parts of the hash are
- * xored together before returned.
- *
- * Honor the request from the caller to only return good data, any data,
- * etc.
- */
-
-void
-isc_entropy_putdata(isc_entropy_t *ent, void *data, unsigned int length,
- isc_uint32_t entropy);
-/*!<
- * \brief Add "length" bytes in "data" to the entropy pool, incrementing the
- * pool's entropy count by "entropy."
- *
- * These bytes will prime the pseudorandom portion even if no entropy is
- * actually added.
- */
-
-void
-isc_entropy_stats(isc_entropy_t *ent, FILE *out);
-/*!<
- * \brief Dump some (trivial) stats to the stdio stream "out".
- */
-
-unsigned int
-isc_entropy_status(isc_entropy_t *end);
-/*
- * Returns the number of bits the pool currently contains. This is just
- * an estimate.
- */
-
-isc_result_t
-isc_entropy_usebestsource(isc_entropy_t *ectx, isc_entropysource_t **source,
- const char *randomfile, int use_keyboard);
-/*!<
- * \brief Use whatever source of entropy is best.
- *
- * Notes:
- *\li If "randomfile" is not NULL, open it with
- * isc_entropy_createfilesource().
- *
- *\li If "randomfile" is NULL and the system's random device was detected
- * when the program was configured and built, open that device with
- * isc_entropy_createfilesource().
- *
- *\li If "use_keyboard" is #ISC_ENTROPY_KEYBOARDYES, then always open
- * the keyboard as an entropy source (possibly in addition to
- * "randomfile" or the random device).
- *
- *\li If "use_keyboard" is #ISC_ENTROPY_KEYBOARDMAYBE, open the keyboard only
- * if opening the random file/device fails. A message will be
- * printed describing the need for keyboard input.
- *
- *\li If "use_keyboard" is #ISC_ENTROPY_KEYBOARDNO, the keyboard will
- * never be opened.
- *
- * Returns:
- *\li #ISC_R_SUCCESS if at least one source of entropy could be started.
- *
- *\li #ISC_R_NOENTROPY if use_keyboard is #ISC_ENTROPY_KEYBOARDNO and
- * there is no random device pathname compiled into the program.
- *
- *\li A return code from isc_entropy_createfilesource() or
- * isc_entropy_createcallbacksource().
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_ENTROPY_H */
diff --git a/contrib/ntp/lib/isc/include/isc/fsaccess.h b/contrib/ntp/lib/isc/include/isc/fsaccess.h
deleted file mode 100644
index 7962bbe21ab1..000000000000
--- a/contrib/ntp/lib/isc/include/isc/fsaccess.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: fsaccess.h,v 1.16 2009/01/17 23:47:43 tbox Exp $ */
-
-#ifndef ISC_FSACCESS_H
-#define ISC_FSACCESS_H 1
-
-/*! \file isc/fsaccess.h
- * \brief The ISC filesystem access module encapsulates the setting of file
- * and directory access permissions into one API that is meant to be
- * portable to multiple operating systems.
- *
- * The two primary operating system flavors that are initially accommodated
- * are POSIX and Windows NT 4.0 and later. The Windows NT access model is
- * considerable more flexible than POSIX's model (as much as I am loathe to
- * admit it), and so the ISC API has a higher degree of complexity than would
- * be needed to simply address POSIX's needs.
- *
- * The full breadth of NT's flexibility is not available either, for the
- * present time. Much of it is to provide compatibility with what Unix
- * programmers are expecting. This is also due to not yet really needing all
- * of the functionality of an NT system (or, for that matter, a POSIX system)
- * in BIND9, and so resolving how to handle the various incompatibilities has
- * been a purely theoretical exercise with no operational experience to
- * indicate how flawed the thinking may be.
- *
- * Some of the more notable dumbing down of NT for this API includes:
- *
- *\li Each of FILE_READ_DATA and FILE_READ_EA are set with #ISC_FSACCESS_READ.
- *
- * \li All of FILE_WRITE_DATA, FILE_WRITE_EA and FILE_APPEND_DATA are
- * set with #ISC_FSACCESS_WRITE. FILE_WRITE_ATTRIBUTES is not set
- * so as to be consistent with Unix, where only the owner of the file
- * or the superuser can change the attributes/mode of a file.
- *
- * \li Both of FILE_ADD_FILE and FILE_ADD_SUBDIRECTORY are set with
- * #ISC_FSACCESS_CREATECHILD. This is similar to setting the WRITE
- * permission on a Unix directory.
- *
- * \li SYNCHRONIZE is always set for files and directories, unless someone
- * can give me a reason why this is a bad idea.
- *
- * \li READ_CONTROL and FILE_READ_ATTRIBUTES are always set; this is
- * consistent with Unix, where any file or directory can be stat()'d
- * unless the directory path disallows complete access somewhere along
- * the way.
- *
- * \li WRITE_DAC is only set for the owner. This too is consistent with
- * Unix, and is tighter security than allowing anyone else to be
- * able to set permissions.
- *
- * \li DELETE is only set for the owner. On Unix the ability to delete
- * a file is controlled by the directory permissions, but it isn't
- * currently clear to me what happens on NT if the directory has
- * FILE_DELETE_CHILD set but a file within it does not have DELETE
- * set. Always setting DELETE on the file/directory for the owner
- * gives maximum flexibility to the owner without exposing the
- * file to deletion by others.
- *
- * \li WRITE_OWNER is never set. This too is consistent with Unix,
- * and is also tighter security than allowing anyone to change the
- * ownership of the file apart from the superu..ahem, Administrator.
- *
- * \li Inheritance is set to NO_INHERITANCE.
- *
- * Unix's dumbing down includes:
- *
- * \li The sticky bit cannot be set.
- *
- * \li setuid and setgid cannot be set.
- *
- * \li Only regular files and directories can be set.
- *
- * The rest of this comment discusses a few of the incompatibilities
- * between the two systems that need more thought if this API is to
- * be extended to accommodate them.
- *
- * The Windows standard access right "DELETE" doesn't have a direct
- * equivalent in the Unix world, so it isn't clear what should be done
- * with it.
- *
- * The Unix sticky bit is not supported. While NT does have a concept
- * of allowing users to create files in a directory but not delete or
- * rename them, it does not have a concept of allowing them to be deleted
- * if they are owned by the user trying to delete/rename. While it is
- * probable that something could be cobbled together in NT 5 with inheritance,
- * it can't really be done in NT 4 as a single property that you could
- * set on a directory. You'd need to coordinate something with file creation
- * so that every file created had DELETE set for the owner but noone else.
- *
- * On Unix systems, setting #ISC_FSACCESS_LISTDIRECTORY sets READ.
- * ... setting either #ISC_FSACCESS_CREATECHILD or #ISC_FSACCESS_DELETECHILD
- * sets WRITE.
- * ... setting #ISC_FSACCESS_ACCESSCHILD sets EXECUTE.
- *
- * On NT systems, setting #ISC_FSACCESS_LISTDIRECTORY sets FILE_LIST_DIRECTORY.
- * ... setting #ISC_FSACCESS_CREATECHILD sets FILE_CREATE_CHILD independently.
- * ... setting #ISC_FSACCESS_DELETECHILD sets FILE_DELETE_CHILD independently.
- * ... setting #ISC_FSACCESS_ACCESSCHILD sets FILE_TRAVERSE.
- *
- * Unresolved: XXXDCL
- * \li What NT access right controls the ability to rename a file?
- * \li How does DELETE work? If a directory has FILE_DELETE_CHILD but a
- * file or directory within it does not have DELETE, is that file
- * or directory deletable?
- * \li To implement isc_fsaccess_get(), mapping an existing Unix permission
- * mode_t back to an isc_fsaccess_t is pretty trivial; however, mapping
- * an NT DACL could be impossible to do in a responsible way.
- * \li Similarly, trying to implement the functionality of being able to
- * say "add group writability to whatever permissions already exist"
- * could be tricky on NT because of the order-of-entry issue combined
- * with possibly having one or more matching ACEs already explicitly
- * granting or denying access. Because this functionality is
- * not yet needed by the ISC, no code has been written to try to
- * solve this problem.
- */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-/*
- * Trustees.
- */
-#define ISC_FSACCESS_OWNER 0x1 /*%< User account. */
-#define ISC_FSACCESS_GROUP 0x2 /*%< Primary group owner. */
-#define ISC_FSACCESS_OTHER 0x4 /*%< Not the owner or the group owner. */
-#define ISC_FSACCESS_WORLD 0x7 /*%< User, Group, Other. */
-
-/*
- * Types of permission.
- */
-#define ISC_FSACCESS_READ 0x00000001 /*%< File only. */
-#define ISC_FSACCESS_WRITE 0x00000002 /*%< File only. */
-#define ISC_FSACCESS_EXECUTE 0x00000004 /*%< File only. */
-#define ISC_FSACCESS_CREATECHILD 0x00000008 /*%< Dir only. */
-#define ISC_FSACCESS_DELETECHILD 0x00000010 /*%< Dir only. */
-#define ISC_FSACCESS_LISTDIRECTORY 0x00000020 /*%< Dir only. */
-#define ISC_FSACCESS_ACCESSCHILD 0x00000040 /*%< Dir only. */
-
-/*%
- * Adding any permission bits beyond 0x200 would mean typedef'ing
- * isc_fsaccess_t as isc_uint64_t, and redefining this value to
- * reflect the new range of permission types, Probably to 21 for
- * maximum flexibility. The number of bits has to accommodate all of
- * the permission types, and three full sets of them have to fit
- * within an isc_fsaccess_t.
- */
-#define ISC__FSACCESS_PERMISSIONBITS 10
-
-ISC_LANG_BEGINDECLS
-
-void
-isc_fsaccess_add(int trustee, int permission, isc_fsaccess_t *access);
-
-void
-isc_fsaccess_remove(int trustee, int permission, isc_fsaccess_t *access);
-
-isc_result_t
-isc_fsaccess_set(const char *path, isc_fsaccess_t access);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_FSACCESS_H */
diff --git a/contrib/ntp/lib/isc/include/isc/heap.h b/contrib/ntp/lib/isc/include/isc/heap.h
deleted file mode 100644
index 77bf07c34498..000000000000
--- a/contrib/ntp/lib/isc/include/isc/heap.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1997-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: heap.h,v 1.26 2009/01/17 23:47:43 tbox Exp $ */
-
-#ifndef ISC_HEAP_H
-#define ISC_HEAP_H 1
-
-/*! \file isc/heap.h */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/*%
- * The comparison function returns ISC_TRUE if the first argument has
- * higher priority than the second argument, and ISC_FALSE otherwise.
- */
-typedef isc_boolean_t (*isc_heapcompare_t)(void *, void *);
-
-/*%
- * The index function allows the client of the heap to receive a callback
- * when an item's index number changes. This allows it to maintain
- * sync with its external state, but still delete itself, since deletions
- * from the heap require the index be provided.
- */
-typedef void (*isc_heapindex_t)(void *, unsigned int);
-
-/*%
- * The heapaction function is used when iterating over the heap.
- *
- * NOTE: The heap structure CANNOT BE MODIFIED during the call to
- * isc_heap_foreach().
- */
-typedef void (*isc_heapaction_t)(void *, void *);
-
-typedef struct isc_heap isc_heap_t;
-
-isc_result_t
-isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
- isc_heapindex_t index, unsigned int size_increment,
- isc_heap_t **heapp);
-/*!<
- * \brief Create a new heap. The heap is implemented using a space-efficient
- * storage method. When the heap elements are deleted space is not freed
- * but will be reused when new elements are inserted.
- *
- * Requires:
- *\li "mctx" is valid.
- *\li "compare" is a function which takes two void * arguments and
- * returns ISC_TRUE if the first argument has a higher priority than
- * the second, and ISC_FALSE otherwise.
- *\li "index" is a function which takes a void *, and an unsigned int
- * argument. This function will be called whenever an element's
- * index value changes, so it may continue to delete itself from the
- * heap. This option may be NULL if this functionality is unneeded.
- *\li "size_increment" is a hint about how large the heap should grow
- * when resizing is needed. If this is 0, a default size will be
- * used, which is currently 1024, allowing space for an additional 1024
- * heap elements to be inserted before adding more space.
- *\li "heapp" is not NULL, and "*heap" is NULL.
- *
- * Returns:
- *\li ISC_R_SUCCESS - success
- *\li ISC_R_NOMEMORY - insufficient memory
- */
-
-void
-isc_heap_destroy(isc_heap_t **heapp);
-/*!<
- * \brief Destroys a heap.
- *
- * Requires:
- *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
- */
-
-isc_result_t
-isc_heap_insert(isc_heap_t *heap, void *elt);
-/*!<
- * \brief Inserts a new element into a heap.
- *
- * Requires:
- *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
- */
-
-void
-isc_heap_delete(isc_heap_t *heap, unsigned int index);
-/*!<
- * \brief Deletes an element from a heap, by element index.
- *
- * Requires:
- *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
- *\li "index" is a valid element index, as provided by the "index" callback
- * provided during heap creation.
- */
-
-void
-isc_heap_increased(isc_heap_t *heap, unsigned int index);
-/*!<
- * \brief Indicates to the heap that an element's priority has increased.
- * This function MUST be called whenever an element has increased in priority.
- *
- * Requires:
- *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
- *\li "index" is a valid element index, as provided by the "index" callback
- * provided during heap creation.
- */
-
-void
-isc_heap_decreased(isc_heap_t *heap, unsigned int index);
-/*!<
- * \brief Indicates to the heap that an element's priority has decreased.
- * This function MUST be called whenever an element has decreased in priority.
- *
- * Requires:
- *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
- *\li "index" is a valid element index, as provided by the "index" callback
- * provided during heap creation.
- */
-
-void *
-isc_heap_element(isc_heap_t *heap, unsigned int index);
-/*!<
- * \brief Returns the element for a specific element index.
- *
- * Requires:
- *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
- *\li "index" is a valid element index, as provided by the "index" callback
- * provided during heap creation.
- *
- * Returns:
- *\li A pointer to the element for the element index.
- */
-
-void
-isc_heap_foreach(isc_heap_t *heap, isc_heapaction_t action, void *uap);
-/*!<
- * \brief Iterate over the heap, calling an action for each element. The
- * order of iteration is not sorted.
- *
- * Requires:
- *\li "heapp" is not NULL and "*heap" points to a valid isc_heap_t.
- *\li "action" is not NULL, and is a function which takes two arguments.
- * The first is a void *, representing the element, and the second is
- * "uap" as provided to isc_heap_foreach.
- *\li "uap" is a caller-provided argument, and may be NULL.
- *
- * Note:
- *\li The heap structure CANNOT be modified during this iteration. The only
- * safe function to call while iterating the heap is isc_heap_element().
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_HEAP_H */
diff --git a/contrib/ntp/lib/isc/include/isc/hex.h b/contrib/ntp/lib/isc/include/isc/hex.h
deleted file mode 100644
index a5e2f532d91b..000000000000
--- a/contrib/ntp/lib/isc/include/isc/hex.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: hex.h,v 1.13 2008/09/25 04:02:39 tbox Exp $ */
-
-#ifndef ISC_HEX_H
-#define ISC_HEX_H 1
-
-/*! \file isc/hex.h */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/***
- *** Functions
- ***/
-
-isc_result_t
-isc_hex_totext(isc_region_t *source, int wordlength,
- const char *wordbreak, isc_buffer_t *target);
-/*!<
- * \brief Convert data into hex encoded text.
- *
- * Notes:
- *\li The hex encoded text in 'target' will be divided into
- * words of at most 'wordlength' characters, separated by
- * the 'wordbreak' string. No parentheses will surround
- * the text.
- *
- * Requires:
- *\li 'source' is a region containing binary data
- *\li 'target' is a text buffer containing available space
- *\li 'wordbreak' points to a null-terminated string of
- * zero or more whitespace characters
- *
- * Ensures:
- *\li target will contain the hex encoded version of the data
- * in source. The 'used' pointer in target will be advanced as
- * necessary.
- */
-
-isc_result_t
-isc_hex_decodestring(const char *cstr, isc_buffer_t *target);
-/*!<
- * \brief Decode a null-terminated hex string.
- *
- * Requires:
- *\li 'cstr' is non-null.
- *\li 'target' is a valid buffer.
- *
- * Returns:
- *\li #ISC_R_SUCCESS -- the entire decoded representation of 'cstring'
- * fit in 'target'.
- *\li #ISC_R_BADHEX -- 'cstr' is not a valid hex encoding.
- *
- * Other error returns are any possible error code from:
- * isc_lex_create(),
- * isc_lex_openbuffer(),
- * isc_hex_tobuffer().
- */
-
-isc_result_t
-isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
-/*!<
- * \brief Convert hex encoded text from a lexer context into data.
- *
- * Requires:
- *\li 'lex' is a valid lexer context
- *\li 'target' is a buffer containing binary data
- *\li 'length' is an integer
- *
- * Ensures:
- *\li target will contain the data represented by the hex encoded
- * string parsed by the lexer. No more than length bytes will be read,
- * if length is positive. The 'used' pointer in target will be
- * advanced as necessary.
- */
-
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_HEX_H */
diff --git a/contrib/ntp/lib/isc/include/isc/hmacmd5.h b/contrib/ntp/lib/isc/include/isc/hmacmd5.h
deleted file mode 100644
index 9ecad453dfa5..000000000000
--- a/contrib/ntp/lib/isc/include/isc/hmacmd5.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: hmacmd5.h,v 1.14 2009/02/06 23:47:42 tbox Exp $ */
-
-/*! \file isc/hmacmd5.h
- * \brief This is the header file for the HMAC-MD5 keyed hash algorithm
- * described in RFC2104.
- */
-
-#ifndef ISC_HMACMD5_H
-#define ISC_HMACMD5_H 1
-
-#include <isc/lang.h>
-#include <isc/md5.h>
-#include <isc/platform.h>
-#include <isc/types.h>
-
-#define ISC_HMACMD5_KEYLENGTH 64
-
-#ifdef ISC_PLATFORM_OPENSSLHASH
-#include <openssl/hmac.h>
-
-typedef HMAC_CTX isc_hmacmd5_t;
-
-#else
-
-typedef struct {
- isc_md5_t md5ctx;
- unsigned char key[ISC_HMACMD5_KEYLENGTH];
-} isc_hmacmd5_t;
-#endif
-
-ISC_LANG_BEGINDECLS
-
-void
-isc_hmacmd5_init(isc_hmacmd5_t *ctx, const unsigned char *key,
- unsigned int len);
-
-void
-isc_hmacmd5_invalidate(isc_hmacmd5_t *ctx);
-
-void
-isc_hmacmd5_update(isc_hmacmd5_t *ctx, const unsigned char *buf,
- unsigned int len);
-
-void
-isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest);
-
-isc_boolean_t
-isc_hmacmd5_verify(isc_hmacmd5_t *ctx, unsigned char *digest);
-
-isc_boolean_t
-isc_hmacmd5_verify2(isc_hmacmd5_t *ctx, unsigned char *digest, size_t len);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_HMACMD5_H */
diff --git a/contrib/ntp/lib/isc/include/isc/hmacsha.h b/contrib/ntp/lib/isc/include/isc/hmacsha.h
deleted file mode 100644
index 1d0e18409536..000000000000
--- a/contrib/ntp/lib/isc/include/isc/hmacsha.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2005-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: hmacsha.h,v 1.9 2009/02/06 23:47:42 tbox Exp $ */
-
-/*! \file isc/hmacsha.h
- * This is the header file for the HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
- * HMAC-SHA334 and HMAC-SHA512 hash algorithm described in RFC 2104.
- */
-
-#ifndef ISC_HMACSHA_H
-#define ISC_HMACSHA_H 1
-
-#include <isc/lang.h>
-#include <isc/platform.h>
-#include <isc/sha1.h>
-#include <isc/sha2.h>
-#include <isc/types.h>
-
-#define ISC_HMACSHA1_KEYLENGTH ISC_SHA1_BLOCK_LENGTH
-#define ISC_HMACSHA224_KEYLENGTH ISC_SHA224_BLOCK_LENGTH
-#define ISC_HMACSHA256_KEYLENGTH ISC_SHA256_BLOCK_LENGTH
-#define ISC_HMACSHA384_KEYLENGTH ISC_SHA384_BLOCK_LENGTH
-#define ISC_HMACSHA512_KEYLENGTH ISC_SHA512_BLOCK_LENGTH
-
-#ifdef ISC_PLATFORM_OPENSSLHASH
-#include <openssl/hmac.h>
-
-typedef HMAC_CTX isc_hmacsha1_t;
-typedef HMAC_CTX isc_hmacsha224_t;
-typedef HMAC_CTX isc_hmacsha256_t;
-typedef HMAC_CTX isc_hmacsha384_t;
-typedef HMAC_CTX isc_hmacsha512_t;
-
-#else
-
-typedef struct {
- isc_sha1_t sha1ctx;
- unsigned char key[ISC_HMACSHA1_KEYLENGTH];
-} isc_hmacsha1_t;
-
-typedef struct {
- isc_sha224_t sha224ctx;
- unsigned char key[ISC_HMACSHA224_KEYLENGTH];
-} isc_hmacsha224_t;
-
-typedef struct {
- isc_sha256_t sha256ctx;
- unsigned char key[ISC_HMACSHA256_KEYLENGTH];
-} isc_hmacsha256_t;
-
-typedef struct {
- isc_sha384_t sha384ctx;
- unsigned char key[ISC_HMACSHA384_KEYLENGTH];
-} isc_hmacsha384_t;
-
-typedef struct {
- isc_sha512_t sha512ctx;
- unsigned char key[ISC_HMACSHA512_KEYLENGTH];
-} isc_hmacsha512_t;
-#endif
-
-ISC_LANG_BEGINDECLS
-
-void
-isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
- unsigned int len);
-
-void
-isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx);
-
-void
-isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
- unsigned int len);
-
-void
-isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
-
-isc_boolean_t
-isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
-
-
-void
-isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
- unsigned int len);
-
-void
-isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx);
-
-void
-isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
- unsigned int len);
-
-void
-isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
-
-isc_boolean_t
-isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
-
-
-void
-isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
- unsigned int len);
-
-void
-isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx);
-
-void
-isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
- unsigned int len);
-
-void
-isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
-
-isc_boolean_t
-isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
-
-
-void
-isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
- unsigned int len);
-
-void
-isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx);
-
-void
-isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
- unsigned int len);
-
-void
-isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
-
-isc_boolean_t
-isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
-
-
-void
-isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
- unsigned int len);
-
-void
-isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx);
-
-void
-isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
- unsigned int len);
-
-void
-isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
-
-isc_boolean_t
-isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_HMACSHA_H */
diff --git a/contrib/ntp/lib/isc/include/isc/httpd.h b/contrib/ntp/lib/isc/include/isc/httpd.h
deleted file mode 100644
index ba7f900198e4..000000000000
--- a/contrib/ntp/lib/isc/include/isc/httpd.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2006-2008 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: httpd.h,v 1.9 2008/08/08 05:06:49 marka Exp $ */
-
-#ifndef ISC_HTTPD_H
-#define ISC_HTTPD_H 1
-
-/*! \file */
-
-#include <isc/event.h>
-#include <isc/eventclass.h>
-#include <isc/types.h>
-#include <isc/mutex.h>
-#include <isc/task.h>
-
-#define HTTPD_EVENTCLASS ISC_EVENTCLASS(4300)
-#define HTTPD_SHUTDOWN (HTTPD_EVENTCLASS + 0x0001)
-
-#define ISC_HTTPDMGR_FLAGSHUTTINGDOWN 0x00000001
-
-/*
- * Create a new http daemon which will send, once every time period,
- * a http-like header followed by HTTP data.
- */
-isc_result_t
-isc_httpdmgr_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
- isc_httpdclientok_t *client_ok,
- isc_httpdondestroy_t *ondestory, void *cb_arg,
- isc_timermgr_t *tmgr, isc_httpdmgr_t **httpdp);
-
-void
-isc_httpdmgr_shutdown(isc_httpdmgr_t **httpdp);
-
-isc_result_t
-isc_httpdmgr_addurl(isc_httpdmgr_t *httpdmgr, const char *url,
- isc_httpdaction_t *func, void *arg);
-
-isc_result_t
-isc_httpd_response(isc_httpd_t *httpd);
-
-isc_result_t
-isc_httpd_addheader(isc_httpd_t *httpd, const char *name,
- const char *val);
-
-isc_result_t
-isc_httpd_addheaderuint(isc_httpd_t *httpd, const char *name, int val);
-
-isc_result_t isc_httpd_endheaders(isc_httpd_t *httpd);
-
-#endif /* ISC_HTTPD_H */
diff --git a/contrib/ntp/lib/isc/include/isc/ipv6.h b/contrib/ntp/lib/isc/include/isc/ipv6.h
deleted file mode 100644
index 8054c9e18647..000000000000
--- a/contrib/ntp/lib/isc/include/isc/ipv6.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ipv6.h,v 1.24 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_IPV6_H
-#define ISC_IPV6_H 1
-
-/*!
- * Also define LWRES_IPV6_H to keep it from being included if liblwres is
- * being used, or redefinition errors will occur.
- */
-#define LWRES_IPV6_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/ipv6.h
- * \brief IPv6 definitions for systems which do not support IPv6.
- *
- * \li MP:
- * No impact.
- *
- * \li Reliability:
- * No anticipated impact.
- *
- * \li Resources:
- * N/A.
- *
- * \li Security:
- * No anticipated impact.
- *
- * \li Standards:
- * RFC2553.
- */
-
-/***
- *** Imports.
- ***/
-
-#include <isc/int.h>
-#include <isc/platform.h>
-
-/***
- *** Types.
- ***/
-
-struct in6_addr {
- union {
- isc_uint8_t _S6_u8[16];
- isc_uint16_t _S6_u16[8];
- isc_uint32_t _S6_u32[4];
- } _S6_un;
-};
-#define s6_addr _S6_un._S6_u8
-#define s6_addr8 _S6_un._S6_u8
-#define s6_addr16 _S6_un._S6_u16
-#define s6_addr32 _S6_un._S6_u32
-
-#define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}}
-#define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}}
-
-LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_any;
-LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_loopback;
-
-struct sockaddr_in6 {
-#ifdef ISC_PLATFORM_HAVESALEN
- isc_uint8_t sin6_len;
- isc_uint8_t sin6_family;
-#else
- isc_uint16_t sin6_family;
-#endif
- isc_uint16_t sin6_port;
- isc_uint32_t sin6_flowinfo;
- struct in6_addr sin6_addr;
- isc_uint32_t sin6_scope_id;
-};
-
-#ifdef ISC_PLATFORM_HAVESALEN
-#define SIN6_LEN 1
-#endif
-
-/*%
- * Unspecified
- */
-#define IN6_IS_ADDR_UNSPECIFIED(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == 0) && \
- ((a)->s6_addr32[3] == 0))
-
-/*%
- * Loopback
- */
-#define IN6_IS_ADDR_LOOPBACK(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == 0) && \
- ((a)->s6_addr32[3] == htonl(1)))
-
-/*%
- * IPv4 compatible
- */
-#define IN6_IS_ADDR_V4COMPAT(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == 0) && \
- ((a)->s6_addr32[3] != 0) && \
- ((a)->s6_addr32[3] != htonl(1)))
-
-/*%
- * Mapped
- */
-#define IN6_IS_ADDR_V4MAPPED(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == htonl(0x0000ffff)))
-
-/*%
- * Multicast
- */
-#define IN6_IS_ADDR_MULTICAST(a) \
- ((a)->s6_addr8[0] == 0xffU)
-
-/*%
- * Unicast link / site local.
- */
-#define IN6_IS_ADDR_LINKLOCAL(a) \
- (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
-#define IN6_IS_ADDR_SITELOCAL(a) \
- (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
-
-#endif /* ISC_IPV6_H */
diff --git a/contrib/ntp/lib/isc/include/isc/iterated_hash.h b/contrib/ntp/lib/isc/include/isc/iterated_hash.h
deleted file mode 100644
index a8173f0ab22f..000000000000
--- a/contrib/ntp/lib/isc/include/isc/iterated_hash.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: iterated_hash.h,v 1.3 2008/09/25 04:02:39 tbox Exp $ */
-
-#ifndef ISC_ITERATED_HASH_H
-#define ISC_ITERATED_HASH_H 1
-
-#include <isc/lang.h>
-#include <isc/sha1.h>
-
-/*
- * The maximal hash length that can be encoded it a name
- * using base32hex. floor(255/8)*5
- */
-#define NSEC3_MAX_HASH_LENGTH 155
-
-/*
- * The maximum has that can be encoded in a single label using
- * base32hex. floor(63/8)*5
- */
-#define NSEC3_MAX_LABEL_HASH 35
-
-ISC_LANG_BEGINDECLS
-
-int isc_iterated_hash(unsigned char out[NSEC3_MAX_HASH_LENGTH],
- unsigned int hashalg, int iterations,
- const unsigned char *salt, int saltlength,
- const unsigned char *in, int inlength);
-
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_ITERATED_HASH_H */
diff --git a/contrib/ntp/lib/isc/include/isc/lex.h b/contrib/ntp/lib/isc/include/isc/lex.h
deleted file mode 100644
index 8612150991bc..000000000000
--- a/contrib/ntp/lib/isc/include/isc/lex.h
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: lex.h,v 1.37 2008/05/30 23:47:01 tbox Exp $ */
-
-#ifndef ISC_LEX_H
-#define ISC_LEX_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/lex.h
- * \brief The "lex" module provides a lightweight tokenizer. It can operate
- * on files or buffers, and can handle "include". It is designed for
- * parsing of DNS master files and the BIND configuration file, but
- * should be general enough to tokenize other things, e.g. HTTP.
- *
- * \li MP:
- * No synchronization is provided. Clients must ensure exclusive
- * access.
- *
- * \li Reliability:
- * No anticipated impact.
- *
- * \li Resources:
- * TBS
- *
- * \li Security:
- * No anticipated impact.
- *
- * \li Standards:
- * None.
- */
-
-/***
- *** Imports
- ***/
-
-#include <stdio.h>
-
-#include <isc/lang.h>
-#include <isc/region.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/***
- *** Options
- ***/
-
-/*@{*/
-/*!
- * Various options for isc_lex_gettoken().
- */
-
-#define ISC_LEXOPT_EOL 0x01 /*%< Want end-of-line token. */
-#define ISC_LEXOPT_EOF 0x02 /*%< Want end-of-file token. */
-#define ISC_LEXOPT_INITIALWS 0x04 /*%< Want initial whitespace. */
-#define ISC_LEXOPT_NUMBER 0x08 /*%< Recognize numbers. */
-#define ISC_LEXOPT_QSTRING 0x10 /*%< Recognize qstrings. */
-/*@}*/
-
-/*@{*/
-/*!
- * The ISC_LEXOPT_DNSMULTILINE option handles the processing of '(' and ')' in
- * the DNS master file format. If this option is set, then the
- * ISC_LEXOPT_INITIALWS and ISC_LEXOPT_EOL options will be ignored when
- * the paren count is > 0. To use this option, '(' and ')' must be special
- * characters.
- */
-#define ISC_LEXOPT_DNSMULTILINE 0x20 /*%< Handle '(' and ')'. */
-#define ISC_LEXOPT_NOMORE 0x40 /*%< Want "no more" token. */
-
-#define ISC_LEXOPT_CNUMBER 0x80 /*%< Recognize octal and hex. */
-#define ISC_LEXOPT_ESCAPE 0x100 /*%< Recognize escapes. */
-#define ISC_LEXOPT_QSTRINGMULTILINE 0x200 /*%< Allow multiline "" strings */
-#define ISC_LEXOPT_OCTAL 0x400 /*%< Expect a octal number. */
-/*@}*/
-/*@{*/
-/*!
- * Various commenting styles, which may be changed at any time with
- * isc_lex_setcomments().
- */
-
-#define ISC_LEXCOMMENT_C 0x01
-#define ISC_LEXCOMMENT_CPLUSPLUS 0x02
-#define ISC_LEXCOMMENT_SHELL 0x04
-#define ISC_LEXCOMMENT_DNSMASTERFILE 0x08
-/*@}*/
-
-/***
- *** Types
- ***/
-
-/*! Lex */
-
-typedef char isc_lexspecials_t[256];
-
-/* Tokens */
-
-typedef enum {
- isc_tokentype_unknown = 0,
- isc_tokentype_string = 1,
- isc_tokentype_number = 2,
- isc_tokentype_qstring = 3,
- isc_tokentype_eol = 4,
- isc_tokentype_eof = 5,
- isc_tokentype_initialws = 6,
- isc_tokentype_special = 7,
- isc_tokentype_nomore = 8
-} isc_tokentype_t;
-
-typedef union {
- char as_char;
- unsigned long as_ulong;
- isc_region_t as_region;
- isc_textregion_t as_textregion;
- void * as_pointer;
-} isc_tokenvalue_t;
-
-typedef struct isc_token {
- isc_tokentype_t type;
- isc_tokenvalue_t value;
-} isc_token_t;
-
-/***
- *** Functions
- ***/
-
-isc_result_t
-isc_lex_create(isc_mem_t *mctx, size_t max_token, isc_lex_t **lexp);
-/*%<
- * Create a lexer.
- *
- * 'max_token' is a hint of the number of bytes in the largest token.
- *
- * Requires:
- *\li '*lexp' is a valid lexer.
- *
- *\li max_token > 0.
- *
- * Ensures:
- *\li On success, *lexp is attached to the newly created lexer.
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMEMORY
- */
-
-void
-isc_lex_destroy(isc_lex_t **lexp);
-/*%<
- * Destroy the lexer.
- *
- * Requires:
- *\li '*lexp' is a valid lexer.
- *
- * Ensures:
- *\li *lexp == NULL
- */
-
-unsigned int
-isc_lex_getcomments(isc_lex_t *lex);
-/*%<
- * Return the current lexer commenting styles.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- * Returns:
- *\li The commenting sytles which are currently allowed.
- */
-
-void
-isc_lex_setcomments(isc_lex_t *lex, unsigned int comments);
-/*%<
- * Set allowed lexer commenting styles.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'comments' has meaningful values.
- */
-
-void
-isc_lex_getspecials(isc_lex_t *lex, isc_lexspecials_t specials);
-/*%<
- * Put the current list of specials into 'specials'.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- */
-
-void
-isc_lex_setspecials(isc_lex_t *lex, isc_lexspecials_t specials);
-/*!<
- * The characters in 'specials' are returned as tokens. Along with
- * whitespace, they delimit strings and numbers.
- *
- * Note:
- *\li Comment processing takes precedence over special character
- * recognition.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- */
-
-isc_result_t
-isc_lex_openfile(isc_lex_t *lex, const char *filename);
-/*%<
- * Open 'filename' and make it the current input source for 'lex'.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li filename is a valid C string.
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMEMORY Out of memory
- *\li #ISC_R_NOTFOUND File not found
- *\li #ISC_R_NOPERM No permission to open file
- *\li #ISC_R_FAILURE Couldn't open file, not sure why
- *\li #ISC_R_UNEXPECTED
- */
-
-isc_result_t
-isc_lex_openstream(isc_lex_t *lex, FILE *stream);
-/*%<
- * Make 'stream' the current input source for 'lex'.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'stream' is a valid C stream.
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMEMORY Out of memory
- */
-
-isc_result_t
-isc_lex_openbuffer(isc_lex_t *lex, isc_buffer_t *buffer);
-/*%<
- * Make 'buffer' the current input source for 'lex'.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'buffer' is a valid buffer.
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMEMORY Out of memory
- */
-
-isc_result_t
-isc_lex_close(isc_lex_t *lex);
-/*%<
- * Close the most recently opened object (i.e. file or buffer).
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMORE No more input sources
- */
-
-isc_result_t
-isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp);
-/*%<
- * Get the next token.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'lex' has an input source.
- *
- *\li 'options' contains valid options.
- *
- *\li '*tokenp' is a valid pointer.
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_UNEXPECTEDEND
- *\li #ISC_R_NOMEMORY
- *
- * These two results are returned only if their corresponding lexer
- * options are not set.
- *
- *\li #ISC_R_EOF End of input source
- *\li #ISC_R_NOMORE No more input sources
- */
-
-isc_result_t
-isc_lex_getmastertoken(isc_lex_t *lex, isc_token_t *token,
- isc_tokentype_t expect, isc_boolean_t eol);
-/*%<
- * Get the next token from a DNS master file type stream. This is a
- * convenience function that sets appropriate options and handles quoted
- * strings and end of line correctly for master files. It also ungets
- * unexpected tokens.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'token' is a valid pointer
- *
- * Returns:
- *
- * \li any return code from isc_lex_gettoken().
- */
-
-isc_result_t
-isc_lex_getoctaltoken(isc_lex_t *lex, isc_token_t *token, isc_boolean_t eol);
-/*%<
- * Get the next token from a DNS master file type stream. This is a
- * convenience function that sets appropriate options and handles end
- * of line correctly for master files. It also ungets unexpected tokens.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'token' is a valid pointer
- *
- * Returns:
- *
- * \li any return code from isc_lex_gettoken().
- */
-
-void
-isc_lex_ungettoken(isc_lex_t *lex, isc_token_t *tokenp);
-/*%<
- * Unget the current token.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'lex' has an input source.
- *
- *\li 'tokenp' points to a valid token.
- *
- *\li There is no ungotten token already.
- */
-
-void
-isc_lex_getlasttokentext(isc_lex_t *lex, isc_token_t *tokenp, isc_region_t *r);
-/*%<
- * Returns a region containing the text of the last token returned.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- *\li 'lex' has an input source.
- *
- *\li 'tokenp' points to a valid token.
- *
- *\li A token has been gotten and not ungotten.
- */
-
-char *
-isc_lex_getsourcename(isc_lex_t *lex);
-/*%<
- * Return the input source name.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- * Returns:
- * \li source name or NULL if no current source.
- *\li result valid while current input source exists.
- */
-
-
-unsigned long
-isc_lex_getsourceline(isc_lex_t *lex);
-/*%<
- * Return the input source line number.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- * Returns:
- *\li Current line number or 0 if no current source.
- */
-
-isc_result_t
-isc_lex_setsourcename(isc_lex_t *lex, const char *name);
-/*%<
- * Assigns a new name to the input source.
- *
- * Requires:
- *
- * \li 'lex' is a valid lexer.
- *
- * Returns:
- * \li #ISC_R_SUCCESS
- * \li #ISC_R_NOMEMORY
- * \li #ISC_R_NOTFOUND - there are no sources.
- */
-
-isc_boolean_t
-isc_lex_isfile(isc_lex_t *lex);
-/*%<
- * Return whether the current input source is a file.
- *
- * Requires:
- *\li 'lex' is a valid lexer.
- *
- * Returns:
- * \li #ISC_TRUE if the current input is a file,
- *\li #ISC_FALSE otherwise.
- */
-
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_LEX_H */
diff --git a/contrib/ntp/lib/isc/include/isc/lfsr.h b/contrib/ntp/lib/isc/include/isc/lfsr.h
deleted file mode 100644
index d4d970700078..000000000000
--- a/contrib/ntp/lib/isc/include/isc/lfsr.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: lfsr.h,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_LFSR_H
-#define ISC_LFSR_H 1
-
-/*! \file isc/lfsr.h */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-typedef struct isc_lfsr isc_lfsr_t;
-
-/*%
- * This function is called when reseeding is needed. It is allowed to
- * modify any state in the LFSR in any way it sees fit OTHER THAN "bits".
- *
- * It MUST set "count" to a new value or the lfsr will never reseed again.
- *
- * Also, a reseed will never occur in the middle of an extraction. This
- * is purely an optimization, and is probably what one would want.
- */
-typedef void (*isc_lfsrreseed_t)(isc_lfsr_t *, void *);
-
-/*%
- * The members of this structure can be used by the application, but care
- * needs to be taken to not change state once the lfsr is in operation.
- */
-struct isc_lfsr {
- isc_uint32_t state; /*%< previous state */
- unsigned int bits; /*%< length */
- isc_uint32_t tap; /*%< bit taps */
- unsigned int count; /*%< reseed count (in BITS!) */
- isc_lfsrreseed_t reseed; /*%< reseed function */
- void *arg; /*%< reseed function argument */
-};
-
-ISC_LANG_BEGINDECLS
-
-
-void
-isc_lfsr_init(isc_lfsr_t *lfsr, isc_uint32_t state, unsigned int bits,
- isc_uint32_t tap, unsigned int count,
- isc_lfsrreseed_t reseed, void *arg);
-/*%<
- * Initialize an LFSR.
- *
- * Note:
- *
- *\li Putting untrusted values into this function will cause the LFSR to
- * generate (perhaps) non-maximal length sequences.
- *
- * Requires:
- *
- *\li lfsr != NULL
- *
- *\li 8 <= bits <= 32
- *
- *\li tap != 0
- */
-
-void
-isc_lfsr_generate(isc_lfsr_t *lfsr, void *data, unsigned int count);
-/*%<
- * Returns "count" bytes of data from the LFSR.
- *
- * Requires:
- *
- *\li lfsr be valid.
- *
- *\li data != NULL.
- *
- *\li count > 0.
- */
-
-void
-isc_lfsr_skip(isc_lfsr_t *lfsr, unsigned int skip);
-/*%<
- * Skip "skip" states.
- *
- * Requires:
- *
- *\li lfsr be valid.
- */
-
-isc_uint32_t
-isc_lfsr_generate32(isc_lfsr_t *lfsr1, isc_lfsr_t *lfsr2);
-/*%<
- * Given two LFSRs, use the current state from each to skip entries in the
- * other. The next states are then xor'd together and returned.
- *
- * WARNING:
- *
- *\li This function is used only for very, very low security data, such
- * as DNS message IDs where it is desired to have an unpredictable
- * stream of bytes that are harder to predict than a simple flooding
- * attack.
- *
- * Notes:
- *
- *\li Since the current state from each of the LFSRs is used to skip
- * state in the other, it is important that no state be leaked
- * from either LFSR.
- *
- * Requires:
- *
- *\li lfsr1 and lfsr2 be valid.
- *
- *\li 1 <= skipbits <= 31
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_LFSR_H */
diff --git a/contrib/ntp/lib/isc/include/isc/mem.h b/contrib/ntp/lib/isc/include/isc/mem.h
deleted file mode 100644
index 5101ea3fed1c..000000000000
--- a/contrib/ntp/lib/isc/include/isc/mem.h
+++ /dev/null
@@ -1,750 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1997-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#ifndef ISC_MEM_H
-#define ISC_MEM_H 1
-
-/*! \file isc/mem.h */
-
-#include <stdio.h>
-
-#include <isc/lang.h>
-#include <isc/mutex.h>
-#include <isc/platform.h>
-#include <isc/types.h>
-#include <isc/xml.h>
-
-ISC_LANG_BEGINDECLS
-
-#define ISC_MEM_LOWATER 0
-#define ISC_MEM_HIWATER 1
-typedef void (*isc_mem_water_t)(void *, int);
-
-typedef void * (*isc_memalloc_t)(void *, size_t);
-typedef void (*isc_memfree_t)(void *, void *);
-
-/*%
- * Define ISC_MEM_DEBUG=1 to make all functions that free memory
- * set the pointer being freed to NULL after being freed.
- * This is the default; set ISC_MEM_DEBUG=0 to disable it.
- */
-#ifndef ISC_MEM_DEBUG
-#define ISC_MEM_DEBUG 1
-#endif
-
-/*%
- * Define ISC_MEM_TRACKLINES=1 to turn on detailed tracing of memory
- * allocation and freeing by file and line number.
- */
-#ifndef ISC_MEM_TRACKLINES
-#define ISC_MEM_TRACKLINES 1
-#endif
-
-/*%
- * Define ISC_MEM_CHECKOVERRUN=1 to turn on checks for using memory outside
- * the requested space. This will increase the size of each allocation.
- */
-#ifndef ISC_MEM_CHECKOVERRUN
-#define ISC_MEM_CHECKOVERRUN 1
-#endif
-
-/*%
- * Define ISC_MEM_FILL=1 to fill each block of memory returned to the system
- * with the byte string '0xbe'. This helps track down uninitialized pointers
- * and the like. On freeing memory, the space is filled with '0xde' for
- * the same reasons.
- */
-#ifndef ISC_MEM_FILL
-#define ISC_MEM_FILL 1
-#endif
-
-/*%
- * Define ISC_MEMPOOL_NAMES=1 to make memory pools store a symbolic
- * name so that the leaking pool can be more readily identified in
- * case of a memory leak.
- */
-#ifndef ISC_MEMPOOL_NAMES
-#define ISC_MEMPOOL_NAMES 1
-#endif
-
-LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_debugging;
-/*@{*/
-#define ISC_MEM_DEBUGTRACE 0x00000001U
-#define ISC_MEM_DEBUGRECORD 0x00000002U
-#define ISC_MEM_DEBUGUSAGE 0x00000004U
-#define ISC_MEM_DEBUGSIZE 0x00000008U
-#define ISC_MEM_DEBUGCTX 0x00000010U
-#define ISC_MEM_DEBUGALL 0x0000001FU
-/*!<
- * The variable isc_mem_debugging holds a set of flags for
- * turning certain memory debugging options on or off at
- * runtime. It is initialized to the value ISC_MEM_DEGBUGGING,
- * which is 0 by default but may be overridden at compile time.
- * The following flags can be specified:
- *
- * \li #ISC_MEM_DEBUGTRACE
- * Log each allocation and free to isc_lctx.
- *
- * \li #ISC_MEM_DEBUGRECORD
- * Remember each allocation, and match them up on free.
- * Crash if a free doesn't match an allocation.
- *
- * \li #ISC_MEM_DEBUGUSAGE
- * If a hi_water mark is set, print the maximum inuse memory
- * every time it is raised once it exceeds the hi_water mark.
- *
- * \li #ISC_MEM_DEBUGSIZE
- * Check the size argument being passed to isc_mem_put() matches
- * that passed to isc_mem_get().
- *
- * \li #ISC_MEM_DEBUGCTX
- * Check the mctx argument being passed to isc_mem_put() matches
- * that passed to isc_mem_get().
- */
-/*@}*/
-
-#if ISC_MEM_TRACKLINES
-#define _ISC_MEM_FILELINE , __FILE__, __LINE__
-#define _ISC_MEM_FLARG , const char *, unsigned int
-#else
-#define _ISC_MEM_FILELINE
-#define _ISC_MEM_FLARG
-#endif
-
-/*!
- * Define ISC_MEM_USE_INTERNAL_MALLOC=1 to use the internal malloc()
- * implementation in preference to the system one. The internal malloc()
- * is very space-efficient, and quite fast on uniprocessor systems. It
- * performs poorly on multiprocessor machines.
- * JT: we can overcome the performance issue on multiprocessor machines
- * by carefully separating memory contexts.
- */
-
-#ifndef ISC_MEM_USE_INTERNAL_MALLOC
-#define ISC_MEM_USE_INTERNAL_MALLOC 1
-#endif
-
-/*
- * Flags for isc_mem_create2()calls.
- */
-#define ISC_MEMFLAG_NOLOCK 0x00000001 /* no lock is necessary */
-#define ISC_MEMFLAG_INTERNAL 0x00000002 /* use internal malloc */
-#if ISC_MEM_USE_INTERNAL_MALLOC
-#define ISC_MEMFLAG_DEFAULT ISC_MEMFLAG_INTERNAL
-#else
-#define ISC_MEMFLAG_DEFAULT 0
-#endif
-
-
-/*%<
- * We use either isc___mem (three underscores) or isc__mem (two) depending on
- * whether it's for BIND9's internal purpose (with -DBIND9) or generic export
- * library. This condition is generally handled in isc/namespace.h, but for
- * Windows it doesn't work if it involves multiple times of macro expansion
- * (such as isc_mem to isc__mem then to isc___mem). The following definitions
- * are used to work around this portability issue. Right now, we don't support
- * the export library for Windows, so we always use the three-underscore
- * version.
- */
-#ifdef WIN32
-#define ISCMEMFUNC(sfx) isc___mem_ ## sfx
-#define ISCMEMPOOLFUNC(sfx) isc___mempool_ ## sfx
-#else
-#define ISCMEMFUNC(sfx) isc__mem_ ## sfx
-#define ISCMEMPOOLFUNC(sfx) isc__mempool_ ## sfx
-#endif
-
-#define isc_mem_get(c, s) ISCMEMFUNC(get)((c), (s) _ISC_MEM_FILELINE)
-#define isc_mem_allocate(c, s) ISCMEMFUNC(allocate)((c), (s) _ISC_MEM_FILELINE)
-#define isc_mem_reallocate(c, p, s) ISCMEMFUNC(reallocate)((c), (p), (s) _ISC_MEM_FILELINE)
-#define isc_mem_strdup(c, p) ISCMEMFUNC(strdup)((c), (p) _ISC_MEM_FILELINE)
-#define isc_mempool_get(c) ISCMEMPOOLFUNC(get)((c) _ISC_MEM_FILELINE)
-
-/*%
- * isc_mem_putanddetach() is a convenience function for use where you
- * have a structure with an attached memory context.
- *
- * Given:
- *
- * \code
- * struct {
- * ...
- * isc_mem_t *mctx;
- * ...
- * } *ptr;
- *
- * isc_mem_t *mctx;
- *
- * isc_mem_putanddetach(&ptr->mctx, ptr, sizeof(*ptr));
- * \endcode
- *
- * is the equivalent of:
- *
- * \code
- * mctx = NULL;
- * isc_mem_attach(ptr->mctx, &mctx);
- * isc_mem_detach(&ptr->mctx);
- * isc_mem_put(mctx, ptr, sizeof(*ptr));
- * isc_mem_detach(&mctx);
- * \endcode
- */
-
-/*% memory and memory pool methods */
-typedef struct isc_memmethods {
- void (*attach)(isc_mem_t *source, isc_mem_t **targetp);
- void (*detach)(isc_mem_t **mctxp);
- void (*destroy)(isc_mem_t **mctxp);
- void *(*memget)(isc_mem_t *mctx, size_t size _ISC_MEM_FLARG);
- void (*memput)(isc_mem_t *mctx, void *ptr, size_t size _ISC_MEM_FLARG);
- void (*memputanddetach)(isc_mem_t **mctxp, void *ptr,
- size_t size _ISC_MEM_FLARG);
- void *(*memallocate)(isc_mem_t *mctx, size_t size _ISC_MEM_FLARG);
- void *(*memreallocate)(isc_mem_t *mctx, void *ptr,
- size_t size _ISC_MEM_FLARG);
- char *(*memstrdup)(isc_mem_t *mctx, const char *s _ISC_MEM_FLARG);
- void (*memfree)(isc_mem_t *mctx, void *ptr _ISC_MEM_FLARG);
- void (*setdestroycheck)(isc_mem_t *mctx, isc_boolean_t flag);
- void (*setwater)(isc_mem_t *ctx, isc_mem_water_t water,
- void *water_arg, size_t hiwater, size_t lowater);
- void (*waterack)(isc_mem_t *ctx, int flag);
- size_t (*inuse)(isc_mem_t *mctx);
- isc_boolean_t (*isovermem)(isc_mem_t *mctx);
- isc_result_t (*mpcreate)(isc_mem_t *mctx, size_t size,
- isc_mempool_t **mpctxp);
-} isc_memmethods_t;
-
-typedef struct isc_mempoolmethods {
- void (*destroy)(isc_mempool_t **mpctxp);
- void *(*get)(isc_mempool_t *mpctx _ISC_MEM_FLARG);
- void (*put)(isc_mempool_t *mpctx, void *mem _ISC_MEM_FLARG);
- unsigned int (*getallocated)(isc_mempool_t *mpctx);
- void (*setmaxalloc)(isc_mempool_t *mpctx, unsigned int limit);
- void (*setfreemax)(isc_mempool_t *mpctx, unsigned int limit);
- void (*setname)(isc_mempool_t *mpctx, const char *name);
- void (*associatelock)(isc_mempool_t *mpctx, isc_mutex_t *lock);
- void (*setfillcount)(isc_mempool_t *mpctx, unsigned int limit);
-} isc_mempoolmethods_t;
-
-/*%
- * This structure is actually just the common prefix of a memory context
- * implementation's version of an isc_mem_t.
- * \brief
- * Direct use of this structure by clients is forbidden. mctx implementations
- * may change the structure. 'magic' must be ISCAPI_MCTX_MAGIC for any of the
- * isc_mem_ routines to work. mctx implementations must maintain all mctx
- * invariants.
- */
-struct isc_mem {
- unsigned int impmagic;
- unsigned int magic;
- isc_memmethods_t *methods;
-};
-
-#define ISCAPI_MCTX_MAGIC ISC_MAGIC('A','m','c','x')
-#define ISCAPI_MCTX_VALID(m) ((m) != NULL && \
- (m)->magic == ISCAPI_MCTX_MAGIC)
-
-/*%
- * This is the common prefix of a memory pool context. The same note as
- * that for the mem structure applies.
- */
-struct isc_mempool {
- unsigned int impmagic;
- unsigned int magic;
- isc_mempoolmethods_t *methods;
-};
-
-#define ISCAPI_MPOOL_MAGIC ISC_MAGIC('A','m','p','l')
-#define ISCAPI_MPOOL_VALID(mp) ((mp) != NULL && \
- (mp)->magic == ISCAPI_MPOOL_MAGIC)
-
-#if ISC_MEM_DEBUG
-#define isc_mem_put(c, p, s) \
- do { \
- ISCMEMFUNC(put)((c), (p), (s) _ISC_MEM_FILELINE); \
- (p) = NULL; \
- } while (0)
-#define isc_mem_putanddetach(c, p, s) \
- do { \
- ISCMEMFUNC(putanddetach)((c), (p), (s) _ISC_MEM_FILELINE); \
- (p) = NULL; \
- } while (0)
-#define isc_mem_free(c, p) \
- do { \
- ISCMEMFUNC(free)((c), (p) _ISC_MEM_FILELINE); \
- (p) = NULL; \
- } while (0)
-#define isc_mempool_put(c, p) \
- do { \
- ISCMEMPOOLFUNC(put)((c), (p) _ISC_MEM_FILELINE); \
- (p) = NULL; \
- } while (0)
-#else
-#define isc_mem_put(c, p, s) ISCMEMFUNC(put)((c), (p), (s) _ISC_MEM_FILELINE)
-#define isc_mem_putanddetach(c, p, s) \
- ISCMEMFUNC(putanddetach)((c), (p), (s) _ISC_MEM_FILELINE)
-#define isc_mem_free(c, p) ISCMEMFUNC(free)((c), (p) _ISC_MEM_FILELINE)
-#define isc_mempool_put(c, p) ISCMEMPOOLFUNC(put)((c), (p) _ISC_MEM_FILELINE)
-#endif
-
-/*@{*/
-isc_result_t
-isc_mem_create(size_t max_size, size_t target_size,
- isc_mem_t **mctxp);
-
-isc_result_t
-isc_mem_create2(size_t max_size, size_t target_size,
- isc_mem_t **mctxp, unsigned int flags);
-
-isc_result_t
-isc_mem_createx(size_t max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree,
- void *arg, isc_mem_t **mctxp);
-
-isc_result_t
-isc_mem_createx2(size_t max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree,
- void *arg, isc_mem_t **mctxp, unsigned int flags);
-
-/*!<
- * \brief Create a memory context.
- *
- * 'max_size' and 'target_size' are tuning parameters. When
- * ISC_MEMFLAG_INTERNAL is set, allocations smaller than 'max_size'
- * will be satisfied by getting blocks of size 'target_size' from the
- * system allocator and breaking them up into pieces; larger allocations
- * will use the system allocator directly. If 'max_size' and/or
- * 'target_size' are zero, default values will be * used. When
- * ISC_MEMFLAG_INTERNAL is not set, 'target_size' is ignored.
- *
- * 'max_size' is also used to size the statistics arrays and the array
- * used to record active memory when ISC_MEM_DEBUGRECORD is set. Setting
- * 'max_size' too low can have detrimental effects on performance.
- *
- * A memory context created using isc_mem_createx() will obtain
- * memory from the system by calling 'memalloc' and 'memfree',
- * passing them the argument 'arg'. A memory context created
- * using isc_mem_create() will use the standard library malloc()
- * and free().
- *
- * If ISC_MEMFLAG_NOLOCK is set in 'flags', the corresponding memory context
- * will be accessed without locking. The user who creates the context must
- * ensure there be no race. Since this can be a source of bug, it is generally
- * inadvisable to use this flag unless the user is very sure about the race
- * condition and the access to the object is highly performance sensitive.
- *
- * Requires:
- * mctxp != NULL && *mctxp == NULL */
-/*@}*/
-
-/*@{*/
-void
-isc_mem_attach(isc_mem_t *, isc_mem_t **);
-void
-isc_mem_detach(isc_mem_t **);
-/*!<
- * \brief Attach to / detach from a memory context.
- *
- * This is intended for applications that use multiple memory contexts
- * in such a way that it is not obvious when the last allocations from
- * a given context has been freed and destroying the context is safe.
- *
- * Most applications do not need to call these functions as they can
- * simply create a single memory context at the beginning of main()
- * and destroy it at the end of main(), thereby guaranteeing that it
- * is not destroyed while there are outstanding allocations.
- */
-/*@}*/
-
-void
-isc_mem_destroy(isc_mem_t **);
-/*%<
- * Destroy a memory context.
- */
-
-isc_result_t
-isc_mem_ondestroy(isc_mem_t *ctx,
- isc_task_t *task,
- isc_event_t **event);
-/*%<
- * Request to be notified with an event when a memory context has
- * been successfully destroyed.
- */
-
-void
-isc_mem_stats(isc_mem_t *mctx, FILE *out);
-/*%<
- * Print memory usage statistics for 'mctx' on the stream 'out'.
- */
-
-void
-isc_mem_setdestroycheck(isc_mem_t *mctx,
- isc_boolean_t on);
-/*%<
- * If 'on' is ISC_TRUE, 'mctx' will check for memory leaks when
- * destroyed and abort the program if any are present.
- */
-
-/*@{*/
-void
-isc_mem_setquota(isc_mem_t *, size_t);
-size_t
-isc_mem_getquota(isc_mem_t *);
-/*%<
- * Set/get the memory quota of 'mctx'. This is a hard limit
- * on the amount of memory that may be allocated from mctx;
- * if it is exceeded, allocations will fail.
- */
-/*@}*/
-
-size_t
-isc_mem_inuse(isc_mem_t *mctx);
-/*%<
- * Get an estimate of the number of memory in use in 'mctx', in bytes.
- * This includes quantization overhead, but does not include memory
- * allocated from the system but not yet used.
- */
-
-isc_boolean_t
-isc_mem_isovermem(isc_mem_t *mctx);
-/*%<
- * Return true iff the memory context is in "over memory" state, i.e.,
- * a hiwater mark has been set and the used amount of memory has exceeds
- * the mark.
- */
-
-void
-isc_mem_setwater(isc_mem_t *mctx, isc_mem_water_t water, void *water_arg,
- size_t hiwater, size_t lowater);
-/*%<
- * Set high and low water marks for this memory context.
- *
- * When the memory usage of 'mctx' exceeds 'hiwater',
- * '(water)(water_arg, #ISC_MEM_HIWATER)' will be called. 'water' needs to
- * call isc_mem_waterack() with #ISC_MEM_HIWATER to acknowledge the state
- * change. 'water' may be called multiple times.
- *
- * When the usage drops below 'lowater', 'water' will again be called, this
- * time with #ISC_MEM_LOWATER. 'water' need to calls isc_mem_waterack() with
- * #ISC_MEM_LOWATER to acknowledge the change.
- *
- * static void
- * water(void *arg, int mark) {
- * struct foo *foo = arg;
- *
- * LOCK(&foo->marklock);
- * if (foo->mark != mark) {
- * foo->mark = mark;
- * ....
- * isc_mem_waterack(foo->mctx, mark);
- * }
- * UNLOCK(&foo->marklock);
- * }
- *
- * If 'water' is NULL then 'water_arg', 'hi_water' and 'lo_water' are
- * ignored and the state is reset.
- *
- * Requires:
- *
- * 'water' is not NULL.
- * hi_water >= lo_water
- */
-
-void
-isc_mem_waterack(isc_mem_t *ctx, int mark);
-/*%<
- * Called to acknowledge changes in signaled by calls to 'water'.
- */
-
-void
-isc_mem_printactive(isc_mem_t *mctx, FILE *file);
-/*%<
- * Print to 'file' all active memory in 'mctx'.
- *
- * Requires ISC_MEM_DEBUGRECORD to have been set.
- */
-
-void
-isc_mem_printallactive(FILE *file);
-/*%<
- * Print to 'file' all active memory in all contexts.
- *
- * Requires ISC_MEM_DEBUGRECORD to have been set.
- */
-
-void
-isc_mem_checkdestroyed(FILE *file);
-/*%<
- * Check that all memory contexts have been destroyed.
- * Prints out those that have not been.
- * Fatally fails if there are still active contexts.
- */
-
-unsigned int
-isc_mem_references(isc_mem_t *ctx);
-/*%<
- * Return the current reference count.
- */
-
-void
-isc_mem_setname(isc_mem_t *ctx, const char *name, void *tag);
-/*%<
- * Name 'ctx'.
- *
- * Notes:
- *
- *\li Only the first 15 characters of 'name' will be copied.
- *
- *\li 'tag' is for debugging purposes only.
- *
- * Requires:
- *
- *\li 'ctx' is a valid ctx.
- */
-
-const char *
-isc_mem_getname(isc_mem_t *ctx);
-/*%<
- * Get the name of 'ctx', as previously set using isc_mem_setname().
- *
- * Requires:
- *\li 'ctx' is a valid ctx.
- *
- * Returns:
- *\li A non-NULL pointer to a null-terminated string.
- * If the ctx has not been named, the string is
- * empty.
- */
-
-void *
-isc_mem_gettag(isc_mem_t *ctx);
-/*%<
- * Get the tag value for 'task', as previously set using isc_mem_setname().
- *
- * Requires:
- *\li 'ctx' is a valid ctx.
- *
- * Notes:
- *\li This function is for debugging purposes only.
- *
- * Requires:
- *\li 'ctx' is a valid task.
- */
-
-#ifdef HAVE_LIBXML2
-void
-isc_mem_renderxml(xmlTextWriterPtr writer);
-/*%<
- * Render all contexts' statistics and status in XML for writer.
- */
-#endif /* HAVE_LIBXML2 */
-
-/*
- * Memory pools
- */
-
-isc_result_t
-isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp);
-/*%<
- * Create a memory pool.
- *
- * Requires:
- *\li mctx is a valid memory context.
- *\li size > 0
- *\li mpctxp != NULL and *mpctxp == NULL
- *
- * Defaults:
- *\li maxalloc = UINT_MAX
- *\li freemax = 1
- *\li fillcount = 1
- *
- * Returns:
- *\li #ISC_R_NOMEMORY -- not enough memory to create pool
- *\li #ISC_R_SUCCESS -- all is well.
- */
-
-void
-isc_mempool_destroy(isc_mempool_t **mpctxp);
-/*%<
- * Destroy a memory pool.
- *
- * Requires:
- *\li mpctxp != NULL && *mpctxp is a valid pool.
- *\li The pool has no un"put" allocations outstanding
- */
-
-void
-isc_mempool_setname(isc_mempool_t *mpctx, const char *name);
-/*%<
- * Associate a name with a memory pool. At most 15 characters may be used.
- *
- * Requires:
- *\li mpctx is a valid pool.
- *\li name != NULL;
- */
-
-void
-isc_mempool_associatelock(isc_mempool_t *mpctx, isc_mutex_t *lock);
-/*%<
- * Associate a lock with this memory pool.
- *
- * This lock is used when getting or putting items using this memory pool,
- * and it is also used to set or get internal state via the isc_mempool_get*()
- * and isc_mempool_set*() set of functions.
- *
- * Multiple pools can each share a single lock. For instance, if "manager"
- * type object contained pools for various sizes of events, and each of
- * these pools used a common lock. Note that this lock must NEVER be used
- * by other than mempool routines once it is given to a pool, since that can
- * easily cause double locking.
- *
- * Requires:
- *
- *\li mpctpx is a valid pool.
- *
- *\li lock != NULL.
- *
- *\li No previous lock is assigned to this pool.
- *
- *\li The lock is initialized before calling this function via the normal
- * means of doing that.
- */
-
-/*
- * The following functions get/set various parameters. Note that due to
- * the unlocked nature of pools these are potentially random values unless
- * the imposed externally provided locking protocols are followed.
- *
- * Also note that the quota limits will not always take immediate effect.
- * For instance, setting "maxalloc" to a number smaller than the currently
- * allocated count is permitted. New allocations will be refused until
- * the count drops below this threshold.
- *
- * All functions require (in addition to other requirements):
- * mpctx is a valid memory pool
- */
-
-unsigned int
-isc_mempool_getfreemax(isc_mempool_t *mpctx);
-/*%<
- * Returns the maximum allowed size of the free list.
- */
-
-void
-isc_mempool_setfreemax(isc_mempool_t *mpctx, unsigned int limit);
-/*%<
- * Sets the maximum allowed size of the free list.
- */
-
-unsigned int
-isc_mempool_getfreecount(isc_mempool_t *mpctx);
-/*%<
- * Returns current size of the free list.
- */
-
-unsigned int
-isc_mempool_getmaxalloc(isc_mempool_t *mpctx);
-/*!<
- * Returns the maximum allowed number of allocations.
- */
-
-void
-isc_mempool_setmaxalloc(isc_mempool_t *mpctx, unsigned int limit);
-/*%<
- * Sets the maximum allowed number of allocations.
- *
- * Additional requirements:
- *\li limit > 0
- */
-
-unsigned int
-isc_mempool_getallocated(isc_mempool_t *mpctx);
-/*%<
- * Returns the number of items allocated from this pool.
- */
-
-unsigned int
-isc_mempool_getfillcount(isc_mempool_t *mpctx);
-/*%<
- * Returns the number of items allocated as a block from the parent memory
- * context when the free list is empty.
- */
-
-void
-isc_mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit);
-/*%<
- * Sets the fillcount.
- *
- * Additional requirements:
- *\li limit > 0
- */
-
-
-/*
- * Pseudo-private functions for use via macros. Do not call directly.
- */
-void *
-ISCMEMFUNC(get)(isc_mem_t *, size_t _ISC_MEM_FLARG);
-void
-ISCMEMFUNC(putanddetach)(isc_mem_t **, void *, size_t _ISC_MEM_FLARG);
-void
-ISCMEMFUNC(put)(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
-void *
-ISCMEMFUNC(allocate)(isc_mem_t *, size_t _ISC_MEM_FLARG);
-void *
-ISCMEMFUNC(reallocate)(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
-void
-ISCMEMFUNC(free)(isc_mem_t *, void * _ISC_MEM_FLARG);
-char *
-ISCMEMFUNC(strdup)(isc_mem_t *, const char *_ISC_MEM_FLARG);
-void *
-ISCMEMPOOLFUNC(get)(isc_mempool_t * _ISC_MEM_FLARG);
-void
-ISCMEMPOOLFUNC(put)(isc_mempool_t *, void * _ISC_MEM_FLARG);
-
-#ifdef USE_MEMIMPREGISTER
-
-/*%<
- * See isc_mem_create2() above.
- */
-typedef isc_result_t
-(*isc_memcreatefunc_t)(size_t init_max_size, size_t target_size,
- isc_mem_t **ctxp, unsigned int flags);
-
-isc_result_t
-isc_mem_register(isc_memcreatefunc_t createfunc);
-/*%<
- * Register a new memory management implementation and add it to the list of
- * supported implementations. This function must be called when a different
- * memory management library is used than the one contained in the ISC library.
- */
-
-isc_result_t
-isc__mem_register(void);
-/*%<
- * A short cut function that specifies the memory management module in the ISC
- * library for isc_mem_register(). An application that uses the ISC library
- * usually do not have to care about this function: it would call
- * isc_lib_register(), which internally calls this function.
- */
-#endif /* USE_MEMIMPREGISTER */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_MEM_H */
diff --git a/contrib/ntp/lib/isc/include/isc/mutexblock.h b/contrib/ntp/lib/isc/include/isc/mutexblock.h
deleted file mode 100644
index 65bf2bf27f0b..000000000000
--- a/contrib/ntp/lib/isc/include/isc/mutexblock.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: mutexblock.h,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_MUTEXBLOCK_H
-#define ISC_MUTEXBLOCK_H 1
-
-/*! \file isc/mutexblock.h */
-
-#include <isc/lang.h>
-#include <isc/mutex.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-isc_mutexblock_init(isc_mutex_t *block, unsigned int count);
-/*%<
- * Initialize a block of locks. If an error occurs all initialized locks
- * will be destroyed, if possible.
- *
- * Requires:
- *
- *\li block != NULL
- *
- *\li count > 0
- *
- * Returns:
- *
- *\li Any code isc_mutex_init() can return is a valid return for this
- * function.
- */
-
-isc_result_t
-isc_mutexblock_destroy(isc_mutex_t *block, unsigned int count);
-/*%<
- * Destroy a block of locks.
- *
- * Requires:
- *
- *\li block != NULL
- *
- *\li count > 0
- *
- *\li Each lock in the block be initialized via isc_mutex_init() or
- * the whole block was initialized via isc_mutex_initblock().
- *
- * Returns:
- *
- *\li Any code isc_mutex_init() can return is a valid return for this
- * function.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_MUTEXBLOCK_H */
diff --git a/contrib/ntp/lib/isc/include/isc/os.h b/contrib/ntp/lib/isc/include/isc/os.h
deleted file mode 100644
index 3cf59e2cb642..000000000000
--- a/contrib/ntp/lib/isc/include/isc/os.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: os.h,v 1.12 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_OS_H
-#define ISC_OS_H 1
-
-/*! \file isc/os.h */
-
-#include <isc/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-unsigned int
-isc_os_ncpus(void);
-/*%<
- * Return the number of CPUs available on the system, or 1 if this cannot
- * be determined.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_OS_H */
diff --git a/contrib/ntp/lib/isc/include/isc/parseint.h b/contrib/ntp/lib/isc/include/isc/parseint.h
deleted file mode 100644
index 5047676852bf..000000000000
--- a/contrib/ntp/lib/isc/include/isc/parseint.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001, 2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: parseint.h,v 1.9 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_PARSEINT_H
-#define ISC_PARSEINT_H 1
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-/*! \file isc/parseint.h
- * \brief Parse integers, in a saner way than atoi() or strtoul() do.
- */
-
-/***
- *** Functions
- ***/
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-isc_parse_uint32(isc_uint32_t *uip, const char *string, int base);
-
-isc_result_t
-isc_parse_uint16(isc_uint16_t *uip, const char *string, int base);
-
-isc_result_t
-isc_parse_uint8(isc_uint8_t *uip, const char *string, int base);
-/*%<
- * Parse the null-terminated string 'string' containing a base 'base'
- * integer, storing the result in '*uip'.
- * The base is interpreted
- * as in strtoul(). Unlike strtoul(), leading whitespace, minus or
- * plus signs are not accepted, and all errors (including overflow)
- * are reported uniformly through the return value.
- *
- * Requires:
- *\li 'string' points to a null-terminated string
- *\li 0 <= 'base' <= 36
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_BADNUMBER The string is not numeric (in the given base)
- *\li #ISC_R_RANGE The number is not representable as the requested type.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_PARSEINT_H */
diff --git a/contrib/ntp/lib/isc/include/isc/platform.h.in b/contrib/ntp/lib/isc/include/isc/platform.h.in
deleted file mode 100644
index 03c2710bac35..000000000000
--- a/contrib/ntp/lib/isc/include/isc/platform.h.in
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: platform.h.in,v 1.56 2010/12/18 01:56:23 each Exp $ */
-
-#ifndef ISC_PLATFORM_H
-#define ISC_PLATFORM_H 1
-
-/*! \file */
-
-/*****
- ***** Platform-dependent defines.
- *****/
-
-/***
- *** Network.
- ***/
-
-/*! \brief
- * Define if this system needs the <netinet/in6.h> header file included
- * for full IPv6 support (pretty much only UnixWare).
- */
-@ISC_PLATFORM_NEEDNETINETIN6H@
-
-/*! \brief
- * Define if this system needs the <netinet6/in6.h> header file included
- * to support in6_pkinfo (pretty much only BSD/OS).
- */
-@ISC_PLATFORM_NEEDNETINET6IN6H@
-
-/*! \brief
- * If sockaddrs on this system have an sa_len field, ISC_PLATFORM_HAVESALEN
- * will be defined.
- */
-@ISC_PLATFORM_HAVESALEN@
-
-/*! \brief
- * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
- * will be defined.
- */
-@ISC_PLATFORM_HAVEIPV6@
-
-/*! \brief
- * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
- * be defined.
- */
-@ISC_PLATFORM_NEEDIN6ADDRANY@
-
-/*! \brief
- * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
- * will be defined.
- */
-@ISC_PLATFORM_NEEDIN6ADDRLOOPBACK@
-
-/*! \brief
- * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
- * defined.
- */
-@ISC_PLATFORM_HAVEIN6PKTINFO@
-
-/*! \brief
- * If this system has in_addr6, rather than in6_addr, ISC_PLATFORM_HAVEINADDR6
- * will be defined.
- */
-@ISC_PLATFORM_HAVEINADDR6@
-
-/*! \brief
- * If this system has sin6_scope_id, ISC_PLATFORM_HAVESCOPEID will be defined.
- */
-@ISC_PLATFORM_HAVESCOPEID@
-
-/*! \brief
- * If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
- */
-@ISC_PLATFORM_NEEDNTOP@
-
-/*! \brief
- * If this system needs inet_pton(), ISC_PLATFORM_NEEDPTON will be defined.
- */
-@ISC_PLATFORM_NEEDPTON@
-
-/*! \brief
- * If this system needs in_port_t, ISC_PLATFORM_NEEDPORTT will be defined.
- */
-@ISC_PLATFORM_NEEDPORTT@
-
-/*! \brief
- * Define if the system has struct lifconf which is a extended struct ifconf
- * for IPv6.
- */
-@ISC_PLATFORM_HAVELIFCONF@
-
-/*! \brief
- * Define if the system has struct if_laddrconf which is a extended struct
- * ifconf for IPv6.
- */
-@ISC_PLATFORM_HAVEIF_LADDRCONF@
-
-/*! \brief
- * Define if the system has struct if_laddrreq.
- */
-@ISC_PLATFORM_HAVEIF_LADDRREQ@
-
-/*! \brief
- * Define either ISC_PLATFORM_BSD44MSGHDR or ISC_PLATFORM_BSD43MSGHDR.
- */
-@ISC_PLATFORM_MSGHDRFLAVOR@
-
-/*! \brief
- * Define if the system supports if_nametoindex.
- */
-@ISC_PLATFORM_HAVEIFNAMETOINDEX@
-
-/*! \brief
- * Define on some UnixWare systems to fix erroneous definitions of various
- * IN6_IS_ADDR_* macros.
- */
-@ISC_PLATFORM_FIXIN6ISADDR@
-
-/*! \brief
- * Define if the system supports kqueue multiplexing
- */
-@ISC_PLATFORM_HAVEKQUEUE@
-
-/*! \brief
- * Define if the system supports epoll multiplexing
- */
-@ISC_PLATFORM_HAVEEPOLL@
-
-/*! \brief
- * Define if the system supports /dev/poll multiplexing
- */
-@ISC_PLATFORM_HAVEDEVPOLL@
-
-/*! \brief
- * Define if we want to log backtrace
- */
-@ISC_PLATFORM_USEBACKTRACE@
-
-/*
- *** Printing.
- ***/
-
-/*! \brief
- * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF
- * will be defined.
- */
-@ISC_PLATFORM_NEEDVSNPRINTF@
-
-/*! \brief
- * If this system need a modern sprintf() that returns (int) not (char*).
- */
-@ISC_PLATFORM_NEEDSPRINTF@
-
-/*! \brief
- * The printf format string modifier to use with isc_uint64_t values.
- */
-@ISC_PLATFORM_QUADFORMAT@
-
-/***
- *** String functions.
- ***/
-/*
- * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined.
- */
-@ISC_PLATFORM_NEEDSTRSEP@
-
-/*
- * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined.
- */
-@ISC_PLATFORM_NEEDSTRLCPY@
-
-/*
- * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined.
- */
-@ISC_PLATFORM_NEEDSTRLCAT@
-
-/*
- * Define if this system needs strtoul.
- */
-@ISC_PLATFORM_NEEDSTRTOUL@
-
-/*
- * Define if this system needs memmove.
- */
-@ISC_PLATFORM_NEEDMEMMOVE@
-
-/***
- *** Miscellaneous.
- ***/
-
-/*
- * Defined if we are using threads.
- */
-@ISC_PLATFORM_USETHREADS@
-
-/*
- * Defined if unistd.h does not cause fd_set to be delared.
- */
-@ISC_PLATFORM_NEEDSYSSELECTH@
-
-/*
- * Defined to <gssapi.h> or <gssapi/gssapi.h> for how to include
- * the GSSAPI header.
- */
-@ISC_PLATFORM_GSSAPIHEADER@
-
-/*
- * Defined to <gssapi_krb5.h> or <gssapi/gssapi_krb5.h> for how to
- * include the GSSAPI KRB5 header.
- */
-@ISC_PLATFORM_GSSAPI_KRB5_HEADER@
-
-/*
- * Defined to <krb5.h> or <krb5/krb5.h> for how to include
- * the KRB5 header.
- */
-@ISC_PLATFORM_KRB5HEADER@
-
-/*
- * Type used for resource limits.
- */
-@ISC_PLATFORM_RLIMITTYPE@
-
-/*
- * Define if your compiler supports "long long int".
- */
-@ISC_PLATFORM_HAVELONGLONG@
-
-/*
- * Define if PTHREAD_ONCE_INIT should be surrounded by braces to
- * prevent compiler warnings (such as with gcc on Solaris 2.8).
- */
-@ISC_PLATFORM_BRACEPTHREADONCEINIT@
-
-/*
- * Used to control how extern data is linked; needed for Win32 platforms.
- */
-@ISC_PLATFORM_USEDECLSPEC@
-
-/*
- * Define if the platform has <sys/un.h>.
- */
-@ISC_PLATFORM_HAVESYSUNH@
-
-/*
- * If the "xadd" operation is available on this architecture,
- * ISC_PLATFORM_HAVEXADD will be defined.
- */
-@ISC_PLATFORM_HAVEXADD@
-
-/*
- * If the "xaddq" operation (64bit xadd) is available on this architecture,
- * ISC_PLATFORM_HAVEXADDQ will be defined.
- */
-@ISC_PLATFORM_HAVEXADDQ@
-
-/*
- * If the "atomic swap" operation is available on this architecture,
- * ISC_PLATFORM_HAVEATOMICSTORE" will be defined.
- */
-@ISC_PLATFORM_HAVEATOMICSTORE@
-
-/*
- * If the "compare-and-exchange" operation is available on this architecture,
- * ISC_PLATFORM_HAVECMPXCHG will be defined.
- */
-@ISC_PLATFORM_HAVECMPXCHG@
-
-/*
- * Define if gcc ASM extension is available
- */
-@ISC_PLATFORM_USEGCCASM@
-
-/*
- * Define if Tru64 style ASM syntax must be used.
- */
-@ISC_PLATFORM_USEOSFASM@
-
-/*
- * Define if the standard __asm function must be used.
- */
-@ISC_PLATFORM_USESTDASM@
-
-/*
- * Define if the platform has <strings.h>.
- */
-@ISC_PLATFORM_HAVESTRINGSH@
-
-/*
- * Define if the hash functions must be provided by OpenSSL.
- */
-@ISC_PLATFORM_OPENSSLHASH@
-
-/*
- * Defines for the noreturn attribute.
- */
-@ISC_PLATFORM_NORETURN_PRE@
-@ISC_PLATFORM_NORETURN_POST@
-
-/***
- *** Windows dll support.
- ***/
-
-/*
- * Define if MacOS style of PPC assembly must be used.
- * e.g. "r6", not "6", for register six.
- */
-@ISC_PLATFORM_USEMACASM@
-
-#ifndef ISC_PLATFORM_USEDECLSPEC
-#define LIBISC_EXTERNAL_DATA
-#define LIBDNS_EXTERNAL_DATA
-#define LIBISCCC_EXTERNAL_DATA
-#define LIBISCCFG_EXTERNAL_DATA
-#define LIBBIND9_EXTERNAL_DATA
-#else /*! \brief ISC_PLATFORM_USEDECLSPEC */
-#ifdef LIBISC_EXPORTS
-#define LIBISC_EXTERNAL_DATA __declspec(dllexport)
-#else
-#define LIBISC_EXTERNAL_DATA __declspec(dllimport)
-#endif
-#ifdef LIBDNS_EXPORTS
-#define LIBDNS_EXTERNAL_DATA __declspec(dllexport)
-#else
-#define LIBDNS_EXTERNAL_DATA __declspec(dllimport)
-#endif
-#ifdef LIBISCCC_EXPORTS
-#define LIBISCCC_EXTERNAL_DATA __declspec(dllexport)
-#else
-#define LIBISCCC_EXTERNAL_DATA __declspec(dllimport)
-#endif
-#ifdef LIBISCCFG_EXPORTS
-#define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport)
-#else
-#define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport)
-#endif
-#ifdef LIBBIND9_EXPORTS
-#define LIBBIND9_EXTERNAL_DATA __declspec(dllexport)
-#else
-#define LIBBIND9_EXTERNAL_DATA __declspec(dllimport)
-#endif
-#endif /*! \brief ISC_PLATFORM_USEDECLSPEC */
-
-/*
- * Tell emacs to use C mode for this file.
- *
- * Local Variables:
- * mode: c
- * End:
- */
-
-#endif /* ISC_PLATFORM_H */
diff --git a/contrib/ntp/lib/isc/include/isc/portset.h b/contrib/ntp/lib/isc/include/isc/portset.h
deleted file mode 100644
index 774d6bb18cbd..000000000000
--- a/contrib/ntp/lib/isc/include/isc/portset.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: portset.h,v 1.6 2009/06/25 05:28:34 marka Exp $ */
-
-/*! \file isc/portset.h
- * \brief Transport Protocol Port Manipulation Module
- *
- * This module provides simple utilities to handle a set of transport protocol
- * (UDP or TCP) port numbers, e.g., for creating an ACL list. An isc_portset_t
- * object is an opaque instance of a port set, for which the user can add or
- * remove a specific port or a range of consecutive ports. This object is
- * expected to be used as a temporary work space only, and does not protect
- * simultaneous access from multiple threads. Therefore it must not be stored
- * in a place that can be accessed from multiple threads.
- */
-
-#ifndef ISC_PORTSET_H
-#define ISC_PORTSET_H 1
-
-/***
- *** Imports
- ***/
-
-#include <isc/net.h>
-
-/***
- *** Functions
- ***/
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-isc_portset_create(isc_mem_t *mctx, isc_portset_t **portsetp);
-/*%<
- * Create a port set and initialize it as an empty set.
- *
- * Requires:
- *\li 'mctx' to be valid.
- *\li 'portsetp' to be non NULL and '*portsetp' to be NULL;
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMEMORY
- */
-
-void
-isc_portset_destroy(isc_mem_t *mctx, isc_portset_t **portsetp);
-/*%<
- * Destroy a port set.
- *
- * Requires:
- *\li 'mctx' to be valid and must be the same context given when the port set
- * was created.
- *\li '*portsetp' to be a valid set.
- */
-
-isc_boolean_t
-isc_portset_isset(isc_portset_t *portset, in_port_t port);
-/*%<
- * Test whether the given port is stored in the portset.
- *
- * Requires:
- *\li 'portset' to be a valid set.
- *
- * Returns
- * \li #ISC_TRUE if the port is found, ISC_FALSE otherwise.
- */
-
-unsigned int
-isc_portset_nports(isc_portset_t *portset);
-/*%<
- * Provides the number of ports stored in the given portset.
- *
- * Requires:
- *\li 'portset' to be a valid set.
- *
- * Returns
- * \li the number of ports stored in portset.
- */
-
-void
-isc_portset_add(isc_portset_t *portset, in_port_t port);
-/*%<
- * Add the given port to the portset. The port may or may not be stored in
- * the portset.
- *
- * Requires:
- *\li 'portlist' to be valid.
- */
-
-void
-isc_portset_remove(isc_portset_t *portset, in_port_t port);
-/*%<
- * Remove the given port to the portset. The port may or may not be stored in
- * the portset.
- *
- * Requires:
- *\li 'portlist' to be valid.
- */
-
-void
-isc_portset_addrange(isc_portset_t *portset, in_port_t port_lo,
- in_port_t port_hi);
-/*%<
- * Add a subset of [port_lo, port_hi] (inclusive) to the portset. Ports in the
- * subset may or may not be stored in portset.
- *
- * Requires:
- *\li 'portlist' to be valid.
- *\li port_lo <= port_hi
- */
-
-void
-isc_portset_removerange(isc_portset_t *portset, in_port_t port_lo,
- in_port_t port_hi);
-/*%<
- * Subtract a subset of [port_lo, port_hi] (inclusive) from the portset. Ports
- * in the subset may or may not be stored in portset.
- *
- * Requires:
- *\li 'portlist' to be valid.
- *\li port_lo <= port_hi
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_PORTSET_H */
diff --git a/contrib/ntp/lib/isc/include/isc/queue.h b/contrib/ntp/lib/isc/include/isc/queue.h
deleted file mode 100644
index 5bf84c527c13..000000000000
--- a/contrib/ntp/lib/isc/include/isc/queue.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*
- * This is a generic implementation of a two-lock concurrent queue.
- * There are built-in mutex locks for the head and tail of the queue,
- * allowing elements to be safely added and removed at the same time.
- */
-
-#ifndef ISC_QUEUE_H
-#define ISC_QUEUE_H 1
-#include <isc/assertions.h>
-#include <isc/boolean.h>
-#include <isc/mutex.h>
-
-#ifdef ISC_QUEUE_CHECKINIT
-#define ISC_QLINK_INSIST(x) ISC_INSIST(x)
-#else
-#define ISC_QLINK_INSIST(x) (void)0
-#endif
-
-#define ISC_QLINK(type) struct { void *next; isc_boolean_t linked; }
-#define ISC_QLINK_INIT(elt, link) \
- do { \
- (elt)->link.next = (void *)(-1); \
- (elt)->link.linked = ISC_FALSE; \
- } while (0)
-#define ISC_QLINK_LINKED(elt, link) ((elt)->link.linked)
-
-#define ISC_QUEUE(type) struct { \
- type headnode; \
- type *head, *tail; \
- isc_mutex_t headlock, taillock; \
-}
-
-#define ISC_QUEUE_INIT(queue, link) \
- do { \
- isc_mutex_init(&(queue).headlock); \
- isc_mutex_init(&(queue).taillock); \
- (queue).head = (void *) &((queue).headnode); \
- (queue).tail = (void *) &((queue).headnode); \
- ISC_QLINK_INIT((queue).head, link); \
- } while (0)
-
-#define ISC_QUEUE_EMPTY(queue) ISC_TF((queue).head == (queue).tail)
-
-#define ISC_QUEUE_DESTROY(queue) \
- do { \
- ISC_QLINK_INSIST(ISC_QUEUE_EMPTY(queue)); \
- isc_mutex_destroy(&(queue).headlock); \
- isc_mutex_destroy(&(queue).taillock); \
- } while (0)
-
-#define ISC_QUEUE_PUSH(queue, elt, link) \
- do { \
- ISC_QLINK_INSIST(!ISC_QLINK_LINKED(elt, link)); \
- (elt)->link.next = (void *)(-1); \
- LOCK(&(queue).taillock); \
- (queue).tail->link.next = elt; \
- (queue).tail = elt; \
- UNLOCK(&(queue).taillock); \
- (elt)->link.linked = ISC_TRUE; \
- } while (0)
-
-#define ISC_QUEUE_POP(queue, link, ret) \
- do { \
- LOCK(&(queue).headlock); \
- ret = (queue).head->link.next; \
- if (ret == (void *)(-1)) { \
- UNLOCK(&(queue).headlock); \
- ret = NULL; \
- } else { \
- (queue).head->link.next = ret->link.next; \
- if (ret->link.next == (void *)(-1)) { \
- LOCK(&(queue).taillock); \
- (queue).tail = (queue).head; \
- UNLOCK(&(queue).taillock); \
- } \
- UNLOCK(&(queue).headlock); \
- ret->link.next = (void *)(-1); \
- ret->link.linked = ISC_FALSE; \
- } \
- } while (0)
-
-#endif /* ISC_QUEUE_H */
diff --git a/contrib/ntp/lib/isc/include/isc/quota.h b/contrib/ntp/lib/isc/include/isc/quota.h
deleted file mode 100644
index 7b0d0d9beb84..000000000000
--- a/contrib/ntp/lib/isc/include/isc/quota.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: quota.h,v 1.16 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_QUOTA_H
-#define ISC_QUOTA_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/quota.h
- *
- * \brief The isc_quota_t object is a simple helper object for implementing
- * quotas on things like the number of simultaneous connections to
- * a server. It keeps track of the amount of quota in use, and
- * encapsulates the locking necessary to allow multiple tasks to
- * share a quota.
- */
-
-/***
- *** Imports.
- ***/
-
-#include <isc/lang.h>
-#include <isc/mutex.h>
-#include <isc/types.h>
-
-/*****
- ***** Types.
- *****/
-
-ISC_LANG_BEGINDECLS
-
-/*% isc_quota structure */
-struct isc_quota {
- isc_mutex_t lock; /*%< Locked by lock. */
- int max;
- int used;
- int soft;
-};
-
-isc_result_t
-isc_quota_init(isc_quota_t *quota, int max);
-/*%<
- * Initialize a quota object.
- *
- * Returns:
- * ISC_R_SUCCESS
- * Other error Lock creation failed.
- */
-
-void
-isc_quota_destroy(isc_quota_t *quota);
-/*%<
- * Destroy a quota object.
- */
-
-void
-isc_quota_soft(isc_quota_t *quota, int soft);
-/*%<
- * Set a soft quota.
- */
-
-void
-isc_quota_max(isc_quota_t *quota, int max);
-/*%<
- * Re-set a maximum quota.
- */
-
-isc_result_t
-isc_quota_reserve(isc_quota_t *quota);
-/*%<
- * Attempt to reserve one unit of 'quota'.
- *
- * Returns:
- * \li #ISC_R_SUCCESS Success
- * \li #ISC_R_SOFTQUOTA Success soft quota reached
- * \li #ISC_R_QUOTA Quota is full
- */
-
-void
-isc_quota_release(isc_quota_t *quota);
-/*%<
- * Release one unit of quota.
- */
-
-isc_result_t
-isc_quota_attach(isc_quota_t *quota, isc_quota_t **p);
-/*%<
- * Like isc_quota_reserve, and also attaches '*p' to the
- * quota if successful (ISC_R_SUCCESS or ISC_R_SOFTQUOTA).
- */
-
-void
-isc_quota_detach(isc_quota_t **p);
-/*%<
- * Like isc_quota_release, and also detaches '*p' from the
- * quota.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_QUOTA_H */
diff --git a/contrib/ntp/lib/isc/include/isc/radix.h b/contrib/ntp/lib/isc/include/isc/radix.h
deleted file mode 100644
index 6b413a23b909..000000000000
--- a/contrib/ntp/lib/isc/include/isc/radix.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: radix.h,v 1.13 2008/12/01 23:47:45 tbox Exp $ */
-
-/*
- * This source was adapted from MRT's RCS Ids:
- * Id: radix.h,v 1.6 1999/08/03 03:32:53 masaki Exp
- * Id: mrt.h,v 1.57.2.6 1999/12/28 23:41:27 labovit Exp
- * Id: defs.h,v 1.5.2.2 2000/01/15 14:19:16 masaki Exp
- */
-
-#include <isc/magic.h>
-#include <isc/types.h>
-#include <isc/mutex.h>
-#include <isc/net.h>
-#include <isc/refcount.h>
-
-#include <string.h>
-
-#ifndef _RADIX_H
-#define _RADIX_H
-
-#define NETADDR_TO_PREFIX_T(na,pt,bits) \
- do { \
- memset(&(pt), 0, sizeof(pt)); \
- if((na) != NULL) { \
- (pt).family = (na)->family; \
- (pt).bitlen = (bits); \
- if ((pt).family == AF_INET6) { \
- memcpy(&(pt).add.sin6, &(na)->type.in6, \
- ((bits)+7)/8); \
- } else \
- memcpy(&(pt).add.sin, &(na)->type.in, \
- ((bits)+7)/8); \
- } else { \
- (pt).family = AF_UNSPEC; \
- (pt).bitlen = 0; \
- } \
- isc_refcount_init(&(pt).refcount, 0); \
- } while(0)
-
-typedef struct isc_prefix {
- unsigned int family; /* AF_INET | AF_INET6, or AF_UNSPEC for "any" */
- unsigned int bitlen; /* 0 for "any" */
- isc_refcount_t refcount;
- union {
- struct in_addr sin;
- struct in6_addr sin6;
- } add;
-} isc_prefix_t;
-
-typedef void (*isc_radix_destroyfunc_t)(void *);
-typedef void (*isc_radix_processfunc_t)(isc_prefix_t *, void **);
-
-#define isc_prefix_tochar(prefix) ((char *)&(prefix)->add.sin)
-#define isc_prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
-
-#define BIT_TEST(f, b) ((f) & (b))
-
-/*
- * We need "first match" when we search the radix tree to preserve
- * compatibility with the existing ACL implementation. Radix trees
- * naturally lend themselves to "best match". In order to get "first match"
- * behavior, we keep track of the order in which entries are added to the
- * tree--and when a search is made, we find all matching entries, and
- * return the one that was added first.
- *
- * An IPv4 prefix and an IPv6 prefix may share a radix tree node if they
- * have the same length and bit pattern (e.g., 127/8 and 7f::/8). To
- * disambiguate between them, node_num and data are two-element arrays;
- * node_num[0] and data[0] are used for IPv4 addresses, node_num[1]
- * and data[1] for IPv6 addresses. The only exception is a prefix of
- * 0/0 (aka "any" or "none"), which is always stored as IPv4 but matches
- * IPv6 addresses too.
- */
-
-#define ISC_IS6(family) ((family) == AF_INET6 ? 1 : 0)
-typedef struct isc_radix_node {
- isc_uint32_t bit; /* bit length of the prefix */
- isc_prefix_t *prefix; /* who we are in radix tree */
- struct isc_radix_node *l, *r; /* left and right children */
- struct isc_radix_node *parent; /* may be used */
- void *data[2]; /* pointers to IPv4 and IPV6 data */
- int node_num[2]; /* which node this was in the tree,
- or -1 for glue nodes */
-} isc_radix_node_t;
-
-#define RADIX_TREE_MAGIC ISC_MAGIC('R','d','x','T');
-#define RADIX_TREE_VALID(a) ISC_MAGIC_VALID(a, RADIX_TREE_MAGIC);
-
-typedef struct isc_radix_tree {
- unsigned int magic;
- isc_mem_t *mctx;
- isc_radix_node_t *head;
- isc_uint32_t maxbits; /* for IP, 32 bit addresses */
- int num_active_node; /* for debugging purposes */
- int num_added_node; /* total number of nodes */
-} isc_radix_tree_t;
-
-isc_result_t
-isc_radix_search(isc_radix_tree_t *radix, isc_radix_node_t **target,
- isc_prefix_t *prefix);
-/*%<
- * Search 'radix' for the best match to 'prefix'.
- * Return the node found in '*target'.
- *
- * Requires:
- * \li 'radix' to be valid.
- * \li 'target' is not NULL and "*target" is NULL.
- * \li 'prefix' to be valid.
- *
- * Returns:
- * \li ISC_R_NOTFOUND
- * \li ISC_R_SUCCESS
- */
-
-isc_result_t
-isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
- isc_radix_node_t *source, isc_prefix_t *prefix);
-/*%<
- * Insert 'source' or 'prefix' into the radix tree 'radix'.
- * Return the node added in 'target'.
- *
- * Requires:
- * \li 'radix' to be valid.
- * \li 'target' is not NULL and "*target" is NULL.
- * \li 'prefix' to be valid or 'source' to be non NULL and contain
- * a valid prefix.
- *
- * Returns:
- * \li ISC_R_NOMEMORY
- * \li ISC_R_SUCCESS
- */
-
-void
-isc_radix_remove(isc_radix_tree_t *radix, isc_radix_node_t *node);
-/*%<
- * Remove the node 'node' from the radix tree 'radix'.
- *
- * Requires:
- * \li 'radix' to be valid.
- * \li 'node' to be valid.
- */
-
-isc_result_t
-isc_radix_create(isc_mem_t *mctx, isc_radix_tree_t **target, int maxbits);
-/*%<
- * Create a radix tree with a maximum depth of 'maxbits';
- *
- * Requires:
- * \li 'mctx' to be valid.
- * \li 'target' to be non NULL and '*target' to be NULL.
- * \li 'maxbits' to be less than or equal to RADIX_MAXBITS.
- *
- * Returns:
- * \li ISC_R_NOMEMORY
- * \li ISC_R_SUCCESS
- */
-
-void
-isc_radix_destroy(isc_radix_tree_t *radix, isc_radix_destroyfunc_t func);
-/*%<
- * Destroy a radix tree optionally calling 'func' to clean up node data.
- *
- * Requires:
- * \li 'radix' to be valid.
- */
-
-void
-isc_radix_process(isc_radix_tree_t *radix, isc_radix_processfunc_t func);
-/*%<
- * Walk a radix tree calling 'func' to process node data.
- *
- * Requires:
- * \li 'radix' to be valid.
- * \li 'func' to point to a function.
- */
-
-#define RADIX_MAXBITS 128
-#define RADIX_NBIT(x) (0x80 >> ((x) & 0x7f))
-#define RADIX_NBYTE(x) ((x) >> 3)
-
-#define RADIX_DATA_GET(node, type) (type *)((node)->data)
-#define RADIX_DATA_SET(node, value) ((node)->data = (void *)(value))
-
-#define RADIX_WALK(Xhead, Xnode) \
- do { \
- isc_radix_node_t *Xstack[RADIX_MAXBITS+1]; \
- isc_radix_node_t **Xsp = Xstack; \
- isc_radix_node_t *Xrn = (Xhead); \
- while ((Xnode = Xrn)) { \
- if (Xnode->prefix)
-
-#define RADIX_WALK_ALL(Xhead, Xnode) \
-do { \
- isc_radix_node_t *Xstack[RADIX_MAXBITS+1]; \
- isc_radix_node_t **Xsp = Xstack; \
- isc_radix_node_t *Xrn = (Xhead); \
- while ((Xnode = Xrn)) { \
- if (1)
-
-#define RADIX_WALK_BREAK { \
- if (Xsp != Xstack) { \
- Xrn = *(--Xsp); \
- } else { \
- Xrn = (radix_node_t *) 0; \
- } \
- continue; }
-
-#define RADIX_WALK_END \
- if (Xrn->l) { \
- if (Xrn->r) { \
- *Xsp++ = Xrn->r; \
- } \
- Xrn = Xrn->l; \
- } else if (Xrn->r) { \
- Xrn = Xrn->r; \
- } else if (Xsp != Xstack) { \
- Xrn = *(--Xsp); \
- } else { \
- Xrn = (isc_radix_node_t *) 0; \
- } \
- } \
- } while (0)
-
-#endif /* _RADIX_H */
diff --git a/contrib/ntp/lib/isc/include/isc/ratelimiter.h b/contrib/ntp/lib/isc/include/isc/ratelimiter.h
deleted file mode 100644
index 00a7209758bb..000000000000
--- a/contrib/ntp/lib/isc/include/isc/ratelimiter.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ratelimiter.h,v 1.23 2009/01/18 23:48:14 tbox Exp $ */
-
-#ifndef ISC_RATELIMITER_H
-#define ISC_RATELIMITER_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/ratelimiter.h
- * \brief A rate limiter is a mechanism for dispatching events at a limited
- * rate. This is intended to be used when sending zone maintenance
- * SOA queries, NOTIFY messages, etc.
- */
-
-/***
- *** Imports.
- ***/
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/*****
- ***** Functions.
- *****/
-
-isc_result_t
-isc_ratelimiter_create(isc_mem_t *mctx, isc_timermgr_t *timermgr,
- isc_task_t *task, isc_ratelimiter_t **ratelimiterp);
-/*%<
- * Create a rate limiter. The execution interval is initially undefined.
- */
-
-isc_result_t
-isc_ratelimiter_setinterval(isc_ratelimiter_t *rl, isc_interval_t *interval);
-/*!<
- * Set the minimum interval between event executions.
- * The interval value is copied, so the caller need not preserve it.
- *
- * Requires:
- * '*interval' is a nonzero interval.
- */
-
-void
-isc_ratelimiter_setpertic(isc_ratelimiter_t *rl, isc_uint32_t perint);
-/*%<
- * Set the number of events processed per interval timer tick.
- * If 'perint' is zero it is treated as 1.
- */
-
-isc_result_t
-isc_ratelimiter_enqueue(isc_ratelimiter_t *rl, isc_task_t *task,
- isc_event_t **eventp);
-/*%<
- * Queue an event for rate-limited execution.
- *
- * This is similar
- * to doing an isc_task_send() to the 'task', except that the
- * execution may be delayed to achieve the desired rate of
- * execution.
- *
- * '(*eventp)->ev_sender' is used to hold the task. The caller
- * must ensure that the task exists until the event is delivered.
- *
- * Requires:
- *\li An interval has been set by calling
- * isc_ratelimiter_setinterval().
- *
- *\li 'task' to be non NULL.
- *\li '(*eventp)->ev_sender' to be NULL.
- */
-
-void
-isc_ratelimiter_shutdown(isc_ratelimiter_t *ratelimiter);
-/*%<
- * Shut down a rate limiter.
- *
- * Ensures:
- *\li All events that have not yet been
- * dispatched to the task are dispatched immediately with
- * the #ISC_EVENTATTR_CANCELED bit set in ev_attributes.
- *
- *\li Further attempts to enqueue events will fail with
- * #ISC_R_SHUTTINGDOWN.
- *
- *\li The rate limiter is no longer attached to its task.
- */
-
-void
-isc_ratelimiter_attach(isc_ratelimiter_t *source, isc_ratelimiter_t **target);
-/*%<
- * Attach to a rate limiter.
- */
-
-void
-isc_ratelimiter_detach(isc_ratelimiter_t **ratelimiterp);
-/*%<
- * Detach from a rate limiter.
- */
-
-isc_result_t
-isc_ratelimiter_stall(isc_ratelimiter_t *rl);
-/*%<
- * Stall event processing.
- */
-
-isc_result_t
-isc_ratelimiter_release(isc_ratelimiter_t *rl);
-/*%<
- * Release a stalled rate limiter.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_RATELIMITER_H */
diff --git a/contrib/ntp/lib/isc/include/isc/refcount.h b/contrib/ntp/lib/isc/include/isc/refcount.h
deleted file mode 100644
index b72b1585be39..000000000000
--- a/contrib/ntp/lib/isc/include/isc/refcount.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001, 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: refcount.h,v 1.17 2009/09/29 23:48:04 tbox Exp $ */
-
-#ifndef ISC_REFCOUNT_H
-#define ISC_REFCOUNT_H 1
-
-#include <isc/atomic.h>
-#include <isc/lang.h>
-#include <isc/mutex.h>
-#include <isc/platform.h>
-#include <isc/types.h>
-#include <isc/util.h>
-
-/*! \file isc/refcount.h
- * \brief Implements a locked reference counter.
- *
- * These functions may actually be
- * implemented using macros, and implementations of these macros are below.
- * The isc_refcount_t type should not be accessed directly, as its contents
- * depend on the implementation.
- */
-
-ISC_LANG_BEGINDECLS
-
-/*
- * Function prototypes
- */
-
-/*
- * isc_result_t
- * isc_refcount_init(isc_refcount_t *ref, unsigned int n);
- *
- * Initialize the reference counter. There will be 'n' initial references.
- *
- * Requires:
- * ref != NULL
- */
-
-/*
- * void
- * isc_refcount_destroy(isc_refcount_t *ref);
- *
- * Destroys a reference counter.
- *
- * Requires:
- * ref != NULL
- * The number of references is 0.
- */
-
-/*
- * void
- * isc_refcount_increment(isc_refcount_t *ref, unsigned int *targetp);
- * isc_refcount_increment0(isc_refcount_t *ref, unsigned int *targetp);
- *
- * Increments the reference count, returning the new value in targetp if it's
- * not NULL. The reference counter typically begins with the initial counter
- * of 1, and will be destroyed once the counter reaches 0. Thus,
- * isc_refcount_increment() additionally requires the previous counter be
- * larger than 0 so that an error which violates the usage can be easily
- * caught. isc_refcount_increment0() does not have this restriction.
- *
- * Requires:
- * ref != NULL.
- */
-
-/*
- * void
- * isc_refcount_decrement(isc_refcount_t *ref, unsigned int *targetp);
- *
- * Decrements the reference count, returning the new value in targetp if it's
- * not NULL.
- *
- * Requires:
- * ref != NULL.
- */
-
-
-/*
- * Sample implementations
- */
-#ifdef ISC_PLATFORM_USETHREADS
-#ifdef ISC_PLATFORM_HAVEXADD
-
-#define ISC_REFCOUNT_HAVEATOMIC 1
-
-typedef struct isc_refcount {
- isc_int32_t refs;
-} isc_refcount_t;
-
-#define isc_refcount_destroy(rp) REQUIRE((rp)->refs == 0)
-#define isc_refcount_current(rp) ((unsigned int)((rp)->refs))
-
-#define isc_refcount_increment0(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- isc_int32_t prev; \
- prev = isc_atomic_xadd(&(rp)->refs, 1); \
- if (_tmp != NULL) \
- *_tmp = prev + 1; \
- } while (0)
-
-#define isc_refcount_increment(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- isc_int32_t prev; \
- prev = isc_atomic_xadd(&(rp)->refs, 1); \
- REQUIRE(prev > 0); \
- if (_tmp != NULL) \
- *_tmp = prev + 1; \
- } while (0)
-
-#define isc_refcount_decrement(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- isc_int32_t prev; \
- prev = isc_atomic_xadd(&(rp)->refs, -1); \
- REQUIRE(prev > 0); \
- if (_tmp != NULL) \
- *_tmp = prev - 1; \
- } while (0)
-
-#else /* ISC_PLATFORM_HAVEXADD */
-
-typedef struct isc_refcount {
- int refs;
- isc_mutex_t lock;
-} isc_refcount_t;
-
-/*% Destroys a reference counter. */
-#define isc_refcount_destroy(rp) \
- do { \
- REQUIRE((rp)->refs == 0); \
- DESTROYLOCK(&(rp)->lock); \
- } while (0)
-
-#define isc_refcount_current(rp) ((unsigned int)((rp)->refs))
-
-/*% Increments the reference count, returning the new value in targetp if it's not NULL. */
-#define isc_refcount_increment0(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- LOCK(&(rp)->lock); \
- ++((rp)->refs); \
- if (_tmp != NULL) \
- *_tmp = ((rp)->refs); \
- UNLOCK(&(rp)->lock); \
- } while (0)
-
-#define isc_refcount_increment(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- LOCK(&(rp)->lock); \
- REQUIRE((rp)->refs > 0); \
- ++((rp)->refs); \
- if (_tmp != NULL) \
- *_tmp = ((rp)->refs); \
- UNLOCK(&(rp)->lock); \
- } while (0)
-
-/*% Decrements the reference count, returning the new value in targetp if it's not NULL. */
-#define isc_refcount_decrement(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- LOCK(&(rp)->lock); \
- REQUIRE((rp)->refs > 0); \
- --((rp)->refs); \
- if (_tmp != NULL) \
- *_tmp = ((rp)->refs); \
- UNLOCK(&(rp)->lock); \
- } while (0)
-
-#endif /* ISC_PLATFORM_HAVEXADD */
-#else /* ISC_PLATFORM_USETHREADS */
-
-typedef struct isc_refcount {
- int refs;
-} isc_refcount_t;
-
-#define isc_refcount_destroy(rp) REQUIRE((rp)->refs == 0)
-#define isc_refcount_current(rp) ((unsigned int)((rp)->refs))
-
-#define isc_refcount_increment0(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- int _n = ++(rp)->refs; \
- if (_tmp != NULL) \
- *_tmp = _n; \
- } while (0)
-
-#define isc_refcount_increment(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- int _n; \
- REQUIRE((rp)->refs > 0); \
- _n = ++(rp)->refs; \
- if (_tmp != NULL) \
- *_tmp = _n; \
- } while (0)
-
-#define isc_refcount_decrement(rp, tp) \
- do { \
- unsigned int *_tmp = (unsigned int *)(tp); \
- int _n; \
- REQUIRE((rp)->refs > 0); \
- _n = --(rp)->refs; \
- if (_tmp != NULL) \
- *_tmp = _n; \
- } while (0)
-
-#endif /* ISC_PLATFORM_USETHREADS */
-
-isc_result_t
-isc_refcount_init(isc_refcount_t *ref, unsigned int n);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_REFCOUNT_H */
diff --git a/contrib/ntp/lib/isc/include/isc/resource.h b/contrib/ntp/lib/isc/include/isc/resource.h
deleted file mode 100644
index 747c9fdf4e5d..000000000000
--- a/contrib/ntp/lib/isc/include/isc/resource.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: resource.h,v 1.13 2008/07/11 23:47:09 tbox Exp $ */
-
-#ifndef ISC_RESOURCE_H
-#define ISC_RESOURCE_H 1
-
-/*! \file isc/resource.h */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-#define ISC_RESOURCE_UNLIMITED ((isc_resourcevalue_t)ISC_UINT64_MAX)
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value);
-/*%<
- * Set the maximum limit for a system resource.
- *
- * Notes:
- *\li If 'value' exceeds the maximum possible on the operating system,
- * it is silently limited to that maximum -- or to "infinity", if
- * the operating system has that concept. #ISC_RESOURCE_UNLIMITED
- * can be used to explicitly ask for the maximum.
- *
- * Requires:
- *\li 'resource' is a valid member of the isc_resource_t enumeration.
- *
- * Returns:
- *\li #ISC_R_SUCCESS Success.
- *\li #ISC_R_NOTIMPLEMENTED 'resource' is not a type known by the OS.
- *\li #ISC_R_NOPERM The calling process did not have adequate permission
- * to change the resource limit.
- */
-
-isc_result_t
-isc_resource_getlimit(isc_resource_t resource, isc_resourcevalue_t *value);
-/*%<
- * Get the maximum limit for a system resource.
- *
- * Notes:
- *\li 'value' is set to the maximum limit.
- *
- *\li #ISC_RESOURCE_UNLIMITED is the maximum value of isc_resourcevalue_t.
- *
- *\li On many (all?) Unix systems, RLIM_INFINITY is a valid value that is
- * significantly less than #ISC_RESOURCE_UNLIMITED, but which in practice
- * behaves the same.
- *
- *\li The current ISC libdns configuration file parser assigns a value
- * of ISC_UINT32_MAX for a size_spec of "unlimited" and ISC_UNIT32_MAX - 1
- * for "default", the latter of which is supposed to represent "the
- * limit that was in force when the server started". Since these are
- * valid values in the middle of the range of isc_resourcevalue_t,
- * there is the possibility for confusion over what exactly those
- * particular values are supposed to represent in a particular context --
- * discrete integral values or generalized concepts.
- *
- * Requires:
- *\li 'resource' is a valid member of the isc_resource_t enumeration.
- *
- * Returns:
- *\li #ISC_R_SUCCESS Success.
- *\li #ISC_R_NOTIMPLEMENTED 'resource' is not a type known by the OS.
- */
-
-isc_result_t
-isc_resource_getcurlimit(isc_resource_t resource, isc_resourcevalue_t *value);
-/*%<
- * Same as isc_resource_getlimit(), but returns the current (soft) limit.
- *
- * Returns:
- *\li #ISC_R_SUCCESS Success.
- *\li #ISC_R_NOTIMPLEMENTED 'resource' is not a type known by the OS.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_RESOURCE_H */
-
diff --git a/contrib/ntp/lib/isc/include/isc/rwlock.h b/contrib/ntp/lib/isc/include/isc/rwlock.h
deleted file mode 100644
index 28052cdd7f8b..000000000000
--- a/contrib/ntp/lib/isc/include/isc/rwlock.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: rwlock.h,v 1.28 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_RWLOCK_H
-#define ISC_RWLOCK_H 1
-
-/*! \file isc/rwlock.h */
-
-#include <isc/condition.h>
-#include <isc/lang.h>
-#include <isc/platform.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-typedef enum {
- isc_rwlocktype_none = 0,
- isc_rwlocktype_read,
- isc_rwlocktype_write
-} isc_rwlocktype_t;
-
-#ifdef ISC_PLATFORM_USETHREADS
-#if defined(ISC_PLATFORM_HAVEXADD) && defined(ISC_PLATFORM_HAVECMPXCHG)
-#define ISC_RWLOCK_USEATOMIC 1
-#endif
-
-struct isc_rwlock {
- /* Unlocked. */
- unsigned int magic;
- isc_mutex_t lock;
-
-#if defined(ISC_PLATFORM_HAVEXADD) && defined(ISC_PLATFORM_HAVECMPXCHG)
- /*
- * When some atomic instructions with hardware assistance are
- * available, rwlock will use those so that concurrent readers do not
- * interfere with each other through mutex as long as no writers
- * appear, massively reducing the lock overhead in the typical case.
- *
- * The basic algorithm of this approach is the "simple
- * writer-preference lock" shown in the following URL:
- * http://www.cs.rochester.edu/u/scott/synchronization/pseudocode/rw.html
- * but our implementation does not rely on the spin lock unlike the
- * original algorithm to be more portable as a user space application.
- */
-
- /* Read or modified atomically. */
- isc_int32_t write_requests;
- isc_int32_t write_completions;
- isc_int32_t cnt_and_flag;
-
- /* Locked by lock. */
- isc_condition_t readable;
- isc_condition_t writeable;
- unsigned int readers_waiting;
-
- /* Locked by rwlock itself. */
- unsigned int write_granted;
-
- /* Unlocked. */
- unsigned int write_quota;
-
-#else /* ISC_PLATFORM_HAVEXADD && ISC_PLATFORM_HAVECMPXCHG */
-
- /*%< Locked by lock. */
- isc_condition_t readable;
- isc_condition_t writeable;
- isc_rwlocktype_t type;
-
- /*% The number of threads that have the lock. */
- unsigned int active;
-
- /*%
- * The number of lock grants made since the lock was last switched
- * from reading to writing or vice versa; used in determining
- * when the quota is reached and it is time to switch.
- */
- unsigned int granted;
-
- unsigned int readers_waiting;
- unsigned int writers_waiting;
- unsigned int read_quota;
- unsigned int write_quota;
- isc_rwlocktype_t original;
-#endif /* ISC_PLATFORM_HAVEXADD && ISC_PLATFORM_HAVECMPXCHG */
-};
-#else /* ISC_PLATFORM_USETHREADS */
-struct isc_rwlock {
- unsigned int magic;
- isc_rwlocktype_t type;
- unsigned int active;
-};
-#endif /* ISC_PLATFORM_USETHREADS */
-
-
-isc_result_t
-isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
- unsigned int write_quota);
-
-isc_result_t
-isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type);
-
-isc_result_t
-isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type);
-
-isc_result_t
-isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type);
-
-isc_result_t
-isc_rwlock_tryupgrade(isc_rwlock_t *rwl);
-
-void
-isc_rwlock_downgrade(isc_rwlock_t *rwl);
-
-void
-isc_rwlock_destroy(isc_rwlock_t *rwl);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_RWLOCK_H */
diff --git a/contrib/ntp/lib/isc/include/isc/serial.h b/contrib/ntp/lib/isc/include/isc/serial.h
deleted file mode 100644
index a5e03970c3e6..000000000000
--- a/contrib/ntp/lib/isc/include/isc/serial.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: serial.h,v 1.18 2009/01/18 23:48:14 tbox Exp $ */
-
-#ifndef ISC_SERIAL_H
-#define ISC_SERIAL_H 1
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-/*! \file isc/serial.h
- * \brief Implement 32 bit serial space arithmetic comparison functions.
- * Note: Undefined results are returned as ISC_FALSE.
- */
-
-/***
- *** Functions
- ***/
-
-ISC_LANG_BEGINDECLS
-
-isc_boolean_t
-isc_serial_lt(isc_uint32_t a, isc_uint32_t b);
-/*%<
- * Return true if 'a' < 'b' otherwise false.
- */
-
-isc_boolean_t
-isc_serial_gt(isc_uint32_t a, isc_uint32_t b);
-/*%<
- * Return true if 'a' > 'b' otherwise false.
- */
-
-isc_boolean_t
-isc_serial_le(isc_uint32_t a, isc_uint32_t b);
-/*%<
- * Return true if 'a' <= 'b' otherwise false.
- */
-
-isc_boolean_t
-isc_serial_ge(isc_uint32_t a, isc_uint32_t b);
-/*%<
- * Return true if 'a' >= 'b' otherwise false.
- */
-
-isc_boolean_t
-isc_serial_eq(isc_uint32_t a, isc_uint32_t b);
-/*%<
- * Return true if 'a' == 'b' otherwise false.
- */
-
-isc_boolean_t
-isc_serial_ne(isc_uint32_t a, isc_uint32_t b);
-/*%<
- * Return true if 'a' != 'b' otherwise false.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_SERIAL_H */
diff --git a/contrib/ntp/lib/isc/include/isc/sha2.h b/contrib/ntp/lib/isc/include/isc/sha2.h
deleted file mode 100644
index 0c9dea8eb3d7..000000000000
--- a/contrib/ntp/lib/isc/include/isc/sha2.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2005-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: sha2.h,v 1.12 2009/10/22 02:21:31 each Exp $ */
-
-/* $FreeBSD: 258945 2013-12-04 21:33:17Z roberto $ */
-/* $KAME: sha2.h,v 1.3 2001/03/12 08:27:48 itojun Exp $ */
-
-/*
- * sha2.h
- *
- * Version 1.0.0beta1
- *
- * Written by Aaron D. Gifford <me@aarongifford.com>
- *
- * Copyright 2000 Aaron D. Gifford. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#ifndef ISC_SHA2_H
-#define ISC_SHA2_H
-
-#include <isc/lang.h>
-#include <isc/platform.h>
-#include <isc/types.h>
-
-/*** SHA-224/256/384/512 Various Length Definitions ***********************/
-
-#define ISC_SHA224_BLOCK_LENGTH 64U
-#define ISC_SHA224_DIGESTLENGTH 28U
-#define ISC_SHA224_DIGESTSTRINGLENGTH (ISC_SHA224_DIGESTLENGTH * 2 + 1)
-#define ISC_SHA256_BLOCK_LENGTH 64U
-#define ISC_SHA256_DIGESTLENGTH 32U
-#define ISC_SHA256_DIGESTSTRINGLENGTH (ISC_SHA256_DIGESTLENGTH * 2 + 1)
-#define ISC_SHA384_BLOCK_LENGTH 128
-#define ISC_SHA384_DIGESTLENGTH 48U
-#define ISC_SHA384_DIGESTSTRINGLENGTH (ISC_SHA384_DIGESTLENGTH * 2 + 1)
-#define ISC_SHA512_BLOCK_LENGTH 128U
-#define ISC_SHA512_DIGESTLENGTH 64U
-#define ISC_SHA512_DIGESTSTRINGLENGTH (ISC_SHA512_DIGESTLENGTH * 2 + 1)
-
-/*** SHA-256/384/512 Context Structures *******************************/
-
-#ifdef ISC_PLATFORM_OPENSSLHASH
-#include <openssl/evp.h>
-
-typedef EVP_MD_CTX isc_sha256_t;
-typedef EVP_MD_CTX isc_sha512_t;
-
-#else
-
-/*
- * Keep buffer immediately after bitcount to preserve alignment.
- */
-typedef struct {
- isc_uint32_t state[8];
- isc_uint64_t bitcount;
- isc_uint8_t buffer[ISC_SHA256_BLOCK_LENGTH];
-} isc_sha256_t;
-
-/*
- * Keep buffer immediately after bitcount to preserve alignment.
- */
-typedef struct {
- isc_uint64_t state[8];
- isc_uint64_t bitcount[2];
- isc_uint8_t buffer[ISC_SHA512_BLOCK_LENGTH];
-} isc_sha512_t;
-#endif
-
-typedef isc_sha256_t isc_sha224_t;
-typedef isc_sha512_t isc_sha384_t;
-
-ISC_LANG_BEGINDECLS
-
-/*** SHA-224/256/384/512 Function Prototypes ******************************/
-
-void isc_sha224_init (isc_sha224_t *);
-void isc_sha224_invalidate (isc_sha224_t *);
-void isc_sha224_update (isc_sha224_t *, const isc_uint8_t *, size_t);
-void isc_sha224_final (isc_uint8_t[ISC_SHA224_DIGESTLENGTH], isc_sha224_t *);
-char *isc_sha224_end (isc_sha224_t *, char[ISC_SHA224_DIGESTSTRINGLENGTH]);
-char *isc_sha224_data (const isc_uint8_t *, size_t, char[ISC_SHA224_DIGESTSTRINGLENGTH]);
-
-void isc_sha256_init (isc_sha256_t *);
-void isc_sha256_invalidate (isc_sha256_t *);
-void isc_sha256_update (isc_sha256_t *, const isc_uint8_t *, size_t);
-void isc_sha256_final (isc_uint8_t[ISC_SHA256_DIGESTLENGTH], isc_sha256_t *);
-char *isc_sha256_end (isc_sha256_t *, char[ISC_SHA256_DIGESTSTRINGLENGTH]);
-char *isc_sha256_data (const isc_uint8_t *, size_t, char[ISC_SHA256_DIGESTSTRINGLENGTH]);
-
-void isc_sha384_init (isc_sha384_t *);
-void isc_sha384_invalidate (isc_sha384_t *);
-void isc_sha384_update (isc_sha384_t *, const isc_uint8_t *, size_t);
-void isc_sha384_final (isc_uint8_t[ISC_SHA384_DIGESTLENGTH], isc_sha384_t *);
-char *isc_sha384_end (isc_sha384_t *, char[ISC_SHA384_DIGESTSTRINGLENGTH]);
-char *isc_sha384_data (const isc_uint8_t *, size_t, char[ISC_SHA384_DIGESTSTRINGLENGTH]);
-
-void isc_sha512_init (isc_sha512_t *);
-void isc_sha512_invalidate (isc_sha512_t *);
-void isc_sha512_update (isc_sha512_t *, const isc_uint8_t *, size_t);
-void isc_sha512_final (isc_uint8_t[ISC_SHA512_DIGESTLENGTH], isc_sha512_t *);
-char *isc_sha512_end (isc_sha512_t *, char[ISC_SHA512_DIGESTSTRINGLENGTH]);
-char *isc_sha512_data (const isc_uint8_t *, size_t, char[ISC_SHA512_DIGESTSTRINGLENGTH]);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_SHA2_H */
diff --git a/contrib/ntp/lib/isc/include/isc/stats.h b/contrib/ntp/lib/isc/include/isc/stats.h
deleted file mode 100644
index 682eefdedf13..000000000000
--- a/contrib/ntp/lib/isc/include/isc/stats.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#ifndef ISC_STATS_H
-#define ISC_STATS_H 1
-
-/*! \file isc/stats.h */
-
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-/*%<
- * Flag(s) for isc_stats_dump().
- */
-#define ISC_STATSDUMP_VERBOSE 0x00000001 /*%< dump 0-value counters */
-
-/*%<
- * Dump callback type.
- */
-typedef void (*isc_stats_dumper_t)(isc_statscounter_t, isc_uint64_t, void *);
-
-isc_result_t
-isc_stats_create(isc_mem_t *mctx, isc_stats_t **statsp, int ncounters);
-/*%<
- * Create a statistics counter structure of general type. It counts a general
- * set of counters indexed by an ID between 0 and ncounters -1.
- *
- * Requires:
- *\li 'mctx' must be a valid memory context.
- *
- *\li 'statsp' != NULL && '*statsp' == NULL.
- *
- * Returns:
- *\li ISC_R_SUCCESS -- all ok
- *
- *\li anything else -- failure
- */
-
-void
-isc_stats_attach(isc_stats_t *stats, isc_stats_t **statsp);
-/*%<
- * Attach to a statistics set.
- *
- * Requires:
- *\li 'stats' is a valid isc_stats_t.
- *
- *\li 'statsp' != NULL && '*statsp' == NULL
- */
-
-void
-isc_stats_detach(isc_stats_t **statsp);
-/*%<
- * Detaches from the statistics set.
- *
- * Requires:
- *\li 'statsp' != NULL and '*statsp' is a valid isc_stats_t.
- */
-
-int
-isc_stats_ncounters(isc_stats_t *stats);
-/*%<
- * Returns the number of counters contained in stats.
- *
- * Requires:
- *\li 'stats' is a valid isc_stats_t.
- *
- */
-
-void
-isc_stats_increment(isc_stats_t *stats, isc_statscounter_t counter);
-/*%<
- * Increment the counter-th counter of stats.
- *
- * Requires:
- *\li 'stats' is a valid isc_stats_t.
- *
- *\li counter is less than the maximum available ID for the stats specified
- * on creation.
- */
-
-void
-isc_stats_decrement(isc_stats_t *stats, isc_statscounter_t counter);
-/*%<
- * Decrement the counter-th counter of stats.
- *
- * Requires:
- *\li 'stats' is a valid isc_stats_t.
- */
-
-void
-isc_stats_dump(isc_stats_t *stats, isc_stats_dumper_t dump_fn, void *arg,
- unsigned int options);
-/*%<
- * Dump the current statistics counters in a specified way. For each counter
- * in stats, dump_fn is called with its current value and the given argument
- * arg. By default counters that have a value of 0 is skipped; if options has
- * the ISC_STATSDUMP_VERBOSE flag, even such counters are dumped.
- *
- * Requires:
- *\li 'stats' is a valid isc_stats_t.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_STATS_H */
diff --git a/contrib/ntp/lib/isc/include/isc/stdlib.h b/contrib/ntp/lib/isc/include/isc/stdlib.h
deleted file mode 100644
index 02243f0863ec..000000000000
--- a/contrib/ntp/lib/isc/include/isc/stdlib.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: stdlib.h,v 1.8 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_STDLIB_H
-#define ISC_STDLIB_H 1
-
-/*! \file isc/stdlib.h */
-
-#include <stdlib.h>
-
-#include <isc/lang.h>
-#include <isc/platform.h>
-
-#ifdef ISC_PLATFORM_NEEDSTRTOUL
-#define strtoul isc_strtoul
-#endif
-
-ISC_LANG_BEGINDECLS
-
-unsigned long isc_strtoul(const char *, char **, int);
-
-ISC_LANG_ENDDECLS
-
-#endif
diff --git a/contrib/ntp/lib/isc/include/isc/symtab.h b/contrib/ntp/lib/isc/include/isc/symtab.h
deleted file mode 100644
index 9d0e5e2f23f0..000000000000
--- a/contrib/ntp/lib/isc/include/isc/symtab.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1996-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#ifndef ISC_SYMTAB_H
-#define ISC_SYMTAB_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/symtab.h
- * \brief Provides a simple memory-based symbol table.
- *
- * Keys are C strings, and key comparisons are case-insensitive. A type may
- * be specified when looking up, defining, or undefining. A type value of
- * 0 means "match any type"; any other value will only match the given
- * type.
- *
- * It's possible that a client will attempt to define a <key, type, value>
- * tuple when a tuple with the given key and type already exists in the table.
- * What to do in this case is specified by the client. Possible policies are:
- *
- *\li #isc_symexists_reject Disallow the define, returning #ISC_R_EXISTS
- *\li #isc_symexists_replace Replace the old value with the new. The
- * undefine action (if provided) will be called
- * with the old <key, type, value> tuple.
- *\li #isc_symexists_add Add the new tuple, leaving the old tuple in
- * the table. Subsequent lookups will retrieve
- * the most-recently-defined tuple.
- *
- * A lookup of a key using type 0 will return the most-recently defined
- * symbol with that key. An undefine of a key using type 0 will undefine the
- * most-recently defined symbol with that key. Trying to define a key with
- * type 0 is illegal.
- *
- * The symbol table library does not make a copy the key field, so the
- * caller must ensure that any key it passes to isc_symtab_define() will not
- * change until it calls isc_symtab_undefine() or isc_symtab_destroy().
- *
- * A user-specified action will be called (if provided) when a symbol is
- * undefined. It can be used to free memory associated with keys and/or
- * values.
- *
- * A symbol table is implemented as a hash table of lists; the size of the
- * hash table is set by the 'size' parameter to isc_symtbl_create(). When
- * the number of entries in the symbol table reaches three quarters of this
- * value, the hash table is reallocated with size doubled, in order to
- * optimize lookup performance. This has a negative effect on insertion
- * performance, which can be mitigated by sizing the table appropriately
- * when creating it.
- *
- * \li MP:
- * The callers of this module must ensure any required synchronization.
- *
- * \li Reliability:
- * No anticipated impact.
- *
- * \li Resources:
- * TBS
- *
- * \li Security:
- * No anticipated impact.
- *
- * \li Standards:
- * None.
- */
-
-/***
- *** Imports.
- ***/
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-/*
- *** Symbol Tables.
- ***/
-/*% Symbol table value. */
-typedef union isc_symvalue {
- void * as_pointer;
- const void * as_cpointer;
- int as_integer;
- unsigned int as_uinteger;
-} isc_symvalue_t;
-
-typedef void (*isc_symtabaction_t)(char *key, unsigned int type,
- isc_symvalue_t value, void *userarg);
-/*% Symbol table exists. */
-typedef enum {
- isc_symexists_reject = 0, /*%< Disallow the define */
- isc_symexists_replace = 1, /*%< Replace the old value with the new */
- isc_symexists_add = 2 /*%< Add the new tuple */
-} isc_symexists_t;
-
-ISC_LANG_BEGINDECLS
-
-/*% Create a symbol table. */
-isc_result_t
-isc_symtab_create(isc_mem_t *mctx, unsigned int size,
- isc_symtabaction_t undefine_action, void *undefine_arg,
- isc_boolean_t case_sensitive, isc_symtab_t **symtabp);
-
-/*% Destroy a symbol table. */
-void
-isc_symtab_destroy(isc_symtab_t **symtabp);
-
-/*% Lookup a symbol table. */
-isc_result_t
-isc_symtab_lookup(isc_symtab_t *symtab, const char *key, unsigned int type,
- isc_symvalue_t *value);
-
-/*% Define a symbol table. */
-isc_result_t
-isc_symtab_define(isc_symtab_t *symtab, const char *key, unsigned int type,
- isc_symvalue_t value, isc_symexists_t exists_policy);
-
-/*% Undefine a symbol table. */
-isc_result_t
-isc_symtab_undefine(isc_symtab_t *symtab, const char *key, unsigned int type);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_SYMTAB_H */
diff --git a/contrib/ntp/lib/isc/include/isc/taskpool.h b/contrib/ntp/lib/isc/include/isc/taskpool.h
deleted file mode 100644
index 46f395ea246f..000000000000
--- a/contrib/ntp/lib/isc/include/isc/taskpool.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#ifndef ISC_TASKPOOL_H
-#define ISC_TASKPOOL_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/taskpool.h
- * \brief A task pool is a mechanism for sharing a small number of tasks
- * among a large number of objects such that each object is
- * assigned a unique task, but each task may be shared by several
- * objects.
- *
- * Task pools are used to let objects that can exist in large
- * numbers (e.g., zones) use tasks for synchronization without
- * the memory overhead and unfair scheduling competition that
- * could result from creating a separate task for each object.
- */
-
-
-/***
- *** Imports.
- ***/
-
-#include <isc/lang.h>
-#include <isc/task.h>
-
-ISC_LANG_BEGINDECLS
-
-/*****
- ***** Types.
- *****/
-
-typedef struct isc_taskpool isc_taskpool_t;
-
-/*****
- ***** Functions.
- *****/
-
-isc_result_t
-isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
- unsigned int ntasks, unsigned int quantum,
- isc_taskpool_t **poolp);
-/*%<
- * Create a task pool of "ntasks" tasks, each with quantum
- * "quantum".
- *
- * Requires:
- *
- *\li 'tmgr' is a valid task manager.
- *
- *\li 'mctx' is a valid memory context.
- *
- *\li poolp != NULL && *poolp == NULL
- *
- * Ensures:
- *
- *\li On success, '*taskp' points to the new task pool.
- *
- * Returns:
- *
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMEMORY
- *\li #ISC_R_UNEXPECTED
- */
-
-void
-isc_taskpool_gettask(isc_taskpool_t *pool, isc_task_t **targetp);
-/*%<
- * Attach to a task from the pool. Currently the next task is chosen
- * from the pool at random. (This may be changed in the future to
- * something that guaratees balance.)
- */
-
-int
-isc_taskpool_size(isc_taskpool_t *pool);
-/*%<
- * Returns the number of tasks in the task pool 'pool'.
- */
-
-isc_result_t
-isc_taskpool_expand(isc_taskpool_t **sourcep, unsigned int size,
- isc_taskpool_t **targetp);
-
-/*%<
- * If 'size' is larger than the number of tasks in the pool pointed to by
- * 'sourcep', then a new taskpool of size 'size' is allocated, the existing
- * tasks from are moved into it, additional tasks are created to bring the
- * total number up to 'size', and the resulting pool is attached to
- * 'targetp'.
- *
- * If 'size' is less than or equal to the tasks in pool 'source', then
- * 'sourcep' is attached to 'targetp' without any other action being taken.
- *
- * In either case, 'sourcep' is detached.
- *
- * Requires:
- *
- * \li 'sourcep' is not NULL and '*source' is not NULL
- * \li 'targetp' is not NULL and '*source' is NULL
- *
- * Ensures:
- *
- * \li On success, '*targetp' points to a valid task pool.
- * \li On success, '*sourcep' points to NULL.
- *
- * Returns:
- *
- * \li #ISC_R_SUCCESS
- * \li #ISC_R_NOMEMORY
- */
-
-void
-isc_taskpool_destroy(isc_taskpool_t **poolp);
-/*%<
- * Destroy a task pool. The tasks in the pool are detached but not
- * shut down.
- *
- * Requires:
- * \li '*poolp' is a valid task pool.
- */
-
-void
-isc_taskpool_setprivilege(isc_taskpool_t *pool, isc_boolean_t priv);
-/*%<
- * Set the privilege flag on all tasks in 'pool' to 'priv'. If 'priv' is
- * true, then when the task manager is set into privileged mode, only
- * tasks wihin this pool will be able to execute. (Note: It is important
- * to turn the pool tasks' privilege back off before the last task finishes
- * executing.)
- *
- * Requires:
- * \li 'pool' is a valid task pool.
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_TASKPOOL_H */
diff --git a/contrib/ntp/lib/isc/include/isc/version.h b/contrib/ntp/lib/isc/include/isc/version.h
deleted file mode 100644
index ec00bdea7b24..000000000000
--- a/contrib/ntp/lib/isc/include/isc/version.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: version.h,v 1.9 2007/06/19 23:47:18 tbox Exp $ */
-
-/*! \file isc/version.h */
-
-#include <isc/platform.h>
-
-LIBISC_EXTERNAL_DATA extern const char isc_version[];
-
-LIBISC_EXTERNAL_DATA extern const unsigned int isc_libinterface;
-LIBISC_EXTERNAL_DATA extern const unsigned int isc_librevision;
-LIBISC_EXTERNAL_DATA extern const unsigned int isc_libage;
diff --git a/contrib/ntp/lib/isc/inet_aton.c b/contrib/ntp/lib/isc/inet_aton.c
deleted file mode 100644
index 3fc3a4db87a5..000000000000
--- a/contrib/ntp/lib/isc/inet_aton.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Portions Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (C) 1996-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * Copyright (c) 1983, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-/*! \file */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$Id: inet_aton.c,v 1.23 2008/12/01 23:47:45 tbox Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <config.h>
-
-#include <ctype.h>
-#include <stddef.h> /* Required for NULL. */
-
-#include <isc/types.h>
-#include <isc/net.h>
-
-/*%
- * Check whether "cp" is a valid ascii representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-int
-isc_net_aton(const char *cp, struct in_addr *addr) {
- unsigned long val;
- int base;
- unsigned char c;
- isc_uint8_t parts[4];
- isc_uint8_t *pp = parts;
- int digit;
-
- c = *cp;
- for (;;) {
- /*
- * Collect number up to ``.''.
- * Values are specified as for C:
- * 0x=hex, 0=octal, isdigit=decimal.
- */
- if (!isdigit(c & 0xff))
- return (0);
- val = 0; base = 10; digit = 0;
- if (c == '0') {
- c = *++cp;
- if (c == 'x' || c == 'X')
- base = 16, c = *++cp;
- else {
- base = 8;
- digit = 1;
- }
- }
- for (;;) {
- /*
- * isascii() is valid for all integer values, and
- * when it is true, c is known to be in scope
- * for isdigit(). No cast necessary. Similar
- * comment applies for later ctype uses.
- */
- if (isascii(c) && isdigit(c)) {
- if (base == 8 && (c == '8' || c == '9'))
- return (0);
- val = (val * base) + (c - '0');
- c = *++cp;
- digit = 1;
- } else if (base == 16 && isascii(c) && isxdigit(c)) {
- val = (val << 4) |
- (c + 10 - (islower(c) ? 'a' : 'A'));
- c = *++cp;
- digit = 1;
- } else
- break;
- }
- if (c == '.') {
- /*
- * Internet format:
- * a.b.c.d
- * a.b.c (with c treated as 16 bits)
- * a.b (with b treated as 24 bits)
- */
- if (pp >= parts + 3 || val > 0xffU)
- return (0);
- *pp++ = (isc_uint8_t)val;
- c = *++cp;
- } else
- break;
- }
- /*
- * Check for trailing characters.
- */
- if (c != '\0' && (!isascii(c) || !isspace(c)))
- return (0);
- /*
- * Did we get a valid digit?
- */
- if (!digit)
- return (0);
- /*
- * Concoct the address according to
- * the number of parts specified.
- */
- switch (pp - parts + 1) {
- case 1: /* a -- 32 bits */
- break;
-
- case 2: /* a.b -- 8.24 bits */
- if (val > 0xffffffU)
- return (0);
- val |= parts[0] << 24;
- break;
-
- case 3: /* a.b.c -- 8.8.16 bits */
- if (val > 0xffffU)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
- break;
-
- case 4: /* a.b.c.d -- 8.8.8.8 bits */
- if (val > 0xffU)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
- break;
- }
- if (addr != NULL)
- addr->s_addr = htonl(val);
-
- return (1);
-}
diff --git a/contrib/ntp/lib/isc/iterated_hash.c b/contrib/ntp/lib/isc/iterated_hash.c
deleted file mode 100644
index 86dedde2880c..000000000000
--- a/contrib/ntp/lib/isc/iterated_hash.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2006, 2008, 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: iterated_hash.c,v 1.6 2009/02/18 23:47:48 tbox Exp $ */
-
-#include "config.h"
-
-#include <stdio.h>
-
-#include <isc/sha1.h>
-#include <isc/iterated_hash.h>
-
-int
-isc_iterated_hash(unsigned char out[ISC_SHA1_DIGESTLENGTH],
- unsigned int hashalg, int iterations,
- const unsigned char *salt, int saltlength,
- const unsigned char *in, int inlength)
-{
- isc_sha1_t ctx;
- int n = 0;
-
- if (hashalg != 1)
- return (0);
-
- do {
- isc_sha1_init(&ctx);
- isc_sha1_update(&ctx, in, inlength);
- isc_sha1_update(&ctx, salt, saltlength);
- isc_sha1_final(&ctx, out);
- in = out;
- inlength = ISC_SHA1_DIGESTLENGTH;
- } while (n++ < iterations);
-
- return (ISC_SHA1_DIGESTLENGTH);
-}
diff --git a/contrib/ntp/lib/isc/lex.c b/contrib/ntp/lib/isc/lex.c
deleted file mode 100644
index 8749ed0b0ba3..000000000000
--- a/contrib/ntp/lib/isc/lex.c
+++ /dev/null
@@ -1,959 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: lex.c,v 1.86 2007/09/17 09:56:29 shane Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include <isc/buffer.h>
-#include <isc/file.h>
-#include <isc/lex.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/parseint.h>
-#include <isc/print.h>
-#include <isc/stdio.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-typedef struct inputsource {
- isc_result_t result;
- isc_boolean_t is_file;
- isc_boolean_t need_close;
- isc_boolean_t at_eof;
- isc_buffer_t * pushback;
- unsigned int ignored;
- void * input;
- char * name;
- unsigned long line;
- unsigned long saved_line;
- ISC_LINK(struct inputsource) link;
-} inputsource;
-
-#define LEX_MAGIC ISC_MAGIC('L', 'e', 'x', '!')
-#define VALID_LEX(l) ISC_MAGIC_VALID(l, LEX_MAGIC)
-
-struct isc_lex {
- /* Unlocked. */
- unsigned int magic;
- isc_mem_t * mctx;
- size_t max_token;
- char * data;
- unsigned int comments;
- isc_boolean_t comment_ok;
- isc_boolean_t last_was_eol;
- unsigned int paren_count;
- unsigned int saved_paren_count;
- isc_lexspecials_t specials;
- LIST(struct inputsource) sources;
-};
-
-static inline isc_result_t
-grow_data(isc_lex_t *lex, size_t *remainingp, char **currp, char **prevp) {
- char *new;
-
- new = isc_mem_get(lex->mctx, lex->max_token * 2 + 1);
- if (new == NULL)
- return (ISC_R_NOMEMORY);
- memcpy(new, lex->data, lex->max_token + 1);
- *currp = new + (*currp - lex->data);
- if (*prevp != NULL)
- *prevp = new + (*prevp - lex->data);
- isc_mem_put(lex->mctx, lex->data, lex->max_token + 1);
- lex->data = new;
- *remainingp += lex->max_token;
- lex->max_token *= 2;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_lex_create(isc_mem_t *mctx, size_t max_token, isc_lex_t **lexp) {
- isc_lex_t *lex;
-
- /*
- * Create a lexer.
- */
-
- REQUIRE(lexp != NULL && *lexp == NULL);
- REQUIRE(max_token > 0U);
-
- lex = isc_mem_get(mctx, sizeof(*lex));
- if (lex == NULL)
- return (ISC_R_NOMEMORY);
- lex->data = isc_mem_get(mctx, max_token + 1);
- if (lex->data == NULL) {
- isc_mem_put(mctx, lex, sizeof(*lex));
- return (ISC_R_NOMEMORY);
- }
- lex->mctx = mctx;
- lex->max_token = max_token;
- lex->comments = 0;
- lex->comment_ok = ISC_TRUE;
- lex->last_was_eol = ISC_TRUE;
- lex->paren_count = 0;
- lex->saved_paren_count = 0;
- memset(lex->specials, 0, 256);
- INIT_LIST(lex->sources);
- lex->magic = LEX_MAGIC;
-
- *lexp = lex;
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_lex_destroy(isc_lex_t **lexp) {
- isc_lex_t *lex;
-
- /*
- * Destroy the lexer.
- */
-
- REQUIRE(lexp != NULL);
- lex = *lexp;
- REQUIRE(VALID_LEX(lex));
-
- while (!EMPTY(lex->sources))
- RUNTIME_CHECK(isc_lex_close(lex) == ISC_R_SUCCESS);
- if (lex->data != NULL)
- isc_mem_put(lex->mctx, lex->data, lex->max_token + 1);
- lex->magic = 0;
- isc_mem_put(lex->mctx, lex, sizeof(*lex));
-
- *lexp = NULL;
-}
-
-unsigned int
-isc_lex_getcomments(isc_lex_t *lex) {
- /*
- * Return the current lexer commenting styles.
- */
-
- REQUIRE(VALID_LEX(lex));
-
- return (lex->comments);
-}
-
-void
-isc_lex_setcomments(isc_lex_t *lex, unsigned int comments) {
- /*
- * Set allowed lexer commenting styles.
- */
-
- REQUIRE(VALID_LEX(lex));
-
- lex->comments = comments;
-}
-
-void
-isc_lex_getspecials(isc_lex_t *lex, isc_lexspecials_t specials) {
- /*
- * Put the current list of specials into 'specials'.
- */
-
- REQUIRE(VALID_LEX(lex));
-
- memcpy(specials, lex->specials, 256);
-}
-
-void
-isc_lex_setspecials(isc_lex_t *lex, isc_lexspecials_t specials) {
- /*
- * The characters in 'specials' are returned as tokens. Along with
- * whitespace, they delimit strings and numbers.
- */
-
- REQUIRE(VALID_LEX(lex));
-
- memcpy(lex->specials, specials, 256);
-}
-
-static inline isc_result_t
-new_source(isc_lex_t *lex, isc_boolean_t is_file, isc_boolean_t need_close,
- void *input, const char *name)
-{
- inputsource *source;
- isc_result_t result;
-
- source = isc_mem_get(lex->mctx, sizeof(*source));
- if (source == NULL)
- return (ISC_R_NOMEMORY);
- source->result = ISC_R_SUCCESS;
- source->is_file = is_file;
- source->need_close = need_close;
- source->at_eof = ISC_FALSE;
- source->input = input;
- source->name = isc_mem_strdup(lex->mctx, name);
- if (source->name == NULL) {
- isc_mem_put(lex->mctx, source, sizeof(*source));
- return (ISC_R_NOMEMORY);
- }
- source->pushback = NULL;
- result = isc_buffer_allocate(lex->mctx, &source->pushback,
- lex->max_token);
- if (result != ISC_R_SUCCESS) {
- isc_mem_free(lex->mctx, source->name);
- isc_mem_put(lex->mctx, source, sizeof(*source));
- return (result);
- }
- source->ignored = 0;
- source->line = 1;
- ISC_LIST_INITANDPREPEND(lex->sources, source, link);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_lex_openfile(isc_lex_t *lex, const char *filename) {
- isc_result_t result;
- FILE *stream = NULL;
-
- /*
- * Open 'filename' and make it the current input source for 'lex'.
- */
-
- REQUIRE(VALID_LEX(lex));
-
- result = isc_stdio_open(filename, "r", &stream);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- result = new_source(lex, ISC_TRUE, ISC_TRUE, stream, filename);
- if (result != ISC_R_SUCCESS)
- (void)fclose(stream);
- return (result);
-}
-
-isc_result_t
-isc_lex_openstream(isc_lex_t *lex, FILE *stream) {
- char name[128];
-
- /*
- * Make 'stream' the current input source for 'lex'.
- */
-
- REQUIRE(VALID_LEX(lex));
-
- snprintf(name, sizeof(name), "stream-%p", stream);
-
- return (new_source(lex, ISC_TRUE, ISC_FALSE, stream, name));
-}
-
-isc_result_t
-isc_lex_openbuffer(isc_lex_t *lex, isc_buffer_t *buffer) {
- char name[128];
-
- /*
- * Make 'buffer' the current input source for 'lex'.
- */
-
- REQUIRE(VALID_LEX(lex));
-
- snprintf(name, sizeof(name), "buffer-%p", buffer);
-
- return (new_source(lex, ISC_FALSE, ISC_FALSE, buffer, name));
-}
-
-isc_result_t
-isc_lex_close(isc_lex_t *lex) {
- inputsource *source;
-
- /*
- * Close the most recently opened object (i.e. file or buffer).
- */
-
- REQUIRE(VALID_LEX(lex));
-
- source = HEAD(lex->sources);
- if (source == NULL)
- return (ISC_R_NOMORE);
-
- ISC_LIST_UNLINK(lex->sources, source, link);
- if (source->is_file) {
- if (source->need_close)
- (void)fclose((FILE *)(source->input));
- }
- isc_mem_free(lex->mctx, source->name);
- isc_buffer_free(&source->pushback);
- isc_mem_put(lex->mctx, source, sizeof(*source));
-
- return (ISC_R_SUCCESS);
-}
-
-typedef enum {
- lexstate_start,
- lexstate_crlf,
- lexstate_string,
- lexstate_number,
- lexstate_maybecomment,
- lexstate_ccomment,
- lexstate_ccommentend,
- lexstate_eatline,
- lexstate_qstring
-} lexstate;
-
-#define IWSEOL (ISC_LEXOPT_INITIALWS | ISC_LEXOPT_EOL)
-
-static void
-pushback(inputsource *source, int c) {
- REQUIRE(source->pushback->current > 0);
- if (c == EOF) {
- source->at_eof = ISC_FALSE;
- return;
- }
- source->pushback->current--;
- if (c == '\n')
- source->line--;
-}
-
-static isc_result_t
-pushandgrow(isc_lex_t *lex, inputsource *source, int c) {
- if (isc_buffer_availablelength(source->pushback) == 0) {
- isc_buffer_t *tbuf = NULL;
- unsigned int oldlen;
- isc_region_t used;
- isc_result_t result;
-
- oldlen = isc_buffer_length(source->pushback);
- result = isc_buffer_allocate(lex->mctx, &tbuf, oldlen * 2);
- if (result != ISC_R_SUCCESS)
- return (result);
- isc_buffer_usedregion(source->pushback, &used);
- result = isc_buffer_copyregion(tbuf, &used);
- INSIST(result == ISC_R_SUCCESS);
- tbuf->current = source->pushback->current;
- isc_buffer_free(&source->pushback);
- source->pushback = tbuf;
- }
- isc_buffer_putuint8(source->pushback, (isc_uint8_t)c);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
- inputsource *source;
- int c;
- isc_boolean_t done = ISC_FALSE;
- isc_boolean_t no_comments = ISC_FALSE;
- isc_boolean_t escaped = ISC_FALSE;
- lexstate state = lexstate_start;
- lexstate saved_state = lexstate_start;
- isc_buffer_t *buffer;
- FILE *stream;
- char *curr, *prev;
- size_t remaining;
- isc_uint32_t as_ulong;
- unsigned int saved_options;
- isc_result_t result;
-
- /*
- * Get the next token.
- */
-
- REQUIRE(VALID_LEX(lex));
- source = HEAD(lex->sources);
- REQUIRE(tokenp != NULL);
-
- if (source == NULL) {
- if ((options & ISC_LEXOPT_NOMORE) != 0) {
- tokenp->type = isc_tokentype_nomore;
- return (ISC_R_SUCCESS);
- }
- return (ISC_R_NOMORE);
- }
-
- if (source->result != ISC_R_SUCCESS)
- return (source->result);
-
- lex->saved_paren_count = lex->paren_count;
- source->saved_line = source->line;
-
- if (isc_buffer_remaininglength(source->pushback) == 0 &&
- source->at_eof)
- {
- if ((options & ISC_LEXOPT_DNSMULTILINE) != 0 &&
- lex->paren_count != 0) {
- lex->paren_count = 0;
- return (ISC_R_UNBALANCED);
- }
- if ((options & ISC_LEXOPT_EOF) != 0) {
- tokenp->type = isc_tokentype_eof;
- return (ISC_R_SUCCESS);
- }
- return (ISC_R_EOF);
- }
-
- isc_buffer_compact(source->pushback);
-
- saved_options = options;
- if ((options & ISC_LEXOPT_DNSMULTILINE) != 0 && lex->paren_count > 0)
- options &= ~IWSEOL;
-
- curr = lex->data;
- *curr = '\0';
-
- prev = NULL;
- remaining = lex->max_token;
-
-#ifdef HAVE_FLOCKFILE
- if (source->is_file)
- flockfile(source->input);
-#endif
-
- do {
- if (isc_buffer_remaininglength(source->pushback) == 0) {
- if (source->is_file) {
- stream = source->input;
-
-#if defined(HAVE_FLOCKFILE) && defined(HAVE_GETCUNLOCKED)
- c = getc_unlocked(stream);
-#else
- c = getc(stream);
-#endif
- if (c == EOF) {
- if (ferror(stream)) {
- source->result = ISC_R_IOERROR;
- result = source->result;
- goto done;
- }
- source->at_eof = ISC_TRUE;
- }
- } else {
- buffer = source->input;
-
- if (buffer->current == buffer->used) {
- c = EOF;
- source->at_eof = ISC_TRUE;
- } else {
- c = *((char *)buffer->base +
- buffer->current);
- buffer->current++;
- }
- }
- if (c != EOF) {
- source->result = pushandgrow(lex, source, c);
- if (source->result != ISC_R_SUCCESS) {
- result = source->result;
- goto done;
- }
- }
- }
-
- if (!source->at_eof) {
- if (state == lexstate_start)
- /* Token has not started yet. */
- source->ignored =
- isc_buffer_consumedlength(source->pushback);
- c = isc_buffer_getuint8(source->pushback);
- } else {
- c = EOF;
- }
-
- if (c == '\n')
- source->line++;
-
- if (lex->comment_ok && !no_comments) {
- if (!escaped && c == ';' &&
- ((lex->comments & ISC_LEXCOMMENT_DNSMASTERFILE)
- != 0)) {
- saved_state = state;
- state = lexstate_eatline;
- no_comments = ISC_TRUE;
- continue;
- } else if (c == '/' &&
- (lex->comments &
- (ISC_LEXCOMMENT_C|
- ISC_LEXCOMMENT_CPLUSPLUS)) != 0) {
- saved_state = state;
- state = lexstate_maybecomment;
- no_comments = ISC_TRUE;
- continue;
- } else if (c == '#' &&
- ((lex->comments & ISC_LEXCOMMENT_SHELL)
- != 0)) {
- saved_state = state;
- state = lexstate_eatline;
- no_comments = ISC_TRUE;
- continue;
- }
- }
-
- no_read:
- /* INSIST(c == EOF || (c >= 0 && c <= 255)); */
- switch (state) {
- case lexstate_start:
- if (c == EOF) {
- lex->last_was_eol = ISC_FALSE;
- if ((options & ISC_LEXOPT_DNSMULTILINE) != 0 &&
- lex->paren_count != 0) {
- lex->paren_count = 0;
- result = ISC_R_UNBALANCED;
- goto done;
- }
- if ((options & ISC_LEXOPT_EOF) == 0) {
- result = ISC_R_EOF;
- goto done;
- }
- tokenp->type = isc_tokentype_eof;
- done = ISC_TRUE;
- } else if (c == ' ' || c == '\t') {
- if (lex->last_was_eol &&
- (options & ISC_LEXOPT_INITIALWS)
- != 0) {
- lex->last_was_eol = ISC_FALSE;
- tokenp->type = isc_tokentype_initialws;
- tokenp->value.as_char = c;
- done = ISC_TRUE;
- }
- } else if (c == '\n') {
- if ((options & ISC_LEXOPT_EOL) != 0) {
- tokenp->type = isc_tokentype_eol;
- done = ISC_TRUE;
- }
- lex->last_was_eol = ISC_TRUE;
- } else if (c == '\r') {
- if ((options & ISC_LEXOPT_EOL) != 0)
- state = lexstate_crlf;
- } else if (c == '"' &&
- (options & ISC_LEXOPT_QSTRING) != 0) {
- lex->last_was_eol = ISC_FALSE;
- no_comments = ISC_TRUE;
- state = lexstate_qstring;
- } else if (lex->specials[c]) {
- lex->last_was_eol = ISC_FALSE;
- if ((c == '(' || c == ')') &&
- (options & ISC_LEXOPT_DNSMULTILINE) != 0) {
- if (c == '(') {
- if (lex->paren_count == 0)
- options &= ~IWSEOL;
- lex->paren_count++;
- } else {
- if (lex->paren_count == 0) {
- result = ISC_R_UNBALANCED;
- goto done;
- }
- lex->paren_count--;
- if (lex->paren_count == 0)
- options =
- saved_options;
- }
- continue;
- }
- tokenp->type = isc_tokentype_special;
- tokenp->value.as_char = c;
- done = ISC_TRUE;
- } else if (isdigit((unsigned char)c) &&
- (options & ISC_LEXOPT_NUMBER) != 0) {
- lex->last_was_eol = ISC_FALSE;
- if ((options & ISC_LEXOPT_OCTAL) != 0 &&
- (c == '8' || c == '9'))
- state = lexstate_string;
- else
- state = lexstate_number;
- goto no_read;
- } else {
- lex->last_was_eol = ISC_FALSE;
- state = lexstate_string;
- goto no_read;
- }
- break;
- case lexstate_crlf:
- if (c != '\n')
- pushback(source, c);
- tokenp->type = isc_tokentype_eol;
- done = ISC_TRUE;
- lex->last_was_eol = ISC_TRUE;
- break;
- case lexstate_number:
- if (c == EOF || !isdigit((unsigned char)c)) {
- if (c == ' ' || c == '\t' || c == '\r' ||
- c == '\n' || c == EOF ||
- lex->specials[c]) {
- int base;
- if ((options & ISC_LEXOPT_OCTAL) != 0)
- base = 8;
- else if ((options & ISC_LEXOPT_CNUMBER) != 0)
- base = 0;
- else
- base = 10;
- pushback(source, c);
-
- result = isc_parse_uint32(&as_ulong,
- lex->data,
- base);
- if (result == ISC_R_SUCCESS) {
- tokenp->type =
- isc_tokentype_number;
- tokenp->value.as_ulong =
- as_ulong;
- } else if (result == ISC_R_BADNUMBER) {
- isc_tokenvalue_t *v;
-
- tokenp->type =
- isc_tokentype_string;
- v = &(tokenp->value);
- v->as_textregion.base =
- lex->data;
- v->as_textregion.length =
- lex->max_token -
- remaining;
- } else
- goto done;
- done = ISC_TRUE;
- continue;
- } else if (!(options & ISC_LEXOPT_CNUMBER) ||
- ((c != 'x' && c != 'X') ||
- (curr != &lex->data[1]) ||
- (lex->data[0] != '0'))) {
- /* Above test supports hex numbers */
- state = lexstate_string;
- }
- } else if ((options & ISC_LEXOPT_OCTAL) != 0 &&
- (c == '8' || c == '9')) {
- state = lexstate_string;
- }
- if (remaining == 0U) {
- result = grow_data(lex, &remaining,
- &curr, &prev);
- if (result != ISC_R_SUCCESS)
- goto done;
- }
- INSIST(remaining > 0U);
- *curr++ = c;
- *curr = '\0';
- remaining--;
- break;
- case lexstate_string:
- /*
- * EOF needs to be checked before lex->specials[c]
- * as lex->specials[EOF] is not a good idea.
- */
- if (c == '\r' || c == '\n' || c == EOF ||
- (!escaped &&
- (c == ' ' || c == '\t' || lex->specials[c]))) {
- pushback(source, c);
- if (source->result != ISC_R_SUCCESS) {
- result = source->result;
- goto done;
- }
- tokenp->type = isc_tokentype_string;
- tokenp->value.as_textregion.base = lex->data;
- tokenp->value.as_textregion.length =
- lex->max_token - remaining;
- done = ISC_TRUE;
- continue;
- }
- if ((options & ISC_LEXOPT_ESCAPE) != 0)
- escaped = (!escaped && c == '\\') ?
- ISC_TRUE : ISC_FALSE;
- if (remaining == 0U) {
- result = grow_data(lex, &remaining,
- &curr, &prev);
- if (result != ISC_R_SUCCESS)
- goto done;
- }
- INSIST(remaining > 0U);
- *curr++ = c;
- *curr = '\0';
- remaining--;
- break;
- case lexstate_maybecomment:
- if (c == '*' &&
- (lex->comments & ISC_LEXCOMMENT_C) != 0) {
- state = lexstate_ccomment;
- continue;
- } else if (c == '/' &&
- (lex->comments & ISC_LEXCOMMENT_CPLUSPLUS) != 0) {
- state = lexstate_eatline;
- continue;
- }
- pushback(source, c);
- c = '/';
- no_comments = ISC_FALSE;
- state = saved_state;
- goto no_read;
- case lexstate_ccomment:
- if (c == EOF) {
- result = ISC_R_UNEXPECTEDEND;
- goto done;
- }
- if (c == '*')
- state = lexstate_ccommentend;
- break;
- case lexstate_ccommentend:
- if (c == EOF) {
- result = ISC_R_UNEXPECTEDEND;
- goto done;
- }
- if (c == '/') {
- /*
- * C-style comments become a single space.
- * We do this to ensure that a comment will
- * act as a delimiter for strings and
- * numbers.
- */
- c = ' ';
- no_comments = ISC_FALSE;
- state = saved_state;
- goto no_read;
- } else if (c != '*')
- state = lexstate_ccomment;
- break;
- case lexstate_eatline:
- if ((c == '\n') || (c == EOF)) {
- no_comments = ISC_FALSE;
- state = saved_state;
- goto no_read;
- }
- break;
- case lexstate_qstring:
- if (c == EOF) {
- result = ISC_R_UNEXPECTEDEND;
- goto done;
- }
- if (c == '"') {
- if (escaped) {
- escaped = ISC_FALSE;
- /*
- * Overwrite the preceding backslash.
- */
- INSIST(prev != NULL);
- *prev = '"';
- } else {
- tokenp->type = isc_tokentype_qstring;
- tokenp->value.as_textregion.base =
- lex->data;
- tokenp->value.as_textregion.length =
- lex->max_token - remaining;
- no_comments = ISC_FALSE;
- done = ISC_TRUE;
- }
- } else {
- if (c == '\n' && !escaped &&
- (options & ISC_LEXOPT_QSTRINGMULTILINE) == 0) {
- pushback(source, c);
- result = ISC_R_UNBALANCEDQUOTES;
- goto done;
- }
- if (c == '\\' && !escaped)
- escaped = ISC_TRUE;
- else
- escaped = ISC_FALSE;
- if (remaining == 0U) {
- result = grow_data(lex, &remaining,
- &curr, &prev);
- if (result != ISC_R_SUCCESS)
- goto done;
- }
- INSIST(remaining > 0U);
- prev = curr;
- *curr++ = c;
- *curr = '\0';
- remaining--;
- }
- break;
- default:
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_LEX,
- ISC_MSG_UNEXPECTEDSTATE,
- "Unexpected state %d"),
- state);
- /* Does not return. */
- }
-
- } while (!done);
-
- result = ISC_R_SUCCESS;
- done:
-#ifdef HAVE_FLOCKFILE
- if (source->is_file)
- funlockfile(source->input);
-#endif
- return (result);
-}
-
-isc_result_t
-isc_lex_getmastertoken(isc_lex_t *lex, isc_token_t *token,
- isc_tokentype_t expect, isc_boolean_t eol)
-{
- unsigned int options = ISC_LEXOPT_EOL | ISC_LEXOPT_EOF |
- ISC_LEXOPT_DNSMULTILINE | ISC_LEXOPT_ESCAPE;
- isc_result_t result;
-
- if (expect == isc_tokentype_qstring)
- options |= ISC_LEXOPT_QSTRING;
- else if (expect == isc_tokentype_number)
- options |= ISC_LEXOPT_NUMBER;
- result = isc_lex_gettoken(lex, options, token);
- if (result == ISC_R_RANGE)
- isc_lex_ungettoken(lex, token);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- if (eol && ((token->type == isc_tokentype_eol) ||
- (token->type == isc_tokentype_eof)))
- return (ISC_R_SUCCESS);
- if (token->type == isc_tokentype_string &&
- expect == isc_tokentype_qstring)
- return (ISC_R_SUCCESS);
- if (token->type != expect) {
- isc_lex_ungettoken(lex, token);
- if (token->type == isc_tokentype_eol ||
- token->type == isc_tokentype_eof)
- return (ISC_R_UNEXPECTEDEND);
- if (expect == isc_tokentype_number)
- return (ISC_R_BADNUMBER);
- return (ISC_R_UNEXPECTEDTOKEN);
- }
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_lex_getoctaltoken(isc_lex_t *lex, isc_token_t *token, isc_boolean_t eol)
-{
- unsigned int options = ISC_LEXOPT_EOL | ISC_LEXOPT_EOF |
- ISC_LEXOPT_DNSMULTILINE | ISC_LEXOPT_ESCAPE|
- ISC_LEXOPT_NUMBER | ISC_LEXOPT_OCTAL;
- isc_result_t result;
-
- result = isc_lex_gettoken(lex, options, token);
- if (result == ISC_R_RANGE)
- isc_lex_ungettoken(lex, token);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- if (eol && ((token->type == isc_tokentype_eol) ||
- (token->type == isc_tokentype_eof)))
- return (ISC_R_SUCCESS);
- if (token->type != isc_tokentype_number) {
- isc_lex_ungettoken(lex, token);
- if (token->type == isc_tokentype_eol ||
- token->type == isc_tokentype_eof)
- return (ISC_R_UNEXPECTEDEND);
- return (ISC_R_BADNUMBER);
- }
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_lex_ungettoken(isc_lex_t *lex, isc_token_t *tokenp) {
- inputsource *source;
- /*
- * Unget the current token.
- */
-
- REQUIRE(VALID_LEX(lex));
- source = HEAD(lex->sources);
- REQUIRE(source != NULL);
- REQUIRE(tokenp != NULL);
- REQUIRE(isc_buffer_consumedlength(source->pushback) != 0 ||
- tokenp->type == isc_tokentype_eof);
-
- UNUSED(tokenp);
-
- isc_buffer_first(source->pushback);
- lex->paren_count = lex->saved_paren_count;
- source->line = source->saved_line;
- source->at_eof = ISC_FALSE;
-}
-
-void
-isc_lex_getlasttokentext(isc_lex_t *lex, isc_token_t *tokenp, isc_region_t *r)
-{
- inputsource *source;
-
- REQUIRE(VALID_LEX(lex));
- source = HEAD(lex->sources);
- REQUIRE(source != NULL);
- REQUIRE(tokenp != NULL);
- REQUIRE(isc_buffer_consumedlength(source->pushback) != 0 ||
- tokenp->type == isc_tokentype_eof);
-
- UNUSED(tokenp);
-
- INSIST(source->ignored <= isc_buffer_consumedlength(source->pushback));
- r->base = (unsigned char *)isc_buffer_base(source->pushback) +
- source->ignored;
- r->length = isc_buffer_consumedlength(source->pushback) -
- source->ignored;
-}
-
-
-char *
-isc_lex_getsourcename(isc_lex_t *lex) {
- inputsource *source;
-
- REQUIRE(VALID_LEX(lex));
- source = HEAD(lex->sources);
-
- if (source == NULL)
- return (NULL);
-
- return (source->name);
-}
-
-unsigned long
-isc_lex_getsourceline(isc_lex_t *lex) {
- inputsource *source;
-
- REQUIRE(VALID_LEX(lex));
- source = HEAD(lex->sources);
-
- if (source == NULL)
- return (0);
-
- return (source->line);
-}
-
-
-isc_result_t
-isc_lex_setsourcename(isc_lex_t *lex, const char *name) {
- inputsource *source;
- char *newname;
-
- REQUIRE(VALID_LEX(lex));
- source = HEAD(lex->sources);
-
- if (source == NULL)
- return(ISC_R_NOTFOUND);
- newname = isc_mem_strdup(lex->mctx, name);
- if (newname == NULL)
- return (ISC_R_NOMEMORY);
- isc_mem_free(lex->mctx, source->name);
- source->name = newname;
- return (ISC_R_SUCCESS);
-}
-
-isc_boolean_t
-isc_lex_isfile(isc_lex_t *lex) {
- inputsource *source;
-
- REQUIRE(VALID_LEX(lex));
-
- source = HEAD(lex->sources);
-
- if (source == NULL)
- return (ISC_FALSE);
-
- return (source->is_file);
-}
diff --git a/contrib/ntp/lib/isc/lfsr.c b/contrib/ntp/lib/isc/lfsr.c
deleted file mode 100644
index 0b8d782ec33a..000000000000
--- a/contrib/ntp/lib/isc/lfsr.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: lfsr.c,v 1.20 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-#include <stdlib.h>
-
-#include <isc/assertions.h>
-#include <isc/lfsr.h>
-#include <isc/util.h>
-
-#define VALID_LFSR(x) (x != NULL)
-
-void
-isc_lfsr_init(isc_lfsr_t *lfsr, isc_uint32_t state, unsigned int bits,
- isc_uint32_t tap, unsigned int count,
- isc_lfsrreseed_t reseed, void *arg)
-{
- REQUIRE(VALID_LFSR(lfsr));
- REQUIRE(8 <= bits && bits <= 32);
- REQUIRE(tap != 0);
-
- lfsr->state = state;
- lfsr->bits = bits;
- lfsr->tap = tap;
- lfsr->count = count;
- lfsr->reseed = reseed;
- lfsr->arg = arg;
-
- if (count == 0 && reseed != NULL)
- reseed(lfsr, arg);
- if (lfsr->state == 0)
- lfsr->state = 0xffffffffU >> (32 - lfsr->bits);
-}
-
-/*!
- * Return the next state of the lfsr.
- */
-static inline isc_uint32_t
-lfsr_generate(isc_lfsr_t *lfsr)
-{
-
- /*
- * If the previous state is zero, we must fill it with something
- * here, or we will begin to generate an extremely predictable output.
- *
- * First, give the reseed function a crack at it. If the state is
- * still 0, set it to all ones.
- */
- if (lfsr->state == 0) {
- if (lfsr->reseed != NULL)
- lfsr->reseed(lfsr, lfsr->arg);
- if (lfsr->state == 0)
- lfsr->state = 0xffffffffU >> (32 - lfsr->bits);
- }
-
- if (lfsr->state & 0x01) {
- lfsr->state = (lfsr->state >> 1) ^ lfsr->tap;
- return (1);
- } else {
- lfsr->state >>= 1;
- return (0);
- }
-}
-
-void
-isc_lfsr_generate(isc_lfsr_t *lfsr, void *data, unsigned int count)
-{
- unsigned char *p;
- unsigned int bit;
- unsigned int byte;
-
- REQUIRE(VALID_LFSR(lfsr));
- REQUIRE(data != NULL);
- REQUIRE(count > 0);
-
- p = data;
- byte = count;
-
- while (byte--) {
- *p = 0;
- for (bit = 0; bit < 7; bit++) {
- *p |= lfsr_generate(lfsr);
- *p <<= 1;
- }
- *p |= lfsr_generate(lfsr);
- p++;
- }
-
- if (lfsr->count != 0 && lfsr->reseed != NULL) {
- if (lfsr->count <= count * 8)
- lfsr->reseed(lfsr, lfsr->arg);
- else
- lfsr->count -= (count * 8);
- }
-}
-
-static inline isc_uint32_t
-lfsr_skipgenerate(isc_lfsr_t *lfsr, unsigned int skip)
-{
- while (skip--)
- (void)lfsr_generate(lfsr);
-
- (void)lfsr_generate(lfsr);
-
- return (lfsr->state);
-}
-
-/*
- * Skip "skip" states in "lfsr".
- */
-void
-isc_lfsr_skip(isc_lfsr_t *lfsr, unsigned int skip)
-{
- REQUIRE(VALID_LFSR(lfsr));
-
- while (skip--)
- (void)lfsr_generate(lfsr);
-}
-
-/*
- * Skip states in lfsr1 and lfsr2 using the other's current state.
- * Return the final state of lfsr1 ^ lfsr2.
- */
-isc_uint32_t
-isc_lfsr_generate32(isc_lfsr_t *lfsr1, isc_lfsr_t *lfsr2)
-{
- isc_uint32_t state1, state2;
- isc_uint32_t skip1, skip2;
-
- REQUIRE(VALID_LFSR(lfsr1));
- REQUIRE(VALID_LFSR(lfsr2));
-
- skip1 = lfsr1->state & 0x01;
- skip2 = lfsr2->state & 0x01;
-
- /* cross-skip. */
- state1 = lfsr_skipgenerate(lfsr1, skip2);
- state2 = lfsr_skipgenerate(lfsr2, skip1);
-
- return (state1 ^ state2);
-}
diff --git a/contrib/ntp/lib/isc/mem.c b/contrib/ntp/lib/isc/mem.c
deleted file mode 100644
index 5b4b16c570f6..000000000000
--- a/contrib/ntp/lib/isc/mem.c
+++ /dev/null
@@ -1,2477 +0,0 @@
-/*
- * Copyright (C) 2004-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1997-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-
-#include <limits.h>
-
-#include <isc/magic.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/once.h>
-#include <isc/ondestroy.h>
-#include <isc/string.h>
-#include <isc/mutex.h>
-#include <isc/print.h>
-#include <isc/util.h>
-#include <isc/xml.h>
-
-#define MCTXLOCK(m, l) if (((m)->flags & ISC_MEMFLAG_NOLOCK) == 0) LOCK(l)
-#define MCTXUNLOCK(m, l) if (((m)->flags & ISC_MEMFLAG_NOLOCK) == 0) UNLOCK(l)
-
-#ifndef ISC_MEM_DEBUGGING
-#define ISC_MEM_DEBUGGING 0
-#endif
-LIBISC_EXTERNAL_DATA unsigned int isc_mem_debugging = ISC_MEM_DEBUGGING;
-
-/*
- * Constants.
- */
-
-#define DEF_MAX_SIZE 1100
-#define DEF_MEM_TARGET 4096
-#define ALIGNMENT_SIZE 8U /*%< must be a power of 2 */
-#define NUM_BASIC_BLOCKS 64 /*%< must be > 1 */
-#define TABLE_INCREMENT 1024
-#define DEBUGLIST_COUNT 1024
-
-/*
- * Types.
- */
-typedef struct isc__mem isc__mem_t;
-typedef struct isc__mempool isc__mempool_t;
-
-#if ISC_MEM_TRACKLINES
-typedef struct debuglink debuglink_t;
-struct debuglink {
- ISC_LINK(debuglink_t) link;
- const void *ptr[DEBUGLIST_COUNT];
- unsigned int size[DEBUGLIST_COUNT];
- const char *file[DEBUGLIST_COUNT];
- unsigned int line[DEBUGLIST_COUNT];
- unsigned int count;
-};
-
-#define FLARG_PASS , file, line
-#define FLARG , const char *file, unsigned int line
-#else
-#define FLARG_PASS
-#define FLARG
-#endif
-
-typedef struct element element;
-struct element {
- element * next;
-};
-
-typedef struct {
- /*!
- * This structure must be ALIGNMENT_SIZE bytes.
- */
- union {
- size_t size;
- isc__mem_t *ctx;
- char bytes[ALIGNMENT_SIZE];
- } u;
-} size_info;
-
-struct stats {
- unsigned long gets;
- unsigned long totalgets;
- unsigned long blocks;
- unsigned long freefrags;
-};
-
-#define MEM_MAGIC ISC_MAGIC('M', 'e', 'm', 'C')
-#define VALID_CONTEXT(c) ISC_MAGIC_VALID(c, MEM_MAGIC)
-
-#if ISC_MEM_TRACKLINES
-typedef ISC_LIST(debuglink_t) debuglist_t;
-#endif
-
-/* List of all active memory contexts. */
-
-static ISC_LIST(isc__mem_t) contexts;
-static isc_once_t once = ISC_ONCE_INIT;
-static isc_mutex_t lock;
-
-/*%
- * Total size of lost memory due to a bug of external library.
- * Locked by the global lock.
- */
-static isc_uint64_t totallost;
-
-struct isc__mem {
- isc_mem_t common;
- isc_ondestroy_t ondestroy;
- unsigned int flags;
- isc_mutex_t lock;
- isc_memalloc_t memalloc;
- isc_memfree_t memfree;
- void * arg;
- size_t max_size;
- isc_boolean_t checkfree;
- struct stats * stats;
- unsigned int references;
- char name[16];
- void * tag;
- size_t quota;
- size_t total;
- size_t inuse;
- size_t maxinuse;
- size_t hi_water;
- size_t lo_water;
- isc_boolean_t hi_called;
- isc_boolean_t is_overmem;
- isc_mem_water_t water;
- void * water_arg;
- ISC_LIST(isc__mempool_t) pools;
- unsigned int poolcnt;
-
- /* ISC_MEMFLAG_INTERNAL */
- size_t mem_target;
- element ** freelists;
- element * basic_blocks;
- unsigned char ** basic_table;
- unsigned int basic_table_count;
- unsigned int basic_table_size;
- unsigned char * lowest;
- unsigned char * highest;
-
-#if ISC_MEM_TRACKLINES
- debuglist_t * debuglist;
- unsigned int debuglistcnt;
-#endif
-
- unsigned int memalloc_failures;
- ISC_LINK(isc__mem_t) link;
-};
-
-#define MEMPOOL_MAGIC ISC_MAGIC('M', 'E', 'M', 'p')
-#define VALID_MEMPOOL(c) ISC_MAGIC_VALID(c, MEMPOOL_MAGIC)
-
-struct isc__mempool {
- /* always unlocked */
- isc_mempool_t common; /*%< common header of mempool's */
- isc_mutex_t *lock; /*%< optional lock */
- isc__mem_t *mctx; /*%< our memory context */
- /*%< locked via the memory context's lock */
- ISC_LINK(isc__mempool_t) link; /*%< next pool in this mem context */
- /*%< optionally locked from here down */
- element *items; /*%< low water item list */
- size_t size; /*%< size of each item on this pool */
- unsigned int maxalloc; /*%< max number of items allowed */
- unsigned int allocated; /*%< # of items currently given out */
- unsigned int freecount; /*%< # of items on reserved list */
- unsigned int freemax; /*%< # of items allowed on free list */
- unsigned int fillcount; /*%< # of items to fetch on each fill */
- /*%< Stats only. */
- unsigned int gets; /*%< # of requests to this pool */
- /*%< Debugging only. */
-#if ISC_MEMPOOL_NAMES
- char name[16]; /*%< printed name in stats reports */
-#endif
-};
-
-/*
- * Private Inline-able.
- */
-
-#if ! ISC_MEM_TRACKLINES
-#define ADD_TRACE(a, b, c, d, e)
-#define DELETE_TRACE(a, b, c, d, e)
-#else
-#define ADD_TRACE(a, b, c, d, e) \
- do { \
- if ((isc_mem_debugging & (ISC_MEM_DEBUGTRACE | \
- ISC_MEM_DEBUGRECORD)) != 0 && \
- b != NULL) \
- add_trace_entry(a, b, c, d, e); \
- } while (0)
-#define DELETE_TRACE(a, b, c, d, e) delete_trace_entry(a, b, c, d, e)
-
-static void
-print_active(isc__mem_t *ctx, FILE *out);
-
-/*%
- * The following can be either static or public, depending on build environment.
- */
-
-#ifdef BIND9
-#define ISC_MEMFUNC_SCOPE
-#else
-#define ISC_MEMFUNC_SCOPE static
-#endif
-
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_createx(size_t init_max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
- isc_mem_t **ctxp);
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_createx2(size_t init_max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
- isc_mem_t **ctxp, unsigned int flags);
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_create(size_t init_max_size, size_t target_size, isc_mem_t **ctxp);
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_create2(size_t init_max_size, size_t target_size,
- isc_mem_t **ctxp, unsigned int flags);
-ISC_MEMFUNC_SCOPE void
-isc__mem_attach(isc_mem_t *source, isc_mem_t **targetp);
-ISC_MEMFUNC_SCOPE void
-isc__mem_detach(isc_mem_t **ctxp);
-ISC_MEMFUNC_SCOPE void
-isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG);
-ISC_MEMFUNC_SCOPE void
-isc__mem_destroy(isc_mem_t **ctxp);
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_ondestroy(isc_mem_t *ctx, isc_task_t *task, isc_event_t **event);
-ISC_MEMFUNC_SCOPE void *
-isc___mem_get(isc_mem_t *ctx, size_t size FLARG);
-ISC_MEMFUNC_SCOPE void
-isc___mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG);
-ISC_MEMFUNC_SCOPE void
-isc__mem_stats(isc_mem_t *ctx, FILE *out);
-ISC_MEMFUNC_SCOPE void *
-isc___mem_allocate(isc_mem_t *ctx, size_t size FLARG);
-ISC_MEMFUNC_SCOPE void *
-isc___mem_reallocate(isc_mem_t *ctx, void *ptr, size_t size FLARG);
-ISC_MEMFUNC_SCOPE void
-isc___mem_free(isc_mem_t *ctx, void *ptr FLARG);
-ISC_MEMFUNC_SCOPE char *
-isc___mem_strdup(isc_mem_t *mctx, const char *s FLARG);
-ISC_MEMFUNC_SCOPE void
-isc__mem_setdestroycheck(isc_mem_t *ctx, isc_boolean_t flag);
-ISC_MEMFUNC_SCOPE void
-isc__mem_setquota(isc_mem_t *ctx, size_t quota);
-ISC_MEMFUNC_SCOPE size_t
-isc__mem_getquota(isc_mem_t *ctx);
-ISC_MEMFUNC_SCOPE size_t
-isc__mem_inuse(isc_mem_t *ctx);
-ISC_MEMFUNC_SCOPE isc_boolean_t
-isc__mem_isovermem(isc_mem_t *ctx);
-ISC_MEMFUNC_SCOPE void
-isc__mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
- size_t hiwater, size_t lowater);
-ISC_MEMFUNC_SCOPE void
-isc__mem_waterack(isc_mem_t *ctx0, int flag);
-ISC_MEMFUNC_SCOPE void
-isc__mem_setname(isc_mem_t *ctx, const char *name, void *tag);
-ISC_MEMFUNC_SCOPE const char *
-isc__mem_getname(isc_mem_t *ctx);
-ISC_MEMFUNC_SCOPE void *
-isc__mem_gettag(isc_mem_t *ctx);
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp);
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setname(isc_mempool_t *mpctx, const char *name);
-ISC_MEMFUNC_SCOPE void
-isc__mempool_destroy(isc_mempool_t **mpctxp);
-ISC_MEMFUNC_SCOPE void
-isc__mempool_associatelock(isc_mempool_t *mpctx, isc_mutex_t *lock);
-ISC_MEMFUNC_SCOPE void *
-isc___mempool_get(isc_mempool_t *mpctx FLARG);
-ISC_MEMFUNC_SCOPE void
-isc___mempool_put(isc_mempool_t *mpctx, void *mem FLARG);
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setfreemax(isc_mempool_t *mpctx, unsigned int limit);
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getfreemax(isc_mempool_t *mpctx);
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getfreecount(isc_mempool_t *mpctx);
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setmaxalloc(isc_mempool_t *mpctx, unsigned int limit);
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getmaxalloc(isc_mempool_t *mpctx);
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getallocated(isc_mempool_t *mpctx);
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit);
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getfillcount(isc_mempool_t *mpctx);
-#ifdef BIND9
-ISC_MEMFUNC_SCOPE void
-isc__mem_printactive(isc_mem_t *ctx0, FILE *file);
-ISC_MEMFUNC_SCOPE void
-isc__mem_printallactive(FILE *file);
-ISC_MEMFUNC_SCOPE void
-isc__mem_checkdestroyed(FILE *file);
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mem_references(isc_mem_t *ctx0);
-#endif
-
-static struct isc__memmethods {
- isc_memmethods_t methods;
-
- /*%
- * The following are defined just for avoiding unused static functions.
- */
-#ifndef BIND9
- void *createx, *create, *create2, *ondestroy, *stats,
- *setquota, *getquota, *setname, *getname, *gettag;
-#endif
-} memmethods = {
- {
- isc__mem_attach,
- isc__mem_detach,
- isc__mem_destroy,
- isc___mem_get,
- isc___mem_put,
- isc___mem_putanddetach,
- isc___mem_allocate,
- isc___mem_reallocate,
- isc___mem_strdup,
- isc___mem_free,
- isc__mem_setdestroycheck,
- isc__mem_setwater,
- isc__mem_waterack,
- isc__mem_inuse,
- isc__mem_isovermem,
- isc__mempool_create
- }
-#ifndef BIND9
- ,
- (void *)isc__mem_createx, (void *)isc__mem_create,
- (void *)isc__mem_create2, (void *)isc__mem_ondestroy,
- (void *)isc__mem_stats, (void *)isc__mem_setquota,
- (void *)isc__mem_getquota, (void *)isc__mem_setname,
- (void *)isc__mem_getname, (void *)isc__mem_gettag
-#endif
-};
-
-static struct isc__mempoolmethods {
- isc_mempoolmethods_t methods;
-
- /*%
- * The following are defined just for avoiding unused static functions.
- */
-#ifndef BIND9
- void *getfreemax, *getfreecount, *getmaxalloc, *getfillcount;
-#endif
-} mempoolmethods = {
- {
- isc__mempool_destroy,
- isc___mempool_get,
- isc___mempool_put,
- isc__mempool_getallocated,
- isc__mempool_setmaxalloc,
- isc__mempool_setfreemax,
- isc__mempool_setname,
- isc__mempool_associatelock,
- isc__mempool_setfillcount
- }
-#ifndef BIND9
- ,
- (void *)isc__mempool_getfreemax, (void *)isc__mempool_getfreecount,
- (void *)isc__mempool_getmaxalloc, (void *)isc__mempool_getfillcount
-#endif
-};
-
-/*!
- * mctx must be locked.
- */
-static inline void
-add_trace_entry(isc__mem_t *mctx, const void *ptr, unsigned int size
- FLARG)
-{
- debuglink_t *dl;
- unsigned int i;
- unsigned int mysize = size;
-
- if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0)
- fprintf(stderr, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_ADDTRACE,
- "add %p size %u "
- "file %s line %u mctx %p\n"),
- ptr, size, file, line, mctx);
-
- if (mctx->debuglist == NULL)
- return;
-
- if (mysize > mctx->max_size)
- mysize = mctx->max_size;
-
- dl = ISC_LIST_HEAD(mctx->debuglist[mysize]);
- while (dl != NULL) {
- if (dl->count == DEBUGLIST_COUNT)
- goto next;
- for (i = 0; i < DEBUGLIST_COUNT; i++) {
- if (dl->ptr[i] == NULL) {
- dl->ptr[i] = ptr;
- dl->size[i] = size;
- dl->file[i] = file;
- dl->line[i] = line;
- dl->count++;
- return;
- }
- }
- next:
- dl = ISC_LIST_NEXT(dl, link);
- }
-
- dl = malloc(sizeof(debuglink_t));
- INSIST(dl != NULL);
-
- ISC_LINK_INIT(dl, link);
- for (i = 1; i < DEBUGLIST_COUNT; i++) {
- dl->ptr[i] = NULL;
- dl->size[i] = 0;
- dl->file[i] = NULL;
- dl->line[i] = 0;
- }
-
- dl->ptr[0] = ptr;
- dl->size[0] = size;
- dl->file[0] = file;
- dl->line[0] = line;
- dl->count = 1;
-
- ISC_LIST_PREPEND(mctx->debuglist[mysize], dl, link);
- mctx->debuglistcnt++;
-}
-
-static inline void
-delete_trace_entry(isc__mem_t *mctx, const void *ptr, unsigned int size,
- const char *file, unsigned int line)
-{
- debuglink_t *dl;
- unsigned int i;
-
- if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0)
- fprintf(stderr, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_DELTRACE,
- "del %p size %u "
- "file %s line %u mctx %p\n"),
- ptr, size, file, line, mctx);
-
- if (mctx->debuglist == NULL)
- return;
-
- if (size > mctx->max_size)
- size = mctx->max_size;
-
- dl = ISC_LIST_HEAD(mctx->debuglist[size]);
- while (dl != NULL) {
- for (i = 0; i < DEBUGLIST_COUNT; i++) {
- if (dl->ptr[i] == ptr) {
- dl->ptr[i] = NULL;
- dl->size[i] = 0;
- dl->file[i] = NULL;
- dl->line[i] = 0;
-
- INSIST(dl->count > 0);
- dl->count--;
- if (dl->count == 0) {
- ISC_LIST_UNLINK(mctx->debuglist[size],
- dl, link);
- free(dl);
- }
- return;
- }
- }
- dl = ISC_LIST_NEXT(dl, link);
- }
-
- /*
- * If we get here, we didn't find the item on the list. We're
- * screwed.
- */
- INSIST(dl != NULL);
-}
-#endif /* ISC_MEM_TRACKLINES */
-
-static inline size_t
-rmsize(size_t size) {
- /*
- * round down to ALIGNMENT_SIZE
- */
- return (size & (~(ALIGNMENT_SIZE - 1)));
-}
-
-static inline size_t
-quantize(size_t size) {
- /*!
- * Round up the result in order to get a size big
- * enough to satisfy the request and be aligned on ALIGNMENT_SIZE
- * byte boundaries.
- */
-
- if (size == 0U)
- return (ALIGNMENT_SIZE);
- return ((size + ALIGNMENT_SIZE - 1) & (~(ALIGNMENT_SIZE - 1)));
-}
-
-static inline isc_boolean_t
-more_basic_blocks(isc__mem_t *ctx) {
- void *new;
- unsigned char *curr, *next;
- unsigned char *first, *last;
- unsigned char **table;
- unsigned int table_size;
- size_t increment;
- int i;
-
- /* Require: we hold the context lock. */
-
- /*
- * Did we hit the quota for this context?
- */
- increment = NUM_BASIC_BLOCKS * ctx->mem_target;
- if (ctx->quota != 0U && ctx->total + increment > ctx->quota)
- return (ISC_FALSE);
-
- INSIST(ctx->basic_table_count <= ctx->basic_table_size);
- if (ctx->basic_table_count == ctx->basic_table_size) {
- table_size = ctx->basic_table_size + TABLE_INCREMENT;
- table = (ctx->memalloc)(ctx->arg,
- table_size * sizeof(unsigned char *));
- if (table == NULL) {
- ctx->memalloc_failures++;
- return (ISC_FALSE);
- }
- if (ctx->basic_table_size != 0) {
- memcpy(table, ctx->basic_table,
- ctx->basic_table_size *
- sizeof(unsigned char *));
- (ctx->memfree)(ctx->arg, ctx->basic_table);
- }
- ctx->basic_table = table;
- ctx->basic_table_size = table_size;
- }
-
- new = (ctx->memalloc)(ctx->arg, NUM_BASIC_BLOCKS * ctx->mem_target);
- if (new == NULL) {
- ctx->memalloc_failures++;
- return (ISC_FALSE);
- }
- ctx->total += increment;
- ctx->basic_table[ctx->basic_table_count] = new;
- ctx->basic_table_count++;
-
- curr = new;
- next = curr + ctx->mem_target;
- for (i = 0; i < (NUM_BASIC_BLOCKS - 1); i++) {
- ((element *)curr)->next = (element *)next;
- curr = next;
- next += ctx->mem_target;
- }
- /*
- * curr is now pointing at the last block in the
- * array.
- */
- ((element *)curr)->next = NULL;
- first = new;
- last = first + NUM_BASIC_BLOCKS * ctx->mem_target - 1;
- if (first < ctx->lowest || ctx->lowest == NULL)
- ctx->lowest = first;
- if (last > ctx->highest)
- ctx->highest = last;
- ctx->basic_blocks = new;
-
- return (ISC_TRUE);
-}
-
-static inline isc_boolean_t
-more_frags(isc__mem_t *ctx, size_t new_size) {
- int i, frags;
- size_t total_size;
- void *new;
- unsigned char *curr, *next;
-
- /*!
- * Try to get more fragments by chopping up a basic block.
- */
-
- if (ctx->basic_blocks == NULL) {
- if (!more_basic_blocks(ctx)) {
- /*
- * We can't get more memory from the OS, or we've
- * hit the quota for this context.
- */
- /*
- * XXXRTH "At quota" notification here.
- */
- return (ISC_FALSE);
- }
- }
-
- total_size = ctx->mem_target;
- new = ctx->basic_blocks;
- ctx->basic_blocks = ctx->basic_blocks->next;
- frags = total_size / new_size;
- ctx->stats[new_size].blocks++;
- ctx->stats[new_size].freefrags += frags;
- /*
- * Set up a linked-list of blocks of size
- * "new_size".
- */
- curr = new;
- next = curr + new_size;
- total_size -= new_size;
- for (i = 0; i < (frags - 1); i++) {
- ((element *)curr)->next = (element *)next;
- curr = next;
- next += new_size;
- total_size -= new_size;
- }
- /*
- * Add the remaining fragment of the basic block to a free list.
- */
- total_size = rmsize(total_size);
- if (total_size > 0U) {
- ((element *)next)->next = ctx->freelists[total_size];
- ctx->freelists[total_size] = (element *)next;
- ctx->stats[total_size].freefrags++;
- }
- /*
- * curr is now pointing at the last block in the
- * array.
- */
- ((element *)curr)->next = NULL;
- ctx->freelists[new_size] = new;
-
- return (ISC_TRUE);
-}
-
-static inline void *
-mem_getunlocked(isc__mem_t *ctx, size_t size) {
- size_t new_size = quantize(size);
- void *ret;
-
- if (size >= ctx->max_size || new_size >= ctx->max_size) {
- /*
- * memget() was called on something beyond our upper limit.
- */
- if (ctx->quota != 0U && ctx->total + size > ctx->quota) {
- ret = NULL;
- goto done;
- }
- ret = (ctx->memalloc)(ctx->arg, size);
- if (ret == NULL) {
- ctx->memalloc_failures++;
- goto done;
- }
- ctx->total += size;
- ctx->inuse += size;
- ctx->stats[ctx->max_size].gets++;
- ctx->stats[ctx->max_size].totalgets++;
- /*
- * If we don't set new_size to size, then the
- * ISC_MEM_FILL code might write over bytes we
- * don't own.
- */
- new_size = size;
- goto done;
- }
-
- /*
- * If there are no blocks in the free list for this size, get a chunk
- * of memory and then break it up into "new_size"-sized blocks, adding
- * them to the free list.
- */
- if (ctx->freelists[new_size] == NULL && !more_frags(ctx, new_size))
- return (NULL);
-
- /*
- * The free list uses the "rounded-up" size "new_size".
- */
- ret = ctx->freelists[new_size];
- ctx->freelists[new_size] = ctx->freelists[new_size]->next;
-
- /*
- * The stats[] uses the _actual_ "size" requested by the
- * caller, with the caveat (in the code above) that "size" >= the
- * max. size (max_size) ends up getting recorded as a call to
- * max_size.
- */
- ctx->stats[size].gets++;
- ctx->stats[size].totalgets++;
- ctx->stats[new_size].freefrags--;
- ctx->inuse += new_size;
-
- done:
-
-#if ISC_MEM_FILL
- if (ret != NULL)
- memset(ret, 0xbe, new_size); /* Mnemonic for "beef". */
-#endif
-
- return (ret);
-}
-
-#if ISC_MEM_FILL && ISC_MEM_CHECKOVERRUN
-static inline void
-check_overrun(void *mem, size_t size, size_t new_size) {
- unsigned char *cp;
-
- cp = (unsigned char *)mem;
- cp += size;
- while (size < new_size) {
- INSIST(*cp == 0xbe);
- cp++;
- size++;
- }
-}
-#endif
-
-static inline void
-mem_putunlocked(isc__mem_t *ctx, void *mem, size_t size) {
- size_t new_size = quantize(size);
-
- if (size == ctx->max_size || new_size >= ctx->max_size) {
- /*
- * memput() called on something beyond our upper limit.
- */
-#if ISC_MEM_FILL
- memset(mem, 0xde, size); /* Mnemonic for "dead". */
-#endif
- (ctx->memfree)(ctx->arg, mem);
- INSIST(ctx->stats[ctx->max_size].gets != 0U);
- ctx->stats[ctx->max_size].gets--;
- INSIST(size <= ctx->total);
- ctx->inuse -= size;
- ctx->total -= size;
- return;
- }
-
-#if ISC_MEM_FILL
-#if ISC_MEM_CHECKOVERRUN
- check_overrun(mem, size, new_size);
-#endif
- memset(mem, 0xde, new_size); /* Mnemonic for "dead". */
-#endif
-
- /*
- * The free list uses the "rounded-up" size "new_size".
- */
- ((element *)mem)->next = ctx->freelists[new_size];
- ctx->freelists[new_size] = (element *)mem;
-
- /*
- * The stats[] uses the _actual_ "size" requested by the
- * caller, with the caveat (in the code above) that "size" >= the
- * max. size (max_size) ends up getting recorded as a call to
- * max_size.
- */
- INSIST(ctx->stats[size].gets != 0U);
- ctx->stats[size].gets--;
- ctx->stats[new_size].freefrags++;
- ctx->inuse -= new_size;
-}
-
-/*!
- * Perform a malloc, doing memory filling and overrun detection as necessary.
- */
-static inline void *
-mem_get(isc__mem_t *ctx, size_t size) {
- char *ret;
-
-#if ISC_MEM_CHECKOVERRUN
- size += 1;
-#endif
-
- ret = (ctx->memalloc)(ctx->arg, size);
- if (ret == NULL)
- ctx->memalloc_failures++;
-
-#if ISC_MEM_FILL
- if (ret != NULL)
- memset(ret, 0xbe, size); /* Mnemonic for "beef". */
-#else
-# if ISC_MEM_CHECKOVERRUN
- if (ret != NULL)
- ret[size-1] = 0xbe;
-# endif
-#endif
-
- return (ret);
-}
-
-/*!
- * Perform a free, doing memory filling and overrun detection as necessary.
- */
-static inline void
-mem_put(isc__mem_t *ctx, void *mem, size_t size) {
-#if ISC_MEM_CHECKOVERRUN
- INSIST(((unsigned char *)mem)[size] == 0xbe);
-#endif
-#if ISC_MEM_FILL
- memset(mem, 0xde, size); /* Mnemonic for "dead". */
-#else
- UNUSED(size);
-#endif
- (ctx->memfree)(ctx->arg, mem);
-}
-
-/*!
- * Update internal counters after a memory get.
- */
-static inline void
-mem_getstats(isc__mem_t *ctx, size_t size) {
- ctx->total += size;
- ctx->inuse += size;
-
- if (size > ctx->max_size) {
- ctx->stats[ctx->max_size].gets++;
- ctx->stats[ctx->max_size].totalgets++;
- } else {
- ctx->stats[size].gets++;
- ctx->stats[size].totalgets++;
- }
-}
-
-/*!
- * Update internal counters after a memory put.
- */
-static inline void
-mem_putstats(isc__mem_t *ctx, void *ptr, size_t size) {
- UNUSED(ptr);
-
- INSIST(ctx->inuse >= size);
- ctx->inuse -= size;
-
- if (size > ctx->max_size) {
- INSIST(ctx->stats[ctx->max_size].gets > 0U);
- ctx->stats[ctx->max_size].gets--;
- } else {
- INSIST(ctx->stats[size].gets > 0U);
- ctx->stats[size].gets--;
- }
-}
-
-/*
- * Private.
- */
-
-static void *
-default_memalloc(void *arg, size_t size) {
- UNUSED(arg);
- if (size == 0U)
- size = 1;
- return (malloc(size));
-}
-
-static void
-default_memfree(void *arg, void *ptr) {
- UNUSED(arg);
- free(ptr);
-}
-
-static void
-initialize_action(void) {
- RUNTIME_CHECK(isc_mutex_init(&lock) == ISC_R_SUCCESS);
- ISC_LIST_INIT(contexts);
- totallost = 0;
-}
-
-/*
- * Public.
- */
-
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_createx(size_t init_max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
- isc_mem_t **ctxp)
-{
- return (isc__mem_createx2(init_max_size, target_size, memalloc, memfree,
- arg, ctxp, ISC_MEMFLAG_DEFAULT));
-
-}
-
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_createx2(size_t init_max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
- isc_mem_t **ctxp, unsigned int flags)
-{
- isc__mem_t *ctx;
- isc_result_t result;
-
- REQUIRE(ctxp != NULL && *ctxp == NULL);
- REQUIRE(memalloc != NULL);
- REQUIRE(memfree != NULL);
-
- INSIST((ALIGNMENT_SIZE & (ALIGNMENT_SIZE - 1)) == 0);
-
- RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
-
- ctx = (memalloc)(arg, sizeof(*ctx));
- if (ctx == NULL)
- return (ISC_R_NOMEMORY);
-
- if ((flags & ISC_MEMFLAG_NOLOCK) == 0) {
- result = isc_mutex_init(&ctx->lock);
- if (result != ISC_R_SUCCESS) {
- (memfree)(arg, ctx);
- return (result);
- }
- }
-
- if (init_max_size == 0U)
- ctx->max_size = DEF_MAX_SIZE;
- else
- ctx->max_size = init_max_size;
- ctx->flags = flags;
- ctx->references = 1;
- memset(ctx->name, 0, sizeof(ctx->name));
- ctx->tag = NULL;
- ctx->quota = 0;
- ctx->total = 0;
- ctx->inuse = 0;
- ctx->maxinuse = 0;
- ctx->hi_water = 0;
- ctx->lo_water = 0;
- ctx->hi_called = ISC_FALSE;
- ctx->is_overmem = ISC_FALSE;
- ctx->water = NULL;
- ctx->water_arg = NULL;
- ctx->common.impmagic = MEM_MAGIC;
- ctx->common.magic = ISCAPI_MCTX_MAGIC;
- ctx->common.methods = (isc_memmethods_t *)&memmethods;
- isc_ondestroy_init(&ctx->ondestroy);
- ctx->memalloc = memalloc;
- ctx->memfree = memfree;
- ctx->arg = arg;
- ctx->stats = NULL;
- ctx->checkfree = ISC_TRUE;
-#if ISC_MEM_TRACKLINES
- ctx->debuglist = NULL;
- ctx->debuglistcnt = 0;
-#endif
- ISC_LIST_INIT(ctx->pools);
- ctx->poolcnt = 0;
- ctx->freelists = NULL;
- ctx->basic_blocks = NULL;
- ctx->basic_table = NULL;
- ctx->basic_table_count = 0;
- ctx->basic_table_size = 0;
- ctx->lowest = NULL;
- ctx->highest = NULL;
-
- ctx->stats = (memalloc)(arg,
- (ctx->max_size+1) * sizeof(struct stats));
- if (ctx->stats == NULL) {
- result = ISC_R_NOMEMORY;
- goto error;
- }
- memset(ctx->stats, 0, (ctx->max_size + 1) * sizeof(struct stats));
-
- if ((flags & ISC_MEMFLAG_INTERNAL) != 0) {
- if (target_size == 0U)
- ctx->mem_target = DEF_MEM_TARGET;
- else
- ctx->mem_target = target_size;
- ctx->freelists = (memalloc)(arg, ctx->max_size *
- sizeof(element *));
- if (ctx->freelists == NULL) {
- result = ISC_R_NOMEMORY;
- goto error;
- }
- memset(ctx->freelists, 0,
- ctx->max_size * sizeof(element *));
- }
-
-#if ISC_MEM_TRACKLINES
- if ((isc_mem_debugging & ISC_MEM_DEBUGRECORD) != 0) {
- unsigned int i;
-
- ctx->debuglist = (memalloc)(arg,
- (ctx->max_size+1) * sizeof(debuglist_t));
- if (ctx->debuglist == NULL) {
- result = ISC_R_NOMEMORY;
- goto error;
- }
- for (i = 0; i <= ctx->max_size; i++)
- ISC_LIST_INIT(ctx->debuglist[i]);
- }
-#endif
-
- ctx->memalloc_failures = 0;
-
- LOCK(&lock);
- ISC_LIST_INITANDAPPEND(contexts, ctx, link);
- UNLOCK(&lock);
-
- *ctxp = (isc_mem_t *)ctx;
- return (ISC_R_SUCCESS);
-
- error:
- if (ctx != NULL) {
- if (ctx->stats != NULL)
- (memfree)(arg, ctx->stats);
- if (ctx->freelists != NULL)
- (memfree)(arg, ctx->freelists);
-#if ISC_MEM_TRACKLINES
- if (ctx->debuglist != NULL)
- (ctx->memfree)(ctx->arg, ctx->debuglist);
-#endif /* ISC_MEM_TRACKLINES */
- if ((ctx->flags & ISC_MEMFLAG_NOLOCK) == 0)
- DESTROYLOCK(&ctx->lock);
- (memfree)(arg, ctx);
- }
-
- return (result);
-}
-
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_create(size_t init_max_size, size_t target_size, isc_mem_t **ctxp) {
- return (isc__mem_createx2(init_max_size, target_size,
- default_memalloc, default_memfree, NULL,
- ctxp, ISC_MEMFLAG_DEFAULT));
-}
-
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_create2(size_t init_max_size, size_t target_size,
- isc_mem_t **ctxp, unsigned int flags)
-{
- return (isc__mem_createx2(init_max_size, target_size,
- default_memalloc, default_memfree, NULL,
- ctxp, flags));
-}
-
-static void
-destroy(isc__mem_t *ctx) {
- unsigned int i;
- isc_ondestroy_t ondest;
-
- LOCK(&lock);
- ISC_LIST_UNLINK(contexts, ctx, link);
- totallost += ctx->inuse;
- UNLOCK(&lock);
-
- ctx->common.impmagic = 0;
- ctx->common.magic = 0;
-
- INSIST(ISC_LIST_EMPTY(ctx->pools));
-
-#if ISC_MEM_TRACKLINES
- if (ctx->debuglist != NULL) {
- if (ctx->checkfree) {
- for (i = 0; i <= ctx->max_size; i++) {
- if (!ISC_LIST_EMPTY(ctx->debuglist[i]))
- print_active(ctx, stderr);
- INSIST(ISC_LIST_EMPTY(ctx->debuglist[i]));
- }
- } else {
- debuglink_t *dl;
-
- for (i = 0; i <= ctx->max_size; i++)
- for (dl = ISC_LIST_HEAD(ctx->debuglist[i]);
- dl != NULL;
- dl = ISC_LIST_HEAD(ctx->debuglist[i])) {
- ISC_LIST_UNLINK(ctx->debuglist[i],
- dl, link);
- free(dl);
- }
- }
- (ctx->memfree)(ctx->arg, ctx->debuglist);
- }
-#endif
- INSIST(ctx->references == 0);
-
- if (ctx->checkfree) {
- for (i = 0; i <= ctx->max_size; i++) {
-#if ISC_MEM_TRACKLINES
- if (ctx->stats[i].gets != 0U)
- print_active(ctx, stderr);
-#endif
- INSIST(ctx->stats[i].gets == 0U);
- }
- }
-
- (ctx->memfree)(ctx->arg, ctx->stats);
-
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- for (i = 0; i < ctx->basic_table_count; i++)
- (ctx->memfree)(ctx->arg, ctx->basic_table[i]);
- (ctx->memfree)(ctx->arg, ctx->freelists);
- if (ctx->basic_table != NULL)
- (ctx->memfree)(ctx->arg, ctx->basic_table);
- }
-
- ondest = ctx->ondestroy;
-
- if ((ctx->flags & ISC_MEMFLAG_NOLOCK) == 0)
- DESTROYLOCK(&ctx->lock);
- (ctx->memfree)(ctx->arg, ctx);
-
- isc_ondestroy_notify(&ondest, ctx);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_attach(isc_mem_t *source0, isc_mem_t **targetp) {
- isc__mem_t *source = (isc__mem_t *)source0;
-
- REQUIRE(VALID_CONTEXT(source));
- REQUIRE(targetp != NULL && *targetp == NULL);
-
- MCTXLOCK(source, &source->lock);
- source->references++;
- MCTXUNLOCK(source, &source->lock);
-
- *targetp = (isc_mem_t *)source;
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_detach(isc_mem_t **ctxp) {
- isc__mem_t *ctx;
- isc_boolean_t want_destroy = ISC_FALSE;
-
- REQUIRE(ctxp != NULL);
- ctx = (isc__mem_t *)*ctxp;
- REQUIRE(VALID_CONTEXT(ctx));
-
- MCTXLOCK(ctx, &ctx->lock);
- INSIST(ctx->references > 0);
- ctx->references--;
- if (ctx->references == 0)
- want_destroy = ISC_TRUE;
- MCTXUNLOCK(ctx, &ctx->lock);
-
- if (want_destroy)
- destroy(ctx);
-
- *ctxp = NULL;
-}
-
-/*
- * isc_mem_putanddetach() is the equivalent of:
- *
- * mctx = NULL;
- * isc_mem_attach(ptr->mctx, &mctx);
- * isc_mem_detach(&ptr->mctx);
- * isc_mem_put(mctx, ptr, sizeof(*ptr);
- * isc_mem_detach(&mctx);
- */
-
-ISC_MEMFUNC_SCOPE void
-isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
- isc__mem_t *ctx;
- isc_boolean_t want_destroy = ISC_FALSE;
- size_info *si;
- size_t oldsize;
-
- REQUIRE(ctxp != NULL);
- ctx = (isc__mem_t *)*ctxp;
- REQUIRE(VALID_CONTEXT(ctx));
- REQUIRE(ptr != NULL);
-
- /*
- * Must be before mem_putunlocked() as ctxp is usually within
- * [ptr..ptr+size).
- */
- *ctxp = NULL;
-
- if ((isc_mem_debugging & (ISC_MEM_DEBUGSIZE|ISC_MEM_DEBUGCTX)) != 0) {
- if ((isc_mem_debugging & ISC_MEM_DEBUGSIZE) != 0) {
- si = &(((size_info *)ptr)[-1]);
- oldsize = si->u.size - ALIGNMENT_SIZE;
- if ((isc_mem_debugging & ISC_MEM_DEBUGCTX) != 0)
- oldsize -= ALIGNMENT_SIZE;
- INSIST(oldsize == size);
- }
- isc_mem_free((isc_mem_t *)ctx, ptr);
-
- MCTXLOCK(ctx, &ctx->lock);
- ctx->references--;
- if (ctx->references == 0)
- want_destroy = ISC_TRUE;
- MCTXUNLOCK(ctx, &ctx->lock);
- if (want_destroy)
- destroy(ctx);
-
- return;
- }
-
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- MCTXLOCK(ctx, &ctx->lock);
- mem_putunlocked(ctx, ptr, size);
- } else {
- mem_put(ctx, ptr, size);
- MCTXLOCK(ctx, &ctx->lock);
- mem_putstats(ctx, ptr, size);
- }
-
- DELETE_TRACE(ctx, ptr, size, file, line);
- INSIST(ctx->references > 0);
- ctx->references--;
- if (ctx->references == 0)
- want_destroy = ISC_TRUE;
-
- MCTXUNLOCK(ctx, &ctx->lock);
-
- if (want_destroy)
- destroy(ctx);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_destroy(isc_mem_t **ctxp) {
- isc__mem_t *ctx;
-
- /*
- * This routine provides legacy support for callers who use mctxs
- * without attaching/detaching.
- */
-
- REQUIRE(ctxp != NULL);
- ctx = (isc__mem_t *)*ctxp;
- REQUIRE(VALID_CONTEXT(ctx));
-
- MCTXLOCK(ctx, &ctx->lock);
-#if ISC_MEM_TRACKLINES
- if (ctx->references != 1)
- print_active(ctx, stderr);
-#endif
- REQUIRE(ctx->references == 1);
- ctx->references--;
- MCTXUNLOCK(ctx, &ctx->lock);
-
- destroy(ctx);
-
- *ctxp = NULL;
-}
-
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mem_ondestroy(isc_mem_t *ctx0, isc_task_t *task, isc_event_t **event) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- isc_result_t res;
-
- MCTXLOCK(ctx, &ctx->lock);
- res = isc_ondestroy_register(&ctx->ondestroy, task, event);
- MCTXUNLOCK(ctx, &ctx->lock);
-
- return (res);
-}
-
-ISC_MEMFUNC_SCOPE void *
-isc___mem_get(isc_mem_t *ctx0, size_t size FLARG) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- void *ptr;
- isc_boolean_t call_water = ISC_FALSE;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- if ((isc_mem_debugging & (ISC_MEM_DEBUGSIZE|ISC_MEM_DEBUGCTX)) != 0)
- return (isc__mem_allocate(ctx0, size FLARG_PASS));
-
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- MCTXLOCK(ctx, &ctx->lock);
- ptr = mem_getunlocked(ctx, size);
- } else {
- ptr = mem_get(ctx, size);
- MCTXLOCK(ctx, &ctx->lock);
- if (ptr != NULL)
- mem_getstats(ctx, size);
- }
-
- ADD_TRACE(ctx, ptr, size, file, line);
- if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
- !ctx->is_overmem) {
- ctx->is_overmem = ISC_TRUE;
- }
- if (ctx->hi_water != 0U && !ctx->hi_called &&
- ctx->inuse > ctx->hi_water) {
- call_water = ISC_TRUE;
- }
- if (ctx->inuse > ctx->maxinuse) {
- ctx->maxinuse = ctx->inuse;
- if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
- (isc_mem_debugging & ISC_MEM_DEBUGUSAGE) != 0)
- fprintf(stderr, "maxinuse = %lu\n",
- (unsigned long)ctx->inuse);
- }
- MCTXUNLOCK(ctx, &ctx->lock);
-
- if (call_water)
- (ctx->water)(ctx->water_arg, ISC_MEM_HIWATER);
-
- return (ptr);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc___mem_put(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- isc_boolean_t call_water = ISC_FALSE;
- size_info *si;
- size_t oldsize;
-
- REQUIRE(VALID_CONTEXT(ctx));
- REQUIRE(ptr != NULL);
-
- if ((isc_mem_debugging & (ISC_MEM_DEBUGSIZE|ISC_MEM_DEBUGCTX)) != 0) {
- if ((isc_mem_debugging & ISC_MEM_DEBUGSIZE) != 0) {
- si = &(((size_info *)ptr)[-1]);
- oldsize = si->u.size - ALIGNMENT_SIZE;
- if ((isc_mem_debugging & ISC_MEM_DEBUGCTX) != 0)
- oldsize -= ALIGNMENT_SIZE;
- INSIST(oldsize == size);
- }
- isc_mem_free((isc_mem_t *)ctx, ptr);
- return;
- }
-
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- MCTXLOCK(ctx, &ctx->lock);
- mem_putunlocked(ctx, ptr, size);
- } else {
- mem_put(ctx, ptr, size);
- MCTXLOCK(ctx, &ctx->lock);
- mem_putstats(ctx, ptr, size);
- }
-
- DELETE_TRACE(ctx, ptr, size, file, line);
-
- /*
- * The check against ctx->lo_water == 0 is for the condition
- * when the context was pushed over hi_water but then had
- * isc_mem_setwater() called with 0 for hi_water and lo_water.
- */
- if (ctx->is_overmem &&
- (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
- ctx->is_overmem = ISC_FALSE;
- }
- if (ctx->hi_called &&
- (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
- if (ctx->water != NULL)
- call_water = ISC_TRUE;
- }
- MCTXUNLOCK(ctx, &ctx->lock);
-
- if (call_water)
- (ctx->water)(ctx->water_arg, ISC_MEM_LOWATER);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_waterack(isc_mem_t *ctx0, int flag) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- MCTXLOCK(ctx, &ctx->lock);
- if (flag == ISC_MEM_LOWATER)
- ctx->hi_called = ISC_FALSE;
- else if (flag == ISC_MEM_HIWATER)
- ctx->hi_called = ISC_TRUE;
- MCTXUNLOCK(ctx, &ctx->lock);
-}
-
-#if ISC_MEM_TRACKLINES
-static void
-print_active(isc__mem_t *mctx, FILE *out) {
- if (mctx->debuglist != NULL) {
- debuglink_t *dl;
- unsigned int i, j;
- const char *format;
- isc_boolean_t found;
-
- fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_DUMPALLOC,
- "Dump of all outstanding "
- "memory allocations:\n"));
- found = ISC_FALSE;
- format = isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_PTRFILELINE,
- "\tptr %p size %u file %s line %u\n");
- for (i = 0; i <= mctx->max_size; i++) {
- dl = ISC_LIST_HEAD(mctx->debuglist[i]);
-
- if (dl != NULL)
- found = ISC_TRUE;
-
- while (dl != NULL) {
- for (j = 0; j < DEBUGLIST_COUNT; j++)
- if (dl->ptr[j] != NULL)
- fprintf(out, format,
- dl->ptr[j],
- dl->size[j],
- dl->file[j],
- dl->line[j]);
- dl = ISC_LIST_NEXT(dl, link);
- }
- }
- if (!found)
- fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_NONE, "\tNone.\n"));
- }
-}
-#endif
-
-/*
- * Print the stats[] on the stream "out" with suitable formatting.
- */
-ISC_MEMFUNC_SCOPE void
-isc__mem_stats(isc_mem_t *ctx0, FILE *out) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- size_t i;
- const struct stats *s;
- const isc__mempool_t *pool;
-
- REQUIRE(VALID_CONTEXT(ctx));
- MCTXLOCK(ctx, &ctx->lock);
-
- for (i = 0; i <= ctx->max_size; i++) {
- s = &ctx->stats[i];
-
- if (s->totalgets == 0U && s->gets == 0U)
- continue;
- fprintf(out, "%s%5lu: %11lu gets, %11lu rem",
- (i == ctx->max_size) ? ">=" : " ",
- (unsigned long) i, s->totalgets, s->gets);
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0 &&
- (s->blocks != 0U || s->freefrags != 0U))
- fprintf(out, " (%lu bl, %lu ff)",
- s->blocks, s->freefrags);
- fputc('\n', out);
- }
-
- /*
- * Note that since a pool can be locked now, these stats might be
- * somewhat off if the pool is in active use at the time the stats
- * are dumped. The link fields are protected by the isc_mem_t's
- * lock, however, so walking this list and extracting integers from
- * stats fields is always safe.
- */
- pool = ISC_LIST_HEAD(ctx->pools);
- if (pool != NULL) {
- fprintf(out, "%s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLSTATS,
- "[Pool statistics]\n"));
- fprintf(out, "%15s %10s %10s %10s %10s %10s %10s %10s %1s\n",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLNAME, "name"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLSIZE, "size"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLMAXALLOC, "maxalloc"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLALLOCATED, "allocated"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLFREECOUNT, "freecount"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLFREEMAX, "freemax"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLFILLCOUNT, "fillcount"),
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_POOLGETS, "gets"),
- "L");
- }
- while (pool != NULL) {
- fprintf(out, "%15s %10lu %10u %10u %10u %10u %10u %10u %s\n",
- pool->name, (unsigned long) pool->size, pool->maxalloc,
- pool->allocated, pool->freecount, pool->freemax,
- pool->fillcount, pool->gets,
- (pool->lock == NULL ? "N" : "Y"));
- pool = ISC_LIST_NEXT(pool, link);
- }
-
-#if ISC_MEM_TRACKLINES
- print_active(ctx, out);
-#endif
-
- MCTXUNLOCK(ctx, &ctx->lock);
-}
-
-/*
- * Replacements for malloc() and free() -- they implicitly remember the
- * size of the object allocated (with some additional overhead).
- */
-
-static void *
-isc__mem_allocateunlocked(isc_mem_t *ctx0, size_t size) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- size_info *si;
-
- size += ALIGNMENT_SIZE;
- if ((isc_mem_debugging & ISC_MEM_DEBUGCTX) != 0)
- size += ALIGNMENT_SIZE;
-
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0)
- si = mem_getunlocked(ctx, size);
- else
- si = mem_get(ctx, size);
-
- if (si == NULL)
- return (NULL);
- if ((isc_mem_debugging & ISC_MEM_DEBUGCTX) != 0) {
- si->u.ctx = ctx;
- si++;
- }
- si->u.size = size;
- return (&si[1]);
-}
-
-ISC_MEMFUNC_SCOPE void *
-isc___mem_allocate(isc_mem_t *ctx0, size_t size FLARG) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- size_info *si;
- isc_boolean_t call_water = ISC_FALSE;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- MCTXLOCK(ctx, &ctx->lock);
- si = isc__mem_allocateunlocked((isc_mem_t *)ctx, size);
- } else {
- si = isc__mem_allocateunlocked((isc_mem_t *)ctx, size);
- MCTXLOCK(ctx, &ctx->lock);
- if (si != NULL)
- mem_getstats(ctx, si[-1].u.size);
- }
-
-#if ISC_MEM_TRACKLINES
- ADD_TRACE(ctx, si, si[-1].u.size, file, line);
-#endif
- if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
- !ctx->is_overmem) {
- ctx->is_overmem = ISC_TRUE;
- }
-
- if (ctx->hi_water != 0U && !ctx->hi_called &&
- ctx->inuse > ctx->hi_water) {
- ctx->hi_called = ISC_TRUE;
- call_water = ISC_TRUE;
- }
- if (ctx->inuse > ctx->maxinuse) {
- ctx->maxinuse = ctx->inuse;
- if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
- (isc_mem_debugging & ISC_MEM_DEBUGUSAGE) != 0)
- fprintf(stderr, "maxinuse = %lu\n",
- (unsigned long)ctx->inuse);
- }
- MCTXUNLOCK(ctx, &ctx->lock);
-
- if (call_water)
- (ctx->water)(ctx->water_arg, ISC_MEM_HIWATER);
-
- return (si);
-}
-
-ISC_MEMFUNC_SCOPE void *
-isc___mem_reallocate(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- void *new_ptr = NULL;
- size_t oldsize, copysize;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- /*
- * This function emulates the realloc(3) standard library function:
- * - if size > 0, allocate new memory; and if ptr is non NULL, copy
- * as much of the old contents to the new buffer and free the old one.
- * Note that when allocation fails the original pointer is intact;
- * the caller must free it.
- * - if size is 0 and ptr is non NULL, simply free the given ptr.
- * - this function returns:
- * pointer to the newly allocated memory, or
- * NULL if allocation fails or doesn't happen.
- */
- if (size > 0U) {
- new_ptr = isc__mem_allocate(ctx0, size FLARG_PASS);
- if (new_ptr != NULL && ptr != NULL) {
- oldsize = (((size_info *)ptr)[-1]).u.size;
- INSIST(oldsize >= ALIGNMENT_SIZE);
- oldsize -= ALIGNMENT_SIZE;
- copysize = oldsize > size ? size : oldsize;
- memcpy(new_ptr, ptr, copysize);
- isc__mem_free(ctx0, ptr FLARG_PASS);
- }
- } else if (ptr != NULL)
- isc__mem_free(ctx0, ptr FLARG_PASS);
-
- return (new_ptr);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc___mem_free(isc_mem_t *ctx0, void *ptr FLARG) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- size_info *si;
- size_t size;
- isc_boolean_t call_water= ISC_FALSE;
-
- REQUIRE(VALID_CONTEXT(ctx));
- REQUIRE(ptr != NULL);
-
- if ((isc_mem_debugging & ISC_MEM_DEBUGCTX) != 0) {
- si = &(((size_info *)ptr)[-2]);
- REQUIRE(si->u.ctx == ctx);
- size = si[1].u.size;
- } else {
- si = &(((size_info *)ptr)[-1]);
- size = si->u.size;
- }
-
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- MCTXLOCK(ctx, &ctx->lock);
- mem_putunlocked(ctx, si, size);
- } else {
- mem_put(ctx, si, size);
- MCTXLOCK(ctx, &ctx->lock);
- mem_putstats(ctx, si, size);
- }
-
- DELETE_TRACE(ctx, ptr, size, file, line);
-
- /*
- * The check against ctx->lo_water == 0 is for the condition
- * when the context was pushed over hi_water but then had
- * isc_mem_setwater() called with 0 for hi_water and lo_water.
- */
- if (ctx->is_overmem &&
- (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
- ctx->is_overmem = ISC_FALSE;
- }
-
- if (ctx->hi_called &&
- (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
- ctx->hi_called = ISC_FALSE;
-
- if (ctx->water != NULL)
- call_water = ISC_TRUE;
- }
- MCTXUNLOCK(ctx, &ctx->lock);
-
- if (call_water)
- (ctx->water)(ctx->water_arg, ISC_MEM_LOWATER);
-}
-
-
-/*
- * Other useful things.
- */
-
-ISC_MEMFUNC_SCOPE char *
-isc___mem_strdup(isc_mem_t *mctx0, const char *s FLARG) {
- isc__mem_t *mctx = (isc__mem_t *)mctx0;
- size_t len;
- char *ns;
-
- REQUIRE(VALID_CONTEXT(mctx));
- REQUIRE(s != NULL);
-
- len = strlen(s);
-
- ns = isc___mem_allocate((isc_mem_t *)mctx, len + 1 FLARG_PASS);
-
- if (ns != NULL)
- strncpy(ns, s, len + 1);
-
- return (ns);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_setdestroycheck(isc_mem_t *ctx0, isc_boolean_t flag) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
- MCTXLOCK(ctx, &ctx->lock);
-
- ctx->checkfree = flag;
-
- MCTXUNLOCK(ctx, &ctx->lock);
-}
-
-/*
- * Quotas
- */
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_setquota(isc_mem_t *ctx0, size_t quota) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
- MCTXLOCK(ctx, &ctx->lock);
-
- ctx->quota = quota;
-
- MCTXUNLOCK(ctx, &ctx->lock);
-}
-
-ISC_MEMFUNC_SCOPE size_t
-isc__mem_getquota(isc_mem_t *ctx0) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- size_t quota;
-
- REQUIRE(VALID_CONTEXT(ctx));
- MCTXLOCK(ctx, &ctx->lock);
-
- quota = ctx->quota;
-
- MCTXUNLOCK(ctx, &ctx->lock);
-
- return (quota);
-}
-
-ISC_MEMFUNC_SCOPE size_t
-isc__mem_inuse(isc_mem_t *ctx0) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- size_t inuse;
-
- REQUIRE(VALID_CONTEXT(ctx));
- MCTXLOCK(ctx, &ctx->lock);
-
- inuse = ctx->inuse;
-
- MCTXUNLOCK(ctx, &ctx->lock);
-
- return (inuse);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_setwater(isc_mem_t *ctx0, isc_mem_water_t water, void *water_arg,
- size_t hiwater, size_t lowater)
-{
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- isc_boolean_t callwater = ISC_FALSE;
- isc_mem_water_t oldwater;
- void *oldwater_arg;
-
- REQUIRE(VALID_CONTEXT(ctx));
- REQUIRE(hiwater >= lowater);
-
- MCTXLOCK(ctx, &ctx->lock);
- oldwater = ctx->water;
- oldwater_arg = ctx->water_arg;
- if (water == NULL) {
- callwater = ctx->hi_called;
- ctx->water = NULL;
- ctx->water_arg = NULL;
- ctx->hi_water = 0;
- ctx->lo_water = 0;
- ctx->hi_called = ISC_FALSE;
- } else {
- if (ctx->hi_called &&
- (ctx->water != water || ctx->water_arg != water_arg ||
- ctx->inuse < lowater || lowater == 0U))
- callwater = ISC_TRUE;
- ctx->water = water;
- ctx->water_arg = water_arg;
- ctx->hi_water = hiwater;
- ctx->lo_water = lowater;
- ctx->hi_called = ISC_FALSE;
- }
- MCTXUNLOCK(ctx, &ctx->lock);
-
- if (callwater && oldwater != NULL)
- (oldwater)(oldwater_arg, ISC_MEM_LOWATER);
-}
-
-ISC_MEMFUNC_SCOPE isc_boolean_t
-isc__mem_isovermem(isc_mem_t *ctx0) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- /*
- * We don't bother to lock the context because 100% accuracy isn't
- * necessary (and even if we locked the context the returned value
- * could be different from the actual state when it's used anyway)
- */
- return (ctx->is_overmem);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_setname(isc_mem_t *ctx0, const char *name, void *tag) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- LOCK(&ctx->lock);
- memset(ctx->name, 0, sizeof(ctx->name));
- strncpy(ctx->name, name, sizeof(ctx->name) - 1);
- ctx->tag = tag;
- UNLOCK(&ctx->lock);
-}
-
-ISC_MEMFUNC_SCOPE const char *
-isc__mem_getname(isc_mem_t *ctx0) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- return (ctx->name);
-}
-
-ISC_MEMFUNC_SCOPE void *
-isc__mem_gettag(isc_mem_t *ctx0) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- return (ctx->tag);
-}
-
-/*
- * Memory pool stuff
- */
-
-ISC_MEMFUNC_SCOPE isc_result_t
-isc__mempool_create(isc_mem_t *mctx0, size_t size, isc_mempool_t **mpctxp) {
- isc__mem_t *mctx = (isc__mem_t *)mctx0;
- isc__mempool_t *mpctx;
-
- REQUIRE(VALID_CONTEXT(mctx));
- REQUIRE(size > 0U);
- REQUIRE(mpctxp != NULL && *mpctxp == NULL);
-
- /*
- * Allocate space for this pool, initialize values, and if all works
- * well, attach to the memory context.
- */
- mpctx = isc_mem_get((isc_mem_t *)mctx, sizeof(isc__mempool_t));
- if (mpctx == NULL)
- return (ISC_R_NOMEMORY);
-
- mpctx->common.methods = (isc_mempoolmethods_t *)&mempoolmethods;
- mpctx->common.impmagic = MEMPOOL_MAGIC;
- mpctx->common.magic = ISCAPI_MPOOL_MAGIC;
- mpctx->lock = NULL;
- mpctx->mctx = mctx;
- mpctx->size = size;
- mpctx->maxalloc = UINT_MAX;
- mpctx->allocated = 0;
- mpctx->freecount = 0;
- mpctx->freemax = 1;
- mpctx->fillcount = 1;
- mpctx->gets = 0;
-#if ISC_MEMPOOL_NAMES
- mpctx->name[0] = 0;
-#endif
- mpctx->items = NULL;
-
- *mpctxp = (isc_mempool_t *)mpctx;
-
- MCTXLOCK(mctx, &mctx->lock);
- ISC_LIST_INITANDAPPEND(mctx->pools, mpctx, link);
- mctx->poolcnt++;
- MCTXUNLOCK(mctx, &mctx->lock);
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setname(isc_mempool_t *mpctx0, const char *name) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
-
- REQUIRE(name != NULL);
- REQUIRE(VALID_MEMPOOL(mpctx));
-
-#if ISC_MEMPOOL_NAMES
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- strncpy(mpctx->name, name, sizeof(mpctx->name) - 1);
- mpctx->name[sizeof(mpctx->name) - 1] = '\0';
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-#else
- UNUSED(mpctx);
- UNUSED(name);
-#endif
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mempool_destroy(isc_mempool_t **mpctxp) {
- isc__mempool_t *mpctx;
- isc__mem_t *mctx;
- isc_mutex_t *lock;
- element *item;
-
- REQUIRE(mpctxp != NULL);
- mpctx = (isc__mempool_t *)*mpctxp;
- REQUIRE(VALID_MEMPOOL(mpctx));
-#if ISC_MEMPOOL_NAMES
- if (mpctx->allocated > 0)
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc__mempool_destroy(): mempool %s "
- "leaked memory",
- mpctx->name);
-#endif
- REQUIRE(mpctx->allocated == 0);
-
- mctx = mpctx->mctx;
-
- lock = mpctx->lock;
-
- if (lock != NULL)
- LOCK(lock);
-
- /*
- * Return any items on the free list
- */
- MCTXLOCK(mctx, &mctx->lock);
- while (mpctx->items != NULL) {
- INSIST(mpctx->freecount > 0);
- mpctx->freecount--;
- item = mpctx->items;
- mpctx->items = item->next;
-
- if ((mctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- mem_putunlocked(mctx, item, mpctx->size);
- } else {
- mem_put(mctx, item, mpctx->size);
- mem_putstats(mctx, item, mpctx->size);
- }
- }
- MCTXUNLOCK(mctx, &mctx->lock);
-
- /*
- * Remove our linked list entry from the memory context.
- */
- MCTXLOCK(mctx, &mctx->lock);
- ISC_LIST_UNLINK(mctx->pools, mpctx, link);
- mctx->poolcnt--;
- MCTXUNLOCK(mctx, &mctx->lock);
-
- mpctx->common.impmagic = 0;
- mpctx->common.magic = 0;
-
- isc_mem_put((isc_mem_t *)mpctx->mctx, mpctx, sizeof(isc__mempool_t));
-
- if (lock != NULL)
- UNLOCK(lock);
-
- *mpctxp = NULL;
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mempool_associatelock(isc_mempool_t *mpctx0, isc_mutex_t *lock) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
- REQUIRE(mpctx->lock == NULL);
- REQUIRE(lock != NULL);
-
- mpctx->lock = lock;
-}
-
-ISC_MEMFUNC_SCOPE void *
-isc___mempool_get(isc_mempool_t *mpctx0 FLARG) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
- element *item;
- isc__mem_t *mctx;
- unsigned int i;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- mctx = mpctx->mctx;
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- /*
- * Don't let the caller go over quota
- */
- if (mpctx->allocated >= mpctx->maxalloc) {
- item = NULL;
- goto out;
- }
-
- /*
- * if we have a free list item, return the first here
- */
- item = mpctx->items;
- if (item != NULL) {
- mpctx->items = item->next;
- INSIST(mpctx->freecount > 0);
- mpctx->freecount--;
- mpctx->gets++;
- mpctx->allocated++;
- goto out;
- }
-
- /*
- * We need to dip into the well. Lock the memory context here and
- * fill up our free list.
- */
- MCTXLOCK(mctx, &mctx->lock);
- for (i = 0; i < mpctx->fillcount; i++) {
- if ((mctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- item = mem_getunlocked(mctx, mpctx->size);
- } else {
- item = mem_get(mctx, mpctx->size);
- if (item != NULL)
- mem_getstats(mctx, mpctx->size);
- }
- if (item == NULL)
- break;
- item->next = mpctx->items;
- mpctx->items = item;
- mpctx->freecount++;
- }
- MCTXUNLOCK(mctx, &mctx->lock);
-
- /*
- * If we didn't get any items, return NULL.
- */
- item = mpctx->items;
- if (item == NULL)
- goto out;
-
- mpctx->items = item->next;
- mpctx->freecount--;
- mpctx->gets++;
- mpctx->allocated++;
-
- out:
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-
-#if ISC_MEM_TRACKLINES
- if (item != NULL) {
- MCTXLOCK(mctx, &mctx->lock);
- ADD_TRACE(mctx, item, mpctx->size, file, line);
- MCTXUNLOCK(mctx, &mctx->lock);
- }
-#endif /* ISC_MEM_TRACKLINES */
-
- return (item);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc___mempool_put(isc_mempool_t *mpctx0, void *mem FLARG) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
- isc__mem_t *mctx;
- element *item;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
- REQUIRE(mem != NULL);
-
- mctx = mpctx->mctx;
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- INSIST(mpctx->allocated > 0);
- mpctx->allocated--;
-
-#if ISC_MEM_TRACKLINES
- MCTXLOCK(mctx, &mctx->lock);
- DELETE_TRACE(mctx, mem, mpctx->size, file, line);
- MCTXUNLOCK(mctx, &mctx->lock);
-#endif /* ISC_MEM_TRACKLINES */
-
- /*
- * If our free list is full, return this to the mctx directly.
- */
- if (mpctx->freecount >= mpctx->freemax) {
- if ((mctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- MCTXLOCK(mctx, &mctx->lock);
- mem_putunlocked(mctx, mem, mpctx->size);
- MCTXUNLOCK(mctx, &mctx->lock);
- } else {
- mem_put(mctx, mem, mpctx->size);
- MCTXLOCK(mctx, &mctx->lock);
- mem_putstats(mctx, mem, mpctx->size);
- MCTXUNLOCK(mctx, &mctx->lock);
- }
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
- return;
- }
-
- /*
- * Otherwise, attach it to our free list and bump the counter.
- */
- mpctx->freecount++;
- item = (element *)mem;
- item->next = mpctx->items;
- mpctx->items = item;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-}
-
-/*
- * Quotas
- */
-
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setfreemax(isc_mempool_t *mpctx0, unsigned int limit) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- mpctx->freemax = limit;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-}
-
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getfreemax(isc_mempool_t *mpctx0) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
- unsigned int freemax;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- freemax = mpctx->freemax;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-
- return (freemax);
-}
-
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getfreecount(isc_mempool_t *mpctx0) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
- unsigned int freecount;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- freecount = mpctx->freecount;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-
- return (freecount);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setmaxalloc(isc_mempool_t *mpctx0, unsigned int limit) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
-
- REQUIRE(limit > 0);
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- mpctx->maxalloc = limit;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-}
-
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getmaxalloc(isc_mempool_t *mpctx0) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
- unsigned int maxalloc;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- maxalloc = mpctx->maxalloc;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-
- return (maxalloc);
-}
-
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getallocated(isc_mempool_t *mpctx0) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
- unsigned int allocated;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- allocated = mpctx->allocated;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-
- return (allocated);
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mempool_setfillcount(isc_mempool_t *mpctx0, unsigned int limit) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
-
- REQUIRE(limit > 0);
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- mpctx->fillcount = limit;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-}
-
-ISC_MEMFUNC_SCOPE unsigned int
-isc__mempool_getfillcount(isc_mempool_t *mpctx0) {
- isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
-
- unsigned int fillcount;
-
- REQUIRE(VALID_MEMPOOL(mpctx));
-
- if (mpctx->lock != NULL)
- LOCK(mpctx->lock);
-
- fillcount = mpctx->fillcount;
-
- if (mpctx->lock != NULL)
- UNLOCK(mpctx->lock);
-
- return (fillcount);
-}
-
-#ifdef USE_MEMIMPREGISTER
-isc_result_t
-isc__mem_register() {
- return (isc_mem_register(isc__mem_create2));
-}
-#endif
-
-#ifdef BIND9
-ISC_MEMFUNC_SCOPE void
-isc__mem_printactive(isc_mem_t *ctx0, FILE *file) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
-
- REQUIRE(VALID_CONTEXT(ctx));
- REQUIRE(file != NULL);
-
-#if !ISC_MEM_TRACKLINES
- UNUSED(ctx);
- UNUSED(file);
-#else
- print_active(ctx, file);
-#endif
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_printallactive(FILE *file) {
-#if !ISC_MEM_TRACKLINES
- UNUSED(file);
-#else
- isc__mem_t *ctx;
-
- RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
-
- LOCK(&lock);
- for (ctx = ISC_LIST_HEAD(contexts);
- ctx != NULL;
- ctx = ISC_LIST_NEXT(ctx, link)) {
- fprintf(file, "context: %p\n", ctx);
- print_active(ctx, file);
- }
- UNLOCK(&lock);
-#endif
-}
-
-ISC_MEMFUNC_SCOPE void
-isc__mem_checkdestroyed(FILE *file) {
-
- RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
-
- LOCK(&lock);
- if (!ISC_LIST_EMPTY(contexts)) {
-#if ISC_MEM_TRACKLINES
- isc__mem_t *ctx;
-
- for (ctx = ISC_LIST_HEAD(contexts);
- ctx != NULL;
- ctx = ISC_LIST_NEXT(ctx, link)) {
- fprintf(file, "context: %p\n", ctx);
- print_active(ctx, file);
- }
- fflush(file);
-#endif
- INSIST(0);
- }
- UNLOCK(&lock);
-}
-
-ISC_MEMFUNC_SCOPE unsigned int
-isc_mem_references(isc_mem_t *ctx0) {
- isc__mem_t *ctx = (isc__mem_t *)ctx0;
- unsigned int references;
-
- REQUIRE(VALID_CONTEXT(ctx));
-
- MCTXLOCK(ctx, &ctx->lock);
- references = ctx->references;
- MCTXUNLOCK(ctx, &ctx->lock);
-
- return (references);
-}
-
-#ifdef HAVE_LIBXML2
-
-typedef struct summarystat {
- isc_uint64_t total;
- isc_uint64_t inuse;
- isc_uint64_t blocksize;
- isc_uint64_t contextsize;
-} summarystat_t;
-
-static void
-renderctx(isc__mem_t *ctx, summarystat_t *summary, xmlTextWriterPtr writer) {
- REQUIRE(VALID_CONTEXT(ctx));
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "context");
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "id");
- xmlTextWriterWriteFormatString(writer, "%p", ctx);
- xmlTextWriterEndElement(writer); /* id */
-
- if (ctx->name[0] != 0) {
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "name");
- xmlTextWriterWriteFormatString(writer, "%s", ctx->name);
- xmlTextWriterEndElement(writer); /* name */
- }
-
- REQUIRE(VALID_CONTEXT(ctx));
- MCTXLOCK(ctx, &ctx->lock);
-
- summary->contextsize += sizeof(*ctx) +
- (ctx->max_size + 1) * sizeof(struct stats) +
- ctx->max_size * sizeof(element *) +
- ctx->basic_table_count * sizeof(char *);
-#if ISC_MEM_TRACKLINES
- if (ctx->debuglist != NULL) {
- summary->contextsize +=
- (ctx->max_size + 1) * sizeof(debuglist_t) +
- ctx->debuglistcnt * sizeof(debuglink_t);
- }
-#endif
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
- xmlTextWriterWriteFormatString(writer, "%d", ctx->references);
- xmlTextWriterEndElement(writer); /* references */
-
- summary->total += ctx->total;
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "total");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- (isc_uint64_t)ctx->total);
- xmlTextWriterEndElement(writer); /* total */
-
- summary->inuse += ctx->inuse;
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "inuse");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- (isc_uint64_t)ctx->inuse);
- xmlTextWriterEndElement(writer); /* inuse */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "maxinuse");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- (isc_uint64_t)ctx->maxinuse);
- xmlTextWriterEndElement(writer); /* maxinuse */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "blocksize");
- if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
- summary->blocksize += ctx->basic_table_count *
- NUM_BASIC_BLOCKS * ctx->mem_target;
- xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
- (isc_uint64_t)
- ctx->basic_table_count *
- NUM_BASIC_BLOCKS *
- ctx->mem_target);
- } else
- xmlTextWriterWriteFormatString(writer, "%s", "-");
- xmlTextWriterEndElement(writer); /* blocksize */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "pools");
- xmlTextWriterWriteFormatString(writer, "%u", ctx->poolcnt);
- xmlTextWriterEndElement(writer); /* pools */
- summary->contextsize += ctx->poolcnt * sizeof(isc_mempool_t);
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "hiwater");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- (isc_uint64_t)ctx->hi_water);
- xmlTextWriterEndElement(writer); /* hiwater */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "lowater");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- (isc_uint64_t)ctx->lo_water);
- xmlTextWriterEndElement(writer); /* lowater */
-
- MCTXUNLOCK(ctx, &ctx->lock);
-
- xmlTextWriterEndElement(writer); /* context */
-}
-
-void
-isc_mem_renderxml(xmlTextWriterPtr writer) {
- isc__mem_t *ctx;
- summarystat_t summary;
- isc_uint64_t lost;
-
- memset(&summary, 0, sizeof(summary));
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "contexts");
-
- RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
-
- LOCK(&lock);
- lost = totallost;
- for (ctx = ISC_LIST_HEAD(contexts);
- ctx != NULL;
- ctx = ISC_LIST_NEXT(ctx, link)) {
- renderctx(ctx, &summary, writer);
- }
- UNLOCK(&lock);
-
- xmlTextWriterEndElement(writer); /* contexts */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "summary");
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "TotalUse");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- summary.total);
- xmlTextWriterEndElement(writer); /* TotalUse */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "InUse");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- summary.inuse);
- xmlTextWriterEndElement(writer); /* InUse */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "BlockSize");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- summary.blocksize);
- xmlTextWriterEndElement(writer); /* BlockSize */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "ContextSize");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- summary.contextsize);
- xmlTextWriterEndElement(writer); /* ContextSize */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "Lost");
- xmlTextWriterWriteFormatString(writer, "%" ISC_PRINT_QUADFORMAT "u",
- lost);
- xmlTextWriterEndElement(writer); /* Lost */
-
- xmlTextWriterEndElement(writer); /* summary */
-}
-
-#endif /* HAVE_LIBXML2 */
-#endif /* BIND9 */
diff --git a/contrib/ntp/lib/isc/mem_api.c b/contrib/ntp/lib/isc/mem_api.c
deleted file mode 100644
index 85abb9b4507c..000000000000
--- a/contrib/ntp/lib/isc/mem_api.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: mem_api.c,v 1.8 2010/08/12 21:30:26 jinmei Exp $ */
-
-#include <config.h>
-
-#include <isc/magic.h>
-#include <isc/mem.h>
-#include <isc/once.h>
-#include <isc/util.h>
-
-#if ISC_MEM_TRACKLINES
-#define FLARG_PASS , file, line
-#define FLARG , const char *file, unsigned int line
-#else
-#define FLARG_PASS
-#define FLARG
-#endif
-
-static isc_mutex_t createlock;
-static isc_once_t once = ISC_ONCE_INIT;
-static isc_memcreatefunc_t mem_createfunc = NULL;
-
-static void
-initialize(void) {
- RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_mem_register(isc_memcreatefunc_t createfunc) {
- isc_result_t result = ISC_R_SUCCESS;
-
- RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
-
- LOCK(&createlock);
- if (mem_createfunc == NULL)
- mem_createfunc = createfunc;
- else
- result = ISC_R_EXISTS;
- UNLOCK(&createlock);
-
- return (result);
-}
-
-isc_result_t
-isc_mem_create(size_t init_max_size, size_t target_size, isc_mem_t **mctxp) {
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(mem_createfunc != NULL);
- result = (*mem_createfunc)(init_max_size, target_size, mctxp,
- ISC_MEMFLAG_DEFAULT);
-
- UNLOCK(&createlock);
-
- return (result);
-}
-
-isc_result_t
-isc_mem_create2(size_t init_max_size, size_t target_size, isc_mem_t **mctxp,
- unsigned int flags)
-{
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(mem_createfunc != NULL);
- result = (*mem_createfunc)(init_max_size, target_size, mctxp, flags);
-
- UNLOCK(&createlock);
-
- return (result);
-}
-
-void
-isc_mem_attach(isc_mem_t *source, isc_mem_t **targetp) {
- REQUIRE(ISCAPI_MCTX_VALID(source));
- REQUIRE(targetp != NULL && *targetp == NULL);
-
- source->methods->attach(source, targetp);
-
- ENSURE(*targetp == source);
-}
-
-void
-isc_mem_detach(isc_mem_t **mctxp) {
- REQUIRE(mctxp != NULL && ISCAPI_MCTX_VALID(*mctxp));
-
- (*mctxp)->methods->detach(mctxp);
-
- ENSURE(*mctxp == NULL);
-}
-
-void
-isc_mem_destroy(isc_mem_t **mctxp) {
- REQUIRE(mctxp != NULL && ISCAPI_MCTX_VALID(*mctxp));
-
- (*mctxp)->methods->destroy(mctxp);
-
- ENSURE(*mctxp == NULL);
-}
-
-void *
-isc__mem_get(isc_mem_t *mctx, size_t size FLARG) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (mctx->methods->memget(mctx, size FLARG_PASS));
-}
-
-void
-isc__mem_put(isc_mem_t *mctx, void *ptr, size_t size FLARG) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- mctx->methods->memput(mctx, ptr, size FLARG_PASS);
-}
-
-void
-isc__mem_putanddetach(isc_mem_t **mctxp, void *ptr, size_t size FLARG) {
- REQUIRE(mctxp != NULL && ISCAPI_MCTX_VALID(*mctxp));
-
- (*mctxp)->methods->memputanddetach(mctxp, ptr, size FLARG_PASS);
-
- /*
- * XXX: We cannot always ensure *mctxp == NULL here
- * (see lib/isc/mem.c).
- */
-}
-
-void *
-isc__mem_allocate(isc_mem_t *mctx, size_t size FLARG) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (mctx->methods->memallocate(mctx, size FLARG_PASS));
-}
-
-void *
-isc__mem_reallocate(isc_mem_t *mctx, void *ptr, size_t size FLARG) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (mctx->methods->memreallocate(mctx, ptr, size FLARG_PASS));
-}
-
-char *
-isc__mem_strdup(isc_mem_t *mctx, const char *s FLARG) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (mctx->methods->memstrdup(mctx, s FLARG_PASS));
-}
-
-void
-isc__mem_free(isc_mem_t *mctx, void *ptr FLARG) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- mctx->methods->memfree(mctx, ptr FLARG_PASS);
-}
-
-void
-isc_mem_setdestroycheck(isc_mem_t *mctx, isc_boolean_t flag) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- mctx->methods->setdestroycheck(mctx, flag);
-}
-
-void
-isc_mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
- size_t hiwater, size_t lowater)
-{
- REQUIRE(ISCAPI_MCTX_VALID(ctx));
-
- ctx->methods->setwater(ctx, water, water_arg, hiwater, lowater);
-}
-
-void
-isc_mem_waterack(isc_mem_t *ctx, int flag) {
- REQUIRE(ISCAPI_MCTX_VALID(ctx));
-
- ctx->methods->waterack(ctx, flag);
-}
-
-size_t
-isc_mem_inuse(isc_mem_t *mctx) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (mctx->methods->inuse(mctx));
-}
-
-isc_boolean_t
-isc_mem_isovermem(isc_mem_t *mctx) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (mctx->methods->isovermem(mctx));
-}
-
-void
-isc_mem_setname(isc_mem_t *mctx, const char *name, void *tag) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- UNUSED(name);
- UNUSED(tag);
-
- return;
-}
-
-const char *
-isc_mem_getname(isc_mem_t *mctx) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return ("");
-}
-
-void *
-isc_mem_gettag(isc_mem_t *mctx) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (NULL);
-}
-
-isc_result_t
-isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) {
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
-
- return (mctx->methods->mpcreate(mctx, size, mpctxp));
-}
-
-void
-isc_mempool_destroy(isc_mempool_t **mpctxp) {
- REQUIRE(mpctxp != NULL && ISCAPI_MPOOL_VALID(*mpctxp));
-
- (*mpctxp)->methods->destroy(mpctxp);
-
- ENSURE(*mpctxp == NULL);
-}
-
-void *
-isc__mempool_get(isc_mempool_t *mpctx FLARG) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- return (mpctx->methods->get(mpctx FLARG_PASS));
-}
-
-void
-isc__mempool_put(isc_mempool_t *mpctx, void *mem FLARG) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- mpctx->methods->put(mpctx, mem FLARG_PASS);
-}
-
-unsigned int
-isc_mempool_getallocated(isc_mempool_t *mpctx) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- return (mpctx->methods->getallocated(mpctx));
-}
-
-void
-isc_mempool_setmaxalloc(isc_mempool_t *mpctx, unsigned int limit) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- mpctx->methods->setmaxalloc(mpctx, limit);
-}
-
-void
-isc_mempool_setfreemax(isc_mempool_t *mpctx, unsigned int limit) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- mpctx->methods->setfreemax(mpctx, limit);
-}
-
-void
-isc_mempool_setname(isc_mempool_t *mpctx, const char *name) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- mpctx->methods->setname(mpctx, name);
-}
-
-void
-isc_mempool_associatelock(isc_mempool_t *mpctx, isc_mutex_t *lock) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- mpctx->methods->associatelock(mpctx, lock);
-}
-
-void
-isc_mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit) {
- REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
-
- mpctx->methods->setfillcount(mpctx, limit);
-}
diff --git a/contrib/ntp/lib/isc/mips/include/isc/atomic.h b/contrib/ntp/lib/isc/mips/include/isc/atomic.h
deleted file mode 100644
index bb739f7404a9..000000000000
--- a/contrib/ntp/lib/isc/mips/include/isc/atomic.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: atomic.h,v 1.3 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-#include <isc/platform.h>
-#include <isc/types.h>
-
-#ifdef ISC_PLATFORM_USEGCCASM
-/*
- * This routine atomically increments the value stored in 'p' by 'val', and
- * returns the previous value.
- */
-static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, int val) {
- isc_int32_t orig;
-
- /* add is a cheat, since MIPS has no mov instruction */
- __asm__ volatile (
- "1:"
- "ll $3, %1\n"
- "add %0, $0, $3\n"
- "add $3, $3, %2\n"
- "sc $3, %1\n"
- "beq $3, 0, 1b"
- : "=&r"(orig)
- : "m"(*p), "r"(val)
- : "memory", "$3"
- );
-
- return (orig);
-}
-
-/*
- * This routine atomically stores the value 'val' in 'p'.
- */
-static inline void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
- __asm__ volatile (
- "1:"
- "ll $3, %0\n"
- "add $3, $0, %1\n"
- "sc $3, %0\n"
- "beq $3, 0, 1b"
- :
- : "m"(*p), "r"(val)
- : "memory", "$3"
- );
-}
-
-/*
- * This routine atomically replaces the value in 'p' with 'val', if the
- * original value is equal to 'cmpval'. The original value is returned in any
- * case.
- */
-static inline isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, int cmpval, int val) {
- isc_int32_t orig;
-
- __asm__ volatile(
- "1:"
- "ll $3, %1\n"
- "add %0, $0, $3\n"
- "bne $3, %2, 2f\n"
- "add $3, $0, %3\n"
- "sc $3, %1\n"
- "beq $3, 0, 1b\n"
- "2:"
- : "=&r"(orig)
- : "m"(*p), "r"(cmpval), "r"(val)
- : "memory", "$3"
- );
-
- return (orig);
-}
-
-#else /* !ISC_PLATFORM_USEGCCASM */
-
-#error "unsupported compiler. disable atomic ops by --disable-atomic"
-
-#endif
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/lib/isc/mutexblock.c b/contrib/ntp/lib/isc/mutexblock.c
deleted file mode 100644
index d41e9d28d86d..000000000000
--- a/contrib/ntp/lib/isc/mutexblock.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/mutexblock.h>
-#include <isc/util.h>
-
-isc_result_t
-isc_mutexblock_init(isc_mutex_t *block, unsigned int count) {
- isc_result_t result;
- unsigned int i;
-
- for (i = 0; i < count; i++) {
- result = isc_mutex_init(&block[i]);
- if (result != ISC_R_SUCCESS) {
- while (i > 0U) {
- i--;
- DESTROYLOCK(&block[i]);
- }
- return (result);
- }
- }
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_mutexblock_destroy(isc_mutex_t *block, unsigned int count) {
- isc_result_t result;
- unsigned int i;
-
- for (i = 0; i < count; i++) {
- result = isc_mutex_destroy(&block[i]);
- if (result != ISC_R_SUCCESS)
- return (result);
- }
-
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/noatomic/include/isc/atomic.h b/contrib/ntp/lib/isc/noatomic/include/isc/atomic.h
deleted file mode 100644
index 942ba036e27f..000000000000
--- a/contrib/ntp/lib/isc/noatomic/include/isc/atomic.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: atomic.h,v 1.4 2007/06/19 23:47:18 tbox Exp $ */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-/* This file is inherently empty. */
-
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/lib/isc/nothreads/mutex.c b/contrib/ntp/lib/isc/nothreads/mutex.c
deleted file mode 100644
index 50ba0f4d6593..000000000000
--- a/contrib/ntp/lib/isc/nothreads/mutex.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: mutex.c,v 1.10 2007/06/19 23:47:18 tbox Exp $ */
-
-#include <config.h>
-
-#include <isc/util.h>
-
-EMPTY_TRANSLATION_UNIT
-
diff --git a/contrib/ntp/lib/isc/parseint.c b/contrib/ntp/lib/isc/parseint.c
deleted file mode 100644
index 266d44cec5c5..000000000000
--- a/contrib/ntp/lib/isc/parseint.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: parseint.c,v 1.8 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-
-#include <isc/parseint.h>
-#include <isc/result.h>
-#include <isc/stdlib.h>
-
-isc_result_t
-isc_parse_uint32(isc_uint32_t *uip, const char *string, int base) {
- unsigned long n;
- char *e;
- if (! isalnum((unsigned char)(string[0])))
- return (ISC_R_BADNUMBER);
- errno = 0;
- n = strtoul(string, &e, base);
- if (*e != '\0')
- return (ISC_R_BADNUMBER);
- if (n == ULONG_MAX && errno == ERANGE)
- return (ISC_R_RANGE);
- *uip = n;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_parse_uint16(isc_uint16_t *uip, const char *string, int base) {
- isc_uint32_t val;
- isc_result_t result;
- result = isc_parse_uint32(&val, string, base);
- if (result != ISC_R_SUCCESS)
- return (result);
- if (val > 0xFFFF)
- return (ISC_R_RANGE);
- *uip = (isc_uint16_t) val;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_parse_uint8(isc_uint8_t *uip, const char *string, int base) {
- isc_uint32_t val;
- isc_result_t result;
- result = isc_parse_uint32(&val, string, base);
- if (result != ISC_R_SUCCESS)
- return (result);
- if (val > 0xFF)
- return (ISC_R_RANGE);
- *uip = (isc_uint8_t) val;
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/portset.c b/contrib/ntp/lib/isc/portset.c
deleted file mode 100644
index 471ca8e8d00d..000000000000
--- a/contrib/ntp/lib/isc/portset.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2008 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: portset.c,v 1.4 2008/06/24 23:24:35 marka Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/mem.h>
-#include <isc/portset.h>
-#include <isc/string.h>
-#include <isc/types.h>
-#include <isc/util.h>
-
-#define ISC_PORTSET_BUFSIZE (65536 / (sizeof(isc_uint32_t) * 8))
-
-/*%
- * Internal representation of portset. It's an array of 32-bit integers, each
- * bit corresponding to a single port in the ascending order. For example,
- * the second most significant bit of buf[0] corresponds to port 1.
- */
-struct isc_portset {
- unsigned int nports; /*%< number of ports in the set */
- isc_uint32_t buf[ISC_PORTSET_BUFSIZE];
-};
-
-static inline isc_boolean_t
-portset_isset(isc_portset_t *portset, in_port_t port) {
- return (ISC_TF((portset->buf[port >> 5] & (1 << (port & 31))) != 0));
-}
-
-static inline void
-portset_add(isc_portset_t *portset, in_port_t port) {
- if (!portset_isset(portset, port)) {
- portset->nports++;
- portset->buf[port >> 5] |= (1 << (port & 31));
- }
-}
-
-static inline void
-portset_remove(isc_portset_t *portset, in_port_t port) {
- if (portset_isset(portset, port)) {
- portset->nports--;
- portset->buf[port >> 5] &= ~(1 << (port & 31));
- }
-}
-
-isc_result_t
-isc_portset_create(isc_mem_t *mctx, isc_portset_t **portsetp) {
- isc_portset_t *portset;
-
- REQUIRE(portsetp != NULL && *portsetp == NULL);
-
- portset = isc_mem_get(mctx, sizeof(*portset));
- if (portset == NULL)
- return (ISC_R_NOMEMORY);
-
- /* Make the set 'empty' by default */
- memset(portset, 0, sizeof(*portset));
- *portsetp = portset;
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_portset_destroy(isc_mem_t *mctx, isc_portset_t **portsetp) {
- isc_portset_t *portset;
-
- REQUIRE(portsetp != NULL);
- portset = *portsetp;
-
- isc_mem_put(mctx, portset, sizeof(*portset));
-}
-
-isc_boolean_t
-isc_portset_isset(isc_portset_t *portset, in_port_t port) {
- REQUIRE(portset != NULL);
-
- return (portset_isset(portset, port));
-}
-
-unsigned int
-isc_portset_nports(isc_portset_t *portset) {
- REQUIRE(portset != NULL);
-
- return (portset->nports);
-}
-
-void
-isc_portset_add(isc_portset_t *portset, in_port_t port) {
- REQUIRE(portset != NULL);
-
- portset_add(portset, port);
-}
-
-void
-isc_portset_remove(isc_portset_t *portset, in_port_t port) {
- portset_remove(portset, port);
-}
-
-void
-isc_portset_addrange(isc_portset_t *portset, in_port_t port_lo,
- in_port_t port_hi)
-{
- in_port_t p;
-
- REQUIRE(portset != NULL);
- REQUIRE(port_lo <= port_hi);
-
- p = port_lo;
- do {
- portset_add(portset, p);
- } while (p++ < port_hi);
-}
-
-void
-isc_portset_removerange(isc_portset_t *portset, in_port_t port_lo,
- in_port_t port_hi)
-{
- in_port_t p;
-
- REQUIRE(portset != NULL);
- REQUIRE(port_lo <= port_hi);
-
- p = port_lo;
- do {
- portset_remove(portset, p);
- } while (p++ < port_hi);
-}
diff --git a/contrib/ntp/lib/isc/powerpc/include/isc/atomic.h b/contrib/ntp/lib/isc/powerpc/include/isc/atomic.h
deleted file mode 100644
index 030007f34ed7..000000000000
--- a/contrib/ntp/lib/isc/powerpc/include/isc/atomic.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (C) 2005, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-#include <isc/platform.h>
-#include <isc/types.h>
-
-/*!\file
- * static inline isc_int32_t
- * isc_atomic_xadd(isc_int32_t *p, isc_int32_t val);
- *
- * This routine atomically increments the value stored in 'p' by 'val', and
- * returns the previous value.
- *
- * static inline void
- * isc_atomic_store(void *p, isc_int32_t val);
- *
- * This routine atomically stores the value 'val' in 'p'.
- *
- * static inline isc_int32_t
- * isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val);
- *
- * This routine atomically replaces the value in 'p' with 'val', if the
- * original value is equal to 'cmpval'. The original value is returned in any
- * case.
- */
-
-#if defined(_AIX)
-
-#include <sys/atomic_op.h>
-
-#define isc_atomic_store(p, v) _clear_lock(p, v)
-
-#ifdef __GNUC__
-static inline isc_int32_t
-#else
-static isc_int32_t
-#endif
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- int ret;
-
-#ifdef __GNUC__
- asm("ics");
-#else
- __isync();
-#endif
-
- ret = fetch_and_add((atomic_p)p, (int)val);
-
-#ifdef __GNUC__
- asm("ics");
-#else
- __isync();
-#endif
-
- return (ret);
-}
-
-#ifdef __GNUC__
-static inline int
-#else
-static int
-#endif
-isc_atomic_cmpxchg(atomic_p p, int old, int new) {
- int orig = old;
-
-#ifdef __GNUC__
- asm("ics");
-#else
- __isync();
-#endif
- if (compare_and_swap(p, &orig, new))
- orig = old;
-
-#ifdef __GNUC__
- asm("ics");
-#else
- __isync();
-#endif
-
- return (orig);
-}
-
-#elif defined(ISC_PLATFORM_USEGCCASM) || defined(ISC_PLATFORM_USEMACASM)
-static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- isc_int32_t orig;
-
- __asm__ volatile (
-#ifdef ISC_PLATFORM_USEMACASM
- "1:"
- "lwarx r6, 0, %1\n"
- "mr %0, r6\n"
- "add r6, r6, %2\n"
- "stwcx. r6, 0, %1\n"
- "bne- 1b\n"
- "sync"
-#else
- "1:"
- "lwarx 6, 0, %1\n"
- "mr %0, 6\n"
- "add 6, 6, %2\n"
- "stwcx. 6, 0, %1\n"
- "bne- 1b\n"
- "sync"
-#endif
- : "=&r"(orig)
- : "r"(p), "r"(val)
- : "r6", "memory"
- );
-
- return (orig);
-}
-
-static inline void
-isc_atomic_store(void *p, isc_int32_t val) {
- __asm__ volatile (
-#ifdef ISC_PLATFORM_USEMACASM
- "1:"
- "lwarx r6, 0, %0\n"
- "lwz r6, %1\n"
- "stwcx. r6, 0, %0\n"
- "bne- 1b\n"
- "sync"
-#else
- "1:"
- "lwarx 6, 0, %0\n"
- "lwz 6, %1\n"
- "stwcx. 6, 0, %0\n"
- "bne- 1b\n"
- "sync"
-#endif
- :
- : "r"(p), "m"(val)
- : "r6", "memory"
- );
-}
-
-static inline isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
- isc_int32_t orig;
-
- __asm__ volatile (
-#ifdef ISC_PLATFORM_USEMACASM
- "1:"
- "lwarx r6, 0, %1\n"
- "mr %0,r6\n"
- "cmpw r6, %2\n"
- "bne 2f\n"
- "mr r6, %3\n"
- "stwcx. r6, 0, %1\n"
- "bne- 1b\n"
- "2:\n"
- "sync"
-#else
- "1:"
- "lwarx 6, 0, %1\n"
- "mr %0,6\n"
- "cmpw 6, %2\n"
- "bne 2f\n"
- "mr 6, %3\n"
- "stwcx. 6, 0, %1\n"
- "bne- 1b\n"
- "2:\n"
- "sync"
-#endif
- : "=&r" (orig)
- : "r"(p), "r"(cmpval), "r"(val)
- : "r6", "memory"
- );
-
- return (orig);
-}
-
-#else
-
-#error "unsupported compiler. disable atomic ops by --disable-atomic"
-
-#endif
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/lib/isc/print.c b/contrib/ntp/lib/isc/print.c
deleted file mode 100644
index a5e5ba6699d6..000000000000
--- a/contrib/ntp/lib/isc/print.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/*
- * Copyright (C) 2004-2008, 2010 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: print.c,v 1.37 2010/10/18 23:47:08 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <ctype.h>
-#include <stdio.h> /* for sprintf() */
-#include <string.h> /* for strlen() */
-
-#define ISC__PRINT_SOURCE /* Used to get the isc_print_* prototypes. */
-
-#include <isc/assertions.h>
-#include <isc/int.h>
-#include <isc/msgs.h>
-#include <isc/print.h>
-#include <isc/stdlib.h>
-#include <isc/util.h>
-
-int
-isc_print_sprintf(char *str, const char *format, ...) {
- va_list ap;
-
- va_start(ap, format);
- vsprintf(str, format, ap);
- va_end(ap);
- return (strlen(str));
-}
-
-/*!
- * Return length of string that would have been written if not truncated.
- */
-
-int
-isc_print_snprintf(char *str, size_t size, const char *format, ...) {
- va_list ap;
- int ret;
-
- va_start(ap, format);
- ret = vsnprintf(str, size, format, ap);
- va_end(ap);
- return (ret);
-
-}
-
-/*!
- * Return length of string that would have been written if not truncated.
- */
-
-int
-isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
- int h;
- int l;
- int q;
- int alt;
- int zero;
- int left;
- int plus;
- int space;
- int neg;
- isc_int64_t tmpi;
- isc_uint64_t tmpui;
- unsigned long width;
- unsigned long precision;
- unsigned int length;
- char buf[1024];
- char c;
- void *v;
- char *save = str;
- const char *cp;
- const char *head;
- int count = 0;
- int pad;
- int zeropad;
- int dot;
- double dbl;
-#ifdef HAVE_LONG_DOUBLE
- long double ldbl;
-#endif
- char fmt[32];
-
- INSIST(str != NULL);
- INSIST(format != NULL);
-
- while (*format != '\0') {
- if (*format != '%') {
- if (size > 1) {
- *str++ = *format;
- size--;
- }
- count++;
- format++;
- continue;
- }
- format++;
-
- /*
- * Reset flags.
- */
- dot = neg = space = plus = left = zero = alt = h = l = q = 0;
- width = precision = 0;
- head = "";
- length = pad = zeropad = 0;
-
- do {
- if (*format == '#') {
- alt = 1;
- format++;
- } else if (*format == '-') {
- left = 1;
- zero = 0;
- format++;
- } else if (*format == ' ') {
- if (!plus)
- space = 1;
- format++;
- } else if (*format == '+') {
- plus = 1;
- space = 0;
- format++;
- } else if (*format == '0') {
- if (!left)
- zero = 1;
- format++;
- } else
- break;
- } while (1);
-
- /*
- * Width.
- */
- if (*format == '*') {
- width = va_arg(ap, int);
- format++;
- } else if (isdigit((unsigned char)*format)) {
- char *e;
- width = strtoul(format, &e, 10);
- format = e;
- }
-
- /*
- * Precision.
- */
- if (*format == '.') {
- format++;
- dot = 1;
- if (*format == '*') {
- precision = va_arg(ap, int);
- format++;
- } else if (isdigit((unsigned char)*format)) {
- char *e;
- precision = strtoul(format, &e, 10);
- format = e;
- }
- }
-
- switch (*format) {
- case '\0':
- continue;
- case '%':
- if (size > 1) {
- *str++ = *format;
- size--;
- }
- count++;
- break;
- case 'q':
- q = 1;
- format++;
- goto doint;
- case 'h':
- h = 1;
- format++;
- goto doint;
- case 'l':
- l = 1;
- format++;
- if (*format == 'l') {
- q = 1;
- format++;
- }
- goto doint;
- case 'n':
- case 'i':
- case 'd':
- case 'o':
- case 'u':
- case 'x':
- case 'X':
- doint:
- if (precision != 0)
- zero = 0;
- switch (*format) {
- case 'n':
- if (h) {
- short int *p;
- p = va_arg(ap, short *);
- REQUIRE(p != NULL);
- *p = str - save;
- } else if (l) {
- long int *p;
- p = va_arg(ap, long *);
- REQUIRE(p != NULL);
- *p = str - save;
- } else {
- int *p;
- p = va_arg(ap, int *);
- REQUIRE(p != NULL);
- *p = str - save;
- }
- break;
- case 'i':
- case 'd':
- if (q)
- tmpi = va_arg(ap, isc_int64_t);
- else if (l)
- tmpi = va_arg(ap, long int);
- else
- tmpi = va_arg(ap, int);
- if (tmpi < 0) {
- head = "-";
- tmpui = -tmpi;
- } else {
- if (plus)
- head = "+";
- else if (space)
- head = " ";
- else
- head = "";
- tmpui = tmpi;
- }
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lu",
- (unsigned long)tmpui);
- else {
- unsigned long mid;
- unsigned long lo;
- unsigned long hi;
- lo = tmpui % 1000000000;
- tmpui /= 1000000000;
- mid = tmpui % 1000000000;
- hi = tmpui / 1000000000;
- if (hi != 0)
- sprintf(buf, "%lu", hi);
- else
- buf[0] = '\n';
- sprintf(buf + strlen(buf), "%lu", mid);
- sprintf(buf + strlen(buf), "%lu", lo);
- }
- goto printint;
- case 'o':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, long int);
- else
- tmpui = va_arg(ap, int);
- if (tmpui <= 0xffffffffU)
- sprintf(buf, alt ? "%#lo" : "%lo",
- (unsigned long)tmpui);
- else {
- unsigned long mid;
- unsigned long lo;
- unsigned long hi;
- lo = tmpui % 010000000000;
- tmpui /= 010000000000;
- mid = tmpui % 010000000000;
- hi = tmpui / 010000000000;
- if (hi != 0) {
- sprintf(buf,
- alt ? "%#lo" : "%lo",
- hi);
- sprintf(buf + strlen(buf),
- "%lo", mid);
- } else
- sprintf(buf,
- alt ? "%#lo" : "%lo",
- mid);
- sprintf(buf + strlen(buf), "%lo", lo);
- }
- goto printint;
- case 'u':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, unsigned long int);
- else
- tmpui = va_arg(ap, unsigned int);
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lu",
- (unsigned long)tmpui);
- else {
- unsigned long mid;
- unsigned long lo;
- unsigned long hi;
- lo = tmpui % 1000000000;
- tmpui /= 1000000000;
- mid = tmpui % 1000000000;
- hi = tmpui / 1000000000;
- if (hi != 0)
- sprintf(buf, "%lu", hi);
- else
- buf[0] = '\n';
- sprintf(buf + strlen(buf), "%lu", mid);
- sprintf(buf + strlen(buf), "%lu", lo);
- }
- goto printint;
- case 'x':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, unsigned long int);
- else
- tmpui = va_arg(ap, unsigned int);
- if (alt) {
- head = "0x";
- if (precision > 2)
- precision -= 2;
- }
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lx",
- (unsigned long)tmpui);
- else {
- unsigned long hi = tmpui>>32;
- unsigned long lo = tmpui & 0xffffffff;
- sprintf(buf, "%lx", hi);
- sprintf(buf + strlen(buf), "%lx", lo);
- }
- goto printint;
- case 'X':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, unsigned long int);
- else
- tmpui = va_arg(ap, unsigned int);
- if (alt) {
- head = "0X";
- if (precision > 2)
- precision -= 2;
- }
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lX",
- (unsigned long)tmpui);
- else {
- unsigned long hi = tmpui>>32;
- unsigned long lo = tmpui & 0xffffffff;
- sprintf(buf, "%lX", hi);
- sprintf(buf + strlen(buf), "%lX", lo);
- }
- goto printint;
- printint:
- if (precision != 0 || width != 0) {
- length = strlen(buf);
- if (length < precision)
- zeropad = precision - length;
- else if (length < width && zero)
- zeropad = width - length;
- if (width != 0) {
- pad = width - length -
- zeropad - strlen(head);
- if (pad < 0)
- pad = 0;
- }
- }
- count += strlen(head) + strlen(buf) + pad +
- zeropad;
- if (!left) {
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- }
- cp = head;
- while (*cp != '\0' && size > 1) {
- *str++ = *cp++;
- size--;
- }
- while (zeropad > 0 && size > 1) {
- *str++ = '0';
- size--;
- zeropad--;
- }
- cp = buf;
- while (*cp != '\0' && size > 1) {
- *str++ = *cp++;
- size--;
- }
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- break;
- default:
- break;
- }
- break;
- case 's':
- cp = va_arg(ap, char *);
- REQUIRE(cp != NULL);
-
- if (precision != 0) {
- /*
- * cp need not be NULL terminated.
- */
- const char *tp;
- unsigned long n;
-
- n = precision;
- tp = cp;
- while (n != 0 && *tp != '\0')
- n--, tp++;
- length = precision - n;
- } else {
- length = strlen(cp);
- }
- if (width != 0) {
- pad = width - length;
- if (pad < 0)
- pad = 0;
- }
- count += pad + length;
- if (!left)
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- if (precision != 0)
- while (precision > 0 && *cp != '\0' &&
- size > 1) {
- *str++ = *cp++;
- size--;
- precision--;
- }
- else
- while (*cp != '\0' && size > 1) {
- *str++ = *cp++;
- size--;
- }
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- break;
- case 'c':
- c = va_arg(ap, int);
- if (width > 0) {
- count += width;
- width--;
- if (left && size > 1) {
- *str++ = c;
- size--;
- }
- while (width-- > 0 && size > 1) {
- *str++ = ' ';
- size--;
- }
- if (!left && size > 1) {
- *str++ = c;
- size--;
- }
- } else {
- count++;
- if (size > 1) {
- *str++ = c;
- size--;
- }
- }
- break;
- case 'p':
- v = va_arg(ap, void *);
- sprintf(buf, "%p", v);
- length = strlen(buf);
- if (precision > length)
- zeropad = precision - length;
- if (width > 0) {
- pad = width - length - zeropad;
- if (pad < 0)
- pad = 0;
- }
- count += length + pad + zeropad;
- if (!left)
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- cp = buf;
- if (zeropad > 0 && buf[0] == '0' &&
- (buf[1] == 'x' || buf[1] == 'X')) {
- if (size > 1) {
- *str++ = *cp++;
- size--;
- }
- if (size > 1) {
- *str++ = *cp++;
- size--;
- }
- while (zeropad > 0 && size > 1) {
- *str++ = '0';
- size--;
- zeropad--;
- }
- }
- while (*cp != '\0' && size > 1) {
- *str++ = *cp++;
- size--;
- }
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- break;
- case 'D': /*deprecated*/
- INSIST("use %ld instead of %D" == NULL);
- case 'O': /*deprecated*/
- INSIST("use %lo instead of %O" == NULL);
- case 'U': /*deprecated*/
- INSIST("use %lu instead of %U" == NULL);
-
- case 'L':
-#ifdef HAVE_LONG_DOUBLE
- l = 1;
-#else
- INSIST("long doubles are not supported" == NULL);
-#endif
- /*FALLTHROUGH*/
- case 'e':
- case 'E':
- case 'f':
- case 'g':
- case 'G':
- if (!dot)
- precision = 6;
- /*
- * IEEE floating point.
- * MIN 2.2250738585072014E-308
- * MAX 1.7976931348623157E+308
- * VAX floating point has a smaller range than IEEE.
- *
- * precisions > 324 don't make much sense.
- * if we cap the precision at 512 we will not
- * overflow buf.
- */
- if (precision > 512)
- precision = 512;
- sprintf(fmt, "%%%s%s.%lu%s%c", alt ? "#" : "",
- plus ? "+" : space ? " " : "",
- precision, l ? "L" : "", *format);
- switch (*format) {
- case 'e':
- case 'E':
- case 'f':
- case 'g':
- case 'G':
-#ifdef HAVE_LONG_DOUBLE
- if (l) {
- ldbl = va_arg(ap, long double);
- sprintf(buf, fmt, ldbl);
- } else
-#endif
- {
- dbl = va_arg(ap, double);
- sprintf(buf, fmt, dbl);
- }
- length = strlen(buf);
- if (width > 0) {
- pad = width - length;
- if (pad < 0)
- pad = 0;
- }
- count += length + pad;
- if (!left)
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- cp = buf;
- while (*cp != ' ' && size > 1) {
- *str++ = *cp++;
- size--;
- }
- while (pad > 0 && size > 1) {
- *str++ = ' ';
- size--;
- pad--;
- }
- break;
- default:
- continue;
- }
- break;
- default:
- continue;
- }
- format++;
- }
- if (size > 0)
- *str = '\0';
- return (count);
-}
diff --git a/contrib/ntp/lib/isc/quota.c b/contrib/ntp/lib/isc/quota.c
deleted file mode 100644
index 5e5c50c0edc2..000000000000
--- a/contrib/ntp/lib/isc/quota.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: quota.c,v 1.18 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/quota.h>
-#include <isc/util.h>
-
-isc_result_t
-isc_quota_init(isc_quota_t *quota, int max) {
- quota->max = max;
- quota->used = 0;
- quota->soft = 0;
- return (isc_mutex_init(&quota->lock));
-}
-
-void
-isc_quota_destroy(isc_quota_t *quota) {
- INSIST(quota->used == 0);
- quota->max = 0;
- quota->used = 0;
- quota->soft = 0;
- DESTROYLOCK(&quota->lock);
-}
-
-void
-isc_quota_soft(isc_quota_t *quota, int soft) {
- LOCK(&quota->lock);
- quota->soft = soft;
- UNLOCK(&quota->lock);
-}
-
-void
-isc_quota_max(isc_quota_t *quota, int max) {
- LOCK(&quota->lock);
- quota->max = max;
- UNLOCK(&quota->lock);
-}
-
-isc_result_t
-isc_quota_reserve(isc_quota_t *quota) {
- isc_result_t result;
- LOCK(&quota->lock);
- if (quota->max == 0 || quota->used < quota->max) {
- if (quota->soft == 0 || quota->used < quota->soft)
- result = ISC_R_SUCCESS;
- else
- result = ISC_R_SOFTQUOTA;
- quota->used++;
- } else
- result = ISC_R_QUOTA;
- UNLOCK(&quota->lock);
- return (result);
-}
-
-void
-isc_quota_release(isc_quota_t *quota) {
- LOCK(&quota->lock);
- INSIST(quota->used > 0);
- quota->used--;
- UNLOCK(&quota->lock);
-}
-
-isc_result_t
-isc_quota_attach(isc_quota_t *quota, isc_quota_t **p)
-{
- isc_result_t result;
- INSIST(p != NULL && *p == NULL);
- result = isc_quota_reserve(quota);
- if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA)
- *p = quota;
- return (result);
-}
-
-void
-isc_quota_detach(isc_quota_t **p)
-{
- INSIST(p != NULL && *p != NULL);
- isc_quota_release(*p);
- *p = NULL;
-}
diff --git a/contrib/ntp/lib/isc/radix.c b/contrib/ntp/lib/isc/radix.c
deleted file mode 100644
index ac211efb6a87..000000000000
--- a/contrib/ntp/lib/isc/radix.c
+++ /dev/null
@@ -1,706 +0,0 @@
-/*
- * Copyright (C) 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*
- * This source was adapted from MRT's RCS Ids:
- * Id: radix.c,v 1.10.2.1 1999/11/29 05:16:24 masaki Exp
- * Id: prefix.c,v 1.37.2.9 2000/03/10 02:53:19 labovit Exp
- */
-
-#include <config.h>
-
-#include <isc/mem.h>
-#include <isc/types.h>
-#include <isc/util.h>
-#include <isc/radix.h>
-
-static isc_result_t
-_new_prefix(isc_mem_t *mctx, isc_prefix_t **target, int family,
- void *dest, int bitlen);
-
-static void
-_deref_prefix(isc_mem_t *mctx, isc_prefix_t *prefix);
-
-static isc_result_t
-_ref_prefix(isc_mem_t *mctx, isc_prefix_t **target, isc_prefix_t *prefix);
-
-static int
-_comp_with_mask(void *addr, void *dest, u_int mask);
-
-static void
-_clear_radix(isc_radix_tree_t *radix, isc_radix_destroyfunc_t func);
-
-static isc_result_t
-_new_prefix(isc_mem_t *mctx, isc_prefix_t **target, int family, void *dest,
- int bitlen)
-{
- isc_prefix_t *prefix;
-
- REQUIRE(target != NULL);
-
- if (family != AF_INET6 && family != AF_INET && family != AF_UNSPEC)
- return (ISC_R_NOTIMPLEMENTED);
-
- prefix = isc_mem_get(mctx, sizeof(isc_prefix_t));
- if (prefix == NULL)
- return (ISC_R_NOMEMORY);
-
- if (family == AF_INET6) {
- prefix->bitlen = (bitlen >= 0) ? bitlen : 128;
- memcpy(&prefix->add.sin6, dest, 16);
- } else {
- /* AF_UNSPEC is "any" or "none"--treat it as AF_INET */
- prefix->bitlen = (bitlen >= 0) ? bitlen : 32;
- memcpy(&prefix->add.sin, dest, 4);
- }
-
- prefix->family = family;
-
- isc_refcount_init(&prefix->refcount, 1);
-
- *target = prefix;
- return (ISC_R_SUCCESS);
-}
-
-static void
-_deref_prefix(isc_mem_t *mctx, isc_prefix_t *prefix) {
- int refs;
-
- if (prefix == NULL)
- return;
-
- isc_refcount_decrement(&prefix->refcount, &refs);
-
- if (refs <= 0) {
- isc_refcount_destroy(&prefix->refcount);
- isc_mem_put(mctx, prefix, sizeof(isc_prefix_t));
- }
-}
-
-static isc_result_t
-_ref_prefix(isc_mem_t *mctx, isc_prefix_t **target, isc_prefix_t *prefix) {
- INSIST(prefix != NULL);
- INSIST((prefix->family == AF_INET && prefix->bitlen <= 32) ||
- (prefix->family == AF_INET6 && prefix->bitlen <= 128) ||
- (prefix->family == AF_UNSPEC && prefix->bitlen == 0));
- REQUIRE(target != NULL && *target == NULL);
-
- /*
- * If this prefix is a static allocation, copy it into new memory.
- * (Note, the refcount still has to be destroyed by the calling
- * routine.)
- */
- if (isc_refcount_current(&prefix->refcount) == 0) {
- isc_result_t ret;
- ret = _new_prefix(mctx, target, prefix->family,
- &prefix->add, prefix->bitlen);
- return ret;
- }
-
- isc_refcount_increment(&prefix->refcount, NULL);
-
- *target = prefix;
- return (ISC_R_SUCCESS);
-}
-
-static int
-_comp_with_mask(void *addr, void *dest, u_int mask) {
-
- /* Mask length of zero matches everything */
- if (mask == 0)
- return (1);
-
- if (memcmp(addr, dest, mask / 8) == 0) {
- int n = mask / 8;
- int m = ((~0) << (8 - (mask % 8)));
-
- if ((mask % 8) == 0 ||
- (((u_char *)addr)[n] & m) == (((u_char *)dest)[n] & m))
- return (1);
- }
- return (0);
-}
-
-isc_result_t
-isc_radix_create(isc_mem_t *mctx, isc_radix_tree_t **target, int maxbits) {
- isc_radix_tree_t *radix;
-
- REQUIRE(target != NULL && *target == NULL);
-
- radix = isc_mem_get(mctx, sizeof(isc_radix_tree_t));
- if (radix == NULL)
- return (ISC_R_NOMEMORY);
-
- radix->mctx = mctx;
- radix->maxbits = maxbits;
- radix->head = NULL;
- radix->num_active_node = 0;
- radix->num_added_node = 0;
- RUNTIME_CHECK(maxbits <= RADIX_MAXBITS); /* XXX */
- radix->magic = RADIX_TREE_MAGIC;
- *target = radix;
- return (ISC_R_SUCCESS);
-}
-
-/*
- * if func is supplied, it will be called as func(node->data)
- * before deleting the node
- */
-
-static void
-_clear_radix(isc_radix_tree_t *radix, isc_radix_destroyfunc_t func) {
-
- REQUIRE(radix != NULL);
-
- if (radix->head != NULL) {
-
- isc_radix_node_t *Xstack[RADIX_MAXBITS+1];
- isc_radix_node_t **Xsp = Xstack;
- isc_radix_node_t *Xrn = radix->head;
-
- while (Xrn != NULL) {
- isc_radix_node_t *l = Xrn->l;
- isc_radix_node_t *r = Xrn->r;
-
- if (Xrn->prefix != NULL) {
- _deref_prefix(radix->mctx, Xrn->prefix);
- if (func != NULL && (Xrn->data[0] != NULL ||
- Xrn->data[1] != NULL))
- func(Xrn->data);
- } else {
- INSIST(Xrn->data[0] == NULL &&
- Xrn->data[1] == NULL);
- }
-
- isc_mem_put(radix->mctx, Xrn, sizeof(*Xrn));
- radix->num_active_node--;
-
- if (l != NULL) {
- if (r != NULL) {
- *Xsp++ = r;
- }
- Xrn = l;
- } else if (r != NULL) {
- Xrn = r;
- } else if (Xsp != Xstack) {
- Xrn = *(--Xsp);
- } else {
- Xrn = NULL;
- }
- }
- }
- RUNTIME_CHECK(radix->num_active_node == 0);
-}
-
-
-void
-isc_radix_destroy(isc_radix_tree_t *radix, isc_radix_destroyfunc_t func)
-{
- REQUIRE(radix != NULL);
- _clear_radix(radix, func);
- isc_mem_put(radix->mctx, radix, sizeof(*radix));
-}
-
-
-/*
- * func will be called as func(node->prefix, node->data)
- */
-void
-isc_radix_process(isc_radix_tree_t *radix, isc_radix_processfunc_t func)
-{
- isc_radix_node_t *node;
-
- REQUIRE(func != NULL);
-
- RADIX_WALK(radix->head, node) {
- func(node->prefix, node->data);
- } RADIX_WALK_END;
-}
-
-
-isc_result_t
-isc_radix_search(isc_radix_tree_t *radix, isc_radix_node_t **target,
- isc_prefix_t *prefix)
-{
- isc_radix_node_t *node;
- isc_radix_node_t *stack[RADIX_MAXBITS + 1];
- u_char *addr;
- isc_uint32_t bitlen;
- int tfamily = -1;
- int cnt = 0;
-
- REQUIRE(radix != NULL);
- REQUIRE(prefix != NULL);
- REQUIRE(target != NULL && *target == NULL);
- RUNTIME_CHECK(prefix->bitlen <= radix->maxbits);
-
- *target = NULL;
-
- if (radix->head == NULL) {
- return (ISC_R_NOTFOUND);
- }
-
- node = radix->head;
- addr = isc_prefix_touchar(prefix);
- bitlen = prefix->bitlen;
-
- while (node->bit < bitlen) {
- if (node->prefix)
- stack[cnt++] = node;
-
- if (BIT_TEST(addr[node->bit >> 3], 0x80 >> (node->bit & 0x07)))
- node = node->r;
- else
- node = node->l;
-
- if (node == NULL)
- break;
- }
-
- if (node && node->prefix)
- stack[cnt++] = node;
-
- while (cnt-- > 0) {
- node = stack[cnt];
-
- if (_comp_with_mask(isc_prefix_tochar(node->prefix),
- isc_prefix_tochar(prefix),
- node->prefix->bitlen)) {
- if (node->node_num[ISC_IS6(prefix->family)] != -1 &&
- ((*target == NULL) ||
- (*target)->node_num[ISC_IS6(tfamily)] >
- node->node_num[ISC_IS6(prefix->family)])) {
- *target = node;
- tfamily = prefix->family;
- }
- }
- }
-
- if (*target == NULL) {
- return (ISC_R_NOTFOUND);
- } else {
- return (ISC_R_SUCCESS);
- }
-}
-
-isc_result_t
-isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
- isc_radix_node_t *source, isc_prefix_t *prefix)
-{
- isc_radix_node_t *node, *new_node, *parent, *glue = NULL;
- u_char *addr, *test_addr;
- isc_uint32_t bitlen, fam, check_bit, differ_bit;
- isc_uint32_t i, j, r;
- isc_result_t result;
-
- REQUIRE(radix != NULL);
- REQUIRE(target != NULL && *target == NULL);
- REQUIRE(prefix != NULL || (source != NULL && source->prefix != NULL));
- RUNTIME_CHECK(prefix == NULL || prefix->bitlen <= radix->maxbits);
-
- if (prefix == NULL)
- prefix = source->prefix;
-
- INSIST(prefix != NULL);
-
- bitlen = prefix->bitlen;
- fam = prefix->family;
-
- if (radix->head == NULL) {
- node = isc_mem_get(radix->mctx, sizeof(isc_radix_node_t));
- if (node == NULL)
- return (ISC_R_NOMEMORY);
- node->bit = bitlen;
- node->node_num[0] = node->node_num[1] = -1;
- node->prefix = NULL;
- result = _ref_prefix(radix->mctx, &node->prefix, prefix);
- if (result != ISC_R_SUCCESS) {
- isc_mem_put(radix->mctx, node,
- sizeof(isc_radix_node_t));
- return (result);
- }
- node->parent = NULL;
- node->l = node->r = NULL;
- if (source != NULL) {
- /*
- * If source is non-NULL, then we're merging in a
- * node from an existing radix tree. To keep
- * the node_num values consistent, the calling
- * function will add the total number of nodes
- * added to num_added_node at the end of
- * the merge operation--we don't do it here.
- */
- if (source->node_num[0] != -1)
- node->node_num[0] = radix->num_added_node +
- source->node_num[0];
- if (source->node_num[1] != -1)
- node->node_num[1] = radix->num_added_node +
- source->node_num[1];
- node->data[0] = source->data[0];
- node->data[1] = source->data[1];
- } else {
- if (fam == AF_UNSPEC) {
- /* "any" or "none" */
- node->node_num[0] = node->node_num[1] =
- ++radix->num_added_node;
- } else {
- node->node_num[ISC_IS6(fam)] =
- ++radix->num_added_node;
- }
- node->data[0] = NULL;
- node->data[1] = NULL;
- }
- radix->head = node;
- radix->num_active_node++;
- *target = node;
- return (ISC_R_SUCCESS);
- }
-
- addr = isc_prefix_touchar(prefix);
- node = radix->head;
-
- while (node->bit < bitlen || node->prefix == NULL) {
- if (node->bit < radix->maxbits &&
- BIT_TEST(addr[node->bit >> 3], 0x80 >> (node->bit & 0x07)))
- {
- if (node->r == NULL)
- break;
- node = node->r;
- } else {
- if (node->l == NULL)
- break;
- node = node->l;
- }
-
- INSIST(node != NULL);
- }
-
- INSIST(node->prefix != NULL);
-
- test_addr = isc_prefix_touchar(node->prefix);
- /* Find the first bit different. */
- check_bit = (node->bit < bitlen) ? node->bit : bitlen;
- differ_bit = 0;
- for (i = 0; i*8 < check_bit; i++) {
- if ((r = (addr[i] ^ test_addr[i])) == 0) {
- differ_bit = (i + 1) * 8;
- continue;
- }
- /* I know the better way, but for now. */
- for (j = 0; j < 8; j++) {
- if (BIT_TEST (r, (0x80 >> j)))
- break;
- }
- /* Must be found. */
- INSIST(j < 8);
- differ_bit = i * 8 + j;
- break;
- }
-
- if (differ_bit > check_bit)
- differ_bit = check_bit;
-
- parent = node->parent;
- while (parent != NULL && parent->bit >= differ_bit) {
- node = parent;
- parent = node->parent;
- }
-
- if (differ_bit == bitlen && node->bit == bitlen) {
- if (node->prefix != NULL) {
- /* Set node_num only if it hasn't been set before */
- if (source != NULL) {
- /* Merging node */
- if (node->node_num[0] == -1 &&
- source->node_num[0] != -1) {
- node->node_num[0] =
- radix->num_added_node +
- source->node_num[0];
- node->data[0] = source->data[0];
- }
- if (node->node_num[1] == -1 &&
- source->node_num[0] != -1) {
- node->node_num[1] =
- radix->num_added_node +
- source->node_num[1];
- node->data[1] = source->data[1];
- }
- } else {
- if (fam == AF_UNSPEC) {
- /* "any" or "none" */
- int next = radix->num_added_node + 1;
- if (node->node_num[0] == -1) {
- node->node_num[0] = next;
- radix->num_added_node = next;
- }
- if (node->node_num[1] == -1) {
- node->node_num[1] = next;
- radix->num_added_node = next;
- }
- } else {
- if (node->node_num[ISC_IS6(fam)] == -1)
- node->node_num[ISC_IS6(fam)]
- = ++radix->num_added_node;
- }
- }
- *target = node;
- return (ISC_R_SUCCESS);
- } else {
- result =
- _ref_prefix(radix->mctx, &node->prefix, prefix);
- if (result != ISC_R_SUCCESS)
- return (result);
- }
- INSIST(node->data[0] == NULL && node->node_num[0] == -1 &&
- node->data[1] == NULL && node->node_num[1] == -1);
- if (source != NULL) {
- /* Merging node */
- if (source->node_num[0] != -1) {
- node->node_num[0] = radix->num_added_node +
- source->node_num[0];
- node->data[0] = source->data[0];
- }
- if (source->node_num[1] != -1) {
- node->node_num[1] = radix->num_added_node +
- source->node_num[1];
- node->data[1] = source->data[1];
- }
- } else {
- if (fam == AF_UNSPEC) {
- /* "any" or "none" */
- node->node_num[0] = node->node_num[1] =
- ++radix->num_added_node;
- } else {
- node->node_num[ISC_IS6(fam)] =
- ++radix->num_added_node;
- }
- }
- *target = node;
- return (ISC_R_SUCCESS);
- }
-
- new_node = isc_mem_get(radix->mctx, sizeof(isc_radix_node_t));
- if (new_node == NULL)
- return (ISC_R_NOMEMORY);
- if (node->bit != differ_bit && bitlen != differ_bit) {
- glue = isc_mem_get(radix->mctx, sizeof(isc_radix_node_t));
- if (glue == NULL) {
- isc_mem_put(radix->mctx, new_node,
- sizeof(isc_radix_node_t));
- return (ISC_R_NOMEMORY);
- }
- }
- new_node->bit = bitlen;
- new_node->prefix = NULL;
- result = _ref_prefix(radix->mctx, &new_node->prefix, prefix);
- if (result != ISC_R_SUCCESS) {
- isc_mem_put(radix->mctx, new_node, sizeof(isc_radix_node_t));
- if (glue != NULL)
- isc_mem_put(radix->mctx, glue,
- sizeof(isc_radix_node_t));
- return (result);
- }
- new_node->parent = NULL;
- new_node->l = new_node->r = NULL;
- new_node->node_num[0] = new_node->node_num[1] = -1;
- radix->num_active_node++;
-
- if (source != NULL) {
- /* Merging node */
- if (source->node_num[0] != -1)
- new_node->node_num[0] = radix->num_added_node +
- source->node_num[0];
- if (source->node_num[1] != -1)
- new_node->node_num[1] = radix->num_added_node +
- source->node_num[1];
- new_node->data[0] = source->data[0];
- new_node->data[1] = source->data[1];
- } else {
- if (fam == AF_UNSPEC) {
- /* "any" or "none" */
- new_node->node_num[0] = new_node->node_num[1] =
- ++radix->num_added_node;
- } else {
- new_node->node_num[ISC_IS6(fam)] =
- ++radix->num_added_node;
- }
- new_node->data[0] = NULL;
- new_node->data[1] = NULL;
- }
-
- if (node->bit == differ_bit) {
- INSIST(glue == NULL);
- new_node->parent = node;
- if (node->bit < radix->maxbits &&
- BIT_TEST(addr[node->bit >> 3], 0x80 >> (node->bit & 0x07)))
- {
- INSIST(node->r == NULL);
- node->r = new_node;
- } else {
- INSIST(node->l == NULL);
- node->l = new_node;
- }
- *target = new_node;
- return (ISC_R_SUCCESS);
- }
-
- if (bitlen == differ_bit) {
- INSIST(glue == NULL);
- if (bitlen < radix->maxbits &&
- BIT_TEST(test_addr[bitlen >> 3], 0x80 >> (bitlen & 0x07))) {
- new_node->r = node;
- } else {
- new_node->l = node;
- }
- new_node->parent = node->parent;
- if (node->parent == NULL) {
- INSIST(radix->head == node);
- radix->head = new_node;
- } else if (node->parent->r == node) {
- node->parent->r = new_node;
- } else {
- node->parent->l = new_node;
- }
- node->parent = new_node;
- } else {
- INSIST(glue != NULL);
- glue->bit = differ_bit;
- glue->prefix = NULL;
- glue->parent = node->parent;
- glue->data[0] = glue->data[1] = NULL;
- glue->node_num[0] = glue->node_num[1] = -1;
- radix->num_active_node++;
- if (differ_bit < radix->maxbits &&
- BIT_TEST(addr[differ_bit>>3], 0x80 >> (differ_bit & 07))) {
- glue->r = new_node;
- glue->l = node;
- } else {
- glue->r = node;
- glue->l = new_node;
- }
- new_node->parent = glue;
-
- if (node->parent == NULL) {
- INSIST(radix->head == node);
- radix->head = glue;
- } else if (node->parent->r == node) {
- node->parent->r = glue;
- } else {
- node->parent->l = glue;
- }
- node->parent = glue;
- }
-
- *target = new_node;
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_radix_remove(isc_radix_tree_t *radix, isc_radix_node_t *node) {
- isc_radix_node_t *parent, *child;
-
- REQUIRE(radix != NULL);
- REQUIRE(node != NULL);
-
- if (node->r && node->l) {
- /*
- * This might be a placeholder node -- have to check and
- * make sure there is a prefix associated with it!
- */
- if (node->prefix != NULL)
- _deref_prefix(radix->mctx, node->prefix);
-
- node->prefix = NULL;
- node->data[0] = node->data[1] = NULL;
- return;
- }
-
- if (node->r == NULL && node->l == NULL) {
- parent = node->parent;
- _deref_prefix(radix->mctx, node->prefix);
- isc_mem_put(radix->mctx, node, sizeof(*node));
- radix->num_active_node--;
-
- if (parent == NULL) {
- INSIST(radix->head == node);
- radix->head = NULL;
- return;
- }
-
- if (parent->r == node) {
- parent->r = NULL;
- child = parent->l;
- } else {
- INSIST(parent->l == node);
- parent->l = NULL;
- child = parent->r;
- }
-
- if (parent->prefix)
- return;
-
- /* We need to remove parent too. */
-
- if (parent->parent == NULL) {
- INSIST(radix->head == parent);
- radix->head = child;
- } else if (parent->parent->r == parent) {
- parent->parent->r = child;
- } else {
- INSIST(parent->parent->l == parent);
- parent->parent->l = child;
- }
- child->parent = parent->parent;
- isc_mem_put(radix->mctx, parent, sizeof(*parent));
- radix->num_active_node--;
- return;
- }
-
- if (node->r) {
- child = node->r;
- } else {
- INSIST(node->l != NULL);
- child = node->l;
- }
- parent = node->parent;
- child->parent = parent;
-
- _deref_prefix(radix->mctx, node->prefix);
- isc_mem_put(radix->mctx, node, sizeof(*node));
- radix->num_active_node--;
-
- if (parent == NULL) {
- INSIST(radix->head == node);
- radix->head = child;
- return;
- }
-
- if (parent->r == node) {
- parent->r = child;
- } else {
- INSIST(parent->l == node);
- parent->l = child;
- }
-}
-
-/*
-Local Variables:
-c-basic-offset: 4
-indent-tabs-mode: t
-End:
-*/
diff --git a/contrib/ntp/lib/isc/ratelimiter.c b/contrib/ntp/lib/isc/ratelimiter.c
deleted file mode 100644
index 07bcc7c7af1c..000000000000
--- a/contrib/ntp/lib/isc/ratelimiter.c
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ratelimiter.c,v 1.25 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/mem.h>
-#include <isc/ratelimiter.h>
-#include <isc/task.h>
-#include <isc/time.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-typedef enum {
- isc_ratelimiter_stalled = 0,
- isc_ratelimiter_ratelimited = 1,
- isc_ratelimiter_idle = 2,
- isc_ratelimiter_shuttingdown = 3
-} isc_ratelimiter_state_t;
-
-struct isc_ratelimiter {
- isc_mem_t * mctx;
- isc_mutex_t lock;
- int refs;
- isc_task_t * task;
- isc_timer_t * timer;
- isc_interval_t interval;
- isc_uint32_t pertic;
- isc_ratelimiter_state_t state;
- isc_event_t shutdownevent;
- ISC_LIST(isc_event_t) pending;
-};
-
-#define ISC_RATELIMITEREVENT_SHUTDOWN (ISC_EVENTCLASS_RATELIMITER + 1)
-
-static void
-ratelimiter_tick(isc_task_t *task, isc_event_t *event);
-
-static void
-ratelimiter_shutdowncomplete(isc_task_t *task, isc_event_t *event);
-
-isc_result_t
-isc_ratelimiter_create(isc_mem_t *mctx, isc_timermgr_t *timermgr,
- isc_task_t *task, isc_ratelimiter_t **ratelimiterp)
-{
- isc_result_t result;
- isc_ratelimiter_t *rl;
- INSIST(ratelimiterp != NULL && *ratelimiterp == NULL);
-
- rl = isc_mem_get(mctx, sizeof(*rl));
- if (rl == NULL)
- return ISC_R_NOMEMORY;
- rl->mctx = mctx;
- rl->refs = 1;
- rl->task = task;
- isc_interval_set(&rl->interval, 0, 0);
- rl->timer = NULL;
- rl->pertic = 1;
- rl->state = isc_ratelimiter_idle;
- ISC_LIST_INIT(rl->pending);
-
- result = isc_mutex_init(&rl->lock);
- if (result != ISC_R_SUCCESS)
- goto free_mem;
- result = isc_timer_create(timermgr, isc_timertype_inactive,
- NULL, NULL, rl->task, ratelimiter_tick,
- rl, &rl->timer);
- if (result != ISC_R_SUCCESS)
- goto free_mutex;
-
- /*
- * Increment the reference count to indicate that we may
- * (soon) have events outstanding.
- */
- rl->refs++;
-
- ISC_EVENT_INIT(&rl->shutdownevent,
- sizeof(isc_event_t),
- 0, NULL, ISC_RATELIMITEREVENT_SHUTDOWN,
- ratelimiter_shutdowncomplete, rl, rl, NULL, NULL);
-
- *ratelimiterp = rl;
- return (ISC_R_SUCCESS);
-
-free_mutex:
- DESTROYLOCK(&rl->lock);
-free_mem:
- isc_mem_put(mctx, rl, sizeof(*rl));
- return (result);
-}
-
-isc_result_t
-isc_ratelimiter_setinterval(isc_ratelimiter_t *rl, isc_interval_t *interval) {
- isc_result_t result = ISC_R_SUCCESS;
- LOCK(&rl->lock);
- rl->interval = *interval;
- /*
- * If the timer is currently running, change its rate.
- */
- if (rl->state == isc_ratelimiter_ratelimited) {
- result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
- &rl->interval, ISC_FALSE);
- }
- UNLOCK(&rl->lock);
- return (result);
-}
-
-void
-isc_ratelimiter_setpertic(isc_ratelimiter_t *rl, isc_uint32_t pertic) {
- if (pertic == 0)
- pertic = 1;
- rl->pertic = pertic;
-}
-
-isc_result_t
-isc_ratelimiter_enqueue(isc_ratelimiter_t *rl, isc_task_t *task,
- isc_event_t **eventp)
-{
- isc_result_t result = ISC_R_SUCCESS;
- isc_event_t *ev;
-
- REQUIRE(eventp != NULL && *eventp != NULL);
- REQUIRE(task != NULL);
- ev = *eventp;
- REQUIRE(ev->ev_sender == NULL);
-
- LOCK(&rl->lock);
- if (rl->state == isc_ratelimiter_ratelimited ||
- rl->state == isc_ratelimiter_stalled) {
- isc_event_t *ev = *eventp;
- ev->ev_sender = task;
- ISC_LIST_APPEND(rl->pending, ev, ev_link);
- *eventp = NULL;
- } else if (rl->state == isc_ratelimiter_idle) {
- result = isc_timer_reset(rl->timer, isc_timertype_ticker, NULL,
- &rl->interval, ISC_FALSE);
- if (result == ISC_R_SUCCESS) {
- ev->ev_sender = task;
- rl->state = isc_ratelimiter_ratelimited;
- }
- } else {
- INSIST(rl->state == isc_ratelimiter_shuttingdown);
- result = ISC_R_SHUTTINGDOWN;
- }
- UNLOCK(&rl->lock);
- if (*eventp != NULL && result == ISC_R_SUCCESS)
- isc_task_send(task, eventp);
- return (result);
-}
-
-static void
-ratelimiter_tick(isc_task_t *task, isc_event_t *event) {
- isc_result_t result = ISC_R_SUCCESS;
- isc_ratelimiter_t *rl = (isc_ratelimiter_t *)event->ev_arg;
- isc_event_t *p;
- isc_uint32_t pertic;
-
- UNUSED(task);
-
- isc_event_free(&event);
-
- pertic = rl->pertic;
- while (pertic != 0) {
- pertic--;
- LOCK(&rl->lock);
- p = ISC_LIST_HEAD(rl->pending);
- if (p != NULL) {
- /*
- * There is work to do. Let's do it after unlocking.
- */
- ISC_LIST_UNLINK(rl->pending, p, ev_link);
- } else {
- /*
- * No work left to do. Stop the timer so that we don't
- * waste resources by having it fire periodically.
- */
- result = isc_timer_reset(rl->timer,
- isc_timertype_inactive,
- NULL, NULL, ISC_FALSE);
- RUNTIME_CHECK(result == ISC_R_SUCCESS);
- rl->state = isc_ratelimiter_idle;
- pertic = 0; /* Force the loop to exit. */
- }
- UNLOCK(&rl->lock);
- if (p != NULL) {
- isc_task_t *evtask = p->ev_sender;
- isc_task_send(evtask, &p);
- }
- INSIST(p == NULL);
- }
-}
-
-void
-isc_ratelimiter_shutdown(isc_ratelimiter_t *rl) {
- isc_event_t *ev;
- isc_task_t *task;
- LOCK(&rl->lock);
- rl->state = isc_ratelimiter_shuttingdown;
- (void)isc_timer_reset(rl->timer, isc_timertype_inactive,
- NULL, NULL, ISC_FALSE);
- while ((ev = ISC_LIST_HEAD(rl->pending)) != NULL) {
- ISC_LIST_UNLINK(rl->pending, ev, ev_link);
- ev->ev_attributes |= ISC_EVENTATTR_CANCELED;
- task = ev->ev_sender;
- isc_task_send(task, &ev);
- }
- isc_timer_detach(&rl->timer);
- /*
- * Send an event to our task. The delivery of this event
- * indicates that no more timer events will be delivered.
- */
- ev = &rl->shutdownevent;
- isc_task_send(rl->task, &ev);
-
- UNLOCK(&rl->lock);
-}
-
-static void
-ratelimiter_shutdowncomplete(isc_task_t *task, isc_event_t *event) {
- isc_ratelimiter_t *rl = (isc_ratelimiter_t *)event->ev_arg;
-
- UNUSED(task);
-
- isc_ratelimiter_detach(&rl);
-}
-
-static void
-ratelimiter_free(isc_ratelimiter_t *rl) {
- DESTROYLOCK(&rl->lock);
- isc_mem_put(rl->mctx, rl, sizeof(*rl));
-}
-
-void
-isc_ratelimiter_attach(isc_ratelimiter_t *source, isc_ratelimiter_t **target) {
- REQUIRE(source != NULL);
- REQUIRE(target != NULL && *target == NULL);
-
- LOCK(&source->lock);
- REQUIRE(source->refs > 0);
- source->refs++;
- INSIST(source->refs > 0);
- UNLOCK(&source->lock);
- *target = source;
-}
-
-void
-isc_ratelimiter_detach(isc_ratelimiter_t **rlp) {
- isc_ratelimiter_t *rl = *rlp;
- isc_boolean_t free_now = ISC_FALSE;
-
- LOCK(&rl->lock);
- REQUIRE(rl->refs > 0);
- rl->refs--;
- if (rl->refs == 0)
- free_now = ISC_TRUE;
- UNLOCK(&rl->lock);
-
- if (free_now)
- ratelimiter_free(rl);
-
- *rlp = NULL;
-}
-
-isc_result_t
-isc_ratelimiter_stall(isc_ratelimiter_t *rl) {
- isc_result_t result = ISC_R_SUCCESS;
-
- LOCK(&rl->lock);
- switch (rl->state) {
- case isc_ratelimiter_shuttingdown:
- result = ISC_R_SHUTTINGDOWN;
- break;
- case isc_ratelimiter_ratelimited:
- result = isc_timer_reset(rl->timer, isc_timertype_inactive,
- NULL, NULL, ISC_FALSE);
- RUNTIME_CHECK(result == ISC_R_SUCCESS);
- case isc_ratelimiter_idle:
- case isc_ratelimiter_stalled:
- rl->state = isc_ratelimiter_stalled;
- break;
- }
- UNLOCK(&rl->lock);
- return (result);
-}
-
-isc_result_t
-isc_ratelimiter_release(isc_ratelimiter_t *rl) {
- isc_result_t result = ISC_R_SUCCESS;
-
- LOCK(&rl->lock);
- switch (rl->state) {
- case isc_ratelimiter_shuttingdown:
- result = ISC_R_SHUTTINGDOWN;
- break;
- case isc_ratelimiter_stalled:
- if (!ISC_LIST_EMPTY(rl->pending)) {
- result = isc_timer_reset(rl->timer,
- isc_timertype_ticker, NULL,
- &rl->interval, ISC_FALSE);
- if (result == ISC_R_SUCCESS)
- rl->state = isc_ratelimiter_ratelimited;
- } else
- rl->state = isc_ratelimiter_idle;
- break;
- case isc_ratelimiter_ratelimited:
- case isc_ratelimiter_idle:
- break;
- }
- UNLOCK(&rl->lock);
- return (result);
-}
diff --git a/contrib/ntp/lib/isc/refcount.c b/contrib/ntp/lib/isc/refcount.c
deleted file mode 100644
index 36dfff297bb1..000000000000
--- a/contrib/ntp/lib/isc/refcount.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: refcount.c,v 1.5 2007/06/19 23:47:17 tbox Exp $ */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/mutex.h>
-#include <isc/refcount.h>
-#include <isc/result.h>
-
-isc_result_t
-isc_refcount_init(isc_refcount_t *ref, unsigned int n) {
- REQUIRE(ref != NULL);
-
- ref->refs = n;
-#if defined(ISC_PLATFORM_USETHREADS) && !defined(ISC_PLATFORM_HAVEXADD)
- return (isc_mutex_init(&ref->lock));
-#else
- return (ISC_R_SUCCESS);
-#endif
-}
diff --git a/contrib/ntp/lib/isc/region.c b/contrib/ntp/lib/isc/region.c
deleted file mode 100644
index cf64979003e9..000000000000
--- a/contrib/ntp/lib/isc/region.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: region.c,v 1.7 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <isc/region.h>
-#include <isc/util.h>
-
-int
-isc_region_compare(isc_region_t *r1, isc_region_t *r2) {
- unsigned int l;
- int result;
-
- REQUIRE(r1 != NULL);
- REQUIRE(r2 != NULL);
-
- l = (r1->length < r2->length) ? r1->length : r2->length;
-
- if ((result = memcmp(r1->base, r2->base, l)) != 0)
- return ((result < 0) ? -1 : 1);
- else
- return ((r1->length == r2->length) ? 0 :
- (r1->length < r2->length) ? -1 : 1);
-}
diff --git a/contrib/ntp/lib/isc/rwlock.c b/contrib/ntp/lib/isc/rwlock.c
deleted file mode 100644
index 9c84c258a28b..000000000000
--- a/contrib/ntp/lib/isc/rwlock.c
+++ /dev/null
@@ -1,809 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stddef.h>
-
-#include <isc/atomic.h>
-#include <isc/magic.h>
-#include <isc/msgs.h>
-#include <isc/platform.h>
-#include <isc/rwlock.h>
-#include <isc/util.h>
-
-#define RWLOCK_MAGIC ISC_MAGIC('R', 'W', 'L', 'k')
-#define VALID_RWLOCK(rwl) ISC_MAGIC_VALID(rwl, RWLOCK_MAGIC)
-
-#ifdef ISC_PLATFORM_USETHREADS
-
-#ifndef RWLOCK_DEFAULT_READ_QUOTA
-#define RWLOCK_DEFAULT_READ_QUOTA 4
-#endif
-
-#ifndef RWLOCK_DEFAULT_WRITE_QUOTA
-#define RWLOCK_DEFAULT_WRITE_QUOTA 4
-#endif
-
-#ifdef ISC_RWLOCK_TRACE
-#include <stdio.h> /* Required for fprintf/stderr. */
-#include <isc/thread.h> /* Required for isc_thread_self(). */
-
-static void
-print_lock(const char *operation, isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- fprintf(stderr,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PRINTLOCK,
- "rwlock %p thread %lu %s(%s): %s, %u active, "
- "%u granted, %u rwaiting, %u wwaiting\n"),
- rwl, isc_thread_self(), operation,
- (type == isc_rwlocktype_read ?
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_READ, "read") :
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_WRITE, "write")),
- (rwl->type == isc_rwlocktype_read ?
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_READING, "reading") :
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_WRITING, "writing")),
- rwl->active, rwl->granted, rwl->readers_waiting,
- rwl->writers_waiting);
-}
-#endif
-
-isc_result_t
-isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
- unsigned int write_quota)
-{
- isc_result_t result;
-
- REQUIRE(rwl != NULL);
-
- /*
- * In case there's trouble initializing, we zero magic now. If all
- * goes well, we'll set it to RWLOCK_MAGIC.
- */
- rwl->magic = 0;
-
-#if defined(ISC_PLATFORM_HAVEXADD) && defined(ISC_PLATFORM_HAVECMPXCHG)
- rwl->write_requests = 0;
- rwl->write_completions = 0;
- rwl->cnt_and_flag = 0;
- rwl->readers_waiting = 0;
- rwl->write_granted = 0;
- if (read_quota != 0) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "read quota is not supported");
- }
- if (write_quota == 0)
- write_quota = RWLOCK_DEFAULT_WRITE_QUOTA;
- rwl->write_quota = write_quota;
-#else
- rwl->type = isc_rwlocktype_read;
- rwl->original = isc_rwlocktype_none;
- rwl->active = 0;
- rwl->granted = 0;
- rwl->readers_waiting = 0;
- rwl->writers_waiting = 0;
- if (read_quota == 0)
- read_quota = RWLOCK_DEFAULT_READ_QUOTA;
- rwl->read_quota = read_quota;
- if (write_quota == 0)
- write_quota = RWLOCK_DEFAULT_WRITE_QUOTA;
- rwl->write_quota = write_quota;
-#endif
-
- result = isc_mutex_init(&rwl->lock);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- result = isc_condition_init(&rwl->readable);
- if (result != ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_condition_init(readable) %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- isc_result_totext(result));
- result = ISC_R_UNEXPECTED;
- goto destroy_lock;
- }
- result = isc_condition_init(&rwl->writeable);
- if (result != ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_condition_init(writeable) %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- isc_result_totext(result));
- result = ISC_R_UNEXPECTED;
- goto destroy_rcond;
- }
-
- rwl->magic = RWLOCK_MAGIC;
-
- return (ISC_R_SUCCESS);
-
- destroy_rcond:
- (void)isc_condition_destroy(&rwl->readable);
- destroy_lock:
- DESTROYLOCK(&rwl->lock);
-
- return (result);
-}
-
-void
-isc_rwlock_destroy(isc_rwlock_t *rwl) {
- REQUIRE(VALID_RWLOCK(rwl));
-
-#if defined(ISC_PLATFORM_HAVEXADD) && defined(ISC_PLATFORM_HAVECMPXCHG)
- REQUIRE(rwl->write_requests == rwl->write_completions &&
- rwl->cnt_and_flag == 0 && rwl->readers_waiting == 0);
-#else
- LOCK(&rwl->lock);
- REQUIRE(rwl->active == 0 &&
- rwl->readers_waiting == 0 &&
- rwl->writers_waiting == 0);
- UNLOCK(&rwl->lock);
-#endif
-
- rwl->magic = 0;
- (void)isc_condition_destroy(&rwl->readable);
- (void)isc_condition_destroy(&rwl->writeable);
- DESTROYLOCK(&rwl->lock);
-}
-
-#if defined(ISC_PLATFORM_HAVEXADD) && defined(ISC_PLATFORM_HAVECMPXCHG)
-
-/*
- * When some architecture-dependent atomic operations are available,
- * rwlock can be more efficient than the generic algorithm defined below.
- * The basic algorithm is described in the following URL:
- * http://www.cs.rochester.edu/u/scott/synchronization/pseudocode/rw.html
- *
- * The key is to use the following integer variables modified atomically:
- * write_requests, write_completions, and cnt_and_flag.
- *
- * write_requests and write_completions act as a waiting queue for writers
- * in order to ensure the FIFO order. Both variables begin with the initial
- * value of 0. When a new writer tries to get a write lock, it increments
- * write_requests and gets the previous value of the variable as a "ticket".
- * When write_completions reaches the ticket number, the new writer can start
- * writing. When the writer completes its work, it increments
- * write_completions so that another new writer can start working. If the
- * write_requests is not equal to write_completions, it means a writer is now
- * working or waiting. In this case, a new readers cannot start reading, or
- * in other words, this algorithm basically prefers writers.
- *
- * cnt_and_flag is a "lock" shared by all readers and writers. This integer
- * variable is a kind of structure with two members: writer_flag (1 bit) and
- * reader_count (31 bits). The writer_flag shows whether a writer is working,
- * and the reader_count shows the number of readers currently working or almost
- * ready for working. A writer who has the current "ticket" tries to get the
- * lock by exclusively setting the writer_flag to 1, provided that the whole
- * 32-bit is 0 (meaning no readers or writers working). On the other hand,
- * a new reader tries to increment the "reader_count" field provided that
- * the writer_flag is 0 (meaning there is no writer working).
- *
- * If some of the above operations fail, the reader or the writer sleeps
- * until the related condition changes. When a working reader or writer
- * completes its work, some readers or writers are sleeping, and the condition
- * that suspended the reader or writer has changed, it wakes up the sleeping
- * readers or writers.
- *
- * As already noted, this algorithm basically prefers writers. In order to
- * prevent readers from starving, however, the algorithm also introduces the
- * "writer quota" (Q). When Q consecutive writers have completed their work,
- * suspending readers, the last writer will wake up the readers, even if a new
- * writer is waiting.
- *
- * Implementation specific note: due to the combination of atomic operations
- * and a mutex lock, ordering between the atomic operation and locks can be
- * very sensitive in some cases. In particular, it is generally very important
- * to check the atomic variable that requires a reader or writer to sleep after
- * locking the mutex and before actually sleeping; otherwise, it could be very
- * likely to cause a deadlock. For example, assume "var" is a variable
- * atomically modified, then the corresponding code would be:
- * if (var == need_sleep) {
- * LOCK(lock);
- * if (var == need_sleep)
- * WAIT(cond, lock);
- * UNLOCK(lock);
- * }
- * The second check is important, since "var" is protected by the atomic
- * operation, not by the mutex, and can be changed just before sleeping.
- * (The first "if" could be omitted, but this is also important in order to
- * make the code efficient by avoiding the use of the mutex unless it is
- * really necessary.)
- */
-
-#define WRITER_ACTIVE 0x1
-#define READER_INCR 0x2
-
-isc_result_t
-isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- isc_int32_t cntflag;
-
- REQUIRE(VALID_RWLOCK(rwl));
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PRELOCK, "prelock"), rwl, type);
-#endif
-
- if (type == isc_rwlocktype_read) {
- if (rwl->write_requests != rwl->write_completions) {
- /* there is a waiting or active writer */
- LOCK(&rwl->lock);
- if (rwl->write_requests != rwl->write_completions) {
- rwl->readers_waiting++;
- WAIT(&rwl->readable, &rwl->lock);
- rwl->readers_waiting--;
- }
- UNLOCK(&rwl->lock);
- }
-
- cntflag = isc_atomic_xadd(&rwl->cnt_and_flag, READER_INCR);
- POST(cntflag);
- while (1) {
- if ((rwl->cnt_and_flag & WRITER_ACTIVE) == 0)
- break;
-
- /* A writer is still working */
- LOCK(&rwl->lock);
- rwl->readers_waiting++;
- if ((rwl->cnt_and_flag & WRITER_ACTIVE) != 0)
- WAIT(&rwl->readable, &rwl->lock);
- rwl->readers_waiting--;
- UNLOCK(&rwl->lock);
-
- /*
- * Typically, the reader should be able to get a lock
- * at this stage:
- * (1) there should have been no pending writer when
- * the reader was trying to increment the
- * counter; otherwise, the writer should be in
- * the waiting queue, preventing the reader from
- * proceeding to this point.
- * (2) once the reader increments the counter, no
- * more writer can get a lock.
- * Still, it is possible another writer can work at
- * this point, e.g. in the following scenario:
- * A previous writer unlocks the writer lock.
- * This reader proceeds to point (1).
- * A new writer appears, and gets a new lock before
- * the reader increments the counter.
- * The reader then increments the counter.
- * The previous writer notices there is a waiting
- * reader who is almost ready, and wakes it up.
- * So, the reader needs to confirm whether it can now
- * read explicitly (thus we loop). Note that this is
- * not an infinite process, since the reader has
- * incremented the counter at this point.
- */
- }
-
- /*
- * If we are temporarily preferred to writers due to the writer
- * quota, reset the condition (race among readers doesn't
- * matter).
- */
- rwl->write_granted = 0;
- } else {
- isc_int32_t prev_writer;
-
- /* enter the waiting queue, and wait for our turn */
- prev_writer = isc_atomic_xadd(&rwl->write_requests, 1);
- while (rwl->write_completions != prev_writer) {
- LOCK(&rwl->lock);
- if (rwl->write_completions != prev_writer) {
- WAIT(&rwl->writeable, &rwl->lock);
- UNLOCK(&rwl->lock);
- continue;
- }
- UNLOCK(&rwl->lock);
- break;
- }
-
- while (1) {
- cntflag = isc_atomic_cmpxchg(&rwl->cnt_and_flag, 0,
- WRITER_ACTIVE);
- if (cntflag == 0)
- break;
-
- /* Another active reader or writer is working. */
- LOCK(&rwl->lock);
- if (rwl->cnt_and_flag != 0)
- WAIT(&rwl->writeable, &rwl->lock);
- UNLOCK(&rwl->lock);
- }
-
- INSIST((rwl->cnt_and_flag & WRITER_ACTIVE) != 0);
- rwl->write_granted++;
- }
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTLOCK, "postlock"), rwl, type);
-#endif
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- isc_int32_t cntflag;
-
- REQUIRE(VALID_RWLOCK(rwl));
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PRELOCK, "prelock"), rwl, type);
-#endif
-
- if (type == isc_rwlocktype_read) {
- /* If a writer is waiting or working, we fail. */
- if (rwl->write_requests != rwl->write_completions)
- return (ISC_R_LOCKBUSY);
-
- /* Otherwise, be ready for reading. */
- cntflag = isc_atomic_xadd(&rwl->cnt_and_flag, READER_INCR);
- if ((cntflag & WRITER_ACTIVE) != 0) {
- /*
- * A writer is working. We lose, and cancel the read
- * request.
- */
- cntflag = isc_atomic_xadd(&rwl->cnt_and_flag,
- -READER_INCR);
- /*
- * If no other readers are waiting and we've suspended
- * new writers in this short period, wake them up.
- */
- if (cntflag == READER_INCR &&
- rwl->write_completions != rwl->write_requests) {
- LOCK(&rwl->lock);
- BROADCAST(&rwl->writeable);
- UNLOCK(&rwl->lock);
- }
-
- return (ISC_R_LOCKBUSY);
- }
- } else {
- /* Try locking without entering the waiting queue. */
- cntflag = isc_atomic_cmpxchg(&rwl->cnt_and_flag, 0,
- WRITER_ACTIVE);
- if (cntflag != 0)
- return (ISC_R_LOCKBUSY);
-
- /*
- * XXXJT: jump into the queue, possibly breaking the writer
- * order.
- */
- (void)isc_atomic_xadd(&rwl->write_completions, -1);
-
- rwl->write_granted++;
- }
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTLOCK, "postlock"), rwl, type);
-#endif
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_rwlock_tryupgrade(isc_rwlock_t *rwl) {
- isc_int32_t prevcnt;
-
- REQUIRE(VALID_RWLOCK(rwl));
-
- /* Try to acquire write access. */
- prevcnt = isc_atomic_cmpxchg(&rwl->cnt_and_flag,
- READER_INCR, WRITER_ACTIVE);
- /*
- * There must have been no writer, and there must have been at least
- * one reader.
- */
- INSIST((prevcnt & WRITER_ACTIVE) == 0 &&
- (prevcnt & ~WRITER_ACTIVE) != 0);
-
- if (prevcnt == READER_INCR) {
- /*
- * We are the only reader and have been upgraded.
- * Now jump into the head of the writer waiting queue.
- */
- (void)isc_atomic_xadd(&rwl->write_completions, -1);
- } else
- return (ISC_R_LOCKBUSY);
-
- return (ISC_R_SUCCESS);
-
-}
-
-void
-isc_rwlock_downgrade(isc_rwlock_t *rwl) {
- isc_int32_t prev_readers;
-
- REQUIRE(VALID_RWLOCK(rwl));
-
- /* Become an active reader. */
- prev_readers = isc_atomic_xadd(&rwl->cnt_and_flag, READER_INCR);
- /* We must have been a writer. */
- INSIST((prev_readers & WRITER_ACTIVE) != 0);
-
- /* Complete write */
- (void)isc_atomic_xadd(&rwl->cnt_and_flag, -WRITER_ACTIVE);
- (void)isc_atomic_xadd(&rwl->write_completions, 1);
-
- /* Resume other readers */
- LOCK(&rwl->lock);
- if (rwl->readers_waiting > 0)
- BROADCAST(&rwl->readable);
- UNLOCK(&rwl->lock);
-}
-
-isc_result_t
-isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- isc_int32_t prev_cnt;
-
- REQUIRE(VALID_RWLOCK(rwl));
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PREUNLOCK, "preunlock"), rwl, type);
-#endif
-
- if (type == isc_rwlocktype_read) {
- prev_cnt = isc_atomic_xadd(&rwl->cnt_and_flag, -READER_INCR);
-
- /*
- * If we're the last reader and any writers are waiting, wake
- * them up. We need to wake up all of them to ensure the
- * FIFO order.
- */
- if (prev_cnt == READER_INCR &&
- rwl->write_completions != rwl->write_requests) {
- LOCK(&rwl->lock);
- BROADCAST(&rwl->writeable);
- UNLOCK(&rwl->lock);
- }
- } else {
- isc_boolean_t wakeup_writers = ISC_TRUE;
-
- /*
- * Reset the flag, and (implicitly) tell other writers
- * we are done.
- */
- (void)isc_atomic_xadd(&rwl->cnt_and_flag, -WRITER_ACTIVE);
- (void)isc_atomic_xadd(&rwl->write_completions, 1);
-
- if (rwl->write_granted >= rwl->write_quota ||
- rwl->write_requests == rwl->write_completions ||
- (rwl->cnt_and_flag & ~WRITER_ACTIVE) != 0) {
- /*
- * We have passed the write quota, no writer is
- * waiting, or some readers are almost ready, pending
- * possible writers. Note that the last case can
- * happen even if write_requests != write_completions
- * (which means a new writer in the queue), so we need
- * to catch the case explicitly.
- */
- LOCK(&rwl->lock);
- if (rwl->readers_waiting > 0) {
- wakeup_writers = ISC_FALSE;
- BROADCAST(&rwl->readable);
- }
- UNLOCK(&rwl->lock);
- }
-
- if (rwl->write_requests != rwl->write_completions &&
- wakeup_writers) {
- LOCK(&rwl->lock);
- BROADCAST(&rwl->writeable);
- UNLOCK(&rwl->lock);
- }
- }
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTUNLOCK, "postunlock"),
- rwl, type);
-#endif
-
- return (ISC_R_SUCCESS);
-}
-
-#else /* ISC_PLATFORM_HAVEXADD && ISC_PLATFORM_HAVECMPXCHG */
-
-static isc_result_t
-doit(isc_rwlock_t *rwl, isc_rwlocktype_t type, isc_boolean_t nonblock) {
- isc_boolean_t skip = ISC_FALSE;
- isc_boolean_t done = ISC_FALSE;
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(VALID_RWLOCK(rwl));
-
- LOCK(&rwl->lock);
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PRELOCK, "prelock"), rwl, type);
-#endif
-
- if (type == isc_rwlocktype_read) {
- if (rwl->readers_waiting != 0)
- skip = ISC_TRUE;
- while (!done) {
- if (!skip &&
- ((rwl->active == 0 ||
- (rwl->type == isc_rwlocktype_read &&
- (rwl->writers_waiting == 0 ||
- rwl->granted < rwl->read_quota)))))
- {
- rwl->type = isc_rwlocktype_read;
- rwl->active++;
- rwl->granted++;
- done = ISC_TRUE;
- } else if (nonblock) {
- result = ISC_R_LOCKBUSY;
- done = ISC_TRUE;
- } else {
- skip = ISC_FALSE;
- rwl->readers_waiting++;
- WAIT(&rwl->readable, &rwl->lock);
- rwl->readers_waiting--;
- }
- }
- } else {
- if (rwl->writers_waiting != 0)
- skip = ISC_TRUE;
- while (!done) {
- if (!skip && rwl->active == 0) {
- rwl->type = isc_rwlocktype_write;
- rwl->active = 1;
- rwl->granted++;
- done = ISC_TRUE;
- } else if (nonblock) {
- result = ISC_R_LOCKBUSY;
- done = ISC_TRUE;
- } else {
- skip = ISC_FALSE;
- rwl->writers_waiting++;
- WAIT(&rwl->writeable, &rwl->lock);
- rwl->writers_waiting--;
- }
- }
- }
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTLOCK, "postlock"), rwl, type);
-#endif
-
- UNLOCK(&rwl->lock);
-
- return (result);
-}
-
-isc_result_t
-isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- return (doit(rwl, type, ISC_FALSE));
-}
-
-isc_result_t
-isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- return (doit(rwl, type, ISC_TRUE));
-}
-
-isc_result_t
-isc_rwlock_tryupgrade(isc_rwlock_t *rwl) {
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(VALID_RWLOCK(rwl));
- LOCK(&rwl->lock);
- REQUIRE(rwl->type == isc_rwlocktype_read);
- REQUIRE(rwl->active != 0);
-
- /* If we are the only reader then succeed. */
- if (rwl->active == 1) {
- rwl->original = (rwl->original == isc_rwlocktype_none) ?
- isc_rwlocktype_read : isc_rwlocktype_none;
- rwl->type = isc_rwlocktype_write;
- } else
- result = ISC_R_LOCKBUSY;
-
- UNLOCK(&rwl->lock);
- return (result);
-}
-
-void
-isc_rwlock_downgrade(isc_rwlock_t *rwl) {
-
- REQUIRE(VALID_RWLOCK(rwl));
- LOCK(&rwl->lock);
- REQUIRE(rwl->type == isc_rwlocktype_write);
- REQUIRE(rwl->active == 1);
-
- rwl->type = isc_rwlocktype_read;
- rwl->original = (rwl->original == isc_rwlocktype_none) ?
- isc_rwlocktype_write : isc_rwlocktype_none;
- /*
- * Resume processing any read request that were blocked when
- * we upgraded.
- */
- if (rwl->original == isc_rwlocktype_none &&
- (rwl->writers_waiting == 0 || rwl->granted < rwl->read_quota) &&
- rwl->readers_waiting > 0)
- BROADCAST(&rwl->readable);
-
- UNLOCK(&rwl->lock);
-}
-
-isc_result_t
-isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
-
- REQUIRE(VALID_RWLOCK(rwl));
- LOCK(&rwl->lock);
- REQUIRE(rwl->type == type);
-
- UNUSED(type);
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_PREUNLOCK, "preunlock"), rwl, type);
-#endif
-
- INSIST(rwl->active > 0);
- rwl->active--;
- if (rwl->active == 0) {
- if (rwl->original != isc_rwlocktype_none) {
- rwl->type = rwl->original;
- rwl->original = isc_rwlocktype_none;
- }
- if (rwl->type == isc_rwlocktype_read) {
- rwl->granted = 0;
- if (rwl->writers_waiting > 0) {
- rwl->type = isc_rwlocktype_write;
- SIGNAL(&rwl->writeable);
- } else if (rwl->readers_waiting > 0) {
- /* Does this case ever happen? */
- BROADCAST(&rwl->readable);
- }
- } else {
- if (rwl->readers_waiting > 0) {
- if (rwl->writers_waiting > 0 &&
- rwl->granted < rwl->write_quota) {
- SIGNAL(&rwl->writeable);
- } else {
- rwl->granted = 0;
- rwl->type = isc_rwlocktype_read;
- BROADCAST(&rwl->readable);
- }
- } else if (rwl->writers_waiting > 0) {
- rwl->granted = 0;
- SIGNAL(&rwl->writeable);
- } else {
- rwl->granted = 0;
- }
- }
- }
- INSIST(rwl->original == isc_rwlocktype_none);
-
-#ifdef ISC_RWLOCK_TRACE
- print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK,
- ISC_MSG_POSTUNLOCK, "postunlock"),
- rwl, type);
-#endif
-
- UNLOCK(&rwl->lock);
-
- return (ISC_R_SUCCESS);
-}
-
-#endif /* ISC_PLATFORM_HAVEXADD && ISC_PLATFORM_HAVECMPXCHG */
-#else /* ISC_PLATFORM_USETHREADS */
-
-isc_result_t
-isc_rwlock_init(isc_rwlock_t *rwl, unsigned int read_quota,
- unsigned int write_quota)
-{
- REQUIRE(rwl != NULL);
-
- UNUSED(read_quota);
- UNUSED(write_quota);
-
- rwl->type = isc_rwlocktype_read;
- rwl->active = 0;
- rwl->magic = RWLOCK_MAGIC;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- REQUIRE(VALID_RWLOCK(rwl));
-
- if (type == isc_rwlocktype_read) {
- if (rwl->type != isc_rwlocktype_read && rwl->active != 0)
- return (ISC_R_LOCKBUSY);
- rwl->type = isc_rwlocktype_read;
- rwl->active++;
- } else {
- if (rwl->active != 0)
- return (ISC_R_LOCKBUSY);
- rwl->type = isc_rwlocktype_write;
- rwl->active = 1;
- }
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- return (isc_rwlock_lock(rwl, type));
-}
-
-isc_result_t
-isc_rwlock_tryupgrade(isc_rwlock_t *rwl) {
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(VALID_RWLOCK(rwl));
- REQUIRE(rwl->type == isc_rwlocktype_read);
- REQUIRE(rwl->active != 0);
-
- /* If we are the only reader then succeed. */
- if (rwl->active == 1)
- rwl->type = isc_rwlocktype_write;
- else
- result = ISC_R_LOCKBUSY;
- return (result);
-}
-
-void
-isc_rwlock_downgrade(isc_rwlock_t *rwl) {
-
- REQUIRE(VALID_RWLOCK(rwl));
- REQUIRE(rwl->type == isc_rwlocktype_write);
- REQUIRE(rwl->active == 1);
-
- rwl->type = isc_rwlocktype_read;
-}
-
-isc_result_t
-isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
- REQUIRE(VALID_RWLOCK(rwl));
- REQUIRE(rwl->type == type);
-
- UNUSED(type);
-
- INSIST(rwl->active > 0);
- rwl->active--;
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_rwlock_destroy(isc_rwlock_t *rwl) {
- REQUIRE(rwl != NULL);
- REQUIRE(rwl->active == 0);
- rwl->magic = 0;
-}
-
-#endif /* ISC_PLATFORM_USETHREADS */
diff --git a/contrib/ntp/lib/isc/serial.c b/contrib/ntp/lib/isc/serial.c
deleted file mode 100644
index b43aac7ed232..000000000000
--- a/contrib/ntp/lib/isc/serial.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: serial.c,v 1.12 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/serial.h>
-
-isc_boolean_t
-isc_serial_lt(isc_uint32_t a, isc_uint32_t b) {
- /*
- * Undefined => ISC_FALSE
- */
- if (a == (b ^ 0x80000000U))
- return (ISC_FALSE);
- return (((isc_int32_t)(a - b) < 0) ? ISC_TRUE : ISC_FALSE);
-}
-
-isc_boolean_t
-isc_serial_gt(isc_uint32_t a, isc_uint32_t b) {
- return (((isc_int32_t)(a - b) > 0) ? ISC_TRUE : ISC_FALSE);
-}
-
-isc_boolean_t
-isc_serial_le(isc_uint32_t a, isc_uint32_t b) {
- return ((a == b) ? ISC_TRUE : isc_serial_lt(a, b));
-}
-
-isc_boolean_t
-isc_serial_ge(isc_uint32_t a, isc_uint32_t b) {
- return ((a == b) ? ISC_TRUE : isc_serial_gt(a, b));
-}
-
-isc_boolean_t
-isc_serial_eq(isc_uint32_t a, isc_uint32_t b) {
- return ((a == b) ? ISC_TRUE : ISC_FALSE);
-}
-
-isc_boolean_t
-isc_serial_ne(isc_uint32_t a, isc_uint32_t b) {
- return ((a != b) ? ISC_TRUE : ISC_FALSE);
-}
diff --git a/contrib/ntp/lib/isc/sha2.c b/contrib/ntp/lib/isc/sha2.c
deleted file mode 100644
index 5a1d708febd2..000000000000
--- a/contrib/ntp/lib/isc/sha2.c
+++ /dev/null
@@ -1,1449 +0,0 @@
-/*
- * Copyright (C) 2005-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/* $FreeBSD: 258945 2013-12-04 21:33:17Z roberto $ */
-/* $KAME: sha2.c,v 1.8 2001/11/08 01:07:52 itojun Exp $ */
-
-/*
- * sha2.c
- *
- * Version 1.0.0beta1
- *
- * Written by Aaron D. Gifford <me@aarongifford.com>
- *
- * Copyright 2000 Aaron D. Gifford. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-
-#include <config.h>
-
-#include <isc/assertions.h>
-#include <isc/platform.h>
-#include <isc/sha2.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-#ifdef ISC_PLATFORM_OPENSSLHASH
-
-void
-isc_sha224_init(isc_sha224_t *context) {
- if (context == (isc_sha224_t *)0) {
- return;
- }
- EVP_DigestInit(context, EVP_sha224());
-}
-
-void
-isc_sha224_invalidate(isc_sha224_t *context) {
- EVP_MD_CTX_cleanup(context);
-}
-
-void
-isc_sha224_update(isc_sha224_t *context, const isc_uint8_t* data, size_t len) {
- if (len == 0U) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha224_t *)0 && data != (isc_uint8_t*)0);
-
- EVP_DigestUpdate(context, (const void *) data, len);
-}
-
-void
-isc_sha224_final(isc_uint8_t digest[], isc_sha224_t *context) {
- /* Sanity check: */
- REQUIRE(context != (isc_sha224_t *)0);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (isc_uint8_t*)0) {
- EVP_DigestFinal(context, digest, NULL);
- } else {
- EVP_MD_CTX_cleanup(context);
- }
-}
-
-void
-isc_sha256_init(isc_sha256_t *context) {
- if (context == (isc_sha256_t *)0) {
- return;
- }
- EVP_DigestInit(context, EVP_sha256());
-}
-
-void
-isc_sha256_invalidate(isc_sha256_t *context) {
- EVP_MD_CTX_cleanup(context);
-}
-
-void
-isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
- if (len == 0U) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha256_t *)0 && data != (isc_uint8_t*)0);
-
- EVP_DigestUpdate(context, (const void *) data, len);
-}
-
-void
-isc_sha256_final(isc_uint8_t digest[], isc_sha256_t *context) {
- /* Sanity check: */
- REQUIRE(context != (isc_sha256_t *)0);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (isc_uint8_t*)0) {
- EVP_DigestFinal(context, digest, NULL);
- } else {
- EVP_MD_CTX_cleanup(context);
- }
-}
-
-void
-isc_sha512_init(isc_sha512_t *context) {
- if (context == (isc_sha512_t *)0) {
- return;
- }
- EVP_DigestInit(context, EVP_sha512());
-}
-
-void
-isc_sha512_invalidate(isc_sha512_t *context) {
- EVP_MD_CTX_cleanup(context);
-}
-
-void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t len) {
- if (len == 0U) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha512_t *)0 && data != (isc_uint8_t*)0);
-
- EVP_DigestUpdate(context, (const void *) data, len);
-}
-
-void isc_sha512_final(isc_uint8_t digest[], isc_sha512_t *context) {
- /* Sanity check: */
- REQUIRE(context != (isc_sha512_t *)0);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (isc_uint8_t*)0) {
- EVP_DigestFinal(context, digest, NULL);
- } else {
- EVP_MD_CTX_cleanup(context);
- }
-}
-
-void
-isc_sha384_init(isc_sha384_t *context) {
- if (context == (isc_sha384_t *)0) {
- return;
- }
- EVP_DigestInit(context, EVP_sha384());
-}
-
-void
-isc_sha384_invalidate(isc_sha384_t *context) {
- EVP_MD_CTX_cleanup(context);
-}
-
-void
-isc_sha384_update(isc_sha384_t *context, const isc_uint8_t* data, size_t len) {
- if (len == 0U) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha512_t *)0 && data != (isc_uint8_t*)0);
-
- EVP_DigestUpdate(context, (const void *) data, len);
-}
-
-void
-isc_sha384_final(isc_uint8_t digest[], isc_sha384_t *context) {
- /* Sanity check: */
- REQUIRE(context != (isc_sha384_t *)0);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (isc_uint8_t*)0) {
- EVP_DigestFinal(context, digest, NULL);
- } else {
- EVP_MD_CTX_cleanup(context);
- }
-}
-
-#else
-
-/*
- * UNROLLED TRANSFORM LOOP NOTE:
- * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform
- * loop version for the hash transform rounds (defined using macros
- * later in this file). Either define on the command line, for example:
- *
- * cc -DISC_SHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c
- *
- * or define below:
- *
- * \#define ISC_SHA2_UNROLL_TRANSFORM
- *
- */
-
-/*** SHA-256/384/512 Machine Architecture Definitions *****************/
-/*
- * BYTE_ORDER NOTE:
- *
- * Please make sure that your system defines BYTE_ORDER. If your
- * architecture is little-endian, make sure it also defines
- * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
- * equivalent.
- *
- * If your system does not define the above, then you can do so by
- * hand like this:
- *
- * \#define LITTLE_ENDIAN 1234
- * \#define BIG_ENDIAN 4321
- *
- * And for little-endian machines, add:
- *
- * \#define BYTE_ORDER LITTLE_ENDIAN
- *
- * Or for big-endian machines:
- *
- * \#define BYTE_ORDER BIG_ENDIAN
- *
- * The FreeBSD machine this was written on defines BYTE_ORDER
- * appropriately by including <sys/types.h> (which in turn includes
- * <machine/endian.h> where the appropriate definitions are actually
- * made).
- */
-#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
-#ifndef BYTE_ORDER
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
-#endif
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN 1234
-#endif
-#ifdef WORDS_BIGENDIAN
-#define BYTE_ORDER BIG_ENDIAN
-#else
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-#else
-#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
-#endif
-#endif
-
-/*** SHA-256/384/512 Various Length Definitions ***********************/
-/* NOTE: Most of these are in sha2.h */
-#define ISC_SHA256_SHORT_BLOCK_LENGTH (ISC_SHA256_BLOCK_LENGTH - 8)
-#define ISC_SHA384_SHORT_BLOCK_LENGTH (ISC_SHA384_BLOCK_LENGTH - 16)
-#define ISC_SHA512_SHORT_BLOCK_LENGTH (ISC_SHA512_BLOCK_LENGTH - 16)
-
-
-/*** ENDIAN REVERSAL MACROS *******************************************/
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define REVERSE32(w,x) { \
- isc_uint32_t tmp = (w); \
- tmp = (tmp >> 16) | (tmp << 16); \
- (x) = ((tmp & 0xff00ff00UL) >> 8) | ((tmp & 0x00ff00ffUL) << 8); \
-}
-#ifdef WIN32
-#define REVERSE64(w,x) { \
- isc_uint64_t tmp = (w); \
- tmp = (tmp >> 32) | (tmp << 32); \
- tmp = ((tmp & 0xff00ff00ff00ff00UL) >> 8) | \
- ((tmp & 0x00ff00ff00ff00ffUL) << 8); \
- (x) = ((tmp & 0xffff0000ffff0000UL) >> 16) | \
- ((tmp & 0x0000ffff0000ffffUL) << 16); \
-}
-#else
-#define REVERSE64(w,x) { \
- isc_uint64_t tmp = (w); \
- tmp = (tmp >> 32) | (tmp << 32); \
- tmp = ((tmp & 0xff00ff00ff00ff00ULL) >> 8) | \
- ((tmp & 0x00ff00ff00ff00ffULL) << 8); \
- (x) = ((tmp & 0xffff0000ffff0000ULL) >> 16) | \
- ((tmp & 0x0000ffff0000ffffULL) << 16); \
-}
-#endif
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-/*
- * Macro for incrementally adding the unsigned 64-bit integer n to the
- * unsigned 128-bit integer (represented using a two-element array of
- * 64-bit words):
- */
-#define ADDINC128(w,n) { \
- (w)[0] += (isc_uint64_t)(n); \
- if ((w)[0] < (n)) { \
- (w)[1]++; \
- } \
-}
-
-/*** THE SIX LOGICAL FUNCTIONS ****************************************/
-/*
- * Bit shifting and rotation (used by the six SHA-XYZ logical functions:
- *
- * NOTE: The naming of R and S appears backwards here (R is a SHIFT and
- * S is a ROTATION) because the SHA-256/384/512 description document
- * (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this
- * same "backwards" definition.
- */
-/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */
-#define R(b,x) ((x) >> (b))
-/* 32-bit Rotate-right (used in SHA-256): */
-#define S32(b,x) (((x) >> (b)) | ((x) << (32 - (b))))
-/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */
-#define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b))))
-
-/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */
-#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
-#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
-
-/* Four of six logical functions used in SHA-256: */
-#define Sigma0_256(x) (S32(2, (x)) ^ S32(13, (x)) ^ S32(22, (x)))
-#define Sigma1_256(x) (S32(6, (x)) ^ S32(11, (x)) ^ S32(25, (x)))
-#define sigma0_256(x) (S32(7, (x)) ^ S32(18, (x)) ^ R(3 , (x)))
-#define sigma1_256(x) (S32(17, (x)) ^ S32(19, (x)) ^ R(10, (x)))
-
-/* Four of six logical functions used in SHA-384 and SHA-512: */
-#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
-#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
-#define sigma0_512(x) (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7, (x)))
-#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x)))
-
-/*** INTERNAL FUNCTION PROTOTYPES *************************************/
-/* NOTE: These should not be accessed directly from outside this
- * library -- they are intended for private internal visibility/use
- * only.
- */
-void isc_sha512_last(isc_sha512_t *);
-void isc_sha256_transform(isc_sha256_t *, const isc_uint32_t*);
-void isc_sha512_transform(isc_sha512_t *, const isc_uint64_t*);
-
-
-/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
-/* Hash constant words K for SHA-224 and SHA-256: */
-static const isc_uint32_t K256[64] = {
- 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
- 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
- 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
- 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
- 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
- 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
- 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
- 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL,
- 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
- 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
- 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
- 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
- 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
- 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
- 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
- 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
-};
-
-/* Initial hash value H for SHA-224: */
-static const isc_uint32_t sha224_initial_hash_value[8] = {
- 0xc1059ed8UL,
- 0x367cd507UL,
- 0x3070dd17UL,
- 0xf70e5939UL,
- 0xffc00b31UL,
- 0x68581511UL,
- 0x64f98fa7UL,
- 0xbefa4fa4UL
-};
-
-/* Initial hash value H for SHA-256: */
-static const isc_uint32_t sha256_initial_hash_value[8] = {
- 0x6a09e667UL,
- 0xbb67ae85UL,
- 0x3c6ef372UL,
- 0xa54ff53aUL,
- 0x510e527fUL,
- 0x9b05688cUL,
- 0x1f83d9abUL,
- 0x5be0cd19UL
-};
-
-#ifdef WIN32
-/* Hash constant words K for SHA-384 and SHA-512: */
-static const isc_uint64_t K512[80] = {
- 0x428a2f98d728ae22UL, 0x7137449123ef65cdUL,
- 0xb5c0fbcfec4d3b2fUL, 0xe9b5dba58189dbbcUL,
- 0x3956c25bf348b538UL, 0x59f111f1b605d019UL,
- 0x923f82a4af194f9bUL, 0xab1c5ed5da6d8118UL,
- 0xd807aa98a3030242UL, 0x12835b0145706fbeUL,
- 0x243185be4ee4b28cUL, 0x550c7dc3d5ffb4e2UL,
- 0x72be5d74f27b896fUL, 0x80deb1fe3b1696b1UL,
- 0x9bdc06a725c71235UL, 0xc19bf174cf692694UL,
- 0xe49b69c19ef14ad2UL, 0xefbe4786384f25e3UL,
- 0x0fc19dc68b8cd5b5UL, 0x240ca1cc77ac9c65UL,
- 0x2de92c6f592b0275UL, 0x4a7484aa6ea6e483UL,
- 0x5cb0a9dcbd41fbd4UL, 0x76f988da831153b5UL,
- 0x983e5152ee66dfabUL, 0xa831c66d2db43210UL,
- 0xb00327c898fb213fUL, 0xbf597fc7beef0ee4UL,
- 0xc6e00bf33da88fc2UL, 0xd5a79147930aa725UL,
- 0x06ca6351e003826fUL, 0x142929670a0e6e70UL,
- 0x27b70a8546d22ffcUL, 0x2e1b21385c26c926UL,
- 0x4d2c6dfc5ac42aedUL, 0x53380d139d95b3dfUL,
- 0x650a73548baf63deUL, 0x766a0abb3c77b2a8UL,
- 0x81c2c92e47edaee6UL, 0x92722c851482353bUL,
- 0xa2bfe8a14cf10364UL, 0xa81a664bbc423001UL,
- 0xc24b8b70d0f89791UL, 0xc76c51a30654be30UL,
- 0xd192e819d6ef5218UL, 0xd69906245565a910UL,
- 0xf40e35855771202aUL, 0x106aa07032bbd1b8UL,
- 0x19a4c116b8d2d0c8UL, 0x1e376c085141ab53UL,
- 0x2748774cdf8eeb99UL, 0x34b0bcb5e19b48a8UL,
- 0x391c0cb3c5c95a63UL, 0x4ed8aa4ae3418acbUL,
- 0x5b9cca4f7763e373UL, 0x682e6ff3d6b2b8a3UL,
- 0x748f82ee5defb2fcUL, 0x78a5636f43172f60UL,
- 0x84c87814a1f0ab72UL, 0x8cc702081a6439ecUL,
- 0x90befffa23631e28UL, 0xa4506cebde82bde9UL,
- 0xbef9a3f7b2c67915UL, 0xc67178f2e372532bUL,
- 0xca273eceea26619cUL, 0xd186b8c721c0c207UL,
- 0xeada7dd6cde0eb1eUL, 0xf57d4f7fee6ed178UL,
- 0x06f067aa72176fbaUL, 0x0a637dc5a2c898a6UL,
- 0x113f9804bef90daeUL, 0x1b710b35131c471bUL,
- 0x28db77f523047d84UL, 0x32caab7b40c72493UL,
- 0x3c9ebe0a15c9bebcUL, 0x431d67c49c100d4cUL,
- 0x4cc5d4becb3e42b6UL, 0x597f299cfc657e2aUL,
- 0x5fcb6fab3ad6faecUL, 0x6c44198c4a475817UL
-};
-
-/* Initial hash value H for SHA-384: */
-static const isc_uint64_t sha384_initial_hash_value[8] = {
- 0xcbbb9d5dc1059ed8UL,
- 0x629a292a367cd507UL,
- 0x9159015a3070dd17UL,
- 0x152fecd8f70e5939UL,
- 0x67332667ffc00b31UL,
- 0x8eb44a8768581511UL,
- 0xdb0c2e0d64f98fa7UL,
- 0x47b5481dbefa4fa4UL
-};
-
-/* Initial hash value H for SHA-512: */
-static const isc_uint64_t sha512_initial_hash_value[8] = {
- 0x6a09e667f3bcc908U,
- 0xbb67ae8584caa73bUL,
- 0x3c6ef372fe94f82bUL,
- 0xa54ff53a5f1d36f1UL,
- 0x510e527fade682d1UL,
- 0x9b05688c2b3e6c1fUL,
- 0x1f83d9abfb41bd6bUL,
- 0x5be0cd19137e2179UL
-};
-#else
-/* Hash constant words K for SHA-384 and SHA-512: */
-static const isc_uint64_t K512[80] = {
- 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
- 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
- 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
- 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
- 0xd807aa98a3030242ULL, 0x12835b0145706fbeULL,
- 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
- 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL,
- 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
- 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL,
- 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
- 0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL,
- 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
- 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL,
- 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
- 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL,
- 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
- 0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL,
- 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
- 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL,
- 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
- 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL,
- 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
- 0xd192e819d6ef5218ULL, 0xd69906245565a910ULL,
- 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
- 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL,
- 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
- 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL,
- 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
- 0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL,
- 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
- 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL,
- 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
- 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL,
- 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
- 0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL,
- 0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
- 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL,
- 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
- 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL,
- 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
-};
-
-/* Initial hash value H for SHA-384: */
-static const isc_uint64_t sha384_initial_hash_value[8] = {
- 0xcbbb9d5dc1059ed8ULL,
- 0x629a292a367cd507ULL,
- 0x9159015a3070dd17ULL,
- 0x152fecd8f70e5939ULL,
- 0x67332667ffc00b31ULL,
- 0x8eb44a8768581511ULL,
- 0xdb0c2e0d64f98fa7ULL,
- 0x47b5481dbefa4fa4ULL
-};
-
-/* Initial hash value H for SHA-512: */
-static const isc_uint64_t sha512_initial_hash_value[8] = {
- 0x6a09e667f3bcc908ULL,
- 0xbb67ae8584caa73bULL,
- 0x3c6ef372fe94f82bULL,
- 0xa54ff53a5f1d36f1ULL,
- 0x510e527fade682d1ULL,
- 0x9b05688c2b3e6c1fULL,
- 0x1f83d9abfb41bd6bULL,
- 0x5be0cd19137e2179ULL
-};
-#endif
-
-
-/*** SHA-224: *********************************************************/
-void
-isc_sha224_init(isc_sha224_t *context) {
- if (context == (isc_sha256_t *)0) {
- return;
- }
- memcpy(context->state, sha224_initial_hash_value,
- ISC_SHA256_DIGESTLENGTH);
- memset(context->buffer, 0, ISC_SHA256_BLOCK_LENGTH);
- context->bitcount = 0;
-}
-
-void
-isc_sha224_invalidate(isc_sha224_t *context) {
- memset(context, 0, sizeof(isc_sha224_t));
-}
-
-void
-isc_sha224_update(isc_sha224_t *context, const isc_uint8_t* data, size_t len) {
- isc_sha256_update((isc_sha256_t *)context, data, len);
-}
-
-void
-isc_sha224_final(isc_uint8_t digest[], isc_sha224_t *context) {
- isc_uint8_t sha256_digest[ISC_SHA256_DIGESTLENGTH];
- isc_sha256_final(sha256_digest, (isc_sha256_t *)context);
- memcpy(digest, sha256_digest, ISC_SHA224_DIGESTLENGTH);
- memset(sha256_digest, 0, ISC_SHA256_DIGESTLENGTH);
-}
-
-/*** SHA-256: *********************************************************/
-void
-isc_sha256_init(isc_sha256_t *context) {
- if (context == (isc_sha256_t *)0) {
- return;
- }
- memcpy(context->state, sha256_initial_hash_value,
- ISC_SHA256_DIGESTLENGTH);
- memset(context->buffer, 0, ISC_SHA256_BLOCK_LENGTH);
- context->bitcount = 0;
-}
-
-void
-isc_sha256_invalidate(isc_sha256_t *context) {
- memset(context, 0, sizeof(isc_sha256_t));
-}
-
-#ifdef ISC_SHA2_UNROLL_TRANSFORM
-
-/* Unrolled SHA-256 round macros: */
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-
-#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \
- REVERSE32(*data++, W256[j]); \
- T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
- K256[j] + W256[j]; \
- (d) += T1; \
- (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
- j++
-
-
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \
- T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
- K256[j] + (W256[j] = *data++); \
- (d) += T1; \
- (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
- j++
-
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND256(a,b,c,d,e,f,g,h) \
- s0 = W256[(j+1)&0x0f]; \
- s0 = sigma0_256(s0); \
- s1 = W256[(j+14)&0x0f]; \
- s1 = sigma1_256(s1); \
- T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \
- (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \
- (d) += T1; \
- (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
- j++
-
-void isc_sha256_transform(isc_sha256_t *context, const isc_uint32_t* data) {
- isc_uint32_t a, b, c, d, e, f, g, h, s0, s1;
- isc_uint32_t T1, *W256;
- int j;
-
- W256 = (isc_uint32_t*)context->buffer;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
- /* Rounds 0 to 15 (unrolled): */
- ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
- ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
- ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
- ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
- ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
- ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
- ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
- ROUND256_0_TO_15(b,c,d,e,f,g,h,a);
- } while (j < 16);
-
- /* Now for the remaining rounds to 64: */
- do {
- ROUND256(a,b,c,d,e,f,g,h);
- ROUND256(h,a,b,c,d,e,f,g);
- ROUND256(g,h,a,b,c,d,e,f);
- ROUND256(f,g,h,a,b,c,d,e);
- ROUND256(e,f,g,h,a,b,c,d);
- ROUND256(d,e,f,g,h,a,b,c);
- ROUND256(c,d,e,f,g,h,a,b);
- ROUND256(b,c,d,e,f,g,h,a);
- } while (j < 64);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = 0;
- /* Avoid compiler warnings */
- POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
- POST(g); POST(h); POST(T1);
-}
-
-#else /* ISC_SHA2_UNROLL_TRANSFORM */
-
-void
-isc_sha256_transform(isc_sha256_t *context, const isc_uint32_t* data) {
- isc_uint32_t a, b, c, d, e, f, g, h, s0, s1;
- isc_uint32_t T1, T2, *W256;
- int j;
-
- W256 = (isc_uint32_t*)context->buffer;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Copy data while converting to host byte order */
- REVERSE32(*data++,W256[j]);
- /* Apply the SHA-256 compression function to update a..h */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
- /* Apply the SHA-256 compression function to update a..h with copy */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
- T2 = Sigma0_256(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 16);
-
- do {
- /* Part of the message block expansion: */
- s0 = W256[(j+1)&0x0f];
- s0 = sigma0_256(s0);
- s1 = W256[(j+14)&0x0f];
- s1 = sigma1_256(s1);
-
- /* Apply the SHA-256 compression function to update a..h */
- T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
- (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
- T2 = Sigma0_256(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 64);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = T2 = 0;
- /* Avoid compiler warnings */
- POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
- POST(g); POST(h); POST(T1); POST(T2);
-}
-
-#endif /* ISC_SHA2_UNROLL_TRANSFORM */
-
-void
-isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
- unsigned int freespace, usedspace;
-
- if (len == 0U) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha256_t *)0 && data != (isc_uint8_t*)0);
-
- usedspace = (unsigned int)((context->bitcount >> 3) %
- ISC_SHA256_BLOCK_LENGTH);
- if (usedspace > 0) {
- /* Calculate how much free space is available in the buffer */
- freespace = ISC_SHA256_BLOCK_LENGTH - usedspace;
-
- if (len >= freespace) {
- /* Fill the buffer completely and process it */
- memcpy(&context->buffer[usedspace], data, freespace);
- context->bitcount += freespace << 3;
- len -= freespace;
- data += freespace;
- isc_sha256_transform(context,
- (isc_uint32_t*)context->buffer);
- } else {
- /* The buffer is not yet full */
- memcpy(&context->buffer[usedspace], data, len);
- context->bitcount += len << 3;
- /* Clean up: */
- usedspace = freespace = 0;
- /* Avoid compiler warnings: */
- POST(usedspace); POST(freespace);
- return;
- }
- }
- while (len >= ISC_SHA256_BLOCK_LENGTH) {
- /* Process as many complete blocks as we can */
- memcpy(context->buffer, data, ISC_SHA256_BLOCK_LENGTH);
- isc_sha256_transform(context, (isc_uint32_t*)context->buffer);
- context->bitcount += ISC_SHA256_BLOCK_LENGTH << 3;
- len -= ISC_SHA256_BLOCK_LENGTH;
- data += ISC_SHA256_BLOCK_LENGTH;
- }
- if (len > 0U) {
- /* There's left-overs, so save 'em */
- memcpy(context->buffer, data, len);
- context->bitcount += len << 3;
- }
- /* Clean up: */
- usedspace = freespace = 0;
- /* Avoid compiler warnings: */
- POST(usedspace); POST(freespace);
-}
-
-void
-isc_sha256_final(isc_uint8_t digest[], isc_sha256_t *context) {
- isc_uint32_t *d = (isc_uint32_t*)digest;
- unsigned int usedspace;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha256_t *)0);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (isc_uint8_t*)0) {
- usedspace = (unsigned int)((context->bitcount >> 3) %
- ISC_SHA256_BLOCK_LENGTH);
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Convert FROM host byte order */
- REVERSE64(context->bitcount,context->bitcount);
-#endif
- if (usedspace > 0) {
- /* Begin padding with a 1 bit: */
- context->buffer[usedspace++] = 0x80;
-
- if (usedspace <= ISC_SHA256_SHORT_BLOCK_LENGTH) {
- /* Set-up for the last transform: */
- memset(&context->buffer[usedspace], 0,
- ISC_SHA256_SHORT_BLOCK_LENGTH - usedspace);
- } else {
- if (usedspace < ISC_SHA256_BLOCK_LENGTH) {
- memset(&context->buffer[usedspace], 0,
- ISC_SHA256_BLOCK_LENGTH -
- usedspace);
- }
- /* Do second-to-last transform: */
- isc_sha256_transform(context,
- (isc_uint32_t*)context->buffer);
-
- /* And set-up for the last transform: */
- memset(context->buffer, 0,
- ISC_SHA256_SHORT_BLOCK_LENGTH);
- }
- } else {
- /* Set-up for the last transform: */
- memset(context->buffer, 0, ISC_SHA256_SHORT_BLOCK_LENGTH);
-
- /* Begin padding with a 1 bit: */
- *context->buffer = 0x80;
- }
- /* Set the bit count: */
- *(isc_uint64_t*)&context->buffer[ISC_SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
-
- /* Final transform: */
- isc_sha256_transform(context, (isc_uint32_t*)context->buffer);
-
-#if BYTE_ORDER == LITTLE_ENDIAN
- {
- /* Convert TO host byte order */
- int j;
- for (j = 0; j < 8; j++) {
- REVERSE32(context->state[j],context->state[j]);
- *d++ = context->state[j];
- }
- }
-#else
- memcpy(d, context->state, ISC_SHA256_DIGESTLENGTH);
-#endif
- }
-
- /* Clean up state data: */
- memset(context, 0, sizeof(*context));
- usedspace = 0;
- POST(usedspace);
-}
-
-/*** SHA-512: *********************************************************/
-void
-isc_sha512_init(isc_sha512_t *context) {
- if (context == (isc_sha512_t *)0) {
- return;
- }
- memcpy(context->state, sha512_initial_hash_value,
- ISC_SHA512_DIGESTLENGTH);
- memset(context->buffer, 0, ISC_SHA512_BLOCK_LENGTH);
- context->bitcount[0] = context->bitcount[1] = 0;
-}
-
-void
-isc_sha512_invalidate(isc_sha512_t *context) {
- memset(context, 0, sizeof(isc_sha512_t));
-}
-
-#ifdef ISC_SHA2_UNROLL_TRANSFORM
-
-/* Unrolled SHA-512 round macros: */
-#if BYTE_ORDER == LITTLE_ENDIAN
-
-#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \
- REVERSE64(*data++, W512[j]); \
- T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
- K512[j] + W512[j]; \
- (d) += T1, \
- (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \
- j++
-
-
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \
- T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
- K512[j] + (W512[j] = *data++); \
- (d) += T1; \
- (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
- j++
-
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-#define ROUND512(a,b,c,d,e,f,g,h) \
- s0 = W512[(j+1)&0x0f]; \
- s0 = sigma0_512(s0); \
- s1 = W512[(j+14)&0x0f]; \
- s1 = sigma1_512(s1); \
- T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \
- (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \
- (d) += T1; \
- (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
- j++
-
-void isc_sha512_transform(isc_sha512_t *context, const isc_uint64_t* data) {
- isc_uint64_t a, b, c, d, e, f, g, h, s0, s1;
- isc_uint64_t T1, *W512 = (isc_uint64_t*)context->buffer;
- int j;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
- ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
- ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
- ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
- ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
- ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
- ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
- ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
- ROUND512_0_TO_15(b,c,d,e,f,g,h,a);
- } while (j < 16);
-
- /* Now for the remaining rounds up to 79: */
- do {
- ROUND512(a,b,c,d,e,f,g,h);
- ROUND512(h,a,b,c,d,e,f,g);
- ROUND512(g,h,a,b,c,d,e,f);
- ROUND512(f,g,h,a,b,c,d,e);
- ROUND512(e,f,g,h,a,b,c,d);
- ROUND512(d,e,f,g,h,a,b,c);
- ROUND512(c,d,e,f,g,h,a,b);
- ROUND512(b,c,d,e,f,g,h,a);
- } while (j < 80);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = 0;
- /* Avoid compiler warnings */
- POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
- POST(g); POST(h); POST(T1);
-}
-
-#else /* ISC_SHA2_UNROLL_TRANSFORM */
-
-void
-isc_sha512_transform(isc_sha512_t *context, const isc_uint64_t* data) {
- isc_uint64_t a, b, c, d, e, f, g, h, s0, s1;
- isc_uint64_t T1, T2, *W512 = (isc_uint64_t*)context->buffer;
- int j;
-
- /* Initialize registers with the prev. intermediate value */
- a = context->state[0];
- b = context->state[1];
- c = context->state[2];
- d = context->state[3];
- e = context->state[4];
- f = context->state[5];
- g = context->state[6];
- h = context->state[7];
-
- j = 0;
- do {
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Convert TO host byte order */
- REVERSE64(*data++, W512[j]);
- /* Apply the SHA-512 compression function to update a..h */
- T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
- /* Apply the SHA-512 compression function to update a..h with copy */
- T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
- T2 = Sigma0_512(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 16);
-
- do {
- /* Part of the message block expansion: */
- s0 = W512[(j+1)&0x0f];
- s0 = sigma0_512(s0);
- s1 = W512[(j+14)&0x0f];
- s1 = sigma1_512(s1);
-
- /* Apply the SHA-512 compression function to update a..h */
- T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
- (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0);
- T2 = Sigma0_512(a) + Maj(a, b, c);
- h = g;
- g = f;
- f = e;
- e = d + T1;
- d = c;
- c = b;
- b = a;
- a = T1 + T2;
-
- j++;
- } while (j < 80);
-
- /* Compute the current intermediate hash value */
- context->state[0] += a;
- context->state[1] += b;
- context->state[2] += c;
- context->state[3] += d;
- context->state[4] += e;
- context->state[5] += f;
- context->state[6] += g;
- context->state[7] += h;
-
- /* Clean up */
- a = b = c = d = e = f = g = h = T1 = T2 = 0;
- /* Avoid compiler warnings */
- POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
- POST(g); POST(h); POST(T1); POST(T2);
-}
-
-#endif /* ISC_SHA2_UNROLL_TRANSFORM */
-
-void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t len) {
- unsigned int freespace, usedspace;
-
- if (len == 0U) {
- /* Calling with no data is valid - we do nothing */
- return;
- }
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha512_t *)0 && data != (isc_uint8_t*)0);
-
- usedspace = (unsigned int)((context->bitcount[0] >> 3) %
- ISC_SHA512_BLOCK_LENGTH);
- if (usedspace > 0) {
- /* Calculate how much free space is available in the buffer */
- freespace = ISC_SHA512_BLOCK_LENGTH - usedspace;
-
- if (len >= freespace) {
- /* Fill the buffer completely and process it */
- memcpy(&context->buffer[usedspace], data, freespace);
- ADDINC128(context->bitcount, freespace << 3);
- len -= freespace;
- data += freespace;
- isc_sha512_transform(context,
- (isc_uint64_t*)context->buffer);
- } else {
- /* The buffer is not yet full */
- memcpy(&context->buffer[usedspace], data, len);
- ADDINC128(context->bitcount, len << 3);
- /* Clean up: */
- usedspace = freespace = 0;
- /* Avoid compiler warnings: */
- POST(usedspace); POST(freespace);
- return;
- }
- }
- while (len >= ISC_SHA512_BLOCK_LENGTH) {
- /* Process as many complete blocks as we can */
- memcpy(context->buffer, data, ISC_SHA512_BLOCK_LENGTH);
- isc_sha512_transform(context, (isc_uint64_t*)context->buffer);
- ADDINC128(context->bitcount, ISC_SHA512_BLOCK_LENGTH << 3);
- len -= ISC_SHA512_BLOCK_LENGTH;
- data += ISC_SHA512_BLOCK_LENGTH;
- }
- if (len > 0U) {
- /* There's left-overs, so save 'em */
- memcpy(context->buffer, data, len);
- ADDINC128(context->bitcount, len << 3);
- }
- /* Clean up: */
- usedspace = freespace = 0;
- /* Avoid compiler warnings: */
- POST(usedspace); POST(freespace);
-}
-
-void isc_sha512_last(isc_sha512_t *context) {
- unsigned int usedspace;
-
- usedspace = (unsigned int)((context->bitcount[0] >> 3) %
- ISC_SHA512_BLOCK_LENGTH);
-#if BYTE_ORDER == LITTLE_ENDIAN
- /* Convert FROM host byte order */
- REVERSE64(context->bitcount[0],context->bitcount[0]);
- REVERSE64(context->bitcount[1],context->bitcount[1]);
-#endif
- if (usedspace > 0) {
- /* Begin padding with a 1 bit: */
- context->buffer[usedspace++] = 0x80;
-
- if (usedspace <= ISC_SHA512_SHORT_BLOCK_LENGTH) {
- /* Set-up for the last transform: */
- memset(&context->buffer[usedspace], 0,
- ISC_SHA512_SHORT_BLOCK_LENGTH - usedspace);
- } else {
- if (usedspace < ISC_SHA512_BLOCK_LENGTH) {
- memset(&context->buffer[usedspace], 0,
- ISC_SHA512_BLOCK_LENGTH - usedspace);
- }
- /* Do second-to-last transform: */
- isc_sha512_transform(context,
- (isc_uint64_t*)context->buffer);
-
- /* And set-up for the last transform: */
- memset(context->buffer, 0, ISC_SHA512_BLOCK_LENGTH - 2);
- }
- } else {
- /* Prepare for final transform: */
- memset(context->buffer, 0, ISC_SHA512_SHORT_BLOCK_LENGTH);
-
- /* Begin padding with a 1 bit: */
- *context->buffer = 0x80;
- }
- /* Store the length of input data (in bits): */
- *(isc_uint64_t*)&context->buffer[ISC_SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
- *(isc_uint64_t*)&context->buffer[ISC_SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
-
- /* Final transform: */
- isc_sha512_transform(context, (isc_uint64_t*)context->buffer);
-}
-
-void isc_sha512_final(isc_uint8_t digest[], isc_sha512_t *context) {
- isc_uint64_t *d = (isc_uint64_t*)digest;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha512_t *)0);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (isc_uint8_t*)0) {
- isc_sha512_last(context);
-
- /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
- {
- /* Convert TO host byte order */
- int j;
- for (j = 0; j < 8; j++) {
- REVERSE64(context->state[j],context->state[j]);
- *d++ = context->state[j];
- }
- }
-#else
- memcpy(d, context->state, ISC_SHA512_DIGESTLENGTH);
-#endif
- }
-
- /* Zero out state data */
- memset(context, 0, sizeof(*context));
-}
-
-
-/*** SHA-384: *********************************************************/
-void
-isc_sha384_init(isc_sha384_t *context) {
- if (context == (isc_sha384_t *)0) {
- return;
- }
- memcpy(context->state, sha384_initial_hash_value,
- ISC_SHA512_DIGESTLENGTH);
- memset(context->buffer, 0, ISC_SHA384_BLOCK_LENGTH);
- context->bitcount[0] = context->bitcount[1] = 0;
-}
-
-void
-isc_sha384_invalidate(isc_sha384_t *context) {
- memset(context, 0, sizeof(isc_sha384_t));
-}
-
-void
-isc_sha384_update(isc_sha384_t *context, const isc_uint8_t* data, size_t len) {
- isc_sha512_update((isc_sha512_t *)context, data, len);
-}
-
-void
-isc_sha384_final(isc_uint8_t digest[], isc_sha384_t *context) {
- isc_uint64_t *d = (isc_uint64_t*)digest;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha384_t *)0);
-
- /* If no digest buffer is passed, we don't bother doing this: */
- if (digest != (isc_uint8_t*)0) {
- isc_sha512_last((isc_sha512_t *)context);
-
- /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
- {
- /* Convert TO host byte order */
- int j;
- for (j = 0; j < 6; j++) {
- REVERSE64(context->state[j],context->state[j]);
- *d++ = context->state[j];
- }
- }
-#else
- memcpy(d, context->state, ISC_SHA384_DIGESTLENGTH);
-#endif
- }
-
- /* Zero out state data */
- memset(context, 0, sizeof(*context));
-}
-#endif /* !ISC_PLATFORM_OPENSSLHASH */
-
-/*
- * Constant used by SHA256/384/512_End() functions for converting the
- * digest to a readable hexadecimal character string:
- */
-static const char *sha2_hex_digits = "0123456789abcdef";
-
-char *
-isc_sha224_end(isc_sha224_t *context, char buffer[]) {
- isc_uint8_t digest[ISC_SHA224_DIGESTLENGTH], *d = digest;
- unsigned int i;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha224_t *)0);
-
- if (buffer != (char*)0) {
- isc_sha224_final(digest, context);
-
- for (i = 0; i < ISC_SHA224_DIGESTLENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char)0;
- } else {
-#ifdef ISC_PLATFORM_OPENSSLHASH
- EVP_MD_CTX_cleanup(context);
-#else
- memset(context, 0, sizeof(*context));
-#endif
- }
- memset(digest, 0, ISC_SHA224_DIGESTLENGTH);
- return buffer;
-}
-
-char *
-isc_sha224_data(const isc_uint8_t *data, size_t len,
- char digest[ISC_SHA224_DIGESTSTRINGLENGTH])
-{
- isc_sha224_t context;
-
- isc_sha224_init(&context);
- isc_sha224_update(&context, data, len);
- return (isc_sha224_end(&context, digest));
-}
-
-char *
-isc_sha256_end(isc_sha256_t *context, char buffer[]) {
- isc_uint8_t digest[ISC_SHA256_DIGESTLENGTH], *d = digest;
- unsigned int i;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha256_t *)0);
-
- if (buffer != (char*)0) {
- isc_sha256_final(digest, context);
-
- for (i = 0; i < ISC_SHA256_DIGESTLENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char)0;
- } else {
-#ifdef ISC_PLATFORM_OPENSSLHASH
- EVP_MD_CTX_cleanup(context);
-#else
- memset(context, 0, sizeof(*context));
-#endif
- }
- memset(digest, 0, ISC_SHA256_DIGESTLENGTH);
- return buffer;
-}
-
-char *
-isc_sha256_data(const isc_uint8_t* data, size_t len,
- char digest[ISC_SHA256_DIGESTSTRINGLENGTH])
-{
- isc_sha256_t context;
-
- isc_sha256_init(&context);
- isc_sha256_update(&context, data, len);
- return (isc_sha256_end(&context, digest));
-}
-
-char *
-isc_sha512_end(isc_sha512_t *context, char buffer[]) {
- isc_uint8_t digest[ISC_SHA512_DIGESTLENGTH], *d = digest;
- unsigned int i;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha512_t *)0);
-
- if (buffer != (char*)0) {
- isc_sha512_final(digest, context);
-
- for (i = 0; i < ISC_SHA512_DIGESTLENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char)0;
- } else {
-#ifdef ISC_PLATFORM_OPENSSLHASH
- EVP_MD_CTX_cleanup(context);
-#else
- memset(context, 0, sizeof(*context));
-#endif
- }
- memset(digest, 0, ISC_SHA512_DIGESTLENGTH);
- return buffer;
-}
-
-char *
-isc_sha512_data(const isc_uint8_t *data, size_t len,
- char digest[ISC_SHA512_DIGESTSTRINGLENGTH])
-{
- isc_sha512_t context;
-
- isc_sha512_init(&context);
- isc_sha512_update(&context, data, len);
- return (isc_sha512_end(&context, digest));
-}
-
-char *
-isc_sha384_end(isc_sha384_t *context, char buffer[]) {
- isc_uint8_t digest[ISC_SHA384_DIGESTLENGTH], *d = digest;
- unsigned int i;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha384_t *)0);
-
- if (buffer != (char*)0) {
- isc_sha384_final(digest, context);
-
- for (i = 0; i < ISC_SHA384_DIGESTLENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char)0;
- } else {
-#ifdef ISC_PLATFORM_OPENSSLHASH
- EVP_MD_CTX_cleanup(context);
-#else
- memset(context, 0, sizeof(*context));
-#endif
- }
- memset(digest, 0, ISC_SHA384_DIGESTLENGTH);
- return buffer;
-}
-
-char *
-isc_sha384_data(const isc_uint8_t *data, size_t len,
- char digest[ISC_SHA384_DIGESTSTRINGLENGTH])
-{
- isc_sha384_t context;
-
- isc_sha384_init(&context);
- isc_sha384_update(&context, data, len);
- return (isc_sha384_end(&context, digest));
-}
diff --git a/contrib/ntp/lib/isc/socket_api.c b/contrib/ntp/lib/isc/socket_api.c
deleted file mode 100644
index 3394ce059b50..000000000000
--- a/contrib/ntp/lib/isc/socket_api.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (C) 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#include <config.h>
-
-#include <isc/app.h>
-#include <isc/magic.h>
-#include <isc/mutex.h>
-#include <isc/once.h>
-#include <isc/socket.h>
-#include <isc/util.h>
-
-static isc_mutex_t createlock;
-static isc_once_t once = ISC_ONCE_INIT;
-static isc_socketmgrcreatefunc_t socketmgr_createfunc = NULL;
-
-static void
-initialize(void) {
- RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_socket_register(isc_socketmgrcreatefunc_t createfunc) {
- isc_result_t result = ISC_R_SUCCESS;
-
- RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
-
- LOCK(&createlock);
- if (socketmgr_createfunc == NULL)
- socketmgr_createfunc = createfunc;
- else
- result = ISC_R_EXISTS;
- UNLOCK(&createlock);
-
- return (result);
-}
-
-isc_result_t
-isc_socketmgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
- isc_socketmgr_t **managerp)
-{
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(socketmgr_createfunc != NULL);
- result = (*socketmgr_createfunc)(mctx, managerp);
-
- UNLOCK(&createlock);
-
- if (result == ISC_R_SUCCESS)
- isc_appctx_setsocketmgr(actx, *managerp);
-
- return (result);
-}
-
-isc_result_t
-isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(socketmgr_createfunc != NULL);
- result = (*socketmgr_createfunc)(mctx, managerp);
-
- UNLOCK(&createlock);
-
- return (result);
-}
-
-void
-isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
- REQUIRE(managerp != NULL && ISCAPI_SOCKETMGR_VALID(*managerp));
-
- (*managerp)->methods->destroy(managerp);
-
- ENSURE(*managerp == NULL);
-}
-
-isc_result_t
-isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
- isc_socket_t **socketp)
-{
- REQUIRE(ISCAPI_SOCKETMGR_VALID(manager));
-
- return (manager->methods->socketcreate(manager, pf, type, socketp));
-}
-
-void
-isc_socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
- REQUIRE(socketp != NULL && *socketp == NULL);
-
- sock->methods->attach(sock, socketp);
-
- ENSURE(*socketp == sock);
-}
-
-void
-isc_socket_detach(isc_socket_t **socketp) {
- REQUIRE(socketp != NULL && ISCAPI_SOCKET_VALID(*socketp));
-
- (*socketp)->methods->detach(socketp);
-
- ENSURE(*socketp == NULL);
-}
-
-isc_result_t
-isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
- unsigned int options)
-{
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return (sock->methods->bind(sock, sockaddr, options));
-}
-
-isc_result_t
-isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_task_t *task,
- isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
-{
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return (sock->methods->sendto(sock, region, task, action, arg, address,
- pktinfo));
-}
-
-isc_result_t
-isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, isc_task_t *task,
- isc_taskaction_t action, const void *arg)
-{
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return (sock->methods->connect(sock, addr, task, action, arg));
-}
-
-isc_result_t
-isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return (sock->methods->recv(sock, region, minimum, task, action, arg));
-}
-
-void
-isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- sock->methods->cancel(sock, task, how);
-}
-
-isc_result_t
-isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return (sock->methods->getsockname(sock, addressp));
-}
-
-void
-isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- sock->methods->ipv6only(sock, yes);
-}
-
-isc_sockettype_t
-isc_socket_gettype(isc_socket_t *sock) {
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return (sock->methods->gettype(sock));
-}
-
-void
-isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
- REQUIRE(ISCAPI_SOCKET_VALID(socket));
-
- UNUSED(socket); /* in case REQUIRE() is empty */
- UNUSED(name);
- UNUSED(tag);
-}
-
-isc_result_t
-isc_socket_fdwatchcreate(isc_socketmgr_t *manager, int fd, int flags,
- isc_sockfdwatch_t callback, void *cbarg,
- isc_task_t *task, isc_socket_t **socketp)
-{
- REQUIRE(ISCAPI_SOCKETMGR_VALID(manager));
-
- return (manager->methods->fdwatchcreate(manager, fd, flags,
- callback, cbarg, task,
- socketp));
-}
-
-isc_result_t
-isc_socket_fdwatchpoke(isc_socket_t *sock, int flags)
-{
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return(sock->methods->fdwatchpoke(sock, flags));
-}
-
-isc_result_t
-isc_socket_dup(isc_socket_t *sock, isc_socket_t **socketp) {
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
- REQUIRE(socketp != NULL && *socketp == NULL);
-
- return(sock->methods->dup(sock, socketp));
-}
-
-int
-isc_socket_getfd(isc_socket_t *sock) {
- REQUIRE(ISCAPI_SOCKET_VALID(sock));
-
- return(sock->methods->getfd(sock));
-}
diff --git a/contrib/ntp/lib/isc/sparc64/include/isc/atomic.h b/contrib/ntp/lib/isc/sparc64/include/isc/atomic.h
deleted file mode 100644
index ab17de1311f7..000000000000
--- a/contrib/ntp/lib/isc/sparc64/include/isc/atomic.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: atomic.h,v 1.5 2007/06/19 23:47:18 tbox Exp $ */
-
-/*
- * This code was written based on FreeBSD's kernel source whose copyright
- * follows:
- */
-
-/*-
- * Copyright (c) 1998 Doug Rabson.
- * Copyright (c) 2001 Jake Burkholder.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: FreeBSD: src/sys/i386/include/atomic.h,v 1.20 2001/02/11
- * $FreeBSD: 258945 2013-12-04 21:33:17Z roberto $
- */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-#include <isc/platform.h>
-#include <isc/types.h>
-
-#define ASI_P 0x80 /* Primary Address Space Identifier */
-
-#ifdef ISC_PLATFORM_USEGCCASM
-
-/*
- * This routine atomically increments the value stored in 'p' by 'val', and
- * returns the previous value.
- */
-static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- isc_int32_t prev, swapped;
-
- for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) {
- swapped = prev + val;
- __asm__ volatile(
- "casa [%1] %2, %3, %0"
- : "+r"(swapped)
- : "r"(p), "n"(ASI_P), "r"(prev));
- if (swapped == prev)
- break;
- }
-
- return (prev);
-}
-
-/*
- * This routine atomically stores the value 'val' in 'p'.
- */
-static inline void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
- isc_int32_t prev, swapped;
-
- for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) {
- swapped = val;
- __asm__ volatile(
- "casa [%1] %2, %3, %0"
- : "+r"(swapped)
- : "r"(p), "n"(ASI_P), "r"(prev)
- : "memory");
- if (swapped == prev)
- break;
- }
-}
-
-/*
- * This routine atomically replaces the value in 'p' with 'val', if the
- * original value is equal to 'cmpval'. The original value is returned in any
- * case.
- */
-static inline isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
- isc_int32_t temp = val;
-
- __asm__ volatile(
- "casa [%1] %2, %3, %0"
- : "+r"(temp)
- : "r"(p), "n"(ASI_P), "r"(cmpval));
-
- return (temp);
-}
-
-#else /* ISC_PLATFORM_USEGCCASM */
-
-#error "unsupported compiler. disable atomic ops by --disable-atomic"
-
-#endif /* ISC_PLATFORM_USEGCCASM */
-
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/lib/isc/stats.c b/contrib/ntp/lib/isc/stats.c
deleted file mode 100644
index 8b624b2d478d..000000000000
--- a/contrib/ntp/lib/isc/stats.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <isc/atomic.h>
-#include <isc/buffer.h>
-#include <isc/magic.h>
-#include <isc/mem.h>
-#include <isc/platform.h>
-#include <isc/print.h>
-#include <isc/rwlock.h>
-#include <isc/stats.h>
-#include <isc/util.h>
-
-#define ISC_STATS_MAGIC ISC_MAGIC('S', 't', 'a', 't')
-#define ISC_STATS_VALID(x) ISC_MAGIC_VALID(x, ISC_STATS_MAGIC)
-
-#ifndef ISC_STATS_USEMULTIFIELDS
-#if defined(ISC_RWLOCK_USEATOMIC) && defined(ISC_PLATFORM_HAVEXADD) && !defined(ISC_PLATFORM_HAVEXADDQ)
-#define ISC_STATS_USEMULTIFIELDS 1
-#else
-#define ISC_STATS_USEMULTIFIELDS 0
-#endif
-#endif /* ISC_STATS_USEMULTIFIELDS */
-
-#if ISC_STATS_USEMULTIFIELDS
-typedef struct {
- isc_uint32_t hi;
- isc_uint32_t lo;
-} isc_stat_t;
-#else
-typedef isc_uint64_t isc_stat_t;
-#endif
-
-struct isc_stats {
- /*% Unlocked */
- unsigned int magic;
- isc_mem_t *mctx;
- int ncounters;
-
- isc_mutex_t lock;
- unsigned int references; /* locked by lock */
-
- /*%
- * Locked by counterlock or unlocked if efficient rwlock is not
- * available.
- */
-#ifdef ISC_RWLOCK_USEATOMIC
- isc_rwlock_t counterlock;
-#endif
- isc_stat_t *counters;
-
- /*%
- * We don't want to lock the counters while we are dumping, so we first
- * copy the current counter values into a local array. This buffer
- * will be used as the copy destination. It's allocated on creation
- * of the stats structure so that the dump operation won't fail due
- * to memory allocation failure.
- * XXX: this approach is weird for non-threaded build because the
- * additional memory and the copy overhead could be avoided. We prefer
- * simplicity here, however, under the assumption that this function
- * should be only rarely called.
- */
- isc_uint64_t *copiedcounters;
-};
-
-static isc_result_t
-create_stats(isc_mem_t *mctx, int ncounters, isc_stats_t **statsp) {
- isc_stats_t *stats;
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(statsp != NULL && *statsp == NULL);
-
- stats = isc_mem_get(mctx, sizeof(*stats));
- if (stats == NULL)
- return (ISC_R_NOMEMORY);
-
- result = isc_mutex_init(&stats->lock);
- if (result != ISC_R_SUCCESS)
- goto clean_stats;
-
- stats->counters = isc_mem_get(mctx, sizeof(isc_stat_t) * ncounters);
- if (stats->counters == NULL) {
- result = ISC_R_NOMEMORY;
- goto clean_mutex;
- }
- stats->copiedcounters = isc_mem_get(mctx,
- sizeof(isc_uint64_t) * ncounters);
- if (stats->copiedcounters == NULL) {
- result = ISC_R_NOMEMORY;
- goto clean_counters;
- }
-
-#ifdef ISC_RWLOCK_USEATOMIC
- result = isc_rwlock_init(&stats->counterlock, 0, 0);
- if (result != ISC_R_SUCCESS)
- goto clean_copiedcounters;
-#endif
-
- stats->references = 1;
- memset(stats->counters, 0, sizeof(isc_stat_t) * ncounters);
- stats->mctx = NULL;
- isc_mem_attach(mctx, &stats->mctx);
- stats->ncounters = ncounters;
- stats->magic = ISC_STATS_MAGIC;
-
- *statsp = stats;
-
- return (result);
-
-clean_counters:
- isc_mem_put(mctx, stats->counters, sizeof(isc_stat_t) * ncounters);
-
-#ifdef ISC_RWLOCK_USEATOMIC
-clean_copiedcounters:
- isc_mem_put(mctx, stats->copiedcounters,
- sizeof(isc_stat_t) * ncounters);
-#endif
-
-clean_mutex:
- DESTROYLOCK(&stats->lock);
-
-clean_stats:
- isc_mem_put(mctx, stats, sizeof(*stats));
-
- return (result);
-}
-
-void
-isc_stats_attach(isc_stats_t *stats, isc_stats_t **statsp) {
- REQUIRE(ISC_STATS_VALID(stats));
- REQUIRE(statsp != NULL && *statsp == NULL);
-
- LOCK(&stats->lock);
- stats->references++;
- UNLOCK(&stats->lock);
-
- *statsp = stats;
-}
-
-void
-isc_stats_detach(isc_stats_t **statsp) {
- isc_stats_t *stats;
-
- REQUIRE(statsp != NULL && ISC_STATS_VALID(*statsp));
-
- stats = *statsp;
- *statsp = NULL;
-
- LOCK(&stats->lock);
- stats->references--;
- UNLOCK(&stats->lock);
-
- if (stats->references == 0) {
- isc_mem_put(stats->mctx, stats->copiedcounters,
- sizeof(isc_stat_t) * stats->ncounters);
- isc_mem_put(stats->mctx, stats->counters,
- sizeof(isc_stat_t) * stats->ncounters);
- DESTROYLOCK(&stats->lock);
-#ifdef ISC_RWLOCK_USEATOMIC
- isc_rwlock_destroy(&stats->counterlock);
-#endif
- isc_mem_putanddetach(&stats->mctx, stats, sizeof(*stats));
- }
-}
-
-int
-isc_stats_ncounters(isc_stats_t *stats) {
- REQUIRE(ISC_STATS_VALID(stats));
-
- return (stats->ncounters);
-}
-
-static inline void
-incrementcounter(isc_stats_t *stats, int counter) {
- isc_int32_t prev;
-
-#ifdef ISC_RWLOCK_USEATOMIC
- /*
- * We use a "read" lock to prevent other threads from reading the
- * counter while we "writing" a counter field. The write access itself
- * is protected by the atomic operation.
- */
- isc_rwlock_lock(&stats->counterlock, isc_rwlocktype_read);
-#endif
-
-#if ISC_STATS_USEMULTIFIELDS
- prev = isc_atomic_xadd((isc_int32_t *)&stats->counters[counter].lo, 1);
- /*
- * If the lower 32-bit field overflows, increment the higher field.
- * Note that it's *theoretically* possible that the lower field
- * overlaps again before the higher field is incremented. It doesn't
- * matter, however, because we don't read the value until
- * isc_stats_copy() is called where the whole process is protected
- * by the write (exclusive) lock.
- */
- if (prev == (isc_int32_t)0xffffffff)
- isc_atomic_xadd((isc_int32_t *)&stats->counters[counter].hi, 1);
-#elif defined(ISC_PLATFORM_HAVEXADDQ)
- UNUSED(prev);
- isc_atomic_xaddq((isc_int64_t *)&stats->counters[counter], 1);
-#else
- UNUSED(prev);
- stats->counters[counter]++;
-#endif
-
-#ifdef ISC_RWLOCK_USEATOMIC
- isc_rwlock_unlock(&stats->counterlock, isc_rwlocktype_read);
-#endif
-}
-
-static inline void
-decrementcounter(isc_stats_t *stats, int counter) {
- isc_int32_t prev;
-
-#ifdef ISC_RWLOCK_USEATOMIC
- isc_rwlock_lock(&stats->counterlock, isc_rwlocktype_read);
-#endif
-
-#if ISC_STATS_USEMULTIFIELDS
- prev = isc_atomic_xadd((isc_int32_t *)&stats->counters[counter].lo, -1);
- if (prev == 0)
- isc_atomic_xadd((isc_int32_t *)&stats->counters[counter].hi,
- -1);
-#elif defined(ISC_PLATFORM_HAVEXADDQ)
- UNUSED(prev);
- isc_atomic_xaddq((isc_int64_t *)&stats->counters[counter], -1);
-#else
- UNUSED(prev);
- stats->counters[counter]--;
-#endif
-
-#ifdef ISC_RWLOCK_USEATOMIC
- isc_rwlock_unlock(&stats->counterlock, isc_rwlocktype_read);
-#endif
-}
-
-static void
-copy_counters(isc_stats_t *stats) {
- int i;
-
-#ifdef ISC_RWLOCK_USEATOMIC
- /*
- * We use a "write" lock before "reading" the statistics counters as
- * an exclusive lock.
- */
- isc_rwlock_lock(&stats->counterlock, isc_rwlocktype_write);
-#endif
-
-#if ISC_STATS_USEMULTIFIELDS
- for (i = 0; i < stats->ncounters; i++) {
- stats->copiedcounters[i] =
- (isc_uint64_t)(stats->counters[i].hi) << 32 |
- stats->counters[i].lo;
- }
-#else
- UNUSED(i);
- memcpy(stats->copiedcounters, stats->counters,
- stats->ncounters * sizeof(isc_stat_t));
-#endif
-
-#ifdef ISC_RWLOCK_USEATOMIC
- isc_rwlock_unlock(&stats->counterlock, isc_rwlocktype_write);
-#endif
-}
-
-isc_result_t
-isc_stats_create(isc_mem_t *mctx, isc_stats_t **statsp, int ncounters) {
- REQUIRE(statsp != NULL && *statsp == NULL);
-
- return (create_stats(mctx, ncounters, statsp));
-}
-
-void
-isc_stats_increment(isc_stats_t *stats, isc_statscounter_t counter) {
- REQUIRE(ISC_STATS_VALID(stats));
- REQUIRE(counter < stats->ncounters);
-
- incrementcounter(stats, (int)counter);
-}
-
-void
-isc_stats_decrement(isc_stats_t *stats, isc_statscounter_t counter) {
- REQUIRE(ISC_STATS_VALID(stats));
- REQUIRE(counter < stats->ncounters);
-
- decrementcounter(stats, (int)counter);
-}
-
-void
-isc_stats_dump(isc_stats_t *stats, isc_stats_dumper_t dump_fn,
- void *arg, unsigned int options)
-{
- int i;
-
- REQUIRE(ISC_STATS_VALID(stats));
-
- copy_counters(stats);
-
- for (i = 0; i < stats->ncounters; i++) {
- if ((options & ISC_STATSDUMP_VERBOSE) == 0 &&
- stats->copiedcounters[i] == 0)
- continue;
- dump_fn((isc_statscounter_t)i, stats->copiedcounters[i], arg);
- }
-}
diff --git a/contrib/ntp/lib/isc/string.c b/contrib/ntp/lib/isc/string.c
deleted file mode 100644
index cba517c568f9..000000000000
--- a/contrib/ntp/lib/isc/string.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <ctype.h>
-
-#include <isc/mem.h>
-#include <isc/print.h>
-#include <isc/region.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-static char digits[] = "0123456789abcdefghijklmnoprstuvwxyz";
-
-isc_uint64_t
-isc_string_touint64(char *source, char **end, int base) {
- isc_uint64_t tmp;
- isc_uint64_t overflow;
- char *s = source;
- char *o;
- char c;
-
- if ((base < 0) || (base == 1) || (base > 36)) {
- *end = source;
- return (0);
- }
-
- while (*s != 0 && isascii(*s&0xff) && isspace(*s&0xff))
- s++;
- if (*s == '+' /* || *s == '-' */)
- s++;
- if (base == 0) {
- if (*s == '0' && (*(s+1) == 'X' || *(s+1) == 'x')) {
- s += 2;
- base = 16;
- } else if (*s == '0')
- base = 8;
- else
- base = 10;
- }
- if (*s == 0) {
- *end = source;
- return (0);
- }
- overflow = ~0;
- overflow /= base;
- tmp = 0;
-
- while ((c = *s) != 0) {
- c = tolower(c&0xff);
- /* end ? */
- if ((o = strchr(digits, c)) == NULL) {
- *end = s;
- return (tmp);
- }
- /* end ? */
- if ((o - digits) >= base) {
- *end = s;
- return (tmp);
- }
- /* overflow ? */
- if (tmp > overflow) {
- *end = source;
- return (0);
- }
- tmp *= base;
- /* overflow ? */
- if ((tmp + (o - digits)) < tmp) {
- *end = source;
- return (0);
- }
- tmp += o - digits;
- s++;
- }
- *end = s;
- return (tmp);
-}
-
-isc_result_t
-isc_string_copy(char *target, size_t size, const char *source) {
- REQUIRE(size > 0U);
-
- if (strlcpy(target, source, size) >= size) {
- memset(target, ISC_STRING_MAGIC, size);
- return (ISC_R_NOSPACE);
- }
-
- ENSURE(strlen(target) < size);
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_string_copy_truncate(char *target, size_t size, const char *source) {
- REQUIRE(size > 0U);
-
- strlcpy(target, source, size);
-
- ENSURE(strlen(target) < size);
-}
-
-isc_result_t
-isc_string_append(char *target, size_t size, const char *source) {
- REQUIRE(size > 0U);
- REQUIRE(strlen(target) < size);
-
- if (strlcat(target, source, size) >= size) {
- memset(target, ISC_STRING_MAGIC, size);
- return (ISC_R_NOSPACE);
- }
-
- ENSURE(strlen(target) < size);
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_string_append_truncate(char *target, size_t size, const char *source) {
- REQUIRE(size > 0U);
- REQUIRE(strlen(target) < size);
-
- strlcat(target, source, size);
-
- ENSURE(strlen(target) < size);
-}
-
-isc_result_t
-isc_string_printf(char *target, size_t size, const char *format, ...) {
- va_list args;
- size_t n;
-
- REQUIRE(size > 0U);
-
- va_start(args, format);
- n = vsnprintf(target, size, format, args);
- va_end(args);
-
- if (n >= size) {
- memset(target, ISC_STRING_MAGIC, size);
- return (ISC_R_NOSPACE);
- }
-
- ENSURE(strlen(target) < size);
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_string_printf_truncate(char *target, size_t size, const char *format, ...)
-{
- va_list args;
-
- REQUIRE(size > 0U);
-
- va_start(args, format);
- /* check return code? */
- (void)vsnprintf(target, size, format, args);
- va_end(args);
-
- ENSURE(strlen(target) < size);
-}
-
-char *
-isc_string_regiondup(isc_mem_t *mctx, const isc_region_t *source) {
- char *target;
-
- REQUIRE(mctx != NULL);
- REQUIRE(source != NULL);
-
- target = (char *) isc_mem_allocate(mctx, source->length + 1);
- if (target != NULL) {
- memcpy(source->base, target, source->length);
- target[source->length] = '\0';
- }
-
- return (target);
-}
-
-char *
-isc_string_separate(char **stringp, const char *delim) {
- char *string = *stringp;
- char *s;
- const char *d;
- char sc, dc;
-
- if (string == NULL)
- return (NULL);
-
- for (s = string; (sc = *s) != '\0'; s++)
- for (d = delim; (dc = *d) != '\0'; d++)
- if (sc == dc) {
- *s++ = '\0';
- *stringp = s;
- return (string);
- }
- *stringp = NULL;
- return (string);
-}
-
-size_t
-isc_string_strlcpy(char *dst, const char *src, size_t size)
-{
- char *d = dst;
- const char *s = src;
- size_t n = size;
-
- /* Copy as many bytes as will fit */
- if (n != 0U && --n != 0U) {
- do {
- if ((*d++ = *s++) == 0)
- break;
- } while (--n != 0U);
- }
-
- /* Not enough room in dst, add NUL and traverse rest of src */
- if (n == 0U) {
- if (size != 0U)
- *d = '\0'; /* NUL-terminate dst */
- while (*s++)
- ;
- }
-
- return(s - src - 1); /* count does not include NUL */
-}
-
-size_t
-isc_string_strlcat(char *dst, const char *src, size_t size)
-{
- char *d = dst;
- const char *s = src;
- size_t n = size;
- size_t dlen;
-
- /* Find the end of dst and adjust bytes left but don't go past end */
- while (n-- != 0U && *d != '\0')
- d++;
- dlen = d - dst;
- n = size - dlen;
-
- if (n == 0U)
- return(dlen + strlen(s));
- while (*s != '\0') {
- if (n != 1U) {
- *d++ = *s;
- n--;
- }
- s++;
- }
- *d = '\0';
-
- return(dlen + (s - src)); /* count does not include NUL */
-}
diff --git a/contrib/ntp/lib/isc/strtoul.c b/contrib/ntp/lib/isc/strtoul.c
deleted file mode 100644
index 18d93e21ce26..000000000000
--- a/contrib/ntp/lib/isc/strtoul.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*! \file */
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/* $Id: strtoul.c,v 1.7 2007/06/19 23:47:17 tbox Exp $ */
-
-#include <config.h>
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <isc/stdlib.h>
-#include <isc/util.h>
-
-/*!
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-unsigned long
-isc_strtoul(const char *nptr, char **endptr, int base) {
- const char *s = nptr;
- unsigned long acc;
- unsigned char c;
- unsigned long cutoff;
- int neg = 0, any, cutlim;
-
- /*
- * See strtol for comments as to the logic used.
- */
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else if (c == '+')
- c = *s++;
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
- cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
- cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= base;
- acc += c;
- }
- }
- if (any < 0) {
- acc = ULONG_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- DE_CONST(any ? s - 1 : nptr, *endptr);
- return (acc);
-}
diff --git a/contrib/ntp/lib/isc/symtab.c b/contrib/ntp/lib/isc/symtab.c
deleted file mode 100644
index d4c1dccf0ad9..000000000000
--- a/contrib/ntp/lib/isc/symtab.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1996-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <ctype.h>
-
-#include <isc/magic.h>
-#include <isc/mem.h>
-#include <isc/string.h>
-#include <isc/symtab.h>
-#include <isc/util.h>
-
-typedef struct elt {
- char * key;
- unsigned int type;
- isc_symvalue_t value;
- LINK(struct elt) link;
-} elt_t;
-
-typedef LIST(elt_t) eltlist_t;
-
-#define SYMTAB_MAGIC ISC_MAGIC('S', 'y', 'm', 'T')
-#define VALID_SYMTAB(st) ISC_MAGIC_VALID(st, SYMTAB_MAGIC)
-
-struct isc_symtab {
- /* Unlocked. */
- unsigned int magic;
- isc_mem_t * mctx;
- unsigned int size;
- unsigned int count;
- unsigned int maxload;
- eltlist_t * table;
- isc_symtabaction_t undefine_action;
- void * undefine_arg;
- isc_boolean_t case_sensitive;
-};
-
-isc_result_t
-isc_symtab_create(isc_mem_t *mctx, unsigned int size,
- isc_symtabaction_t undefine_action,
- void *undefine_arg,
- isc_boolean_t case_sensitive,
- isc_symtab_t **symtabp)
-{
- isc_symtab_t *symtab;
- unsigned int i;
-
- REQUIRE(mctx != NULL);
- REQUIRE(symtabp != NULL && *symtabp == NULL);
- REQUIRE(size > 0); /* Should be prime. */
-
- symtab = (isc_symtab_t *)isc_mem_get(mctx, sizeof(*symtab));
- if (symtab == NULL)
- return (ISC_R_NOMEMORY);
- symtab->table = (eltlist_t *)isc_mem_get(mctx,
- size * sizeof(eltlist_t));
- if (symtab->table == NULL) {
- isc_mem_put(mctx, symtab, sizeof(*symtab));
- return (ISC_R_NOMEMORY);
- }
- for (i = 0; i < size; i++)
- INIT_LIST(symtab->table[i]);
- symtab->mctx = mctx;
- symtab->size = size;
- symtab->count = 0;
- symtab->maxload = size * 3 / 4;
- symtab->undefine_action = undefine_action;
- symtab->undefine_arg = undefine_arg;
- symtab->case_sensitive = case_sensitive;
- symtab->magic = SYMTAB_MAGIC;
-
- *symtabp = symtab;
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_symtab_destroy(isc_symtab_t **symtabp) {
- isc_symtab_t *symtab;
- unsigned int i;
- elt_t *elt, *nelt;
-
- REQUIRE(symtabp != NULL);
- symtab = *symtabp;
- REQUIRE(VALID_SYMTAB(symtab));
-
- for (i = 0; i < symtab->size; i++) {
- for (elt = HEAD(symtab->table[i]); elt != NULL; elt = nelt) {
- nelt = NEXT(elt, link);
- if (symtab->undefine_action != NULL)
- (symtab->undefine_action)(elt->key,
- elt->type,
- elt->value,
- symtab->undefine_arg);
- isc_mem_put(symtab->mctx, elt, sizeof(*elt));
- }
- }
- isc_mem_put(symtab->mctx, symtab->table,
- symtab->size * sizeof(eltlist_t));
- symtab->magic = 0;
- isc_mem_put(symtab->mctx, symtab, sizeof(*symtab));
-
- *symtabp = NULL;
-}
-
-static inline unsigned int
-hash(const char *key, isc_boolean_t case_sensitive) {
- const char *s;
- unsigned int h = 0;
- int c;
-
- /*
- * This hash function is similar to the one Ousterhout
- * uses in Tcl.
- */
-
- if (case_sensitive) {
- for (s = key; *s != '\0'; s++) {
- h += (h << 3) + *s;
- }
- } else {
- for (s = key; *s != '\0'; s++) {
- c = *s;
- c = tolower((unsigned char)c);
- h += (h << 3) + c;
- }
- }
-
- return (h);
-}
-
-#define FIND(s, k, t, b, e) \
- b = hash((k), (s)->case_sensitive) % (s)->size; \
- if ((s)->case_sensitive) { \
- for (e = HEAD((s)->table[b]); e != NULL; e = NEXT(e, link)) { \
- if (((t) == 0 || e->type == (t)) && \
- strcmp(e->key, (k)) == 0) \
- break; \
- } \
- } else { \
- for (e = HEAD((s)->table[b]); e != NULL; e = NEXT(e, link)) { \
- if (((t) == 0 || e->type == (t)) && \
- strcasecmp(e->key, (k)) == 0) \
- break; \
- } \
- }
-
-isc_result_t
-isc_symtab_lookup(isc_symtab_t *symtab, const char *key, unsigned int type,
- isc_symvalue_t *value)
-{
- unsigned int bucket;
- elt_t *elt;
-
- REQUIRE(VALID_SYMTAB(symtab));
- REQUIRE(key != NULL);
-
- FIND(symtab, key, type, bucket, elt);
-
- if (elt == NULL)
- return (ISC_R_NOTFOUND);
-
- if (value != NULL)
- *value = elt->value;
-
- return (ISC_R_SUCCESS);
-}
-
-static void
-grow_table(isc_symtab_t *symtab) {
- eltlist_t *newtable;
- unsigned int i, newsize, newmax;
-
- REQUIRE(symtab != NULL);
-
- newsize = symtab->size * 2;
- newmax = newsize * 3 / 4;
- INSIST(newsize > 0U && newmax > 0U);
-
- newtable = isc_mem_get(symtab->mctx, newsize * sizeof(eltlist_t));
- if (newtable == NULL)
- return;
-
- for (i = 0; i < newsize; i++)
- INIT_LIST(newtable[i]);
-
- for (i = 0; i < symtab->size; i++) {
- elt_t *elt, *nelt;
-
- for (elt = HEAD(symtab->table[i]); elt != NULL; elt = nelt) {
- unsigned int hv;
-
- nelt = NEXT(elt, link);
-
- UNLINK(symtab->table[i], elt, link);
- hv = hash(elt->key, symtab->case_sensitive);
- APPEND(newtable[hv % newsize], elt, link);
- }
- }
-
- isc_mem_put(symtab->mctx, symtab->table,
- symtab->size * sizeof(eltlist_t));
-
- symtab->table = newtable;
- symtab->size = newsize;
- symtab->maxload = newmax;
-}
-
-isc_result_t
-isc_symtab_define(isc_symtab_t *symtab, const char *key, unsigned int type,
- isc_symvalue_t value, isc_symexists_t exists_policy)
-{
- unsigned int bucket;
- elt_t *elt;
-
- REQUIRE(VALID_SYMTAB(symtab));
- REQUIRE(key != NULL);
- REQUIRE(type != 0);
-
- FIND(symtab, key, type, bucket, elt);
-
- if (exists_policy != isc_symexists_add && elt != NULL) {
- if (exists_policy == isc_symexists_reject)
- return (ISC_R_EXISTS);
- INSIST(exists_policy == isc_symexists_replace);
- UNLINK(symtab->table[bucket], elt, link);
- if (symtab->undefine_action != NULL)
- (symtab->undefine_action)(elt->key, elt->type,
- elt->value,
- symtab->undefine_arg);
- } else {
- elt = (elt_t *)isc_mem_get(symtab->mctx, sizeof(*elt));
- if (elt == NULL)
- return (ISC_R_NOMEMORY);
- ISC_LINK_INIT(elt, link);
- symtab->count++;
- }
-
- /*
- * Though the "key" can be const coming in, it is not stored as const
- * so that the calling program can easily have writable access to
- * it in its undefine_action function. In the event that it *was*
- * truly const coming in and then the caller modified it anyway ...
- * well, don't do that!
- */
- DE_CONST(key, elt->key);
- elt->type = type;
- elt->value = value;
-
- /*
- * We prepend so that the most recent definition will be found.
- */
- PREPEND(symtab->table[bucket], elt, link);
-
- if (symtab->count > symtab->maxload)
- grow_table(symtab);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_symtab_undefine(isc_symtab_t *symtab, const char *key, unsigned int type) {
- unsigned int bucket;
- elt_t *elt;
-
- REQUIRE(VALID_SYMTAB(symtab));
- REQUIRE(key != NULL);
-
- FIND(symtab, key, type, bucket, elt);
-
- if (elt == NULL)
- return (ISC_R_NOTFOUND);
-
- if (symtab->undefine_action != NULL)
- (symtab->undefine_action)(elt->key, elt->type,
- elt->value, symtab->undefine_arg);
- UNLINK(symtab->table[bucket], elt, link);
- isc_mem_put(symtab->mctx, elt, sizeof(*elt));
- symtab->count--;
-
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/task_api.c b/contrib/ntp/lib/isc/task_api.c
deleted file mode 100644
index 34510ff64c47..000000000000
--- a/contrib/ntp/lib/isc/task_api.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#include <config.h>
-
-#include <unistd.h>
-
-#include <isc/app.h>
-#include <isc/magic.h>
-#include <isc/mutex.h>
-#include <isc/once.h>
-#include <isc/task.h>
-#include <isc/util.h>
-
-static isc_mutex_t createlock;
-static isc_once_t once = ISC_ONCE_INIT;
-static isc_taskmgrcreatefunc_t taskmgr_createfunc = NULL;
-
-static void
-initialize(void) {
- RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_task_register(isc_taskmgrcreatefunc_t createfunc) {
- isc_result_t result = ISC_R_SUCCESS;
-
- RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
-
- LOCK(&createlock);
- if (taskmgr_createfunc == NULL)
- taskmgr_createfunc = createfunc;
- else
- result = ISC_R_EXISTS;
- UNLOCK(&createlock);
-
- return (result);
-}
-
-isc_result_t
-isc_taskmgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
- unsigned int workers, unsigned int default_quantum,
- isc_taskmgr_t **managerp)
-{
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(taskmgr_createfunc != NULL);
- result = (*taskmgr_createfunc)(mctx, workers, default_quantum,
- managerp);
-
- UNLOCK(&createlock);
-
- if (result == ISC_R_SUCCESS)
- isc_appctx_settaskmgr(actx, *managerp);
-
- return (result);
-}
-
-isc_result_t
-isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
- unsigned int default_quantum, isc_taskmgr_t **managerp)
-{
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(taskmgr_createfunc != NULL);
- result = (*taskmgr_createfunc)(mctx, workers, default_quantum,
- managerp);
-
- UNLOCK(&createlock);
-
- return (result);
-}
-
-void
-isc_taskmgr_destroy(isc_taskmgr_t **managerp) {
- REQUIRE(managerp != NULL && ISCAPI_TASKMGR_VALID(*managerp));
-
- (*managerp)->methods->destroy(managerp);
-
- ENSURE(*managerp == NULL);
-}
-
-void
-isc_taskmgr_setmode(isc_taskmgr_t *manager, isc_taskmgrmode_t mode) {
- REQUIRE(ISCAPI_TASKMGR_VALID(manager));
-
- manager->methods->setmode(manager, mode);
-}
-
-isc_taskmgrmode_t
-isc_taskmgr_mode(isc_taskmgr_t *manager) {
- REQUIRE(ISCAPI_TASKMGR_VALID(manager));
-
- return (manager->methods->mode(manager));
-}
-
-isc_result_t
-isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
- isc_task_t **taskp)
-{
- REQUIRE(ISCAPI_TASKMGR_VALID(manager));
- REQUIRE(taskp != NULL && *taskp == NULL);
-
- return (manager->methods->taskcreate(manager, quantum, taskp));
-}
-
-void
-isc_task_attach(isc_task_t *source, isc_task_t **targetp) {
- REQUIRE(ISCAPI_TASK_VALID(source));
- REQUIRE(targetp != NULL && *targetp == NULL);
-
- source->methods->attach(source, targetp);
-
- ENSURE(*targetp == source);
-}
-
-void
-isc_task_detach(isc_task_t **taskp) {
- REQUIRE(taskp != NULL && ISCAPI_TASK_VALID(*taskp));
-
- (*taskp)->methods->detach(taskp);
-
- ENSURE(*taskp == NULL);
-}
-
-void
-isc_task_send(isc_task_t *task, isc_event_t **eventp) {
- REQUIRE(ISCAPI_TASK_VALID(task));
- REQUIRE(eventp != NULL && *eventp != NULL);
-
- task->methods->send(task, eventp);
-
- ENSURE(*eventp == NULL);
-}
-
-void
-isc_task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
- REQUIRE(taskp != NULL && ISCAPI_TASK_VALID(*taskp));
- REQUIRE(eventp != NULL && *eventp != NULL);
-
- (*taskp)->methods->sendanddetach(taskp, eventp);
-
- ENSURE(*taskp == NULL && *eventp == NULL);
-}
-
-unsigned int
-isc_task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
- void *tag, isc_eventlist_t *events)
-{
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- return (task->methods->unsend(task, sender, type, tag, events));
-}
-
-isc_result_t
-isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- return (task->methods->onshutdown(task, action, arg));
-}
-
-void
-isc_task_shutdown(isc_task_t *task) {
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- task->methods->shutdown(task);
-}
-
-void
-isc_task_setname(isc_task_t *task, const char *name, void *tag) {
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- task->methods->setname(task, name, tag);
-}
-
-unsigned int
-isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type, void *tag)
-{
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- return (task->methods->purgeevents(task, sender, type, tag));
-}
-
-isc_result_t
-isc_task_beginexclusive(isc_task_t *task) {
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- return (task->methods->beginexclusive(task));
-}
-
-void
-isc_task_endexclusive(isc_task_t *task) {
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- task->methods->endexclusive(task);
-}
-
-void
-isc_task_setprivilege(isc_task_t *task, isc_boolean_t priv) {
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- task->methods->setprivilege(task, priv);
-}
-
-isc_boolean_t
-isc_task_privilege(isc_task_t *task) {
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- return (task->methods->privilege(task));
-}
-
-
-/*%
- * This is necessary for libisc's internal timer implementation. Other
- * implementation might skip implementing this.
- */
-unsigned int
-isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
- isc_eventtype_t last, void *tag)
-{
- REQUIRE(ISCAPI_TASK_VALID(task));
-
- return (task->methods->purgerange(task, sender, first, last, tag));
-}
diff --git a/contrib/ntp/lib/isc/taskpool.c b/contrib/ntp/lib/isc/taskpool.c
deleted file mode 100644
index 25d951682889..000000000000
--- a/contrib/ntp/lib/isc/taskpool.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/mem.h>
-#include <isc/random.h>
-#include <isc/taskpool.h>
-#include <isc/util.h>
-
-/***
- *** Types.
- ***/
-
-struct isc_taskpool {
- isc_mem_t * mctx;
- isc_taskmgr_t * tmgr;
- unsigned int ntasks;
- unsigned int quantum;
- isc_task_t ** tasks;
-};
-
-/***
- *** Functions.
- ***/
-
-static isc_result_t
-alloc_pool(isc_taskmgr_t *tmgr, isc_mem_t *mctx, unsigned int ntasks,
- unsigned int quantum, isc_taskpool_t **poolp)
-{
- isc_taskpool_t *pool;
- unsigned int i;
-
- pool = isc_mem_get(mctx, sizeof(*pool));
- if (pool == NULL)
- return (ISC_R_NOMEMORY);
- pool->mctx = mctx;
- pool->ntasks = ntasks;
- pool->quantum = quantum;
- pool->tmgr = tmgr;
- pool->tasks = isc_mem_get(mctx, ntasks * sizeof(isc_task_t *));
- if (pool->tasks == NULL) {
- isc_mem_put(mctx, pool, sizeof(*pool));
- return (ISC_R_NOMEMORY);
- }
- for (i = 0; i < ntasks; i++)
- pool->tasks[i] = NULL;
-
- *poolp = pool;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
- unsigned int ntasks, unsigned int quantum,
- isc_taskpool_t **poolp)
-{
- unsigned int i;
- isc_taskpool_t *pool = NULL;
- isc_result_t result;
-
- INSIST(ntasks > 0);
-
- /* Allocate the pool structure */
- result = alloc_pool(tmgr, mctx, ntasks, quantum, &pool);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- /* Create the tasks */
- for (i = 0; i < ntasks; i++) {
- result = isc_task_create(tmgr, quantum, &pool->tasks[i]);
- if (result != ISC_R_SUCCESS) {
- isc_taskpool_destroy(&pool);
- return (result);
- }
- isc_task_setname(pool->tasks[i], "taskpool", NULL);
- }
-
- *poolp = pool;
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_taskpool_gettask(isc_taskpool_t *pool, isc_task_t **targetp) {
- isc_uint32_t i;
- isc_random_get(&i);
- isc_task_attach(pool->tasks[i % pool->ntasks], targetp);
-}
-
-int
-isc_taskpool_size(isc_taskpool_t *pool) {
- REQUIRE(pool != NULL);
- return (pool->ntasks);
-}
-
-isc_result_t
-isc_taskpool_expand(isc_taskpool_t **sourcep, unsigned int size,
- isc_taskpool_t **targetp)
-{
- isc_result_t result;
- isc_taskpool_t *pool;
-
- REQUIRE(sourcep != NULL && *sourcep != NULL);
- REQUIRE(targetp != NULL && *targetp == NULL);
-
- pool = *sourcep;
- if (size > pool->ntasks) {
- isc_taskpool_t *newpool = NULL;
- unsigned int i;
-
- /* Allocate a new pool structure */
- result = alloc_pool(pool->tmgr, pool->mctx, size,
- pool->quantum, &newpool);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- /* Copy over the tasks from the old pool */
- for (i = 0; i < pool->ntasks; i++) {
- newpool->tasks[i] = pool->tasks[i];
- pool->tasks[i] = NULL;
- }
-
- /* Create new tasks */
- for (i = pool->ntasks; i < size; i++) {
- result = isc_task_create(pool->tmgr, pool->quantum,
- &newpool->tasks[i]);
- if (result != ISC_R_SUCCESS) {
- isc_taskpool_destroy(&newpool);
- return (result);
- }
- isc_task_setname(newpool->tasks[i], "taskpool", NULL);
- }
-
- isc_taskpool_destroy(&pool);
- pool = newpool;
- }
-
- *sourcep = NULL;
- *targetp = pool;
- return (ISC_R_SUCCESS);
-}
-
-void
-isc_taskpool_destroy(isc_taskpool_t **poolp) {
- unsigned int i;
- isc_taskpool_t *pool = *poolp;
- for (i = 0; i < pool->ntasks; i++) {
- if (pool->tasks[i] != NULL)
- isc_task_detach(&pool->tasks[i]);
- }
- isc_mem_put(pool->mctx, pool->tasks,
- pool->ntasks * sizeof(isc_task_t *));
- isc_mem_put(pool->mctx, pool, sizeof(*pool));
- *poolp = NULL;
-}
-
-void
-isc_taskpool_setprivilege(isc_taskpool_t *pool, isc_boolean_t priv) {
- unsigned int i;
-
- REQUIRE(pool != NULL);
-
- for (i = 0; i < pool->ntasks; i++) {
- if (pool->tasks[i] != NULL)
- isc_task_setprivilege(pool->tasks[i], priv);
- }
-}
diff --git a/contrib/ntp/lib/isc/tests/Atffile b/contrib/ntp/lib/isc/tests/Atffile
deleted file mode 100644
index c3e044f41a84..000000000000
--- a/contrib/ntp/lib/isc/tests/Atffile
+++ /dev/null
@@ -1,5 +0,0 @@
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = bind9
-
-tp-glob: *_test
diff --git a/contrib/ntp/lib/isc/tests/hash_test.c b/contrib/ntp/lib/isc/tests/hash_test.c
deleted file mode 100644
index 836d7b67abc7..000000000000
--- a/contrib/ntp/lib/isc/tests/hash_test.c
+++ /dev/null
@@ -1,1805 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/* ! \file */
-
-#include <config.h>
-
-#include <atf-c.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include <isc/hmacmd5.h>
-#include <isc/hmacsha.h>
-#include <isc/md5.h>
-#include <isc/sha1.h>
-#include <isc/util.h>
-#include <isc/string.h>
-
-/*
- * Test data from RFC6234
- */
-
-unsigned char digest[ISC_SHA512_DIGESTLENGTH];
-unsigned char buffer[1024];
-const char *s;
-char str[ISC_SHA512_DIGESTLENGTH];
-unsigned char key[20];
-int i = 0;
-
-isc_result_t
-tohexstr(unsigned char *d, unsigned int len, char *out);
-/*
- * Precondition: a hexadecimal number in *d, the length of that number in len,
- * and a pointer to a character array to put the output (*out).
- * Postcondition: A String representation of the given hexadecimal number is
- * placed into the array *out
- *
- * 'out' MUST point to an array of at least len / 2 + 1
- *
- * Return values: ISC_R_SUCCESS if the operation is sucessful
- */
-
-isc_result_t
-tohexstr(unsigned char *d, unsigned int len, char *out) {
-
- out[0]='\0';
- char c_ret[] = "AA";
- unsigned int i;
- strcat(out, "0x");
- for (i = 0; i < len; i++) {
- sprintf(c_ret, "%02X", d[i]);
- strcat(out, c_ret);
- }
- strcat(out, "\0");
- return (ISC_R_SUCCESS);
-}
-
-
-#define TEST_INPUT(x) (x), sizeof(x)-1
-
-typedef struct hash_testcase {
- const char *input;
- size_t input_len;
- const char *result;
- int repeats;
-} hash_testcase_t;
-
-typedef struct hash_test_key {
- const char *key;
- const int len;
-} hash_test_key_t;
-
-/* non-hmac tests */
-
-ATF_TC(isc_sha1);
-ATF_TC_HEAD(isc_sha1, tc) {
- atf_tc_set_md_var(tc, "descr", "sha1 examples from RFC4634");
-}
-ATF_TC_BODY(isc_sha1, tc) {
- isc_sha1_t sha1;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("abc"),
- "0xA9993E364706816ABA3E25717850C26C9CD0D89D",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("abcdbcdecdefdefgefghfghighijhijkijk"
- "ljklmklmnlmnomnopnopq"),
- "0x84983E441C3BD26EBAAE4AA1F95129E5E54670F1",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("a") /* times 1000000 */,
- "0x34AA973CD4C4DAA4F61EEB2BDBAD27316534016F",
- 1000000
- },
- /* Test 4 -- exact multiple of 512 bits */
- {
- TEST_INPUT("01234567012345670123456701234567"),
- "0xDEA356A2CDDD90C7A7ECEDC5EBB563934F460452",
- 20 /* 20 times */
- },
-#if 0
- /* Test 5 -- optional feature, not implemented */
- {
- TEST_INPUT(""),
- /* "extrabits": 0x98 , "numberextrabits": 5 */
- "0x29826B003B906E660EFF4027CE98AF3531AC75BA",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("\x5e"),
- "0x5E6F80A34A9798CAFC6A5DB96CC57BA4C4DB59C2",
- 1
- },
-#if 0
- /* Test 7 -- optional feature, not implemented */
- {
- TEST_INPUT("\x49\xb2\xae\xc2\x59\x4b\xbe\x3a"
- "\x3b\x11\x75\x42\xd9\x4a\xc8"),
- /* "extrabits": 0x80, "numberextrabits": 3 */
- "0x6239781E03729919C01955B3FFA8ACB60B988340", 1 },
-#endif
- /* Test 8 */
- {
- TEST_INPUT("\x9a\x7d\xfd\xf1\xec\xea\xd0\x6e\xd6\x46"
- "\xaa\x55\xfe\x75\x71\x46"),
- "0x82ABFF6605DBE1C17DEF12A394FA22A82B544A35",
- 1
- },
-#if 0
- /* Test 9 -- optional feature, not implemented */
- {
- TEST_INPUT("\x65\xf9\x32\x99\x5b\xa4\xce\x2c\xb1\xb4"
- "\xa2\xe7\x1a\xe7\x02\x20\xaa\xce\xc8\x96"
- "\x2d\xd4\x49\x9c\xbd\x7c\x88\x7a\x94\xea"
- "\xaa\x10\x1e\xa5\xaa\xbc\x52\x9b\x4e\x7e"
- "\x43\x66\x5a\x5a\xf2\xcd\x03\xfe\x67\x8e"
- "\xa6\xa5\x00\x5b\xba\x3b\x08\x22\x04\xc2"
- "\x8b\x91\x09\xf4\x69\xda\xc9\x2a\xaa\xb3"
- "\xaa\x7c\x11\xa1\xb3\x2a"),
- /* "extrabits": 0xE0 , "numberextrabits": 3 */
- "0x8C5B2A5DDAE5A97FC7F9D85661C672ADBF7933D4",
- 1
- },
-#endif
- /* Test 10 */
- {
- TEST_INPUT("\xf7\x8f\x92\x14\x1b\xcd\x17\x0a\xe8\x9b"
- "\x4f\xba\x15\xa1\xd5\x9f\x3f\xd8\x4d\x22"
- "\x3c\x92\x51\xbd\xac\xbb\xae\x61\xd0\x5e"
- "\xd1\x15\xa0\x6a\x7c\xe1\x17\xb7\xbe\xea"
- "\xd2\x44\x21\xde\xd9\xc3\x25\x92\xbd\x57"
- "\xed\xea\xe3\x9c\x39\xfa\x1f\xe8\x94\x6a"
- "\x84\xd0\xcf\x1f\x7b\xee\xad\x17\x13\xe2"
- "\xe0\x95\x98\x97\x34\x7f\x67\xc8\x0b\x04"
- "\x00\xc2\x09\x81\x5d\x6b\x10\xa6\x83\x83"
- "\x6f\xd5\x56\x2a\x56\xca\xb1\xa2\x8e\x81"
- "\xb6\x57\x66\x54\x63\x1c\xf1\x65\x66\xb8"
- "\x6e\x3b\x33\xa1\x08\xb0\x53\x07\xc0\x0a"
- "\xff\x14\xa7\x68\xed\x73\x50\x60\x6a\x0f"
- "\x85\xe6\xa9\x1d\x39\x6f\x5b\x5c\xbe\x57"
- "\x7f\x9b\x38\x80\x7c\x7d\x52\x3d\x6d\x79"
- "\x2f\x6e\xbc\x24\xa4\xec\xf2\xb3\xa4\x27"
- "\xcd\xbb\xfb"),
- "0xCB0082C8F197D260991BA6A460E76E202BAD27B3",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- isc_sha1_init(&sha1);
- for(i = 0; i < testcase->repeats; i++) {
- isc_sha1_update(&sha1,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- }
- isc_sha1_final(&sha1, digest);
- tohexstr(digest, ISC_SHA1_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- }
-}
-
-
-ATF_TC(isc_sha224);
-ATF_TC_HEAD(isc_sha224, tc) {
- atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
-}
-ATF_TC_BODY(isc_sha224, tc) {
- isc_sha224_t sha224;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("abc"),
- "0x23097D223405D8228642A477BDA255B32AADBCE4BDA0B3F7"
- "E36C9DA7",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("abcdbcdecdefdefgefghfghighijhijkijklj"
- "klmklmnlmnomnopnopq"),
- "0x75388B16512776CC5DBA5DA1FD890150B0C6455CB4F58B"
- "1952522525",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("a"),
- "0x20794655980C91D8BBB4C1EA97618A4BF03F42581948B2"
- "EE4EE7AD67",
- 1000000
- },
- /* Test 4 */
- {
- TEST_INPUT("01234567012345670123456701234567"),
- "0x567F69F168CD7844E65259CE658FE7AADFA25216E68ECA"
- "0EB7AB8262",
- 20
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("\x07"),
- "0x00ECD5F138422B8AD74C9799FD826C531BAD2FCABC7450"
- "BEE2AA8C2A",
- 1
- },
-#if 0
- /* Test 7 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 8 */
- {
- TEST_INPUT("\x18\x80\x40\x05\xdd\x4f\xbd\x15\x56\x29"
- "\x9d\x6f\x9d\x93\xdf\x62"),
- "0xDF90D78AA78821C99B40BA4C966921ACCD8FFB1E98AC38"
- "8E56191DB1",
- 1
- },
-#if 0
- /* Test 9 */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 10 */
- {
- TEST_INPUT("\x55\xb2\x10\x07\x9c\x61\xb5\x3a\xdd\x52"
- "\x06\x22\xd1\xac\x97\xd5\xcd\xbe\x8c\xb3"
- "\x3a\xa0\xae\x34\x45\x17\xbe\xe4\xd7\xba"
- "\x09\xab\xc8\x53\x3c\x52\x50\x88\x7a\x43"
- "\xbe\xbb\xac\x90\x6c\x2e\x18\x37\xf2\x6b"
- "\x36\xa5\x9a\xe3\xbe\x78\x14\xd5\x06\x89"
- "\x6b\x71\x8b\x2a\x38\x3e\xcd\xac\x16\xb9"
- "\x61\x25\x55\x3f\x41\x6f\xf3\x2c\x66\x74"
- "\xc7\x45\x99\xa9\x00\x53\x86\xd9\xce\x11"
- "\x12\x24\x5f\x48\xee\x47\x0d\x39\x6c\x1e"
- "\xd6\x3b\x92\x67\x0c\xa5\x6e\xc8\x4d\xee"
- "\xa8\x14\xb6\x13\x5e\xca\x54\x39\x2b\xde"
- "\xdb\x94\x89\xbc\x9b\x87\x5a\x8b\xaf\x0d"
- "\xc1\xae\x78\x57\x36\x91\x4a\xb7\xda\xa2"
- "\x64\xbc\x07\x9d\x26\x9f\x2c\x0d\x7e\xdd"
- "\xd8\x10\xa4\x26\x14\x5a\x07\x76\xf6\x7c"
- "\x87\x82\x73"),
- "0x0B31894EC8937AD9B91BDFBCBA294D9ADEFAA18E09305E"
- "9F20D5C3A4",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- isc_sha224_init(&sha224);
- for(i = 0; i < testcase->repeats; i++) {
- isc_sha224_update(&sha224,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- }
- isc_sha224_final(digest, &sha224);
- /*
- *API inconsistency BUG HERE
- * in order to be consistant with the other isc_hash_final
- * functions the call should be
- * isc_sha224_final(&sha224, digest);
- */
- tohexstr(digest, ISC_SHA224_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- }
-
-}
-
-ATF_TC(isc_sha256);
-ATF_TC_HEAD(isc_sha256, tc) {
- atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
-}
-ATF_TC_BODY(isc_sha256, tc) {
- isc_sha256_t sha256;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("abc"),
- "0xBA7816BF8F01CFEA414140DE5DAE2223B00361A396177A"
- "9CB410FF61F20015AD",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("abcdbcdecdefdefgefghfghighijhijkijkljk"
- "lmklmnlmnomnopnopq"),
- "0x248D6A61D20638B8E5C026930C3E6039A33CE45964FF21"
- "67F6ECEDD419DB06C1",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("a"),
- "0xCDC76E5C9914FB9281A1C7E284D73E67F1809A48A49720"
- "0E046D39CCC7112CD0",
- 1000000 },
- /* Test 4 */
- {
- TEST_INPUT("01234567012345670123456701234567"),
- "0x594847328451BDFA85056225462CC1D867D877FB388DF0"
- "CE35F25AB5562BFBB5",
- 20
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("\x19"),
- "0x68AA2E2EE5DFF96E3355E6C7EE373E3D6A4E17F75F9518"
- "D843709C0C9BC3E3D4",
- 1
- },
-#if 0
- /* Test 7 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 8 */
- {
- TEST_INPUT("\xe3\xd7\x25\x70\xdc\xdd\x78\x7c\xe3"
- "\x88\x7a\xb2\xcd\x68\x46\x52"),
- "0x175EE69B02BA9B58E2B0A5FD13819CEA573F3940A94F82"
- "5128CF4209BEABB4E8",
- 1
- },
-#if 0
- /* Test 9 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 10 */
- {
- TEST_INPUT("\x83\x26\x75\x4e\x22\x77\x37\x2f\x4f\xc1"
- "\x2b\x20\x52\x7a\xfe\xf0\x4d\x8a\x05\x69"
- "\x71\xb1\x1a\xd5\x71\x23\xa7\xc1\x37\x76"
- "\x00\x00\xd7\xbe\xf6\xf3\xc1\xf7\xa9\x08"
- "\x3a\xa3\x9d\x81\x0d\xb3\x10\x77\x7d\xab"
- "\x8b\x1e\x7f\x02\xb8\x4a\x26\xc7\x73\x32"
- "\x5f\x8b\x23\x74\xde\x7a\x4b\x5a\x58\xcb"
- "\x5c\x5c\xf3\x5b\xce\xe6\xfb\x94\x6e\x5b"
- "\xd6\x94\xfa\x59\x3a\x8b\xeb\x3f\x9d\x65"
- "\x92\xec\xed\xaa\x66\xca\x82\xa2\x9d\x0c"
- "\x51\xbc\xf9\x33\x62\x30\xe5\xd7\x84\xe4"
- "\xc0\xa4\x3f\x8d\x79\xa3\x0a\x16\x5c\xba"
- "\xbe\x45\x2b\x77\x4b\x9c\x71\x09\xa9\x7d"
- "\x13\x8f\x12\x92\x28\x96\x6f\x6c\x0a\xdc"
- "\x10\x6a\xad\x5a\x9f\xdd\x30\x82\x57\x69"
- "\xb2\xc6\x71\xaf\x67\x59\xdf\x28\xeb\x39"
- "\x3d\x54\xd6"),
- "0x97DBCA7DF46D62C8A422C941DD7E835B8AD3361763F7E9"
- "B2D95F4F0DA6E1CCBC",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- isc_sha256_init(&sha256);
- for(i = 0; i < testcase->repeats; i++) {
- isc_sha256_update(&sha256,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- }
- isc_sha256_final(digest, &sha256);
- /*
- *API inconsistency BUG HERE
- * in order to be consistant with the other isc_hash_final
- * functions the call should be
- * isc_sha224_final(&sha224, digest);
- */
- tohexstr(digest, ISC_SHA256_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- }
-
-}
-
-ATF_TC(isc_sha384);
-ATF_TC_HEAD(isc_sha384, tc) {
- atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
-}
-ATF_TC_BODY(isc_sha384, tc) {
- isc_sha384_t sha384;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("abc"),
- "0xCB00753F45A35E8BB5A03D699AC65007272C32AB0EDED1"
- "631A8B605A43FF5BED8086072BA1E7CC2358BAEC"
- "A134C825A7",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("abcdefghbcdefghicdefghijdefghijkefghijkl"
- "fghijklmghijklmnhijklmnoijklmnopjklmnopq"
- "klmnopqrlmnopqrsmnopqrstnopqrstu"),
- "0x09330C33F71147E83D192FC782CD1B4753111B173B3B05"
- "D22FA08086E3B0F712FCC7C71A557E2DB966C3E9"
- "FA91746039",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("a"),
- "0x9D0E1809716474CB086E834E310A4A1CED149E9C00F248"
- "527972CEC5704C2A5B07B8B3DC38ECC4EBAE97DD"
- "D87F3D8985",
- 1000000
- },
- /* Test 4 */
- {
- TEST_INPUT("01234567012345670123456701234567"),
- "0x2FC64A4F500DDB6828F6A3430B8DD72A368EB7F3A8322A"
- "70BC84275B9C0B3AB00D27A5CC3C2D224AA6B61A"
- "0D79FB4596",
- 20
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 6 */
- { TEST_INPUT("\xb9"),
- "0xBC8089A19007C0B14195F4ECC74094FEC64F01F9092928"
- "2C2FB392881578208AD466828B1C6C283D2722CF"
- "0AD1AB6938",
- 1
- },
-#if 0
- /* Test 7 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 8 */
- {
- TEST_INPUT("\xa4\x1c\x49\x77\x79\xc0\x37\x5f\xf1"
- "\x0a\x7f\x4e\x08\x59\x17\x39"),
- "0xC9A68443A005812256B8EC76B00516F0DBB74FAB26D665"
- "913F194B6FFB0E91EA9967566B58109CBC675CC2"
- "08E4C823F7",
- 1
- },
-#if 0
- /* Test 9 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 10 */
- {
- TEST_INPUT("\x39\x96\x69\xe2\x8f\x6b\x9c\x6d\xbc\xbb"
- "\x69\x12\xec\x10\xff\xcf\x74\x79\x03\x49"
- "\xb7\xdc\x8f\xbe\x4a\x8e\x7b\x3b\x56\x21"
- "\xdb\x0f\x3e\x7d\xc8\x7f\x82\x32\x64\xbb"
- "\xe4\x0d\x18\x11\xc9\xea\x20\x61\xe1\xc8"
- "\x4a\xd1\x0a\x23\xfa\xc1\x72\x7e\x72\x02"
- "\xfc\x3f\x50\x42\xe6\xbf\x58\xcb\xa8\xa2"
- "\x74\x6e\x1f\x64\xf9\xb9\xea\x35\x2c\x71"
- "\x15\x07\x05\x3c\xf4\xe5\x33\x9d\x52\x86"
- "\x5f\x25\xcc\x22\xb5\xe8\x77\x84\xa1\x2f"
- "\xc9\x61\xd6\x6c\xb6\xe8\x95\x73\x19\x9a"
- "\x2c\xe6\x56\x5c\xbd\xf1\x3d\xca\x40\x38"
- "\x32\xcf\xcb\x0e\x8b\x72\x11\xe8\x3a\xf3"
- "\x2a\x11\xac\x17\x92\x9f\xf1\xc0\x73\xa5"
- "\x1c\xc0\x27\xaa\xed\xef\xf8\x5a\xad\x7c"
- "\x2b\x7c\x5a\x80\x3e\x24\x04\xd9\x6d\x2a"
- "\x77\x35\x7b\xda\x1a\x6d\xae\xed\x17\x15"
- "\x1c\xb9\xbc\x51\x25\xa4\x22\xe9\x41\xde"
- "\x0c\xa0\xfc\x50\x11\xc2\x3e\xcf\xfe\xfd"
- "\xd0\x96\x76\x71\x1c\xf3\xdb\x0a\x34\x40"
- "\x72\x0e\x16\x15\xc1\xf2\x2f\xbc\x3c\x72"
- "\x1d\xe5\x21\xe1\xb9\x9b\xa1\xbd\x55\x77"
- "\x40\x86\x42\x14\x7e\xd0\x96"),
- "0x4F440DB1E6EDD2899FA335F09515AA025EE177A79F4B4A"
- "AF38E42B5C4DE660F5DE8FB2A5B2FBD2A3CBFFD2"
- "0CFF1288C0",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- isc_sha384_init(&sha384);
- for(i = 0; i < testcase->repeats; i++) {
- isc_sha384_update(&sha384,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- }
- isc_sha384_final(digest, &sha384);
- /*
- *API inconsistency BUG HERE
- * in order to be consistant with the other isc_hash_final
- * functions the call should be
- * isc_sha224_final(&sha224, digest);
- */
- tohexstr(digest, ISC_SHA384_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- }
-
-}
-
-ATF_TC(isc_sha512);
-ATF_TC_HEAD(isc_sha512, tc) {
- atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
-}
-ATF_TC_BODY(isc_sha512, tc) {
- isc_sha512_t sha512;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("abc"),
- "0xDDAF35A193617ABACC417349AE20413112E6FA4E89A97E"
- "A20A9EEEE64B55D39A2192992A274FC1A836BA3C"
- "23A3FEEBBD454D4423643CE80E2A9AC94FA54CA49F",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("abcdefghbcdefghicdefghijdefghijkefghijkl"
- "fghijklmghijklmnhijklmnoijklmnopjklmnopq"
- "klmnopqrlmnopqrsmnopqrstnopqrstu"),
- "0x8E959B75DAE313DA8CF4F72814FC143F8F7779C6EB9F7F"
- "A17299AEADB6889018501D289E4900F7E4331B99"
- "DEC4B5433AC7D329EEB6DD26545E96E55B874BE909",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("a"),
- "0xE718483D0CE769644E2E42C7BC15B4638E1F98B13B2044"
- "285632A803AFA973EBDE0FF244877EA60A4CB043"
- "2CE577C31BEB009C5C2C49AA2E4EADB217AD8CC09B",
- 1000000
- },
- /* Test 4 */
- {
- TEST_INPUT("01234567012345670123456701234567"),
- "0x89D05BA632C699C31231DED4FFC127D5A894DAD412C0E0"
- "24DB872D1ABD2BA8141A0F85072A9BE1E2AA04CF"
- "33C765CB510813A39CD5A84C4ACAA64D3F3FB7BAE9",
- 20
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("\xD0"),
- "0x9992202938E882E73E20F6B69E68A0A7149090423D93C8"
- "1BAB3F21678D4ACEEEE50E4E8CAFADA4C85A54EA"
- "8306826C4AD6E74CECE9631BFA8A549B4AB3FBBA15",
- 1
- },
-#if 0
- /* Test 7 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 8 */
- {
- TEST_INPUT("\x8d\x4e\x3c\x0e\x38\x89\x19\x14\x91\x81"
- "\x6e\x9d\x98\xbf\xf0\xa0"),
- "0xCB0B67A4B8712CD73C9AABC0B199E9269B20844AFB75AC"
- "BDD1C153C9828924C3DDEDAAFE669C5FDD0BC66F"
- "630F6773988213EB1B16F517AD0DE4B2F0C95C90F8",
- 1
- },
-#if 0
- /* Test 9 -- unimplemented optional functionality */
- {
- TEST_INPUT(""),
- "0xXXX",
- 1
- },
-#endif
- /* Test 10 */
- {
- TEST_INPUT("\xa5\x5f\x20\xc4\x11\xaa\xd1\x32\x80\x7a"
- "\x50\x2d\x65\x82\x4e\x31\xa2\x30\x54\x32"
- "\xaa\x3d\x06\xd3\xe2\x82\xa8\xd8\x4e\x0d"
- "\xe1\xde\x69\x74\xbf\x49\x54\x69\xfc\x7f"
- "\x33\x8f\x80\x54\xd5\x8c\x26\xc4\x93\x60"
- "\xc3\xe8\x7a\xf5\x65\x23\xac\xf6\xd8\x9d"
- "\x03\xe5\x6f\xf2\xf8\x68\x00\x2b\xc3\xe4"
- "\x31\xed\xc4\x4d\xf2\xf0\x22\x3d\x4b\xb3"
- "\xb2\x43\x58\x6e\x1a\x7d\x92\x49\x36\x69"
- "\x4f\xcb\xba\xf8\x8d\x95\x19\xe4\xeb\x50"
- "\xa6\x44\xf8\xe4\xf9\x5e\xb0\xea\x95\xbc"
- "\x44\x65\xc8\x82\x1a\xac\xd2\xfe\x15\xab"
- "\x49\x81\x16\x4b\xbb\x6d\xc3\x2f\x96\x90"
- "\x87\xa1\x45\xb0\xd9\xcc\x9c\x67\xc2\x2b"
- "\x76\x32\x99\x41\x9c\xc4\x12\x8b\xe9\xa0"
- "\x77\xb3\xac\xe6\x34\x06\x4e\x6d\x99\x28"
- "\x35\x13\xdc\x06\xe7\x51\x5d\x0d\x73\x13"
- "\x2e\x9a\x0d\xc6\xd3\xb1\xf8\xb2\x46\xf1"
- "\xa9\x8a\x3f\xc7\x29\x41\xb1\xe3\xbb\x20"
- "\x98\xe8\xbf\x16\xf2\x68\xd6\x4f\x0b\x0f"
- "\x47\x07\xfe\x1e\xa1\xa1\x79\x1b\xa2\xf3"
- "\xc0\xc7\x58\xe5\xf5\x51\x86\x3a\x96\xc9"
- "\x49\xad\x47\xd7\xfb\x40\xd2"),
- "0xC665BEFB36DA189D78822D10528CBF3B12B3EEF7260399"
- "09C1A16A270D48719377966B957A878E72058477"
- "9A62825C18DA26415E49A7176A894E7510FD1451F5",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- isc_sha512_init(&sha512);
- for(i = 0; i < testcase->repeats; i++) {
- isc_sha512_update(&sha512,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- }
- isc_sha512_final(digest, &sha512);
- /*
- *API inconsistency BUG HERE
- * in order to be consistant with the other isc_hash_final
- * functions the call should be
- * isc_sha224_final(&sha224, digest);
- */
- tohexstr(digest, ISC_SHA512_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- }
-
-}
-
-ATF_TC(isc_md5);
-ATF_TC_HEAD(isc_md5, tc) {
- atf_tc_set_md_var(tc, "descr", "md5 example from RFC1321");
-}
-ATF_TC_BODY(isc_md5, tc) {
- isc_md5_t md5;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- {
- TEST_INPUT(""),
- "0xD41D8CD98F00B204E9800998ECF8427E",
- 1
- },
- {
- TEST_INPUT("a"),
- "0x0CC175B9C0F1B6A831C399E269772661",
- 1
- },
- {
- TEST_INPUT("abc"),
- "0x900150983CD24FB0D6963F7D28E17F72",
- 1
- },
- {
- TEST_INPUT("message digest"),
- "0xF96B697D7CB7938D525A2F31AAF161D0",
- 1
- },
- {
- TEST_INPUT("abcdefghijklmnopqrstuvwxyz"),
- "0xC3FCD3D76192E4007DFB496CCA67E13B",
- 1
- },
- {
- TEST_INPUT("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"
- "nopqrstuvwxyz0123456789"),
- "0xD174AB98D277D9F5A5611C2C9F419D9F",
- 1
- },
- {
- TEST_INPUT("123456789012345678901234567890123456789"
- "01234567890123456789012345678901234567890"),
- "0x57EDF4A22BE3C955AC49DA2E2107B67A",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- isc_md5_init(&md5);
- for(i = 0; i < testcase->repeats; i++) {
- isc_md5_update(&md5,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- }
- isc_md5_final(&md5, digest);
- tohexstr(digest, ISC_MD5_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- }
-}
-
-/* HMAC-SHA1 test */
-ATF_TC(isc_hmacsha1);
-ATF_TC_HEAD(isc_hmacsha1, tc) {
- atf_tc_set_md_var(tc, "descr", "HMAC-SHA1 examples from RFC2104");
-}
-ATF_TC_BODY(isc_hmacsha1, tc) {
- isc_hmacsha1_t hmacsha1;
-
- UNUSED(tc);
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
- "0xB617318655057264E28BC0B6FB378C8EF146BE00",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
- "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
- "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
- "0xEFFCDF6AE5EB2FA2D27416D5F184DF9C259A7C79",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
- "0x125D7342B9AC11CD91A39AF48AA17B4F63F175D3",
- 1
- },
- /* Test 4 */
- {
- TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
- "0x4C9007F4026250C6BC8414F9BF50C86C2D7235DA",
- 1
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test With Truncation"),
- "0x4C1A03424B55E07FE7F27BE1",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key - "
- "Hash Key First"),
- "0xAA4AE5E15272D00E95705637CE8A3B55ED402112", 1 },
- /* Test 7 */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key and "
- "Larger Than One Block-Size Data"),
- "0xE8E99D0F45237D786D6BBAA7965C7808BBFF1A91",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- hash_test_key_t test_keys[] = {
- /* Key 1 */
- { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
- "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
- /* Key 2 */
- { "Jefe", 4 },
- /* Key 3 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
- /* Key 4 */
- { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
- "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
- "\x15\x16\x17\x18\x19", 25 },
-#if 0
- /* Key 5 */
- { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
-#endif
- /* Key 6 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 80 },
- /* Key 7 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 80 },
- { "", 0 }
- };
-
- hash_test_key_t *test_key = test_keys;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- memcpy(buffer, test_key->key, test_key->len);
- isc_hmacsha1_init(&hmacsha1, buffer, test_key->len);
- isc_hmacsha1_update(&hmacsha1,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH);
- tohexstr(digest, ISC_SHA1_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- test_key++;
- }
-}
-
-/* HMAC-SHA224 test */
-ATF_TC(isc_hmacsha224);
-ATF_TC_HEAD(isc_hmacsha224, tc) {
- atf_tc_set_md_var(tc, "descr", "HMAC-SHA224 examples from RFC4634");
-}
-ATF_TC_BODY(isc_hmacsha224, tc) {
- isc_hmacsha224_t hmacsha224;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
- "0x896FB1128ABBDF196832107CD49DF33F47B4B1169912BA"
- "4F53684B22",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
- "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
- "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
- "0xA30E01098BC6DBBF45690F3A7E9E6D0F8BBEA2A39E61480"
- "08FD05E44",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
- "0x7FB3CB3588C6C1F6FFA9694D7D6AD2649365B0C1F65D69"
- "D1EC8333EA",
- 1
- },
- /* Test 4 */
- {
- TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
- "0x6C11506874013CAC6A2ABC1BB382627CEC6A90D86EFC01"
- "2DE7AFEC5A",
- 1
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test With Truncation"),
- "0x4C1A03424B55E07FE7F27BE1",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key - "
- "Hash Key First"),
- "0x95E9A0DB962095ADAEBE9B2D6F0DBCE2D499F112F2D2B7"
- "273FA6870E",
- 1
- },
- /* Test 7 */
- {
- TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
- "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
- "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
- "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
- "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
- "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
- "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
- "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
- "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
- "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
- "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
- "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
- "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
- "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
- "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
- "\x6d\x2e"),
- "0x3A854166AC5D9F023F54D517D0B39DBD946770DB9C2B95"
- "C9F6F565D1",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- hash_test_key_t test_keys[] = {
- /* Key 1 */
- { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
- "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
- /* Key 2 */
- { "Jefe", 4 },
- /* Key 3 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
- /* Key 4 */
- { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
- "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
- "\x15\x16\x17\x18\x19", 25 },
-#if 0
- /* Key 5 */
- { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
-#endif
- /* Key 6 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- /* Key 7 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- { "", 0 }
- };
-
- hash_test_key_t *test_key = test_keys;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- memcpy(buffer, test_key->key, test_key->len);
- isc_hmacsha224_init(&hmacsha224, buffer, test_key->len);
- isc_hmacsha224_update(&hmacsha224,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH);
- tohexstr(digest, ISC_SHA224_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- test_key++;
- }
-}
-
-/* HMAC-SHA256 test */
-ATF_TC(isc_hmacsha256);
-ATF_TC_HEAD(isc_hmacsha256, tc) {
- atf_tc_set_md_var(tc, "descr", "HMAC-SHA256 examples from RFC4634");
-}
-ATF_TC_BODY(isc_hmacsha256, tc) {
- isc_hmacsha256_t hmacsha256;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
- "0xB0344C61D8DB38535CA8AFCEAF0BF12B881DC200C9833D"
- "A726E9376C2E32CFF7",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
- "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
- "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
- "0x5BDCC146BF60754E6A042426089575C75A003F089D2739"
- "839DEC58B964EC3843",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
- "0x773EA91E36800E46854DB8EBD09181A72959098B3EF8C1"
- "22D9635514CED565FE",
- 1
- },
- /* Test 4 */
- {
- TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
- "0x82558A389A443C0EA4CC819899F2083A85F0FAA3E578F8"
- "077A2E3FF46729665B",
- 1
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test With Truncation"),
- "0x4C1A03424B55E07FE7F27BE1",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key - "
- "Hash Key First"),
- "0x60E431591EE0B67F0D8A26AACBF5B77F8E0BC6213728C5"
- "140546040F0EE37F54",
- 1
- },
- /* Test 7 */
- {
- TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
- "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
- "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
- "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
- "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
- "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
- "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
- "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
- "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
- "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
- "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
- "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
- "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
- "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
- "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
- "\x6d\x2e"),
- "0x9B09FFA71B942FCB27635FBCD5B0E944BFDC63644F0713"
- "938A7F51535C3A35E2",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- hash_test_key_t test_keys[] = {
- /* Key 1 */
- { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
- "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
- /* Key 2 */
- { "Jefe", 4 },
- /* Key 3 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
- /* Key 4 */
- { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
- "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
- "\x15\x16\x17\x18\x19", 25 },
-#if 0
- /* Key 5 */
- { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
-#endif
- /* Key 6 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- /* Key 7 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- { "", 0 }
- };
-
- hash_test_key_t *test_key = test_keys;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- memcpy(buffer, test_key->key, test_key->len);
- isc_hmacsha256_init(&hmacsha256, buffer, test_key->len);
- isc_hmacsha256_update(&hmacsha256,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH);
- tohexstr(digest, ISC_SHA256_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- test_key++;
- }
-}
-
-/* HMAC-SHA384 test */
-ATF_TC(isc_hmacsha384);
-ATF_TC_HEAD(isc_hmacsha384, tc) {
- atf_tc_set_md_var(tc, "descr", "HMAC-SHA384 examples from RFC4634");
-}
-ATF_TC_BODY(isc_hmacsha384, tc) {
- isc_hmacsha384_t hmacsha384;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
- "0xAFD03944D84895626B0825F4AB46907F15F9DADBE4101E"
- "C682AA034C7CEBC59CFAEA9EA9076EDE7F4AF152"
- "E8B2FA9CB6",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
- "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
- "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
- "0xAF45D2E376484031617F78D2B58A6B1B9C7EF464F5A01B"
- "47E42EC3736322445E8E2240CA5E69E2C78B3239"
- "ECFAB21649",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
- "0x88062608D3E6AD8A0AA2ACE014C8A86F0AA635D947AC9F"
- "EBE83EF4E55966144B2A5AB39DC13814B94E3AB6"
- "E101A34F27",
- 1
- },
- /* Test 4 */
- {
- TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
- "0x3E8A69B7783C25851933AB6290AF6CA77A998148085000"
- "9CC5577C6E1F573B4E6801DD23C4A7D679CCF8A3"
- "86C674CFFB",
- 1
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test With Truncation"),
- "0x4C1A03424B55E07FE7F27BE1",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key - "
- "Hash Key First"),
- "0x4ECE084485813E9088D2C63A041BC5B44F9EF1012A2B58"
- "8F3CD11F05033AC4C60C2EF6AB4030FE8296248D"
- "F163F44952",
- 1
- },
- /* Test 7 */
- {
- TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
- "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
- "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
- "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
- "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
- "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
- "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
- "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
- "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
- "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
- "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
- "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
- "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
- "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
- "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
- "\x6d\x2e"),
- "0x6617178E941F020D351E2F254E8FD32C602420FEB0B8FB"
- "9ADCCEBB82461E99C5A678CC31E799176D3860E6"
- "110C46523E",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- hash_test_key_t test_keys[] = {
- /* Key 1 */
- { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
- "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
- /* Key 2 */
- { "Jefe", 4 },
- /* Key 3 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
- /* Key 4 */
- { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
- "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
- "\x15\x16\x17\x18\x19", 25 },
-#if 0
- /* Key 5 */
- { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
-#endif
- /* Key 6 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- /* Key 7 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- { "", 0 }
- };
-
- hash_test_key_t *test_key = test_keys;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- memcpy(buffer, test_key->key, test_key->len);
- isc_hmacsha384_init(&hmacsha384, buffer, test_key->len);
- isc_hmacsha384_update(&hmacsha384,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH);
- tohexstr(digest, ISC_SHA384_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- test_key++;
- }
-}
-
-/* HMAC-SHA512 test */
-ATF_TC(isc_hmacsha512);
-ATF_TC_HEAD(isc_hmacsha512, tc) {
- atf_tc_set_md_var(tc, "descr", "HMAC-SHA512 examples from RFC4634");
-}
-ATF_TC_BODY(isc_hmacsha512, tc) {
- isc_hmacsha512_t hmacsha512;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
- "0x87AA7CDEA5EF619D4FF0B4241A1D6CB02379F4E2CE4EC2"
- "787AD0B30545E17CDEDAA833B7D6B8A702038B27"
- "4EAEA3F4E4BE9D914EEB61F1702E696C203A126854",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
- "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
- "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
- "0x164B7A7BFCF819E2E395FBE73B56E0A387BD64222E831F"
- "D610270CD7EA2505549758BF75C05A994A6D034F"
- "65F8F0E6FDCAEAB1A34D4A6B4B636E070A38BCE737",
- 1
- },
- /* Test 3 */
- {
- TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
- "0xFA73B0089D56A284EFB0F0756C890BE9B1B5DBDD8EE81A"
- "3655F83E33B2279D39BF3E848279A722C806B485"
- "A47E67C807B946A337BEE8942674278859E13292FB",
- 1
- },
- /* Test 4 */
- {
- TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
- "0xB0BA465637458C6990E5A8C5F61D4AF7E576D97FF94B87"
- "2DE76F8050361EE3DBA91CA5C11AA25EB4D67927"
- "5CC5788063A5F19741120C4F2DE2ADEBEB10A298DD",
- 1
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test With Truncation"),
- "0x4C1A03424B55E07FE7F27BE1",
- 1
- },
-#endif
- /* Test 6 */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key - "
- "Hash Key First"),
- "0x80B24263C7C1A3EBB71493C1DD7BE8B49B46D1F41B4AEE"
- "C1121B013783F8F3526B56D037E05F2598BD0FD2"
- "215D6A1E5295E64F73F63F0AEC8B915A985D786598",
- 1
- },
- /* Test 7 */
- {
- TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
- "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
- "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
- "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
- "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
- "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
- "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
- "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
- "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
- "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
- "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
- "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
- "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
- "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
- "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
- "\x6d\x2e"),
- "0xE37B6A775DC87DBAA4DFA9F96E5E3FFDDEBD71F8867289"
- "865DF5A32D20CDC944B6022CAC3C4982B10D5EEB"
- "55C3E4DE15134676FB6DE0446065C97440FA8C6A58",
- 1
- },
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- hash_test_key_t test_keys[] = {
- /* Key 1 */
- { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
- "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
- /* Key 2 */
- { "Jefe", 4 },
- /* Key 3 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
- /* Key 4 */
- { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
- "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
- "\x15\x16\x17\x18\x19", 25 },
-#if 0
- /* Key 5 */
- { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
-#endif
- /* Key 6 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- /* Key 7 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- { "", 0 }
- };
-
- hash_test_key_t *test_key = test_keys;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- memcpy(buffer, test_key->key, test_key->len);
- isc_hmacsha512_init(&hmacsha512, buffer, test_key->len);
- isc_hmacsha512_update(&hmacsha512,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH);
- tohexstr(digest, ISC_SHA512_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- test_key++;
- }
-}
-
-
-/* HMAC-MD5 Test */
-ATF_TC(isc_hmacmd5);
-ATF_TC_HEAD(isc_hmacmd5, tc) {
- atf_tc_set_md_var(tc, "descr", "HMAC-MD5 examples from RFC2104");
-}
-ATF_TC_BODY(isc_hmacmd5, tc) {
- isc_hmacmd5_t hmacmd5;
-
- UNUSED(tc);
-
- /*
- * These are the various test vectors. All of these are passed
- * through the hash function and the results are compared to the
- * result specified here.
- */
- hash_testcase_t testcases[] = {
- /* Test 1 */
- {
- TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
- "0x9294727A3638BB1C13F48EF8158BFC9D",
- 1
- },
- /* Test 2 */
- {
- TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79"
- "\x61\x20\x77\x61\x6e\x74\x20\x66\x6f"
- "\x72\x20\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
- "0x750C783E6AB0B503EAA86E310A5DB738", 1
- },
- /* Test 3 */
- {
- TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
- "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
- "0x56BE34521D144C88DBB8C733F0E8B3F6",
- 1
- },
- /* Test 4 */
- {
- TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
- "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
- "0x697EAF0ACA3A3AEA3A75164746FFAA79",
- 1
- },
-#if 0
- /* Test 5 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test With Truncation"),
- "0x4C1A03424B55E07FE7F27BE1",
- 1
- },
- /* Test 6 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key - "
- "Hash Key First"),
- "0xAA4AE5E15272D00E95705637CE8A3B55ED402112",
- 1
- },
- /* Test 7 -- unimplemented optional functionality */
- {
- TEST_INPUT("Test Using Larger Than Block-Size Key and "
- "Larger Than One Block-Size Data"),
- "0xE8E99D0F45237D786D6BBAA7965C7808BBFF1A91",
- 1
- },
-#endif
- { NULL, 0, NULL, 1 }
- };
-
- hash_testcase_t *testcase = testcases;
-
- hash_test_key_t test_keys[] = {
- /* Key 1 */
- { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
- "\x0b\x0b\x0b\x0b\x0b\x0b", 16 },
- /* Key 2 */
- { "Jefe", 4 },
- /* Key 3 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa", 16 },
- /* Key 4 */
- { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
- "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
- "\x15\x16\x17\x18\x19", 25 },
-#if 0
- /* Key 5 */
- { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
- /* Key 6 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
- /* Key 7 */
- { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
- "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
-#endif
- { "", 0 }
- };
-
- hash_test_key_t *test_key = test_keys;
-
- while (testcase->input != NULL && testcase->result != NULL) {
- memcpy(buffer, test_key->key, test_key->len);
- isc_hmacmd5_init(&hmacmd5, buffer, test_key->len);
- isc_hmacmd5_update(&hmacmd5,
- (const isc_uint8_t *) testcase->input,
- testcase->input_len);
- isc_hmacmd5_sign(&hmacmd5, digest);
- tohexstr(digest, ISC_MD5_DIGESTLENGTH, str);
- ATF_CHECK_STREQ(str, testcase->result);
-
- testcase++;
- test_key++;
- }
-}
-
-/*
- * Main
- */
-ATF_TP_ADD_TCS(tp) {
- ATF_TP_ADD_TC(tp, isc_hmacmd5);
- ATF_TP_ADD_TC(tp, isc_hmacsha1);
- ATF_TP_ADD_TC(tp, isc_hmacsha224);
- ATF_TP_ADD_TC(tp, isc_hmacsha256);
- ATF_TP_ADD_TC(tp, isc_hmacsha384);
- ATF_TP_ADD_TC(tp, isc_hmacsha512);
- ATF_TP_ADD_TC(tp, isc_md5);
- ATF_TP_ADD_TC(tp, isc_sha1);
- ATF_TP_ADD_TC(tp, isc_sha224);
- ATF_TP_ADD_TC(tp, isc_sha256);
- ATF_TP_ADD_TC(tp, isc_sha384);
- ATF_TP_ADD_TC(tp, isc_sha512);
- return (atf_no_error());
-}
-
diff --git a/contrib/ntp/lib/isc/tests/isctest.c b/contrib/ntp/lib/isc/tests/isctest.c
deleted file mode 100644
index e118bbf2ad9e..000000000000
--- a/contrib/ntp/lib/isc/tests/isctest.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <time.h>
-
-#include <isc/app.h>
-#include <isc/buffer.h>
-#include <isc/entropy.h>
-#include <isc/hash.h>
-#include <isc/mem.h>
-#include <isc/os.h>
-#include <isc/socket.h>
-#include <isc/string.h>
-#include <isc/task.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-#include "isctest.h"
-
-isc_mem_t *mctx = NULL;
-isc_entropy_t *ectx = NULL;
-isc_log_t *lctx = NULL;
-isc_taskmgr_t *taskmgr = NULL;
-isc_timermgr_t *timermgr = NULL;
-isc_socketmgr_t *socketmgr = NULL;
-int ncpus;
-
-static isc_boolean_t hash_active = ISC_FALSE;
-
-/*
- * Logging categories: this needs to match the list in bin/named/log.c.
- */
-static isc_logcategory_t categories[] = {
- { "", 0 },
- { "client", 0 },
- { "network", 0 },
- { "update", 0 },
- { "queries", 0 },
- { "unmatched", 0 },
- { "update-security", 0 },
- { "query-errors", 0 },
- { NULL, 0 }
-};
-
-static void
-cleanup_managers() {
- if (socketmgr != NULL)
- isc_socketmgr_destroy(&socketmgr);
- if (taskmgr != NULL)
- isc_taskmgr_destroy(&taskmgr);
- if (timermgr != NULL)
- isc_timermgr_destroy(&timermgr);
-}
-
-static isc_result_t
-create_managers() {
- isc_result_t result;
-#ifdef ISC_PLATFORM_USETHREADS
- ncpus = isc_os_ncpus();
-#else
- ncpus = 1;
-#endif
-
- CHECK(isc_taskmgr_create(mctx, ncpus, 0, &taskmgr));
- CHECK(isc_timermgr_create(mctx, &timermgr));
- CHECK(isc_socketmgr_create(mctx, &socketmgr));
- return (ISC_R_SUCCESS);
-
- cleanup:
- cleanup_managers();
- return (result);
-}
-
-isc_result_t
-isc_test_begin(FILE *logfile, isc_boolean_t start_managers) {
- isc_result_t result;
-
- isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
- CHECK(isc_mem_create(0, 0, &mctx));
- CHECK(isc_entropy_create(mctx, &ectx));
-
- CHECK(isc_hash_create(mctx, ectx, 255));
- hash_active = ISC_TRUE;
-
- if (logfile != NULL) {
- isc_logdestination_t destination;
- isc_logconfig_t *logconfig = NULL;
-
- CHECK(isc_log_create(mctx, &lctx, &logconfig));
- isc_log_registercategories(lctx, categories);
- isc_log_setcontext(lctx);
-
- destination.file.stream = logfile;
- destination.file.name = NULL;
- destination.file.versions = ISC_LOG_ROLLNEVER;
- destination.file.maximum_size = 0;
- CHECK(isc_log_createchannel(logconfig, "stderr",
- ISC_LOG_TOFILEDESC,
- ISC_LOG_DYNAMIC,
- &destination, 0));
- CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL));
- }
-
-#ifdef ISC_PLATFORM_USETHREADS
- ncpus = isc_os_ncpus();
-#else
- ncpus = 1;
-#endif
-
- if (start_managers)
- CHECK(create_managers());
-
- return (ISC_R_SUCCESS);
-
- cleanup:
- isc_test_end();
- return (result);
-}
-
-void
-isc_test_end() {
- if (taskmgr != NULL)
- isc_taskmgr_destroy(&taskmgr);
- if (lctx != NULL)
- isc_log_destroy(&lctx);
- if (hash_active) {
- isc_hash_destroy();
- hash_active = ISC_FALSE;
- }
- if (ectx != NULL)
- isc_entropy_detach(&ectx);
-
- cleanup_managers();
-
- if (mctx != NULL)
- isc_mem_destroy(&mctx);
-}
-
-/*
- * Sleep for 'usec' microseconds.
- */
-void
-isc_test_nap(isc_uint32_t usec) {
-#ifdef HAVE_NANOSLEEP
- struct timespec ts;
-
- ts.tv_sec = usec / 1000000;
- ts.tv_nsec = (usec % 1000000) * 1000;
- nanosleep(&ts, NULL);
-#elif HAVE_USLEEP
- usleep(usec);
-#else
- /*
- * No fractional-second sleep function is available, so we
- * round up to the nearest second and sleep instead
- */
- sleep((usec / 1000000) + 1);
-#endif
-}
diff --git a/contrib/ntp/lib/isc/tests/isctest.h b/contrib/ntp/lib/isc/tests/isctest.h
deleted file mode 100644
index 03423c807bb7..000000000000
--- a/contrib/ntp/lib/isc/tests/isctest.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/buffer.h>
-#include <isc/entropy.h>
-#include <isc/hash.h>
-#include <isc/log.h>
-#include <isc/mem.h>
-#include <isc/print.h>
-#include <isc/result.h>
-#include <isc/string.h>
-#include <isc/task.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-#define CHECK(r) \
- do { \
- result = (r); \
- if (result != ISC_R_SUCCESS) \
- goto cleanup; \
- } while (0)
-
-extern isc_mem_t *mctx;
-extern isc_entropy_t *ectx;
-extern isc_log_t *lctx;
-extern isc_taskmgr_t *taskmgr;
-isc_timermgr_t *timermgr;
-isc_socketmgr_t *socketmgr;
-extern int ncpus;
-
-isc_result_t
-isc_test_begin(FILE *logfile, isc_boolean_t start_managers);
-
-void
-isc_test_end(void);
-
-void
-isc_test_nap(isc_uint32_t usec);
diff --git a/contrib/ntp/lib/isc/tests/queue_test.c b/contrib/ntp/lib/isc/tests/queue_test.c
deleted file mode 100644
index 74620fef42aa..000000000000
--- a/contrib/ntp/lib/isc/tests/queue_test.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <atf-c.h>
-
-#include <unistd.h>
-#include <time.h>
-
-#include <isc/queue.h>
-
-#include "isctest.h"
-
-typedef struct item {
- int value;
- ISC_QLINK(item_t) qlink;
-} item_t;
-
-typedef ISC_QUEUE(item_t) item_queue_t;
-
-static void
-item_init(item_t *item, int value) {
- item->value = value;
- ISC_QLINK_INIT(item, qlink);
-}
-
-/*
- * Individual unit tests
- */
-
-/* Test UDP sendto/recv (IPv4) */
-ATF_TC(queue_valid);
-ATF_TC_HEAD(queue_valid, tc) {
- atf_tc_set_md_var(tc, "descr", "Check queue validity");
-}
-ATF_TC_BODY(queue_valid, tc) {
- isc_result_t result;
- item_queue_t queue;
- item_t one, two, three, four, five;
- item_t *p;
-
- UNUSED(tc);
-
- ISC_QUEUE_INIT(queue, qlink);
-
- item_init(&one, 1);
- item_init(&two, 2);
- item_init(&three, 3);
- item_init(&four, 4);
- item_init(&five, 5);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- ATF_CHECK(ISC_QUEUE_EMPTY(queue));
-
- ISC_QUEUE_POP(queue, qlink, p);
- ATF_CHECK(p == NULL);
-
- ATF_CHECK(! ISC_QLINK_LINKED(&one, qlink));
- ISC_QUEUE_PUSH(queue, &one, qlink);
- ATF_CHECK(ISC_QLINK_LINKED(&one, qlink));
-
- ATF_CHECK(! ISC_QUEUE_EMPTY(queue));
-
- ISC_QUEUE_POP(queue, qlink, p);
- ATF_REQUIRE(p != NULL);
- ATF_CHECK_EQ(p->value, 1);
- ATF_CHECK(ISC_QUEUE_EMPTY(queue));
- ATF_CHECK(! ISC_QLINK_LINKED(p, qlink));
-
- ISC_QUEUE_PUSH(queue, p, qlink);
- ATF_CHECK(! ISC_QUEUE_EMPTY(queue));
- ATF_CHECK(ISC_QLINK_LINKED(p, qlink));
-
- ATF_CHECK(! ISC_QLINK_LINKED(&two, qlink));
- ISC_QUEUE_PUSH(queue, &two, qlink);
- ATF_CHECK(ISC_QLINK_LINKED(&two, qlink));
-
- ATF_CHECK(! ISC_QLINK_LINKED(&three, qlink));
- ISC_QUEUE_PUSH(queue, &three, qlink);
- ATF_CHECK(ISC_QLINK_LINKED(&three, qlink));
-
- ATF_CHECK(! ISC_QLINK_LINKED(&four, qlink));
- ISC_QUEUE_PUSH(queue, &four, qlink);
- ATF_CHECK(ISC_QLINK_LINKED(&four, qlink));
-
- ATF_CHECK(! ISC_QLINK_LINKED(&five, qlink));
- ISC_QUEUE_PUSH(queue, &five, qlink);
- ATF_CHECK(ISC_QLINK_LINKED(&five, qlink));
-
- ISC_QUEUE_POP(queue, qlink, p);
- ATF_REQUIRE(p != NULL);
- ATF_CHECK_EQ(p->value, 1);
-
- ISC_QUEUE_POP(queue, qlink, p);
- ATF_REQUIRE(p != NULL);
- ATF_CHECK_EQ(p->value, 2);
-
- ISC_QUEUE_POP(queue, qlink, p);
- ATF_REQUIRE(p != NULL);
- ATF_CHECK_EQ(p->value, 3);
-
- ISC_QUEUE_POP(queue, qlink, p);
- ATF_REQUIRE(p != NULL);
- ATF_CHECK_EQ(p->value, 4);
-
- ISC_QUEUE_POP(queue, qlink, p);
- ATF_REQUIRE(p != NULL);
- ATF_CHECK_EQ(p->value, 5);
-
- ATF_CHECK(ISC_QUEUE_EMPTY(queue));
-
- ISC_QUEUE_DESTROY(queue);
- isc_test_end();
-}
-
-/*
- * Main
- */
-ATF_TP_ADD_TCS(tp) {
- ATF_TP_ADD_TC(tp, queue_valid);
-
- return (atf_no_error());
-}
-
diff --git a/contrib/ntp/lib/isc/tests/socket_test.c b/contrib/ntp/lib/isc/tests/socket_test.c
deleted file mode 100644
index 724d79df2bd1..000000000000
--- a/contrib/ntp/lib/isc/tests/socket_test.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <atf-c.h>
-
-#include <unistd.h>
-#include <time.h>
-
-#include <isc/socket.h>
-
-#include "../task_p.h"
-#include "isctest.h"
-
-/*
- * Helper functions
- */
-typedef struct {
- isc_boolean_t done;
- isc_result_t result;
-} completion_t;
-
-static void
-completion_init(completion_t *completion) {
- completion->done = ISC_FALSE;
-}
-
-static void
-event_done(isc_task_t *task, isc_event_t *event) {
- isc_socketevent_t *dev;
- completion_t *completion = event->ev_arg;
-
- UNUSED(task);
-
- dev = (isc_socketevent_t *) event;
- completion->result = dev->result;
- completion->done = ISC_TRUE;
- isc_event_free(&event);
-}
-
-static isc_result_t
-waitfor(completion_t *completion) {
- int i = 0;
- while (!completion->done && i++ < 5000) {
-#ifndef ISC_PLATFORM_USETHREADS
- while (isc__taskmgr_ready(taskmgr))
- isc__taskmgr_dispatch(taskmgr);
-#endif
- isc_test_nap(1000);
- }
- if (completion->done)
- return (ISC_R_SUCCESS);
- return (ISC_R_FAILURE);
-}
-
-/*
- * Individual unit tests
- */
-
-/* Test UDP sendto/recv (IPv4) */
-ATF_TC(udp_sendto);
-ATF_TC_HEAD(udp_sendto, tc) {
- atf_tc_set_md_var(tc, "descr", "UDP sendto/recv");
-}
-ATF_TC_BODY(udp_sendto, tc) {
- isc_result_t result;
- isc_sockaddr_t addr1, addr2;
- struct in_addr in;
- isc_socket_t *s1 = NULL, *s2 = NULL;
- isc_task_t *task = NULL;
- char sendbuf[BUFSIZ], recvbuf[BUFSIZ];
- completion_t completion;
- isc_region_t r;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- /*
- * Create two sockets: 127.0.0.1/5444 and 127.0.0.1/5445, talking to
- * each other.
- */
- in.s_addr = inet_addr("127.0.0.1");
- isc_sockaddr_fromin(&addr1, &in, 5444);
- isc_sockaddr_fromin(&addr2, &in, 5445);
-
- result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s1);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- result = isc_socket_bind(s1, &addr1, ISC_SOCKET_REUSEADDRESS);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s2);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- result = isc_socket_bind(s2, &addr2, ISC_SOCKET_REUSEADDRESS);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_task_create(taskmgr, 0, &task);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- strcpy(sendbuf, "Hello");
- r.base = (void *) sendbuf;
- r.length = strlen(sendbuf) + 1;
-
- completion_init(&completion);
- result = isc_socket_sendto(s1, &r, task, event_done, &completion,
- &addr2, NULL);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- waitfor(&completion);
- ATF_CHECK(completion.done);
- ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
-
- r.base = (void *) recvbuf;
- r.length = BUFSIZ;
- completion_init(&completion);
- result = isc_socket_recv(s2, &r, 1, task, event_done, &completion);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- waitfor(&completion);
- ATF_CHECK(completion.done);
- ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
- ATF_CHECK_STREQ(recvbuf, "Hello");
-
- isc_task_detach(&task);
-
- isc_socket_detach(&s1);
- isc_socket_detach(&s2);
-
- isc_test_end();
-}
-
-/* Test UDP sendto/recv with duplicated socket */
-ATF_TC(udp_dup);
-ATF_TC_HEAD(udp_dup, tc) {
- atf_tc_set_md_var(tc, "descr", "duplicated socket sendto/recv");
-}
-ATF_TC_BODY(udp_dup, tc) {
- isc_result_t result;
- isc_sockaddr_t addr1, addr2;
- struct in_addr in;
- isc_socket_t *s1 = NULL, *s2 = NULL, *s3 = NULL;
- isc_task_t *task = NULL;
- char sendbuf[BUFSIZ], recvbuf[BUFSIZ];
- completion_t completion;
- isc_region_t r;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- /*
- * Create two sockets: 127.0.0.1/5444 and 127.0.0.1/5445, talking to
- * each other.
- */
- in.s_addr = inet_addr("127.0.0.1");
- isc_sockaddr_fromin(&addr1, &in, 5444);
- isc_sockaddr_fromin(&addr2, &in, 5445);
-
- result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s1);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- result = isc_socket_bind(s1, &addr1, ISC_SOCKET_REUSEADDRESS);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s2);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- result = isc_socket_bind(s2, &addr2, ISC_SOCKET_REUSEADDRESS);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_socket_dup(s2, &s3);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_task_create(taskmgr, 0, &task);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- strcpy(sendbuf, "Hello");
- r.base = (void *) sendbuf;
- r.length = strlen(sendbuf) + 1;
-
- completion_init(&completion);
- result = isc_socket_sendto(s1, &r, task, event_done, &completion,
- &addr2, NULL);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- waitfor(&completion);
- ATF_CHECK(completion.done);
- ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
-
- strcpy(sendbuf, "World");
- r.base = (void *) sendbuf;
- r.length = strlen(sendbuf) + 1;
-
- completion_init(&completion);
- result = isc_socket_sendto(s1, &r, task, event_done, &completion,
- &addr2, NULL);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- waitfor(&completion);
- ATF_CHECK(completion.done);
- ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
-
- r.base = (void *) recvbuf;
- r.length = BUFSIZ;
- completion_init(&completion);
- result = isc_socket_recv(s2, &r, 1, task, event_done, &completion);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- waitfor(&completion);
- ATF_CHECK(completion.done);
- ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
- ATF_CHECK_STREQ(recvbuf, "Hello");
-
- r.base = (void *) recvbuf;
- r.length = BUFSIZ;
- completion_init(&completion);
- result = isc_socket_recv(s3, &r, 1, task, event_done, &completion);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- waitfor(&completion);
- ATF_CHECK(completion.done);
- ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
- ATF_CHECK_STREQ(recvbuf, "World");
-
- isc_task_detach(&task);
-
- isc_socket_detach(&s1);
- isc_socket_detach(&s2);
- isc_socket_detach(&s3);
-
- isc_test_end();
-}
-
-/*
- * Main
- */
-ATF_TP_ADD_TCS(tp) {
- ATF_TP_ADD_TC(tp, udp_sendto);
- ATF_TP_ADD_TC(tp, udp_dup);
-
- return (atf_no_error());
-}
-
diff --git a/contrib/ntp/lib/isc/tests/symtab_test.c b/contrib/ntp/lib/isc/tests/symtab_test.c
deleted file mode 100644
index 21444b4c48ec..000000000000
--- a/contrib/ntp/lib/isc/tests/symtab_test.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <atf-c.h>
-
-#include <unistd.h>
-
-#include <isc/symtab.h>
-#include <isc/print.h>
-
-#include "isctest.h"
-
-static void
-undefine(char *key, unsigned int type, isc_symvalue_t value, void *arg) {
- UNUSED(arg);
-
- ATF_REQUIRE_EQ(type, 1);
- isc_mem_free(mctx, key);
- isc_mem_free(mctx, value.as_pointer);
-}
-
-/*
- * Individual unit tests
- */
-
-ATF_TC(symtab_grow);
-ATF_TC_HEAD(symtab_grow, tc) {
- atf_tc_set_md_var(tc, "descr", "symbol table growth");
-}
-ATF_TC_BODY(symtab_grow, tc) {
- isc_result_t result;
- isc_symtab_t *st = NULL;
- isc_symvalue_t value;
- isc_symexists_t policy = isc_symexists_reject;
- int i;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_symtab_create(mctx, 3, undefine, NULL, ISC_FALSE, &st);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE(st != NULL);
-
- /* Nothing should be in the table yet */
-
- /*
- * Put 1024 entries in the table (this should necessate
- * regrowing the hash table several times
- */
- for (i = 0; i < 1024; i++) {
- char str[16], *key;
-
- snprintf(str, sizeof(str), "%04x", i);
- key = isc_mem_strdup(mctx, str);
- ATF_REQUIRE(key != NULL);
- value.as_pointer = isc_mem_strdup(mctx, str);
- ATF_REQUIRE(value.as_pointer != NULL);
- result = isc_symtab_define(st, key, 1, value, policy);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- if (result != ISC_R_SUCCESS)
- undefine(key, 1, value, NULL);
- }
-
- /*
- * Try to put them in again; this should fail
- */
- for (i = 0; i < 1024; i++) {
- char str[16], *key;
-
- snprintf(str, sizeof(str), "%04x", i);
- key = isc_mem_strdup(mctx, str);
- ATF_REQUIRE(key != NULL);
- value.as_pointer = isc_mem_strdup(mctx, str);
- ATF_REQUIRE(value.as_pointer != NULL);
- result = isc_symtab_define(st, key, 1, value, policy);
- ATF_CHECK_EQ(result, ISC_R_EXISTS);
- undefine(key, 1, value, NULL);
- }
-
- /*
- * Retrieve them; this should succeed
- */
- for (i = 0; i < 1024; i++) {
- char str[16];
-
- snprintf(str, sizeof(str), "%04x", i);
- result = isc_symtab_lookup(st, str, 0, &value);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- ATF_CHECK_STREQ(str, value.as_pointer);
- }
-
- /*
- * Undefine them
- */
- for (i = 0; i < 1024; i++) {
- char str[16];
-
- snprintf(str, sizeof(str), "%04x", i);
- result = isc_symtab_undefine(st, str, 1);
- ATF_CHECK_EQ(result, ISC_R_SUCCESS);
- }
-
- /*
- * Retrieve them again; this should fail
- */
- for (i = 0; i < 1024; i++) {
- char str[16];
-
- snprintf(str, sizeof(str), "%04x", i);
- result = isc_symtab_lookup(st, str, 0, &value);
- ATF_CHECK_EQ(result, ISC_R_NOTFOUND);
- }
-
- isc_symtab_destroy(&st);
- isc_test_end();
-}
-
-/*
- * Main
- */
-ATF_TP_ADD_TCS(tp) {
- ATF_TP_ADD_TC(tp, symtab_grow);
-
- return (atf_no_error());
-}
-
diff --git a/contrib/ntp/lib/isc/tests/task_test.c b/contrib/ntp/lib/isc/tests/task_test.c
deleted file mode 100644
index 7294d861d38a..000000000000
--- a/contrib/ntp/lib/isc/tests/task_test.c
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <atf-c.h>
-
-#include <unistd.h>
-
-#include <isc/task.h>
-#include <isc/util.h>
-
-#include "../task_p.h"
-#include "isctest.h"
-
-/*
- * Helper functions
- */
-
-/* task event handler, sets a boolean to true */
-int counter = 0;
-isc_mutex_t set_lock;
-
-static void
-set(isc_task_t *task, isc_event_t *event) {
- int *value = (int *) event->ev_arg;
-
- UNUSED(task);
-
- isc_event_free(&event);
- LOCK(&set_lock);
- *value = counter++;
- UNLOCK(&set_lock);
-}
-
-static void
-set_and_drop(isc_task_t *task, isc_event_t *event) {
- int *value = (int *) event->ev_arg;
-
- UNUSED(task);
-
- isc_event_free(&event);
- LOCK(&set_lock);
- *value = (int) isc_taskmgr_mode(taskmgr);
- counter++;
- UNLOCK(&set_lock);
- isc_taskmgr_setmode(taskmgr, isc_taskmgrmode_normal);
-}
-
-/*
- * Individual unit tests
- */
-
-/* Create a task */
-ATF_TC(create_task);
-ATF_TC_HEAD(create_task, tc) {
- atf_tc_set_md_var(tc, "descr", "create and destroy a task");
-}
-ATF_TC_BODY(create_task, tc) {
- isc_result_t result;
- isc_task_t *task = NULL;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_task_create(taskmgr, 0, &task);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- isc_task_destroy(&task);
- ATF_REQUIRE_EQ(task, NULL);
-
- isc_test_end();
-}
-
-/* Process events */
-ATF_TC(all_events);
-ATF_TC_HEAD(all_events, tc) {
- atf_tc_set_md_var(tc, "descr", "process task events");
-}
-ATF_TC_BODY(all_events, tc) {
- isc_result_t result;
- isc_task_t *task = NULL;
- isc_event_t *event;
- int a = 0, b = 0;
- int i = 0;
-
- UNUSED(tc);
-
- counter = 1;
-
- result = isc_mutex_init(&set_lock);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_task_create(taskmgr, 0, &task);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- /* First event */
- event = isc_event_allocate(mctx, task, ISC_TASKEVENT_TEST,
- set, &a, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(a, 0);
- isc_task_send(task, &event);
-
- event = isc_event_allocate(mctx, task, ISC_TASKEVENT_TEST,
- set, &b, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(b, 0);
- isc_task_send(task, &event);
-
- while ((a == 0 || b == 0) && i++ < 5000) {
-#ifndef ISC_PLATFORM_USETHREADS
- while (isc__taskmgr_ready(taskmgr))
- isc__taskmgr_dispatch(taskmgr);
-#endif
- isc_test_nap(1000);
- }
-
- ATF_CHECK(a != 0);
- ATF_CHECK(b != 0);
-
- isc_task_destroy(&task);
- ATF_REQUIRE_EQ(task, NULL);
-
- isc_test_end();
-}
-
-/* Privileged events */
-ATF_TC(privileged_events);
-ATF_TC_HEAD(privileged_events, tc) {
- atf_tc_set_md_var(tc, "descr", "process privileged events");
-}
-ATF_TC_BODY(privileged_events, tc) {
- isc_result_t result;
- isc_task_t *task1 = NULL, *task2 = NULL;
- isc_event_t *event;
- int a = 0, b = 0, c = 0, d = 0, e = 0;
- int i = 0;
-
- UNUSED(tc);
-
- counter = 1;
- result = isc_mutex_init(&set_lock);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
-#ifdef ISC_PLATFORM_USETHREADS
- /*
- * Pause the task manager so we can fill up the work queue
- * without things happening while we do it.
- */
- isc__taskmgr_pause(taskmgr);
-#endif
-
- result = isc_task_create(taskmgr, 0, &task1);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- isc_task_setname(task1, "privileged", NULL);
- ATF_CHECK(!isc_task_privilege(task1));
- isc_task_setprivilege(task1, ISC_TRUE);
- ATF_CHECK(isc_task_privilege(task1));
-
- result = isc_task_create(taskmgr, 0, &task2);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- isc_task_setname(task2, "normal", NULL);
- ATF_CHECK(!isc_task_privilege(task2));
-
- /* First event: privileged */
- event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
- set, &a, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(a, 0);
- isc_task_send(task1, &event);
-
- /* Second event: not privileged */
- event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
- set, &b, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(b, 0);
- isc_task_send(task2, &event);
-
- /* Third event: privileged */
- event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
- set, &c, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(c, 0);
- isc_task_send(task1, &event);
-
- /* Fourth event: privileged */
- event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
- set, &d, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(d, 0);
- isc_task_send(task1, &event);
-
- /* Fifth event: not privileged */
- event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
- set, &e, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(e, 0);
- isc_task_send(task2, &event);
-
- ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
- isc_taskmgr_setmode(taskmgr, isc_taskmgrmode_privileged);
- ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_privileged);
-
-#ifdef ISC_PLATFORM_USETHREADS
- isc__taskmgr_resume(taskmgr);
-#endif
-
- /* We're waiting for *all* variables to be set */
- while ((a == 0 || b == 0 || c == 0 || d == 0 || e == 0) && i++ < 5000) {
-#ifndef ISC_PLATFORM_USETHREADS
- while (isc__taskmgr_ready(taskmgr))
- isc__taskmgr_dispatch(taskmgr);
-#endif
- isc_test_nap(1000);
- }
-
- /*
- * We can't guarantee what order the events fire, but
- * we do know the privileged tasks that set a, c, and d
- * would have fired first.
- */
- ATF_CHECK(a <= 3);
- ATF_CHECK(c <= 3);
- ATF_CHECK(d <= 3);
-
- /* ...and the non-privileged tasks that set b and e, last */
- ATF_CHECK(b >= 4);
- ATF_CHECK(e >= 4);
-
- ATF_CHECK_EQ(counter, 6);
-
- isc_task_setprivilege(task1, ISC_FALSE);
- ATF_CHECK(!isc_task_privilege(task1));
-
- ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
-
- isc_task_destroy(&task1);
- ATF_REQUIRE_EQ(task1, NULL);
- isc_task_destroy(&task2);
- ATF_REQUIRE_EQ(task2, NULL);
-
- isc_test_end();
-}
-
-/*
- * Edge case: this tests that the task manager behaves as expected when
- * we explicitly set it into normal mode *while* running privileged.
- */
-ATF_TC(privilege_drop);
-ATF_TC_HEAD(privilege_drop, tc) {
- atf_tc_set_md_var(tc, "descr", "process privileged events");
-}
-ATF_TC_BODY(privilege_drop, tc) {
- isc_result_t result;
- isc_task_t *task1 = NULL, *task2 = NULL;
- isc_event_t *event;
- int a = -1, b = -1, c = -1, d = -1, e = -1; /* non valid states */
- int i = 0;
-
- UNUSED(tc);
-
- counter = 1;
- result = isc_mutex_init(&set_lock);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
-#ifdef ISC_PLATFORM_USETHREADS
- /*
- * Pause the task manager so we can fill up the work queue
- * without things happening while we do it.
- */
- isc__taskmgr_pause(taskmgr);
-#endif
-
- result = isc_task_create(taskmgr, 0, &task1);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- isc_task_setname(task1, "privileged", NULL);
- ATF_CHECK(!isc_task_privilege(task1));
- isc_task_setprivilege(task1, ISC_TRUE);
- ATF_CHECK(isc_task_privilege(task1));
-
- result = isc_task_create(taskmgr, 0, &task2);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- isc_task_setname(task2, "normal", NULL);
- ATF_CHECK(!isc_task_privilege(task2));
-
- /* First event: privileged */
- event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
- set_and_drop, &a, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(a, -1);
- isc_task_send(task1, &event);
-
- /* Second event: not privileged */
- event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
- set_and_drop, &b, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(b, -1);
- isc_task_send(task2, &event);
-
- /* Third event: privileged */
- event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
- set_and_drop, &c, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(c, -1);
- isc_task_send(task1, &event);
-
- /* Fourth event: privileged */
- event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
- set_and_drop, &d, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(d, -1);
- isc_task_send(task1, &event);
-
- /* Fifth event: not privileged */
- event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
- set_and_drop, &e, sizeof (isc_event_t));
- ATF_REQUIRE(event != NULL);
-
- ATF_CHECK_EQ(e, -1);
- isc_task_send(task2, &event);
-
- ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
- isc_taskmgr_setmode(taskmgr, isc_taskmgrmode_privileged);
- ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_privileged);
-
-#ifdef ISC_PLATFORM_USETHREADS
- isc__taskmgr_resume(taskmgr);
-#endif
-
- /* We're waiting for all variables to be set. */
- while ((a == -1 || b == -1 || c == -1 || d == -1 || e == -1) &&
- i++ < 5000) {
-#ifndef ISC_PLATFORM_USETHREADS
- while (isc__taskmgr_ready(taskmgr))
- isc__taskmgr_dispatch(taskmgr);
-#endif
- isc_test_nap(1000);
- }
-
- /*
- * We can't guarantee what order the events fire, but
- * we do know *exactly one* of the privileged tasks will
- * have run in privileged mode...
- */
- ATF_CHECK(a == isc_taskmgrmode_privileged ||
- c == isc_taskmgrmode_privileged ||
- d == isc_taskmgrmode_privileged);
- ATF_CHECK(a + c + d == isc_taskmgrmode_privileged);
-
- /* ...and neither of the non-privileged tasks did... */
- ATF_CHECK(b == isc_taskmgrmode_normal || e == isc_taskmgrmode_normal);
-
- /* ...but all five of them did run. */
- ATF_CHECK_EQ(counter, 6);
-
- ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
-
- isc_task_destroy(&task1);
- ATF_REQUIRE_EQ(task1, NULL);
- isc_task_destroy(&task2);
- ATF_REQUIRE_EQ(task2, NULL);
-
- isc_test_end();
-}
-
-/*
- * Main
- */
-ATF_TP_ADD_TCS(tp) {
- ATF_TP_ADD_TC(tp, create_task);
- ATF_TP_ADD_TC(tp, all_events);
- ATF_TP_ADD_TC(tp, privileged_events);
- ATF_TP_ADD_TC(tp, privilege_drop);
-
- return (atf_no_error());
-}
-
diff --git a/contrib/ntp/lib/isc/tests/taskpool_test.c b/contrib/ntp/lib/isc/tests/taskpool_test.c
deleted file mode 100644
index aecb694f2f3f..000000000000
--- a/contrib/ntp/lib/isc/tests/taskpool_test.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <atf-c.h>
-
-#include <unistd.h>
-
-#include <isc/task.h>
-#include <isc/taskpool.h>
-
-#include "isctest.h"
-
-/*
- * Individual unit tests
- */
-
-/* Create a taskpool */
-ATF_TC(create_pool);
-ATF_TC_HEAD(create_pool, tc) {
- atf_tc_set_md_var(tc, "descr", "create a taskpool");
-}
-ATF_TC_BODY(create_pool, tc) {
- isc_result_t result;
- isc_taskpool_t *pool = NULL;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_taskpool_create(taskmgr, mctx, 8, 2, &pool);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE_EQ(isc_taskpool_size(pool), 8);
-
- isc_taskpool_destroy(&pool);
- ATF_REQUIRE_EQ(pool, NULL);
-
- isc_test_end();
-}
-
-/* Resize a taskpool */
-ATF_TC(expand_pool);
-ATF_TC_HEAD(expand_pool, tc) {
- atf_tc_set_md_var(tc, "descr", "expand a taskpool");
-}
-ATF_TC_BODY(expand_pool, tc) {
- isc_result_t result;
- isc_taskpool_t *pool1 = NULL, *pool2 = NULL, *hold = NULL;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_taskpool_create(taskmgr, mctx, 10, 2, &pool1);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE_EQ(isc_taskpool_size(pool1), 10);
-
- /* resizing to a smaller size should have no effect */
- hold = pool1;
- result = isc_taskpool_expand(&pool1, 5, &pool2);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE_EQ(isc_taskpool_size(pool2), 10);
- ATF_REQUIRE_EQ(pool2, hold);
- ATF_REQUIRE_EQ(pool1, NULL);
- pool1 = pool2;
- pool2 = NULL;
-
- /* resizing to the same size should have no effect */
- hold = pool1;
- result = isc_taskpool_expand(&pool1, 10, &pool2);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE_EQ(isc_taskpool_size(pool2), 10);
- ATF_REQUIRE_EQ(pool2, hold);
- ATF_REQUIRE_EQ(pool1, NULL);
- pool1 = pool2;
- pool2 = NULL;
-
- /* resizing to larger size should make a new pool */
- hold = pool1;
- result = isc_taskpool_expand(&pool1, 20, &pool2);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE_EQ(isc_taskpool_size(pool2), 20);
- ATF_REQUIRE(pool2 != hold);
- ATF_REQUIRE_EQ(pool1, NULL);
-
- isc_taskpool_destroy(&pool2);
- ATF_REQUIRE_EQ(pool2, NULL);
-
- isc_test_end();
-}
-
-/* Get tasks */
-ATF_TC(get_tasks);
-ATF_TC_HEAD(get_tasks, tc) {
- atf_tc_set_md_var(tc, "descr", "create a taskpool");
-}
-ATF_TC_BODY(get_tasks, tc) {
- isc_result_t result;
- isc_taskpool_t *pool = NULL;
- isc_task_t *task1 = NULL, *task2 = NULL, *task3 = NULL;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_taskpool_create(taskmgr, mctx, 2, 2, &pool);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE_EQ(isc_taskpool_size(pool), 2);
-
- /* two tasks in pool; make sure we can access them more than twice */
- isc_taskpool_gettask(pool, &task1);
- ATF_REQUIRE(ISCAPI_TASK_VALID(task1));
-
- isc_taskpool_gettask(pool, &task2);
- ATF_REQUIRE(ISCAPI_TASK_VALID(task2));
-
- isc_taskpool_gettask(pool, &task3);
- ATF_REQUIRE(ISCAPI_TASK_VALID(task3));
-
- isc_task_destroy(&task1);
- isc_task_destroy(&task2);
- isc_task_destroy(&task3);
-
- isc_taskpool_destroy(&pool);
- ATF_REQUIRE_EQ(pool, NULL);
-
- isc_test_end();
-}
-
-/* Get tasks */
-ATF_TC(set_privilege);
-ATF_TC_HEAD(set_privilege, tc) {
- atf_tc_set_md_var(tc, "descr", "create a taskpool");
-}
-ATF_TC_BODY(set_privilege, tc) {
- isc_result_t result;
- isc_taskpool_t *pool = NULL;
- isc_task_t *task1 = NULL, *task2 = NULL, *task3 = NULL;
-
- UNUSED(tc);
-
- result = isc_test_begin(NULL, ISC_TRUE);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
- result = isc_taskpool_create(taskmgr, mctx, 2, 2, &pool);
- ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
- ATF_REQUIRE_EQ(isc_taskpool_size(pool), 2);
-
- isc_taskpool_setprivilege(pool, ISC_TRUE);
-
- isc_taskpool_gettask(pool, &task1);
- isc_taskpool_gettask(pool, &task2);
- isc_taskpool_gettask(pool, &task3);
-
- ATF_CHECK(ISCAPI_TASK_VALID(task1));
- ATF_CHECK(ISCAPI_TASK_VALID(task2));
- ATF_CHECK(ISCAPI_TASK_VALID(task3));
-
- ATF_CHECK(isc_task_privilege(task1));
- ATF_CHECK(isc_task_privilege(task2));
- ATF_CHECK(isc_task_privilege(task3));
-
- isc_taskpool_setprivilege(pool, ISC_FALSE);
-
- ATF_CHECK(!isc_task_privilege(task1));
- ATF_CHECK(!isc_task_privilege(task2));
- ATF_CHECK(!isc_task_privilege(task3));
-
- isc_task_destroy(&task1);
- isc_task_destroy(&task2);
- isc_task_destroy(&task3);
-
- isc_taskpool_destroy(&pool);
- ATF_REQUIRE_EQ(pool, NULL);
-
- isc_test_end();
-}
-
-/*
- * Main
- */
-ATF_TP_ADD_TCS(tp) {
- ATF_TP_ADD_TC(tp, create_pool);
- ATF_TP_ADD_TC(tp, expand_pool);
- ATF_TP_ADD_TC(tp, get_tasks);
- ATF_TP_ADD_TC(tp, set_privilege);
-
- return (atf_no_error());
-}
-
diff --git a/contrib/ntp/lib/isc/timer.c b/contrib/ntp/lib/isc/timer.c
deleted file mode 100644
index 0da251f4c31b..000000000000
--- a/contrib/ntp/lib/isc/timer.c
+++ /dev/null
@@ -1,1072 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/condition.h>
-#include <isc/heap.h>
-#include <isc/log.h>
-#include <isc/magic.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/platform.h>
-#include <isc/task.h>
-#include <isc/thread.h>
-#include <isc/time.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-#ifdef OPENSSL_LEAKS
-#include <openssl/err.h>
-#endif
-
-/* See task.c about the following definition: */
-#ifdef BIND9
-#ifdef ISC_PLATFORM_USETHREADS
-#define USE_TIMER_THREAD
-#else
-#define USE_SHARED_MANAGER
-#endif /* ISC_PLATFORM_USETHREADS */
-#endif /* BIND9 */
-
-#ifndef USE_TIMER_THREAD
-#include "timer_p.h"
-#endif /* USE_TIMER_THREAD */
-
-#ifdef ISC_TIMER_TRACE
-#define XTRACE(s) fprintf(stderr, "%s\n", (s))
-#define XTRACEID(s, t) fprintf(stderr, "%s %p\n", (s), (t))
-#define XTRACETIME(s, d) fprintf(stderr, "%s %u.%09u\n", (s), \
- (d).seconds, (d).nanoseconds)
-#define XTRACETIME2(s, d, n) fprintf(stderr, "%s %u.%09u %u.%09u\n", (s), \
- (d).seconds, (d).nanoseconds, (n).seconds, (n).nanoseconds)
-#define XTRACETIMER(s, t, d) fprintf(stderr, "%s %p %u.%09u\n", (s), (t), \
- (d).seconds, (d).nanoseconds)
-#else
-#define XTRACE(s)
-#define XTRACEID(s, t)
-#define XTRACETIME(s, d)
-#define XTRACETIME2(s, d, n)
-#define XTRACETIMER(s, t, d)
-#endif /* ISC_TIMER_TRACE */
-
-#define TIMER_MAGIC ISC_MAGIC('T', 'I', 'M', 'R')
-#define VALID_TIMER(t) ISC_MAGIC_VALID(t, TIMER_MAGIC)
-
-typedef struct isc__timer isc__timer_t;
-typedef struct isc__timermgr isc__timermgr_t;
-
-struct isc__timer {
- /*! Not locked. */
- isc_timer_t common;
- isc__timermgr_t * manager;
- isc_mutex_t lock;
- /*! Locked by timer lock. */
- unsigned int references;
- isc_time_t idle;
- /*! Locked by manager lock. */
- isc_timertype_t type;
- isc_time_t expires;
- isc_interval_t interval;
- isc_task_t * task;
- isc_taskaction_t action;
- void * arg;
- unsigned int index;
- isc_time_t due;
- LINK(isc__timer_t) link;
-};
-
-#define TIMER_MANAGER_MAGIC ISC_MAGIC('T', 'I', 'M', 'M')
-#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, TIMER_MANAGER_MAGIC)
-
-struct isc__timermgr {
- /* Not locked. */
- isc_timermgr_t common;
- isc_mem_t * mctx;
- isc_mutex_t lock;
- /* Locked by manager lock. */
- isc_boolean_t done;
- LIST(isc__timer_t) timers;
- unsigned int nscheduled;
- isc_time_t due;
-#ifdef USE_TIMER_THREAD
- isc_condition_t wakeup;
- isc_thread_t thread;
-#endif /* USE_TIMER_THREAD */
-#ifdef USE_SHARED_MANAGER
- unsigned int refs;
-#endif /* USE_SHARED_MANAGER */
- isc_heap_t * heap;
-};
-
-/*%
- * The followings can be either static or public, depending on build
- * environment.
- */
-
-#ifdef BIND9
-#define ISC_TIMERFUNC_SCOPE
-#else
-#define ISC_TIMERFUNC_SCOPE static
-#endif
-
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timer_create(isc_timermgr_t *manager, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_timer_t **timerp);
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timer_reset(isc_timer_t *timer, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_boolean_t purge);
-ISC_TIMERFUNC_SCOPE isc_timertype_t
-isc__timer_gettype(isc_timer_t *timer);
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timer_touch(isc_timer_t *timer);
-ISC_TIMERFUNC_SCOPE void
-isc__timer_attach(isc_timer_t *timer0, isc_timer_t **timerp);
-ISC_TIMERFUNC_SCOPE void
-isc__timer_detach(isc_timer_t **timerp);
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp);
-ISC_TIMERFUNC_SCOPE void
-isc__timermgr_poke(isc_timermgr_t *manager0);
-ISC_TIMERFUNC_SCOPE void
-isc__timermgr_destroy(isc_timermgr_t **managerp);
-
-static struct isc__timermethods {
- isc_timermethods_t methods;
-
- /*%
- * The following are defined just for avoiding unused static functions.
- */
-#ifndef BIND9
- void *gettype;
-#endif
-} timermethods = {
- {
- isc__timer_attach,
- isc__timer_detach,
- isc__timer_reset,
- isc__timer_touch
- }
-#ifndef BIND9
- ,
- (void *)isc__timer_gettype
-#endif
-};
-
-static struct isc__timermgrmethods {
- isc_timermgrmethods_t methods;
-#ifndef BIND9
- void *poke; /* see above */
-#endif
-} timermgrmethods = {
- {
- isc__timermgr_destroy,
- isc__timer_create
- }
-#ifndef BIND9
- ,
- (void *)isc__timermgr_poke
-#endif
-};
-
-#ifdef USE_SHARED_MANAGER
-/*!
- * If the manager is supposed to be shared, there can be only one.
- */
-static isc__timermgr_t *timermgr = NULL;
-#endif /* USE_SHARED_MANAGER */
-
-static inline isc_result_t
-schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
- isc_result_t result;
- isc__timermgr_t *manager;
- isc_time_t due;
- int cmp;
-#ifdef USE_TIMER_THREAD
- isc_boolean_t timedwait;
-#endif
-
- /*!
- * Note: the caller must ensure locking.
- */
-
- REQUIRE(timer->type != isc_timertype_inactive);
-
-#ifndef USE_TIMER_THREAD
- UNUSED(signal_ok);
-#endif /* USE_TIMER_THREAD */
-
- manager = timer->manager;
-
-#ifdef USE_TIMER_THREAD
- /*!
- * If the manager was timed wait, we may need to signal the
- * manager to force a wakeup.
- */
- timedwait = ISC_TF(manager->nscheduled > 0 &&
- isc_time_seconds(&manager->due) != 0);
-#endif
-
- /*
- * Compute the new due time.
- */
- if (timer->type != isc_timertype_once) {
- result = isc_time_add(now, &timer->interval, &due);
- if (result != ISC_R_SUCCESS)
- return (result);
- if (timer->type == isc_timertype_limited &&
- isc_time_compare(&timer->expires, &due) < 0)
- due = timer->expires;
- } else {
- if (isc_time_isepoch(&timer->idle))
- due = timer->expires;
- else if (isc_time_isepoch(&timer->expires))
- due = timer->idle;
- else if (isc_time_compare(&timer->idle, &timer->expires) < 0)
- due = timer->idle;
- else
- due = timer->expires;
- }
-
- /*
- * Schedule the timer.
- */
-
- if (timer->index > 0) {
- /*
- * Already scheduled.
- */
- cmp = isc_time_compare(&due, &timer->due);
- timer->due = due;
- switch (cmp) {
- case -1:
- isc_heap_increased(manager->heap, timer->index);
- break;
- case 1:
- isc_heap_decreased(manager->heap, timer->index);
- break;
- case 0:
- /* Nothing to do. */
- break;
- }
- } else {
- timer->due = due;
- result = isc_heap_insert(manager->heap, timer);
- if (result != ISC_R_SUCCESS) {
- INSIST(result == ISC_R_NOMEMORY);
- return (ISC_R_NOMEMORY);
- }
- manager->nscheduled++;
- }
-
- XTRACETIMER(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SCHEDULE, "schedule"), timer, due);
-
- /*
- * If this timer is at the head of the queue, we need to ensure
- * that we won't miss it if it has a more recent due time than
- * the current "next" timer. We do this either by waking up the
- * run thread, or explicitly setting the value in the manager.
- */
-#ifdef USE_TIMER_THREAD
-
- /*
- * This is a temporary (probably) hack to fix a bug on tru64 5.1
- * and 5.1a. Sometimes, pthread_cond_timedwait() doesn't actually
- * return when the time expires, so here, we check to see if
- * we're 15 seconds or more behind, and if we are, we signal
- * the dispatcher. This isn't such a bad idea as a general purpose
- * watchdog, so perhaps we should just leave it in here.
- */
- if (signal_ok && timedwait) {
- isc_interval_t fifteen;
- isc_time_t then;
-
- isc_interval_set(&fifteen, 15, 0);
- result = isc_time_add(&manager->due, &fifteen, &then);
-
- if (result == ISC_R_SUCCESS &&
- isc_time_compare(&then, now) < 0) {
- SIGNAL(&manager->wakeup);
- signal_ok = ISC_FALSE;
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_TIMER, ISC_LOG_WARNING,
- "*** POKED TIMER ***");
- }
- }
-
- if (timer->index == 1 && signal_ok) {
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SIGNALSCHED,
- "signal (schedule)"));
- SIGNAL(&manager->wakeup);
- }
-#else /* USE_TIMER_THREAD */
- if (timer->index == 1 &&
- isc_time_compare(&timer->due, &manager->due) < 0)
- manager->due = timer->due;
-#endif /* USE_TIMER_THREAD */
-
- return (ISC_R_SUCCESS);
-}
-
-static inline void
-deschedule(isc__timer_t *timer) {
-#ifdef USE_TIMER_THREAD
- isc_boolean_t need_wakeup = ISC_FALSE;
-#endif
- isc__timermgr_t *manager;
-
- /*
- * The caller must ensure locking.
- */
-
- manager = timer->manager;
- if (timer->index > 0) {
-#ifdef USE_TIMER_THREAD
- if (timer->index == 1)
- need_wakeup = ISC_TRUE;
-#endif
- isc_heap_delete(manager->heap, timer->index);
- timer->index = 0;
- INSIST(manager->nscheduled > 0);
- manager->nscheduled--;
-#ifdef USE_TIMER_THREAD
- if (need_wakeup) {
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SIGNALDESCHED,
- "signal (deschedule)"));
- SIGNAL(&manager->wakeup);
- }
-#endif /* USE_TIMER_THREAD */
- }
-}
-
-static void
-destroy(isc__timer_t *timer) {
- isc__timermgr_t *manager = timer->manager;
-
- /*
- * The caller must ensure it is safe to destroy the timer.
- */
-
- LOCK(&manager->lock);
-
- (void)isc_task_purgerange(timer->task,
- timer,
- ISC_TIMEREVENT_FIRSTEVENT,
- ISC_TIMEREVENT_LASTEVENT,
- NULL);
- deschedule(timer);
- UNLINK(manager->timers, timer, link);
-
- UNLOCK(&manager->lock);
-
- isc_task_detach(&timer->task);
- DESTROYLOCK(&timer->lock);
- timer->common.impmagic = 0;
- timer->common.magic = 0;
- isc_mem_put(manager->mctx, timer, sizeof(*timer));
-}
-
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timer_create(isc_timermgr_t *manager0, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_timer_t **timerp)
-{
- isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
- isc__timer_t *timer;
- isc_result_t result;
- isc_time_t now;
-
- /*
- * Create a new 'type' timer managed by 'manager'. The timers
- * parameters are specified by 'expires' and 'interval'. Events
- * will be posted to 'task' and when dispatched 'action' will be
- * called with 'arg' as the arg value. The new timer is returned
- * in 'timerp'.
- */
-
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
- if (expires == NULL)
- expires = isc_time_epoch;
- if (interval == NULL)
- interval = isc_interval_zero;
- REQUIRE(type == isc_timertype_inactive ||
- !(isc_time_isepoch(expires) && isc_interval_iszero(interval)));
- REQUIRE(timerp != NULL && *timerp == NULL);
- REQUIRE(type != isc_timertype_limited ||
- !(isc_time_isepoch(expires) || isc_interval_iszero(interval)));
-
- /*
- * Get current time.
- */
- if (type != isc_timertype_inactive) {
- TIME_NOW(&now);
- } else {
- /*
- * We don't have to do this, but it keeps the compiler from
- * complaining about "now" possibly being used without being
- * set, even though it will never actually happen.
- */
- isc_time_settoepoch(&now);
- }
-
-
- timer = isc_mem_get(manager->mctx, sizeof(*timer));
- if (timer == NULL)
- return (ISC_R_NOMEMORY);
-
- timer->manager = manager;
- timer->references = 1;
-
- if (type == isc_timertype_once && !isc_interval_iszero(interval)) {
- result = isc_time_add(&now, interval, &timer->idle);
- if (result != ISC_R_SUCCESS) {
- isc_mem_put(manager->mctx, timer, sizeof(*timer));
- return (result);
- }
- } else
- isc_time_settoepoch(&timer->idle);
-
- timer->type = type;
- timer->expires = *expires;
- timer->interval = *interval;
- timer->task = NULL;
- isc_task_attach(task, &timer->task);
- timer->action = action;
- /*
- * Removing the const attribute from "arg" is the best of two
- * evils here. If the timer->arg member is made const, then
- * it affects a great many recipients of the timer event
- * which did not pass in an "arg" that was truly const.
- * Changing isc_timer_create() to not have "arg" prototyped as const,
- * though, can cause compilers warnings for calls that *do*
- * have a truly const arg. The caller will have to carefully
- * keep track of whether arg started as a true const.
- */
- DE_CONST(arg, timer->arg);
- timer->index = 0;
- result = isc_mutex_init(&timer->lock);
- if (result != ISC_R_SUCCESS) {
- isc_task_detach(&timer->task);
- isc_mem_put(manager->mctx, timer, sizeof(*timer));
- return (result);
- }
- ISC_LINK_INIT(timer, link);
- timer->common.impmagic = TIMER_MAGIC;
- timer->common.magic = ISCAPI_TIMER_MAGIC;
- timer->common.methods = (isc_timermethods_t *)&timermethods;
-
- LOCK(&manager->lock);
-
- /*
- * Note we don't have to lock the timer like we normally would because
- * there are no external references to it yet.
- */
-
- if (type != isc_timertype_inactive)
- result = schedule(timer, &now, ISC_TRUE);
- else
- result = ISC_R_SUCCESS;
- if (result == ISC_R_SUCCESS)
- APPEND(manager->timers, timer, link);
-
- UNLOCK(&manager->lock);
-
- if (result != ISC_R_SUCCESS) {
- timer->common.impmagic = 0;
- timer->common.magic = 0;
- DESTROYLOCK(&timer->lock);
- isc_task_detach(&timer->task);
- isc_mem_put(manager->mctx, timer, sizeof(*timer));
- return (result);
- }
-
- *timerp = (isc_timer_t *)timer;
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_boolean_t purge)
-{
- isc__timer_t *timer = (isc__timer_t *)timer0;
- isc_time_t now;
- isc__timermgr_t *manager;
- isc_result_t result;
-
- /*
- * Change the timer's type, expires, and interval values to the given
- * values. If 'purge' is ISC_TRUE, any pending events from this timer
- * are purged from its task's event queue.
- */
-
- REQUIRE(VALID_TIMER(timer));
- manager = timer->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- if (expires == NULL)
- expires = isc_time_epoch;
- if (interval == NULL)
- interval = isc_interval_zero;
- REQUIRE(type == isc_timertype_inactive ||
- !(isc_time_isepoch(expires) && isc_interval_iszero(interval)));
- REQUIRE(type != isc_timertype_limited ||
- !(isc_time_isepoch(expires) || isc_interval_iszero(interval)));
-
- /*
- * Get current time.
- */
- if (type != isc_timertype_inactive) {
- TIME_NOW(&now);
- } else {
- /*
- * We don't have to do this, but it keeps the compiler from
- * complaining about "now" possibly being used without being
- * set, even though it will never actually happen.
- */
- isc_time_settoepoch(&now);
- }
-
- LOCK(&manager->lock);
- LOCK(&timer->lock);
-
- if (purge)
- (void)isc_task_purgerange(timer->task,
- timer,
- ISC_TIMEREVENT_FIRSTEVENT,
- ISC_TIMEREVENT_LASTEVENT,
- NULL);
- timer->type = type;
- timer->expires = *expires;
- timer->interval = *interval;
- if (type == isc_timertype_once && !isc_interval_iszero(interval)) {
- result = isc_time_add(&now, interval, &timer->idle);
- } else {
- isc_time_settoepoch(&timer->idle);
- result = ISC_R_SUCCESS;
- }
-
- if (result == ISC_R_SUCCESS) {
- if (type == isc_timertype_inactive) {
- deschedule(timer);
- result = ISC_R_SUCCESS;
- } else
- result = schedule(timer, &now, ISC_TRUE);
- }
-
- UNLOCK(&timer->lock);
- UNLOCK(&manager->lock);
-
- return (result);
-}
-
-ISC_TIMERFUNC_SCOPE isc_timertype_t
-isc__timer_gettype(isc_timer_t *timer0) {
- isc__timer_t *timer = (isc__timer_t *)timer0;
- isc_timertype_t t;
-
- REQUIRE(VALID_TIMER(timer));
-
- LOCK(&timer->lock);
- t = timer->type;
- UNLOCK(&timer->lock);
-
- return (t);
-}
-
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timer_touch(isc_timer_t *timer0) {
- isc__timer_t *timer = (isc__timer_t *)timer0;
- isc_result_t result;
- isc_time_t now;
-
- /*
- * Set the last-touched time of 'timer' to the current time.
- */
-
- REQUIRE(VALID_TIMER(timer));
-
- LOCK(&timer->lock);
-
- /*
- * We'd like to
- *
- * REQUIRE(timer->type == isc_timertype_once);
- *
- * but we cannot without locking the manager lock too, which we
- * don't want to do.
- */
-
- TIME_NOW(&now);
- result = isc_time_add(&now, &timer->interval, &timer->idle);
-
- UNLOCK(&timer->lock);
-
- return (result);
-}
-
-ISC_TIMERFUNC_SCOPE void
-isc__timer_attach(isc_timer_t *timer0, isc_timer_t **timerp) {
- isc__timer_t *timer = (isc__timer_t *)timer0;
-
- /*
- * Attach *timerp to timer.
- */
-
- REQUIRE(VALID_TIMER(timer));
- REQUIRE(timerp != NULL && *timerp == NULL);
-
- LOCK(&timer->lock);
- timer->references++;
- UNLOCK(&timer->lock);
-
- *timerp = (isc_timer_t *)timer;
-}
-
-ISC_TIMERFUNC_SCOPE void
-isc__timer_detach(isc_timer_t **timerp) {
- isc__timer_t *timer;
- isc_boolean_t free_timer = ISC_FALSE;
-
- /*
- * Detach *timerp from its timer.
- */
-
- REQUIRE(timerp != NULL);
- timer = (isc__timer_t *)*timerp;
- REQUIRE(VALID_TIMER(timer));
-
- LOCK(&timer->lock);
- REQUIRE(timer->references > 0);
- timer->references--;
- if (timer->references == 0)
- free_timer = ISC_TRUE;
- UNLOCK(&timer->lock);
-
- if (free_timer)
- destroy(timer);
-
- *timerp = NULL;
-}
-
-static void
-dispatch(isc__timermgr_t *manager, isc_time_t *now) {
- isc_boolean_t done = ISC_FALSE, post_event, need_schedule;
- isc_timerevent_t *event;
- isc_eventtype_t type = 0;
- isc__timer_t *timer;
- isc_result_t result;
- isc_boolean_t idle;
-
- /*!
- * The caller must be holding the manager lock.
- */
-
- while (manager->nscheduled > 0 && !done) {
- timer = isc_heap_element(manager->heap, 1);
- INSIST(timer->type != isc_timertype_inactive);
- if (isc_time_compare(now, &timer->due) >= 0) {
- if (timer->type == isc_timertype_ticker) {
- type = ISC_TIMEREVENT_TICK;
- post_event = ISC_TRUE;
- need_schedule = ISC_TRUE;
- } else if (timer->type == isc_timertype_limited) {
- int cmp;
- cmp = isc_time_compare(now, &timer->expires);
- if (cmp >= 0) {
- type = ISC_TIMEREVENT_LIFE;
- post_event = ISC_TRUE;
- need_schedule = ISC_FALSE;
- } else {
- type = ISC_TIMEREVENT_TICK;
- post_event = ISC_TRUE;
- need_schedule = ISC_TRUE;
- }
- } else if (!isc_time_isepoch(&timer->expires) &&
- isc_time_compare(now,
- &timer->expires) >= 0) {
- type = ISC_TIMEREVENT_LIFE;
- post_event = ISC_TRUE;
- need_schedule = ISC_FALSE;
- } else {
- idle = ISC_FALSE;
-
- LOCK(&timer->lock);
- if (!isc_time_isepoch(&timer->idle) &&
- isc_time_compare(now,
- &timer->idle) >= 0) {
- idle = ISC_TRUE;
- }
- UNLOCK(&timer->lock);
- if (idle) {
- type = ISC_TIMEREVENT_IDLE;
- post_event = ISC_TRUE;
- need_schedule = ISC_FALSE;
- } else {
- /*
- * Idle timer has been touched;
- * reschedule.
- */
- XTRACEID(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_IDLERESCHED,
- "idle reschedule"),
- timer);
- post_event = ISC_FALSE;
- need_schedule = ISC_TRUE;
- }
- }
-
- if (post_event) {
- XTRACEID(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_POSTING,
- "posting"), timer);
- /*
- * XXX We could preallocate this event.
- */
- event = (isc_timerevent_t *)isc_event_allocate(manager->mctx,
- timer,
- type,
- timer->action,
- timer->arg,
- sizeof(*event));
-
- if (event != NULL) {
- event->due = timer->due;
- isc_task_send(timer->task,
- ISC_EVENT_PTR(&event));
- } else
- UNEXPECTED_ERROR(__FILE__, __LINE__, "%s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_EVENTNOTALLOC,
- "couldn't "
- "allocate event"));
- }
-
- timer->index = 0;
- isc_heap_delete(manager->heap, 1);
- manager->nscheduled--;
-
- if (need_schedule) {
- result = schedule(timer, now, ISC_FALSE);
- if (result != ISC_R_SUCCESS)
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "%s: %u",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_SCHEDFAIL,
- "couldn't schedule "
- "timer"),
- result);
- }
- } else {
- manager->due = timer->due;
- done = ISC_TRUE;
- }
- }
-}
-
-#ifdef USE_TIMER_THREAD
-static isc_threadresult_t
-#ifdef _WIN32 /* XXXDCL */
-WINAPI
-#endif
-run(void *uap) {
- isc__timermgr_t *manager = uap;
- isc_time_t now;
- isc_result_t result;
-
- LOCK(&manager->lock);
- while (!manager->done) {
- TIME_NOW(&now);
-
- XTRACETIME(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_RUNNING,
- "running"), now);
-
- dispatch(manager, &now);
-
- if (manager->nscheduled > 0) {
- XTRACETIME2(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_WAITUNTIL,
- "waituntil"),
- manager->due, now);
- result = WAITUNTIL(&manager->wakeup, &manager->lock, &manager->due);
- INSIST(result == ISC_R_SUCCESS ||
- result == ISC_R_TIMEDOUT);
- } else {
- XTRACETIME(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_WAIT, "wait"), now);
- WAIT(&manager->wakeup, &manager->lock);
- }
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_WAKEUP, "wakeup"));
- }
- UNLOCK(&manager->lock);
-
-#ifdef OPENSSL_LEAKS
- ERR_remove_state(0);
-#endif
-
- return ((isc_threadresult_t)0);
-}
-#endif /* USE_TIMER_THREAD */
-
-static isc_boolean_t
-sooner(void *v1, void *v2) {
- isc__timer_t *t1, *t2;
-
- t1 = v1;
- t2 = v2;
- REQUIRE(VALID_TIMER(t1));
- REQUIRE(VALID_TIMER(t2));
-
- if (isc_time_compare(&t1->due, &t2->due) < 0)
- return (ISC_TRUE);
- return (ISC_FALSE);
-}
-
-static void
-set_index(void *what, unsigned int index) {
- isc__timer_t *timer;
-
- timer = what;
- REQUIRE(VALID_TIMER(timer));
-
- timer->index = index;
-}
-
-ISC_TIMERFUNC_SCOPE isc_result_t
-isc__timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
- isc__timermgr_t *manager;
- isc_result_t result;
-
- /*
- * Create a timer manager.
- */
-
- REQUIRE(managerp != NULL && *managerp == NULL);
-
-#ifdef USE_SHARED_MANAGER
- if (timermgr != NULL) {
- timermgr->refs++;
- *managerp = (isc_timermgr_t *)timermgr;
- return (ISC_R_SUCCESS);
- }
-#endif /* USE_SHARED_MANAGER */
-
- manager = isc_mem_get(mctx, sizeof(*manager));
- if (manager == NULL)
- return (ISC_R_NOMEMORY);
-
- manager->common.impmagic = TIMER_MANAGER_MAGIC;
- manager->common.magic = ISCAPI_TIMERMGR_MAGIC;
- manager->common.methods = (isc_timermgrmethods_t *)&timermgrmethods;
- manager->mctx = NULL;
- manager->done = ISC_FALSE;
- INIT_LIST(manager->timers);
- manager->nscheduled = 0;
- isc_time_settoepoch(&manager->due);
- manager->heap = NULL;
- result = isc_heap_create(mctx, sooner, set_index, 0, &manager->heap);
- if (result != ISC_R_SUCCESS) {
- INSIST(result == ISC_R_NOMEMORY);
- isc_mem_put(mctx, manager, sizeof(*manager));
- return (ISC_R_NOMEMORY);
- }
- result = isc_mutex_init(&manager->lock);
- if (result != ISC_R_SUCCESS) {
- isc_heap_destroy(&manager->heap);
- isc_mem_put(mctx, manager, sizeof(*manager));
- return (result);
- }
- isc_mem_attach(mctx, &manager->mctx);
-#ifdef USE_TIMER_THREAD
- if (isc_condition_init(&manager->wakeup) != ISC_R_SUCCESS) {
- isc_mem_detach(&manager->mctx);
- DESTROYLOCK(&manager->lock);
- isc_heap_destroy(&manager->heap);
- isc_mem_put(mctx, manager, sizeof(*manager));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_condition_init() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- return (ISC_R_UNEXPECTED);
- }
- if (isc_thread_create(run, manager, &manager->thread) !=
- ISC_R_SUCCESS) {
- isc_mem_detach(&manager->mctx);
- (void)isc_condition_destroy(&manager->wakeup);
- DESTROYLOCK(&manager->lock);
- isc_heap_destroy(&manager->heap);
- isc_mem_put(mctx, manager, sizeof(*manager));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_create() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- return (ISC_R_UNEXPECTED);
- }
-#endif
-#ifdef USE_SHARED_MANAGER
- manager->refs = 1;
- timermgr = manager;
-#endif /* USE_SHARED_MANAGER */
-
- *managerp = (isc_timermgr_t *)manager;
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_TIMERFUNC_SCOPE void
-isc__timermgr_poke(isc_timermgr_t *manager0) {
-#ifdef USE_TIMER_THREAD
- isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
-
- REQUIRE(VALID_MANAGER(manager));
-
- SIGNAL(&manager->wakeup);
-#else
- UNUSED(manager0);
-#endif
-}
-
-ISC_TIMERFUNC_SCOPE void
-isc__timermgr_destroy(isc_timermgr_t **managerp) {
- isc__timermgr_t *manager;
- isc_mem_t *mctx;
-
- /*
- * Destroy a timer manager.
- */
-
- REQUIRE(managerp != NULL);
- manager = (isc__timermgr_t *)*managerp;
- REQUIRE(VALID_MANAGER(manager));
-
- LOCK(&manager->lock);
-
-#ifdef USE_SHARED_MANAGER
- manager->refs--;
- if (manager->refs > 0) {
- UNLOCK(&manager->lock);
- *managerp = NULL;
- return;
- }
- timermgr = NULL;
-#endif /* USE_SHARED_MANAGER */
-
-#ifndef USE_TIMER_THREAD
- isc__timermgr_dispatch((isc_timermgr_t *)manager);
-#endif
-
- REQUIRE(EMPTY(manager->timers));
- manager->done = ISC_TRUE;
-
-#ifdef USE_TIMER_THREAD
- XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
- ISC_MSG_SIGNALDESTROY, "signal (destroy)"));
- SIGNAL(&manager->wakeup);
-#endif /* USE_TIMER_THREAD */
-
- UNLOCK(&manager->lock);
-
-#ifdef USE_TIMER_THREAD
- /*
- * Wait for thread to exit.
- */
- if (isc_thread_join(manager->thread, NULL) != ISC_R_SUCCESS)
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_join() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
-#endif /* USE_TIMER_THREAD */
-
- /*
- * Clean up.
- */
-#ifdef USE_TIMER_THREAD
- (void)isc_condition_destroy(&manager->wakeup);
-#endif /* USE_TIMER_THREAD */
- DESTROYLOCK(&manager->lock);
- isc_heap_destroy(&manager->heap);
- manager->common.impmagic = 0;
- manager->common.magic = 0;
- mctx = manager->mctx;
- isc_mem_put(mctx, manager, sizeof(*manager));
- isc_mem_detach(&mctx);
-
- *managerp = NULL;
-
-#ifdef USE_SHARED_MANAGER
- timermgr = NULL;
-#endif
-}
-
-#ifndef USE_TIMER_THREAD
-isc_result_t
-isc__timermgr_nextevent(isc_timermgr_t *manager0, isc_time_t *when) {
- isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
-
-#ifdef USE_SHARED_MANAGER
- if (manager == NULL)
- manager = timermgr;
-#endif
- if (manager == NULL || manager->nscheduled == 0)
- return (ISC_R_NOTFOUND);
- *when = manager->due;
- return (ISC_R_SUCCESS);
-}
-
-void
-isc__timermgr_dispatch(isc_timermgr_t *manager0) {
- isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
- isc_time_t now;
-
-#ifdef USE_SHARED_MANAGER
- if (manager == NULL)
- manager = timermgr;
-#endif
- if (manager == NULL)
- return;
- TIME_NOW(&now);
- dispatch(manager, &now);
-}
-#endif /* USE_TIMER_THREAD */
-
-#ifdef USE_TIMERIMPREGISTER
-isc_result_t
-isc__timer_register() {
- return (isc_timer_register(isc__timermgr_create));
-}
-#endif
diff --git a/contrib/ntp/lib/isc/timer_api.c b/contrib/ntp/lib/isc/timer_api.c
deleted file mode 100644
index 97e62b3f0ec4..000000000000
--- a/contrib/ntp/lib/isc/timer_api.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: timer_api.c,v 1.4 2009/09/02 23:48:02 tbox Exp $ */
-
-#include <config.h>
-
-#include <unistd.h>
-
-#include <isc/app.h>
-#include <isc/magic.h>
-#include <isc/mutex.h>
-#include <isc/once.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-static isc_mutex_t createlock;
-static isc_once_t once = ISC_ONCE_INIT;
-static isc_timermgrcreatefunc_t timermgr_createfunc = NULL;
-
-static void
-initialize(void) {
- RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_timer_register(isc_timermgrcreatefunc_t createfunc) {
- isc_result_t result = ISC_R_SUCCESS;
-
- RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
-
- LOCK(&createlock);
- if (timermgr_createfunc == NULL)
- timermgr_createfunc = createfunc;
- else
- result = ISC_R_EXISTS;
- UNLOCK(&createlock);
-
- return (result);
-}
-
-isc_result_t
-isc_timermgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
- isc_timermgr_t **managerp)
-{
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(timermgr_createfunc != NULL);
- result = (*timermgr_createfunc)(mctx, managerp);
-
- UNLOCK(&createlock);
-
- if (result == ISC_R_SUCCESS)
- isc_appctx_settimermgr(actx, *managerp);
-
- return (result);
-}
-
-isc_result_t
-isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
- isc_result_t result;
-
- LOCK(&createlock);
-
- REQUIRE(timermgr_createfunc != NULL);
- result = (*timermgr_createfunc)(mctx, managerp);
-
- UNLOCK(&createlock);
-
- return (result);
-}
-
-void
-isc_timermgr_destroy(isc_timermgr_t **managerp) {
- REQUIRE(*managerp != NULL && ISCAPI_TIMERMGR_VALID(*managerp));
-
- (*managerp)->methods->destroy(managerp);
-
- ENSURE(*managerp == NULL);
-}
-
-isc_result_t
-isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_timer_t **timerp)
-{
- REQUIRE(ISCAPI_TIMERMGR_VALID(manager));
-
- return (manager->methods->timercreate(manager, type, expires,
- interval, task, action, arg,
- timerp));
-}
-
-void
-isc_timer_attach(isc_timer_t *timer, isc_timer_t **timerp) {
- REQUIRE(ISCAPI_TIMER_VALID(timer));
- REQUIRE(timerp != NULL && *timerp == NULL);
-
- timer->methods->attach(timer, timerp);
-
- ENSURE(*timerp == timer);
-}
-
-void
-isc_timer_detach(isc_timer_t **timerp) {
- REQUIRE(timerp != NULL && ISCAPI_TIMER_VALID(*timerp));
-
- (*timerp)->methods->detach(timerp);
-
- ENSURE(*timerp == NULL);
-}
-
-isc_result_t
-isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_boolean_t purge)
-{
- REQUIRE(ISCAPI_TIMER_VALID(timer));
-
- return (timer->methods->reset(timer, type, expires, interval, purge));
-}
-
-isc_result_t
-isc_timer_touch(isc_timer_t *timer) {
- REQUIRE(ISCAPI_TIMER_VALID(timer));
-
- return (timer->methods->touch(timer));
-}
diff --git a/contrib/ntp/lib/isc/timer_p.h b/contrib/ntp/lib/isc/timer_p.h
deleted file mode 100644
index d6f7c996c7e2..000000000000
--- a/contrib/ntp/lib/isc/timer_p.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: timer_p.h,v 1.12 2009/09/02 23:48:02 tbox Exp $ */
-
-#ifndef ISC_TIMER_P_H
-#define ISC_TIMER_P_H
-
-/*! \file */
-
-isc_result_t
-isc__timermgr_nextevent(isc_timermgr_t *timermgr, isc_time_t *when);
-
-void
-isc__timermgr_dispatch(isc_timermgr_t *timermgr);
-
-#endif /* ISC_TIMER_P_H */
diff --git a/contrib/ntp/lib/isc/unix/app.c b/contrib/ntp/lib/isc/unix/app.c
deleted file mode 100644
index 5393be942504..000000000000
--- a/contrib/ntp/lib/isc/unix/app.c
+++ /dev/null
@@ -1,946 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: app.c,v 1.64 2009/11/04 05:58:46 marka Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <sys/param.h> /* Openserver 5.0.6A and FD_SETSIZE */
-#include <sys/types.h>
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <signal.h>
-#include <sys/time.h>
-#ifdef HAVE_EPOLL
-#include <sys/epoll.h>
-#endif
-
-#include <isc/app.h>
-#include <isc/boolean.h>
-#include <isc/condition.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/mutex.h>
-#include <isc/event.h>
-#include <isc/platform.h>
-#include <isc/strerror.h>
-#include <isc/string.h>
-#include <isc/task.h>
-#include <isc/time.h>
-#include <isc/util.h>
-
-/*%
- * For BIND9 internal applications built with threads, we use a single app
- * context and let multiple worker, I/O, timer threads do actual jobs.
- * For other cases (including BIND9 built without threads) an app context acts
- * as an event loop dispatching various events.
- */
-#if defined(ISC_PLATFORM_USETHREADS) && defined(BIND9)
-#define USE_THREADS_SINGLECTX
-#endif
-
-#ifdef ISC_PLATFORM_USETHREADS
-#include <pthread.h>
-#endif
-
-#ifndef USE_THREADS_SINGLECTX
-#include "../timer_p.h"
-#include "../task_p.h"
-#include "socket_p.h"
-#endif /* USE_THREADS_SINGLECTX */
-
-#ifdef ISC_PLATFORM_USETHREADS
-static pthread_t blockedthread;
-#endif /* ISC_PLATFORM_USETHREADS */
-
-/*%
- * The following can be either static or public, depending on build environment.
- */
-
-#ifdef BIND9
-#define ISC_APPFUNC_SCOPE
-#else
-#define ISC_APPFUNC_SCOPE static
-#endif
-
-ISC_APPFUNC_SCOPE isc_result_t isc__app_start(void);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxstart(isc_appctx_t *ctx);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_onrun(isc_mem_t *mctx,
- isc_task_t *task,
- isc_taskaction_t action,
- void *arg);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxrun(isc_appctx_t *ctx);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_run(void);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxshutdown(isc_appctx_t *ctx);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_shutdown(void);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_reload(void);
-ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxsuspend(isc_appctx_t *ctx);
-ISC_APPFUNC_SCOPE void isc__app_ctxfinish(isc_appctx_t *ctx);
-ISC_APPFUNC_SCOPE void isc__app_finish(void);
-ISC_APPFUNC_SCOPE void isc__app_block(void);
-ISC_APPFUNC_SCOPE void isc__app_unblock(void);
-ISC_APPFUNC_SCOPE isc_result_t isc__appctx_create(isc_mem_t *mctx,
- isc_appctx_t **ctxp);
-ISC_APPFUNC_SCOPE void isc__appctx_destroy(isc_appctx_t **ctxp);
-ISC_APPFUNC_SCOPE void isc__appctx_settaskmgr(isc_appctx_t *ctx,
- isc_taskmgr_t *taskmgr);
-ISC_APPFUNC_SCOPE void isc__appctx_setsocketmgr(isc_appctx_t *ctx,
- isc_socketmgr_t *socketmgr);
-ISC_APPFUNC_SCOPE void isc__appctx_settimermgr(isc_appctx_t *ctx,
- isc_timermgr_t *timermgr);
-
-/*
- * The application context of this module. This implementation actually
- * doesn't use it. (This may change in the future).
- */
-#define APPCTX_MAGIC ISC_MAGIC('A', 'p', 'c', 'x')
-#define VALID_APPCTX(c) ISC_MAGIC_VALID(c, APPCTX_MAGIC)
-
-typedef struct isc__appctx {
- isc_appctx_t common;
- isc_mem_t *mctx;
- isc_mutex_t lock;
- isc_eventlist_t on_run;
- isc_boolean_t shutdown_requested;
- isc_boolean_t running;
-
- /*!
- * We assume that 'want_shutdown' can be read and written atomically.
- */
- isc_boolean_t want_shutdown;
- /*
- * We assume that 'want_reload' can be read and written atomically.
- */
- isc_boolean_t want_reload;
-
- isc_boolean_t blocked;
-
- isc_taskmgr_t *taskmgr;
- isc_socketmgr_t *socketmgr;
- isc_timermgr_t *timermgr;
-} isc__appctx_t;
-
-static isc__appctx_t isc_g_appctx;
-
-static struct {
- isc_appmethods_t methods;
-
- /*%
- * The following are defined just for avoiding unused static functions.
- */
-#ifndef BIND9
- void *run, *shutdown, *start, *onrun, *reload, *finish,
- *block, *unblock;
-#endif
-} appmethods = {
- {
- isc__appctx_destroy,
- isc__app_ctxstart,
- isc__app_ctxrun,
- isc__app_ctxsuspend,
- isc__app_ctxshutdown,
- isc__app_ctxfinish,
- isc__appctx_settaskmgr,
- isc__appctx_setsocketmgr,
- isc__appctx_settimermgr
- }
-#ifndef BIND9
- ,
- (void *)isc__app_run, (void *)isc__app_shutdown,
- (void *)isc__app_start, (void *)isc__app_onrun, (void *)isc__app_reload,
- (void *)isc__app_finish, (void *)isc__app_block,
- (void *)isc__app_unblock
-#endif
-};
-
-#ifdef HAVE_LINUXTHREADS
-/*!
- * Linux has sigwait(), but it appears to prevent signal handlers from
- * running, even if they're not in the set being waited for. This makes
- * it impossible to get the default actions for SIGILL, SIGSEGV, etc.
- * Instead of messing with it, we just use sigsuspend() instead.
- */
-#undef HAVE_SIGWAIT
-/*!
- * We need to remember which thread is the main thread...
- */
-static pthread_t main_thread;
-#endif
-
-#ifndef HAVE_SIGWAIT
-static void
-exit_action(int arg) {
- UNUSED(arg);
- isc_g_appctx.want_shutdown = ISC_TRUE;
-}
-
-static void
-reload_action(int arg) {
- UNUSED(arg);
- isc_g_appctx.want_reload = ISC_TRUE;
-}
-#endif
-
-static isc_result_t
-handle_signal(int sig, void (*handler)(int)) {
- struct sigaction sa;
- char strbuf[ISC_STRERRORSIZE];
-
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = handler;
-
- if (sigfillset(&sa.sa_mask) != 0 ||
- sigaction(sig, &sa, NULL) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_APP,
- ISC_MSG_SIGNALSETUP,
- "handle_signal() %d setup: %s"),
- sig, strbuf);
- return (ISC_R_UNEXPECTED);
- }
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_ctxstart(isc_appctx_t *ctx0) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
- isc_result_t result;
-
- REQUIRE(VALID_APPCTX(ctx));
-
- /*
- * Start an ISC library application.
- */
-
-#ifdef NEED_PTHREAD_INIT
- /*
- * BSDI 3.1 seg faults in pthread_sigmask() if we don't do this.
- */
- presult = pthread_init();
- if (presult != 0) {
- isc__strerror(presult, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_start() pthread_init: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
-#endif
-
-#ifdef HAVE_LINUXTHREADS
- main_thread = pthread_self();
-#endif
-
- result = isc_mutex_init(&ctx->lock);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- ISC_LIST_INIT(ctx->on_run);
-
- ctx->shutdown_requested = ISC_FALSE;
- ctx->running = ISC_FALSE;
- ctx->want_shutdown = ISC_FALSE;
- ctx->want_reload = ISC_FALSE;
- ctx->blocked = ISC_FALSE;
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_start(void) {
- isc_result_t result;
- int presult;
- sigset_t sset;
- char strbuf[ISC_STRERRORSIZE];
-
- isc_g_appctx.common.impmagic = APPCTX_MAGIC;
- isc_g_appctx.common.magic = ISCAPI_APPCTX_MAGIC;
- isc_g_appctx.common.methods = &appmethods.methods;
- isc_g_appctx.mctx = NULL;
- /* The remaining members will be initialized in ctxstart() */
-
- result = isc__app_ctxstart((isc_appctx_t *)&isc_g_appctx);
- if (result != ISC_R_SUCCESS)
- return (result);
-
-#ifndef HAVE_SIGWAIT
- /*
- * Install do-nothing handlers for SIGINT and SIGTERM.
- *
- * We install them now because BSDI 3.1 won't block
- * the default actions, regardless of what we do with
- * pthread_sigmask().
- */
- result = handle_signal(SIGINT, exit_action);
- if (result != ISC_R_SUCCESS)
- return (result);
- result = handle_signal(SIGTERM, exit_action);
- if (result != ISC_R_SUCCESS)
- return (result);
-#endif
-
- /*
- * Always ignore SIGPIPE.
- */
- result = handle_signal(SIGPIPE, SIG_IGN);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- /*
- * On Solaris 2, delivery of a signal whose action is SIG_IGN
- * will not cause sigwait() to return. We may have inherited
- * unexpected actions for SIGHUP, SIGINT, and SIGTERM from our parent
- * process (e.g, Solaris cron). Set an action of SIG_DFL to make
- * sure sigwait() works as expected. Only do this for SIGTERM and
- * SIGINT if we don't have sigwait(), since a different handler is
- * installed above.
- */
- result = handle_signal(SIGHUP, SIG_DFL);
- if (result != ISC_R_SUCCESS)
- return (result);
-
-#ifdef HAVE_SIGWAIT
- result = handle_signal(SIGTERM, SIG_DFL);
- if (result != ISC_R_SUCCESS)
- return (result);
- result = handle_signal(SIGINT, SIG_DFL);
- if (result != ISC_R_SUCCESS)
- return (result);
-#endif
-
-#ifdef ISC_PLATFORM_USETHREADS
- /*
- * Block SIGHUP, SIGINT, SIGTERM.
- *
- * If isc_app_start() is called from the main thread before any other
- * threads have been created, then the pthread_sigmask() call below
- * will result in all threads having SIGHUP, SIGINT and SIGTERM
- * blocked by default, ensuring that only the thread that calls
- * sigwait() for them will get those signals.
- */
- if (sigemptyset(&sset) != 0 ||
- sigaddset(&sset, SIGHUP) != 0 ||
- sigaddset(&sset, SIGINT) != 0 ||
- sigaddset(&sset, SIGTERM) != 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_start() sigsetops: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
- presult = pthread_sigmask(SIG_BLOCK, &sset, NULL);
- if (presult != 0) {
- isc__strerror(presult, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_start() pthread_sigmask: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
-#else /* ISC_PLATFORM_USETHREADS */
- /*
- * Unblock SIGHUP, SIGINT, SIGTERM.
- *
- * If we're not using threads, we need to make sure that SIGHUP,
- * SIGINT and SIGTERM are not inherited as blocked from the parent
- * process.
- */
- if (sigemptyset(&sset) != 0 ||
- sigaddset(&sset, SIGHUP) != 0 ||
- sigaddset(&sset, SIGINT) != 0 ||
- sigaddset(&sset, SIGTERM) != 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_start() sigsetops: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
- presult = sigprocmask(SIG_UNBLOCK, &sset, NULL);
- if (presult != 0) {
- isc__strerror(presult, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_start() sigprocmask: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
-#endif /* ISC_PLATFORM_USETHREADS */
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
- void *arg)
-{
- isc_event_t *event;
- isc_task_t *cloned_task = NULL;
- isc_result_t result;
-
- LOCK(&isc_g_appctx.lock);
-
- if (isc_g_appctx.running) {
- result = ISC_R_ALREADYRUNNING;
- goto unlock;
- }
-
- /*
- * Note that we store the task to which we're going to send the event
- * in the event's "sender" field.
- */
- isc_task_attach(task, &cloned_task);
- event = isc_event_allocate(mctx, cloned_task, ISC_APPEVENT_SHUTDOWN,
- action, arg, sizeof(*event));
- if (event == NULL) {
- result = ISC_R_NOMEMORY;
- goto unlock;
- }
-
- ISC_LIST_APPEND(isc_g_appctx.on_run, event, ev_link);
-
- result = ISC_R_SUCCESS;
-
- unlock:
- UNLOCK(&isc_g_appctx.lock);
-
- return (result);
-}
-
-#ifndef USE_THREADS_SINGLECTX
-/*!
- * Event loop for nonthreaded programs.
- */
-static isc_result_t
-evloop(isc__appctx_t *ctx) {
- isc_result_t result;
-
- while (!ctx->want_shutdown) {
- int n;
- isc_time_t when, now;
- struct timeval tv, *tvp;
- isc_socketwait_t *swait;
- isc_boolean_t readytasks;
- isc_boolean_t call_timer_dispatch = ISC_FALSE;
-
- /*
- * Check the reload (or suspend) case first for exiting the
- * loop as fast as possible in case:
- * - the direct call to isc__taskmgr_dispatch() in
- * isc__app_ctxrun() completes all the tasks so far,
- * - there is thus currently no active task, and
- * - there is a timer event
- */
- if (ctx->want_reload) {
- ctx->want_reload = ISC_FALSE;
- return (ISC_R_RELOAD);
- }
-
- readytasks = isc__taskmgr_ready(ctx->taskmgr);
- if (readytasks) {
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- tvp = &tv;
- call_timer_dispatch = ISC_TRUE;
- } else {
- result = isc__timermgr_nextevent(ctx->timermgr, &when);
- if (result != ISC_R_SUCCESS)
- tvp = NULL;
- else {
- isc_uint64_t us;
-
- TIME_NOW(&now);
- us = isc_time_microdiff(&when, &now);
- if (us == 0)
- call_timer_dispatch = ISC_TRUE;
- tv.tv_sec = us / 1000000;
- tv.tv_usec = us % 1000000;
- tvp = &tv;
- }
- }
-
- swait = NULL;
- n = isc__socketmgr_waitevents(ctx->socketmgr, tvp, &swait);
-
- if (n == 0 || call_timer_dispatch) {
- /*
- * We call isc__timermgr_dispatch() only when
- * necessary, in order to reduce overhead. If the
- * select() call indicates a timeout, we need the
- * dispatch. Even if not, if we set the 0-timeout
- * for the select() call, we need to check the timer
- * events. In the 'readytasks' case, there may be no
- * timeout event actually, but there is no other way
- * to reduce the overhead.
- * Note that we do not have to worry about the case
- * where a new timer is inserted during the select()
- * call, since this loop only runs in the non-thread
- * mode.
- */
- isc__timermgr_dispatch(ctx->timermgr);
- }
- if (n > 0)
- (void)isc__socketmgr_dispatch(ctx->socketmgr, swait);
- (void)isc__taskmgr_dispatch(ctx->taskmgr);
- }
- return (ISC_R_SUCCESS);
-}
-#endif /* USE_THREADS_SINGLECTX */
-
-#ifndef ISC_PLATFORM_USETHREADS
-/*
- * This is a gross hack to support waiting for condition
- * variables in nonthreaded programs in a limited way;
- * see lib/isc/nothreads/include/isc/condition.h.
- * We implement isc_condition_wait() by entering the
- * event loop recursively until the want_shutdown flag
- * is set by isc_condition_signal().
- */
-
-/*!
- * \brief True if we are currently executing in the recursive
- * event loop.
- */
-static isc_boolean_t in_recursive_evloop = ISC_FALSE;
-
-/*!
- * \brief True if we are exiting the event loop as the result of
- * a call to isc_condition_signal() rather than a shutdown
- * or reload.
- */
-static isc_boolean_t signalled = ISC_FALSE;
-
-isc_result_t
-isc__nothread_wait_hack(isc_condition_t *cp, isc_mutex_t *mp) {
- isc_result_t result;
-
- UNUSED(cp);
- UNUSED(mp);
-
- INSIST(!in_recursive_evloop);
- in_recursive_evloop = ISC_TRUE;
-
- INSIST(*mp == 1); /* Mutex must be locked on entry. */
- --*mp;
-
- result = evloop(&isc_g_appctx);
- if (result == ISC_R_RELOAD)
- isc_g_appctx.want_reload = ISC_TRUE;
- if (signalled) {
- isc_g_appctx.want_shutdown = ISC_FALSE;
- signalled = ISC_FALSE;
- }
-
- ++*mp;
- in_recursive_evloop = ISC_FALSE;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__nothread_signal_hack(isc_condition_t *cp) {
-
- UNUSED(cp);
-
- INSIST(in_recursive_evloop);
-
- isc_g_appctx.want_shutdown = ISC_TRUE;
- signalled = ISC_TRUE;
- return (ISC_R_SUCCESS);
-}
-
-#endif /* ISC_PLATFORM_USETHREADS */
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_ctxrun(isc_appctx_t *ctx0) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
- int result;
- isc_event_t *event, *next_event;
- isc_task_t *task;
-#ifdef USE_THREADS_SINGLECTX
- sigset_t sset;
- char strbuf[ISC_STRERRORSIZE];
-#ifdef HAVE_SIGWAIT
- int sig;
-#endif
-#endif /* USE_THREADS_SINGLECTX */
-
- REQUIRE(VALID_APPCTX(ctx));
-
-#ifdef HAVE_LINUXTHREADS
- REQUIRE(main_thread == pthread_self());
-#endif
-
- LOCK(&ctx->lock);
-
- if (!ctx->running) {
- ctx->running = ISC_TRUE;
-
- /*
- * Post any on-run events (in FIFO order).
- */
- for (event = ISC_LIST_HEAD(ctx->on_run);
- event != NULL;
- event = next_event) {
- next_event = ISC_LIST_NEXT(event, ev_link);
- ISC_LIST_UNLINK(ctx->on_run, event, ev_link);
- task = event->ev_sender;
- event->ev_sender = NULL;
- isc_task_sendanddetach(&task, &event);
- }
-
- }
-
- UNLOCK(&ctx->lock);
-
-#ifndef HAVE_SIGWAIT
- /*
- * Catch SIGHUP.
- *
- * We do this here to ensure that the signal handler is installed
- * (i.e. that it wasn't a "one-shot" handler).
- */
- if (ctx == &isc_g_appctx) {
- result = handle_signal(SIGHUP, reload_action);
- if (result != ISC_R_SUCCESS)
- return (ISC_R_SUCCESS);
- }
-#endif
-
-#ifdef USE_THREADS_SINGLECTX
- /*
- * When we are using multiple contexts, we don't rely on signals.
- */
- if (ctx != &isc_g_appctx)
- return (ISC_R_SUCCESS);
-
- /*
- * There is no danger if isc_app_shutdown() is called before we wait
- * for signals. Signals are blocked, so any such signal will simply
- * be made pending and we will get it when we call sigwait().
- */
-
- while (!ctx->want_shutdown) {
-#ifdef HAVE_SIGWAIT
- /*
- * Wait for SIGHUP, SIGINT, or SIGTERM.
- */
- if (sigemptyset(&sset) != 0 ||
- sigaddset(&sset, SIGHUP) != 0 ||
- sigaddset(&sset, SIGINT) != 0 ||
- sigaddset(&sset, SIGTERM) != 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_run() sigsetops: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
-
-#ifndef HAVE_UNIXWARE_SIGWAIT
- result = sigwait(&sset, &sig);
- if (result == 0) {
- if (sig == SIGINT || sig == SIGTERM)
- ctx->want_shutdown = ISC_TRUE;
- else if (sig == SIGHUP)
- ctx->want_reload = ISC_TRUE;
- }
-
-#else /* Using UnixWare sigwait semantics. */
- sig = sigwait(&sset);
- if (sig >= 0) {
- if (sig == SIGINT || sig == SIGTERM)
- ctx->want_shutdown = ISC_TRUE;
- else if (sig == SIGHUP)
- ctx->want_reload = ISC_TRUE;
- }
-
-#endif /* HAVE_UNIXWARE_SIGWAIT */
-#else /* Don't have sigwait(). */
- /*
- * Listen for all signals.
- */
- if (sigemptyset(&sset) != 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_run() sigsetops: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
- result = sigsuspend(&sset);
-#endif /* HAVE_SIGWAIT */
-
- if (ctx->want_reload) {
- ctx->want_reload = ISC_FALSE;
- return (ISC_R_RELOAD);
- }
-
- if (ctx->want_shutdown && ctx->blocked)
- exit(1);
- }
-
-#else /* USE_THREADS_SINGLECTX */
-
- (void)isc__taskmgr_dispatch(ctx->taskmgr);
-
- result = evloop(ctx);
- if (result != ISC_R_SUCCESS)
- return (result);
-
-#endif /* USE_THREADS_SINGLECTX */
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_run() {
- return (isc__app_ctxrun((isc_appctx_t *)&isc_g_appctx));
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_ctxshutdown(isc_appctx_t *ctx0) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
- isc_boolean_t want_kill = ISC_TRUE;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_APPCTX(ctx));
-
- LOCK(&ctx->lock);
-
- REQUIRE(ctx->running);
-
- if (ctx->shutdown_requested)
- want_kill = ISC_FALSE;
- else
- ctx->shutdown_requested = ISC_TRUE;
-
- UNLOCK(&ctx->lock);
-
- if (want_kill) {
- if (ctx != &isc_g_appctx)
- ctx->want_shutdown = ISC_TRUE;
- else {
-#ifdef HAVE_LINUXTHREADS
- int result;
-
- result = pthread_kill(main_thread, SIGTERM);
- if (result != 0) {
- isc__strerror(result, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_shutdown() "
- "pthread_kill: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
-#else
- if (kill(getpid(), SIGTERM) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_shutdown() "
- "kill: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
-#endif /* HAVE_LINUXTHREADS */
- }
- }
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_shutdown() {
- return (isc__app_ctxshutdown((isc_appctx_t *)&isc_g_appctx));
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_ctxsuspend(isc_appctx_t *ctx0) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
- isc_boolean_t want_kill = ISC_TRUE;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_APPCTX(ctx));
-
- LOCK(&ctx->lock);
-
- REQUIRE(ctx->running);
-
- /*
- * Don't send the reload signal if we're shutting down.
- */
- if (ctx->shutdown_requested)
- want_kill = ISC_FALSE;
-
- UNLOCK(&ctx->lock);
-
- if (want_kill) {
- if (ctx != &isc_g_appctx)
- ctx->want_reload = ISC_TRUE;
- else {
-#ifdef HAVE_LINUXTHREADS
- int result;
-
- result = pthread_kill(main_thread, SIGHUP);
- if (result != 0) {
- isc__strerror(result, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_reload() "
- "pthread_kill: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
-#else
- if (kill(getpid(), SIGHUP) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_reload() "
- "kill: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
-#endif
- }
- }
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__app_reload(void) {
- return (isc__app_ctxsuspend((isc_appctx_t *)&isc_g_appctx));
-}
-
-ISC_APPFUNC_SCOPE void
-isc__app_ctxfinish(isc_appctx_t *ctx0) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-
- REQUIRE(VALID_APPCTX(ctx));
-
- DESTROYLOCK(&ctx->lock);
-}
-
-ISC_APPFUNC_SCOPE void
-isc__app_finish(void) {
- isc__app_ctxfinish((isc_appctx_t *)&isc_g_appctx);
-}
-
-ISC_APPFUNC_SCOPE void
-isc__app_block(void) {
-#ifdef ISC_PLATFORM_USETHREADS
- sigset_t sset;
-#endif /* ISC_PLATFORM_USETHREADS */
- REQUIRE(isc_g_appctx.running);
- REQUIRE(!isc_g_appctx.blocked);
-
- isc_g_appctx.blocked = ISC_TRUE;
-#ifdef ISC_PLATFORM_USETHREADS
- blockedthread = pthread_self();
- RUNTIME_CHECK(sigemptyset(&sset) == 0 &&
- sigaddset(&sset, SIGINT) == 0 &&
- sigaddset(&sset, SIGTERM) == 0);
- RUNTIME_CHECK(pthread_sigmask(SIG_UNBLOCK, &sset, NULL) == 0);
-#endif /* ISC_PLATFORM_USETHREADS */
-}
-
-ISC_APPFUNC_SCOPE void
-isc__app_unblock(void) {
-#ifdef ISC_PLATFORM_USETHREADS
- sigset_t sset;
-#endif /* ISC_PLATFORM_USETHREADS */
-
- REQUIRE(isc_g_appctx.running);
- REQUIRE(isc_g_appctx.blocked);
-
- isc_g_appctx.blocked = ISC_FALSE;
-
-#ifdef ISC_PLATFORM_USETHREADS
- REQUIRE(blockedthread == pthread_self());
-
- RUNTIME_CHECK(sigemptyset(&sset) == 0 &&
- sigaddset(&sset, SIGINT) == 0 &&
- sigaddset(&sset, SIGTERM) == 0);
- RUNTIME_CHECK(pthread_sigmask(SIG_BLOCK, &sset, NULL) == 0);
-#endif /* ISC_PLATFORM_USETHREADS */
-}
-
-ISC_APPFUNC_SCOPE isc_result_t
-isc__appctx_create(isc_mem_t *mctx, isc_appctx_t **ctxp) {
- isc__appctx_t *ctx;
-
- REQUIRE(mctx != NULL);
- REQUIRE(ctxp != NULL && *ctxp == NULL);
-
- ctx = isc_mem_get(mctx, sizeof(*ctx));
- if (ctx == NULL)
- return (ISC_R_NOMEMORY);
-
- ctx->common.impmagic = APPCTX_MAGIC;
- ctx->common.magic = ISCAPI_APPCTX_MAGIC;
- ctx->common.methods = &appmethods.methods;
-
- ctx->mctx = NULL;
- isc_mem_attach(mctx, &ctx->mctx);
-
- ctx->taskmgr = NULL;
- ctx->socketmgr = NULL;
- ctx->timermgr = NULL;
-
- *ctxp = (isc_appctx_t *)ctx;
-
- return (ISC_R_SUCCESS);
-}
-
-ISC_APPFUNC_SCOPE void
-isc__appctx_destroy(isc_appctx_t **ctxp) {
- isc__appctx_t *ctx;
-
- REQUIRE(ctxp != NULL);
- ctx = (isc__appctx_t *)*ctxp;
- REQUIRE(VALID_APPCTX(ctx));
-
- isc_mem_putanddetach(&ctx->mctx, ctx, sizeof(*ctx));
-
- *ctxp = NULL;
-}
-
-ISC_APPFUNC_SCOPE void
-isc__appctx_settaskmgr(isc_appctx_t *ctx0, isc_taskmgr_t *taskmgr) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-
- REQUIRE(VALID_APPCTX(ctx));
-
- ctx->taskmgr = taskmgr;
-}
-
-ISC_APPFUNC_SCOPE void
-isc__appctx_setsocketmgr(isc_appctx_t *ctx0, isc_socketmgr_t *socketmgr) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-
- REQUIRE(VALID_APPCTX(ctx));
-
- ctx->socketmgr = socketmgr;
-}
-
-ISC_APPFUNC_SCOPE void
-isc__appctx_settimermgr(isc_appctx_t *ctx0, isc_timermgr_t *timermgr) {
- isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
-
- REQUIRE(VALID_APPCTX(ctx));
-
- ctx->timermgr = timermgr;
-}
-
-#ifdef USE_APPIMPREGISTER
-isc_result_t
-isc__app_register() {
- return (isc_app_register(isc__appctx_create));
-}
-#endif
diff --git a/contrib/ntp/lib/isc/unix/entropy.c b/contrib/ntp/lib/isc/unix/entropy.c
deleted file mode 100644
index ab53faf6754e..000000000000
--- a/contrib/ntp/lib/isc/unix/entropy.c
+++ /dev/null
@@ -1,605 +0,0 @@
-/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: entropy.c,v 1.82 2008/12/01 23:47:45 tbox Exp $ */
-
-/* \file unix/entropy.c
- * \brief
- * This is the system dependent part of the ISC entropy API.
- */
-
-#include <config.h>
-
-#include <sys/param.h> /* Openserver 5.0.6A and FD_SETSIZE */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#ifdef HAVE_NANOSLEEP
-#include <time.h>
-#endif
-#include <unistd.h>
-
-#include <isc/platform.h>
-#include <isc/strerror.h>
-
-#ifdef ISC_PLATFORM_NEEDSYSSELECTH
-#include <sys/select.h>
-#endif
-
-#include "errno2result.h"
-
-/*%
- * There is only one variable in the entropy data structures that is not
- * system independent, but pulling the structure that uses it into this file
- * ultimately means pulling several other independent structures here also to
- * resolve their interdependencies. Thus only the problem variable's type
- * is defined here.
- */
-#define FILESOURCE_HANDLE_TYPE int
-
-typedef struct {
- int handle;
- enum {
- isc_usocketsource_disconnected,
- isc_usocketsource_connecting,
- isc_usocketsource_connected,
- isc_usocketsource_ndesired,
- isc_usocketsource_wrote,
- isc_usocketsource_reading
- } status;
- size_t sz_to_recv;
-} isc_entropyusocketsource_t;
-
-#include "../entropy.c"
-
-static unsigned int
-get_from_filesource(isc_entropysource_t *source, isc_uint32_t desired) {
- isc_entropy_t *ent = source->ent;
- unsigned char buf[128];
- int fd = source->sources.file.handle;
- ssize_t n, ndesired;
- unsigned int added;
-
- if (source->bad)
- return (0);
-
- desired = desired / 8 + (((desired & 0x07) > 0) ? 1 : 0);
-
- added = 0;
- while (desired > 0) {
- ndesired = ISC_MIN(desired, sizeof(buf));
- n = read(fd, buf, ndesired);
- if (n < 0) {
- if (errno == EAGAIN || errno == EINTR)
- goto out;
- goto err;
- }
- if (n == 0)
- goto err;
-
- entropypool_adddata(ent, buf, n, n * 8);
- added += n * 8;
- desired -= n;
- }
- goto out;
-
- err:
- (void)close(fd);
- source->sources.file.handle = -1;
- source->bad = ISC_TRUE;
-
- out:
- return (added);
-}
-
-static unsigned int
-get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
- isc_entropy_t *ent = source->ent;
- unsigned char buf[128];
- int fd = source->sources.usocket.handle;
- ssize_t n = 0, ndesired;
- unsigned int added;
- size_t sz_to_recv = source->sources.usocket.sz_to_recv;
-
- if (source->bad)
- return (0);
-
- desired = desired / 8 + (((desired & 0x07) > 0) ? 1 : 0);
-
- added = 0;
- while (desired > 0) {
- ndesired = ISC_MIN(desired, sizeof(buf));
- eagain_loop:
-
- switch ( source->sources.usocket.status ) {
- case isc_usocketsource_ndesired:
- buf[0] = ndesired;
- if ((n = sendto(fd, buf, 1, 0, NULL, 0)) < 0) {
- if (errno == EWOULDBLOCK || errno == EINTR ||
- errno == ECONNRESET)
- goto out;
- goto err;
- }
- INSIST(n == 1);
- source->sources.usocket.status =
- isc_usocketsource_wrote;
- goto eagain_loop;
-
- case isc_usocketsource_connecting:
- case isc_usocketsource_connected:
- buf[0] = 1;
- buf[1] = ndesired;
- if ((n = sendto(fd, buf, 2, 0, NULL, 0)) < 0) {
- if (errno == EWOULDBLOCK || errno == EINTR ||
- errno == ECONNRESET)
- goto out;
- goto err;
- }
- if (n == 1) {
- source->sources.usocket.status =
- isc_usocketsource_ndesired;
- goto eagain_loop;
- }
- INSIST(n == 2);
- source->sources.usocket.status =
- isc_usocketsource_wrote;
- /*FALLTHROUGH*/
-
- case isc_usocketsource_wrote:
- if (recvfrom(fd, buf, 1, 0, NULL, NULL) != 1) {
- if (errno == EAGAIN) {
- /*
- * The problem of EAGAIN (try again
- * later) is a major issue on HP-UX.
- * Solaris actually tries the recvfrom
- * call again, while HP-UX just dies.
- * This code is an attempt to let the
- * entropy pool fill back up (at least
- * that's what I think the problem is.)
- * We go to eagain_loop because if we
- * just "break", then the "desired"
- * amount gets borked.
- */
-#ifdef HAVE_NANOSLEEP
- struct timespec ts;
-
- ts.tv_sec = 0;
- ts.tv_nsec = 1000000;
- nanosleep(&ts, NULL);
-#else
- usleep(1000);
-#endif
- goto eagain_loop;
- }
- if (errno == EWOULDBLOCK || errno == EINTR)
- goto out;
- goto err;
- }
- source->sources.usocket.status =
- isc_usocketsource_reading;
- sz_to_recv = buf[0];
- source->sources.usocket.sz_to_recv = sz_to_recv;
- if (sz_to_recv > sizeof(buf))
- goto err;
- /*FALLTHROUGH*/
-
- case isc_usocketsource_reading:
- if (sz_to_recv != 0U) {
- n = recv(fd, buf, sz_to_recv, 0);
- if (n < 0) {
- if (errno == EWOULDBLOCK ||
- errno == EINTR)
- goto out;
- goto err;
- }
- } else
- n = 0;
- break;
-
- default:
- goto err;
- }
-
- if ((size_t)n != sz_to_recv)
- source->sources.usocket.sz_to_recv -= n;
- else
- source->sources.usocket.status =
- isc_usocketsource_connected;
-
- if (n == 0)
- goto out;
-
- entropypool_adddata(ent, buf, n, n * 8);
- added += n * 8;
- desired -= n;
- }
- goto out;
-
- err:
- close(fd);
- source->bad = ISC_TRUE;
- source->sources.usocket.status = isc_usocketsource_disconnected;
- source->sources.usocket.handle = -1;
-
- out:
- return (added);
-}
-
-/*
- * Poll each source, trying to get data from it to stuff into the entropy
- * pool.
- */
-static void
-fillpool(isc_entropy_t *ent, unsigned int desired, isc_boolean_t blocking) {
- unsigned int added;
- unsigned int remaining;
- unsigned int needed;
- unsigned int nsource;
- isc_entropysource_t *source;
-
- REQUIRE(VALID_ENTROPY(ent));
-
- needed = desired;
-
- /*
- * This logic is a little strange, so an explanation is in order.
- *
- * If needed is 0, it means we are being asked to "fill to whatever
- * we think is best." This means that if we have at least a
- * partially full pool (say, > 1/4th of the pool) we probably don't
- * need to add anything.
- *
- * Also, we will check to see if the "pseudo" count is too high.
- * If it is, try to mix in better data. Too high is currently
- * defined as 1/4th of the pool.
- *
- * Next, if we are asked to add a specific bit of entropy, make
- * certain that we will do so. Clamp how much we try to add to
- * (DIGEST_SIZE * 8 < needed < POOLBITS - entropy).
- *
- * Note that if we are in a blocking mode, we will only try to
- * get as much data as we need, not as much as we might want
- * to build up.
- */
- if (needed == 0) {
- REQUIRE(!blocking);
-
- if ((ent->pool.entropy >= RND_POOLBITS / 4)
- && (ent->pool.pseudo <= RND_POOLBITS / 4))
- return;
-
- needed = THRESHOLD_BITS * 4;
- } else {
- needed = ISC_MAX(needed, THRESHOLD_BITS);
- needed = ISC_MIN(needed, RND_POOLBITS);
- }
-
- /*
- * In any case, clamp how much we need to how much we can add.
- */
- needed = ISC_MIN(needed, RND_POOLBITS - ent->pool.entropy);
-
- /*
- * But wait! If we're not yet initialized, we need at least
- * THRESHOLD_BITS
- * of randomness.
- */
- if (ent->initialized < THRESHOLD_BITS)
- needed = ISC_MAX(needed, THRESHOLD_BITS - ent->initialized);
-
- /*
- * Poll each file source to see if we can read anything useful from
- * it. XXXMLG When where are multiple sources, we should keep a
- * record of which one we last used so we can start from it (or the
- * next one) to avoid letting some sources build up entropy while
- * others are always drained.
- */
-
- added = 0;
- remaining = needed;
- if (ent->nextsource == NULL) {
- ent->nextsource = ISC_LIST_HEAD(ent->sources);
- if (ent->nextsource == NULL)
- return;
- }
- source = ent->nextsource;
- again_file:
- for (nsource = 0; nsource < ent->nsources; nsource++) {
- unsigned int got;
-
- if (remaining == 0)
- break;
-
- got = 0;
-
- switch ( source->type ) {
- case ENTROPY_SOURCETYPE_FILE:
- got = get_from_filesource(source, remaining);
- break;
-
- case ENTROPY_SOURCETYPE_USOCKET:
- got = get_from_usocketsource(source, remaining);
- break;
- }
-
- added += got;
-
- remaining -= ISC_MIN(remaining, got);
-
- source = ISC_LIST_NEXT(source, link);
- if (source == NULL)
- source = ISC_LIST_HEAD(ent->sources);
- }
- ent->nextsource = source;
-
- if (blocking && remaining != 0) {
- int fds;
-
- fds = wait_for_sources(ent);
- if (fds > 0)
- goto again_file;
- }
-
- /*
- * Here, if there are bits remaining to be had and we can block,
- * check to see if we have a callback source. If so, call them.
- */
- source = ISC_LIST_HEAD(ent->sources);
- while ((remaining != 0) && (source != NULL)) {
- unsigned int got;
-
- got = 0;
-
- if (source->type == ENTROPY_SOURCETYPE_CALLBACK)
- got = get_from_callback(source, remaining, blocking);
-
- added += got;
- remaining -= ISC_MIN(remaining, got);
-
- if (added >= needed)
- break;
-
- source = ISC_LIST_NEXT(source, link);
- }
-
- /*
- * Mark as initialized if we've added enough data.
- */
- if (ent->initialized < THRESHOLD_BITS)
- ent->initialized += added;
-}
-
-static int
-wait_for_sources(isc_entropy_t *ent) {
- isc_entropysource_t *source;
- int maxfd, fd;
- int cc;
- fd_set reads;
- fd_set writes;
-
- maxfd = -1;
- FD_ZERO(&reads);
- FD_ZERO(&writes);
-
- source = ISC_LIST_HEAD(ent->sources);
- while (source != NULL) {
- if (source->type == ENTROPY_SOURCETYPE_FILE) {
- fd = source->sources.file.handle;
- if (fd >= 0) {
- maxfd = ISC_MAX(maxfd, fd);
- FD_SET(fd, &reads);
- }
- }
- if (source->type == ENTROPY_SOURCETYPE_USOCKET) {
- fd = source->sources.usocket.handle;
- if (fd >= 0) {
- switch (source->sources.usocket.status) {
- case isc_usocketsource_disconnected:
- break;
- case isc_usocketsource_connecting:
- case isc_usocketsource_connected:
- case isc_usocketsource_ndesired:
- maxfd = ISC_MAX(maxfd, fd);
- FD_SET(fd, &writes);
- break;
- case isc_usocketsource_wrote:
- case isc_usocketsource_reading:
- maxfd = ISC_MAX(maxfd, fd);
- FD_SET(fd, &reads);
- break;
- }
- }
- }
- source = ISC_LIST_NEXT(source, link);
- }
-
- if (maxfd < 0)
- return (-1);
-
- cc = select(maxfd + 1, &reads, &writes, NULL, NULL);
- if (cc < 0)
- return (-1);
-
- return (cc);
-}
-
-static void
-destroyfilesource(isc_entropyfilesource_t *source) {
- (void)close(source->handle);
-}
-
-static void
-destroyusocketsource(isc_entropyusocketsource_t *source) {
- close(source->handle);
-}
-
-/*
- * Make a fd non-blocking
- */
-static isc_result_t
-make_nonblock(int fd) {
- int ret;
- int flags;
- char strbuf[ISC_STRERRORSIZE];
-#ifdef USE_FIONBIO_IOCTL
- int on = 1;
-
- ret = ioctl(fd, FIONBIO, (char *)&on);
-#else
- flags = fcntl(fd, F_GETFL, 0);
- flags |= PORT_NONBLOCK;
- ret = fcntl(fd, F_SETFL, flags);
-#endif
-
- if (ret == -1) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
-#ifdef USE_FIONBIO_IOCTL
- "ioctl(%d, FIONBIO, &on): %s", fd,
-#else
- "fcntl(%d, F_SETFL, %d): %s", fd, flags,
-#endif
- strbuf);
-
- return (ISC_R_UNEXPECTED);
- }
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
- int fd;
- struct stat _stat;
- isc_boolean_t is_usocket = ISC_FALSE;
- isc_boolean_t is_connected = ISC_FALSE;
- isc_result_t ret;
- isc_entropysource_t *source;
-
- REQUIRE(VALID_ENTROPY(ent));
- REQUIRE(fname != NULL);
-
- LOCK(&ent->lock);
-
- if (stat(fname, &_stat) < 0) {
- ret = isc__errno2result(errno);
- goto errout;
- }
- /*
- * Solaris 2.5.1 does not have support for sockets (S_IFSOCK),
- * but it does return type S_IFIFO (the OS believes that
- * the socket is a fifo). This may be an issue if we tell
- * the program to look at an actual FIFO as its source of
- * entropy.
- */
-#if defined(S_ISSOCK)
- if (S_ISSOCK(_stat.st_mode))
- is_usocket = ISC_TRUE;
-#endif
-#if defined(S_ISFIFO) && defined(sun)
- if (S_ISFIFO(_stat.st_mode))
- is_usocket = ISC_TRUE;
-#endif
- if (is_usocket)
- fd = socket(PF_UNIX, SOCK_STREAM, 0);
- else
- fd = open(fname, O_RDONLY | PORT_NONBLOCK, 0);
-
- if (fd < 0) {
- ret = isc__errno2result(errno);
- goto errout;
- }
-
- ret = make_nonblock(fd);
- if (ret != ISC_R_SUCCESS)
- goto closefd;
-
- if (is_usocket) {
- struct sockaddr_un sname;
-
- memset(&sname, 0, sizeof(sname));
- sname.sun_family = AF_UNIX;
- strncpy(sname.sun_path, fname, sizeof(sname.sun_path));
- sname.sun_path[sizeof(sname.sun_path)-1] = '0';
-#ifdef ISC_PLATFORM_HAVESALEN
-#if !defined(SUN_LEN)
-#define SUN_LEN(su) \
- (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
-#endif
- sname.sun_len = SUN_LEN(&sname);
-#endif
-
- if (connect(fd, (struct sockaddr *) &sname,
- sizeof(struct sockaddr_un)) < 0) {
- if (errno != EINPROGRESS) {
- ret = isc__errno2result(errno);
- goto closefd;
- }
- } else
- is_connected = ISC_TRUE;
- }
-
- source = isc_mem_get(ent->mctx, sizeof(isc_entropysource_t));
- if (source == NULL) {
- ret = ISC_R_NOMEMORY;
- goto closefd;
- }
-
- /*
- * From here down, no failures can occur.
- */
- source->magic = SOURCE_MAGIC;
- source->ent = ent;
- source->total = 0;
- source->bad = ISC_FALSE;
- memset(source->name, 0, sizeof(source->name));
- ISC_LINK_INIT(source, link);
- if (is_usocket) {
- source->sources.usocket.handle = fd;
- if (is_connected)
- source->sources.usocket.status =
- isc_usocketsource_connected;
- else
- source->sources.usocket.status =
- isc_usocketsource_connecting;
- source->sources.usocket.sz_to_recv = 0;
- source->type = ENTROPY_SOURCETYPE_USOCKET;
- } else {
- source->sources.file.handle = fd;
- source->type = ENTROPY_SOURCETYPE_FILE;
- }
-
- /*
- * Hook it into the entropy system.
- */
- ISC_LIST_APPEND(ent->sources, source, link);
- ent->nsources++;
-
- UNLOCK(&ent->lock);
- return (ISC_R_SUCCESS);
-
- closefd:
- (void)close(fd);
-
- errout:
- UNLOCK(&ent->lock);
-
- return (ret);
-}
diff --git a/contrib/ntp/lib/isc/unix/fsaccess.c b/contrib/ntp/lib/isc/unix/fsaccess.c
deleted file mode 100644
index a2bd89ad7131..000000000000
--- a/contrib/ntp/lib/isc/unix/fsaccess.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: fsaccess.c,v 1.13 2007/06/19 23:47:18 tbox Exp $ */
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-
-#include "errno2result.h"
-
-/*! \file
- * \brief
- * The OS-independent part of the API is in lib/isc.
- */
-#include "../fsaccess.c"
-
-isc_result_t
-isc_fsaccess_set(const char *path, isc_fsaccess_t access) {
- struct stat statb;
- mode_t mode;
- isc_boolean_t is_dir = ISC_FALSE;
- isc_fsaccess_t bits;
- isc_result_t result;
-
- if (stat(path, &statb) != 0)
- return (isc__errno2result(errno));
-
- if ((statb.st_mode & S_IFDIR) != 0)
- is_dir = ISC_TRUE;
- else if ((statb.st_mode & S_IFREG) == 0)
- return (ISC_R_INVALIDFILE);
-
- result = check_bad_bits(access, is_dir);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- /*
- * Done with checking bad bits. Set mode_t.
- */
- mode = 0;
-
-#define SET_AND_CLEAR1(modebit) \
- if ((access & bits) != 0) { \
- mode |= modebit; \
- access &= ~bits; \
- }
-#define SET_AND_CLEAR(user, group, other) \
- SET_AND_CLEAR1(user); \
- bits <<= STEP; \
- SET_AND_CLEAR1(group); \
- bits <<= STEP; \
- SET_AND_CLEAR1(other);
-
- bits = ISC_FSACCESS_READ | ISC_FSACCESS_LISTDIRECTORY;
-
- SET_AND_CLEAR(S_IRUSR, S_IRGRP, S_IROTH);
-
- bits = ISC_FSACCESS_WRITE |
- ISC_FSACCESS_CREATECHILD |
- ISC_FSACCESS_DELETECHILD;
-
- SET_AND_CLEAR(S_IWUSR, S_IWGRP, S_IWOTH);
-
- bits = ISC_FSACCESS_EXECUTE |
- ISC_FSACCESS_ACCESSCHILD;
-
- SET_AND_CLEAR(S_IXUSR, S_IXGRP, S_IXOTH);
-
- INSIST(access == 0);
-
- if (chmod(path, mode) < 0)
- return (isc__errno2result(errno));
-
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/unix/include/isc/keyboard.h b/contrib/ntp/lib/isc/unix/include/isc/keyboard.h
deleted file mode 100644
index 43f5e7eec27b..000000000000
--- a/contrib/ntp/lib/isc/unix/include/isc/keyboard.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: keyboard.h,v 1.11 2007/06/19 23:47:19 tbox Exp $ */
-
-#ifndef ISC_KEYBOARD_H
-#define ISC_KEYBOARD_H 1
-
-/*! \file */
-
-#include <termios.h>
-
-#include <isc/lang.h>
-#include <isc/result.h>
-
-ISC_LANG_BEGINDECLS
-
-typedef struct {
- int fd;
- struct termios saved_mode;
- isc_result_t result;
-} isc_keyboard_t;
-
-isc_result_t
-isc_keyboard_open(isc_keyboard_t *keyboard);
-
-isc_result_t
-isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleepseconds);
-
-isc_result_t
-isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp);
-
-isc_boolean_t
-isc_keyboard_canceled(isc_keyboard_t *keyboard);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_KEYBOARD_H */
diff --git a/contrib/ntp/lib/isc/unix/include/isc/netdb.h b/contrib/ntp/lib/isc/unix/include/isc/netdb.h
deleted file mode 100644
index ff12a26e22ae..000000000000
--- a/contrib/ntp/lib/isc/unix/include/isc/netdb.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: netdb.h,v 1.11 2007/06/19 23:47:19 tbox Exp $ */
-
-#ifndef ISC_NETDB_H
-#define ISC_NETDB_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file
- * \brief
- * Portable netdb.h support.
- *
- * This module is responsible for defining the get<x>by<y> APIs.
- *
- * MP:
- *\li No impact.
- *
- * Reliability:
- *\li No anticipated impact.
- *
- * Resources:
- *\li N/A.
- *
- * Security:
- *\li No anticipated impact.
- *
- * Standards:
- *\li BSD API
- */
-
-/***
- *** Imports.
- ***/
-
-#include <isc/net.h>
-
-#include <netdb.h>
-
-#endif /* ISC_NETDB_H */
diff --git a/contrib/ntp/lib/isc/unix/include/isc/syslog.h b/contrib/ntp/lib/isc/unix/include/isc/syslog.h
deleted file mode 100644
index 7e0c88cb3b50..000000000000
--- a/contrib/ntp/lib/isc/unix/include/isc/syslog.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: syslog.h,v 1.7 2007/06/19 23:47:19 tbox Exp $ */
-
-#ifndef ISC_SYSLOG_H
-#define ISC_SYSLOG_H 1
-
-/*! \file */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-isc_syslog_facilityfromstring(const char *str, int *facilityp);
-/*%<
- * Convert 'str' to the appropriate syslog facility constant.
- *
- * Requires:
- *
- *\li 'str' is not NULL
- *\li 'facilityp' is not NULL
- *
- * Returns:
- * \li #ISC_R_SUCCESS
- * \li #ISC_R_NOTFOUND
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_SYSLOG_H */
diff --git a/contrib/ntp/lib/isc/unix/ipv6.c b/contrib/ntp/lib/isc/unix/ipv6.c
deleted file mode 100644
index 61e984f09d34..000000000000
--- a/contrib/ntp/lib/isc/unix/ipv6.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ipv6.c,v 1.14 2007/06/19 23:47:18 tbox Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/ipv6.h>
-
-const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
-const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
diff --git a/contrib/ntp/lib/isc/unix/keyboard.c b/contrib/ntp/lib/isc/unix/keyboard.c
deleted file mode 100644
index 8ee62d3f5906..000000000000
--- a/contrib/ntp/lib/isc/unix/keyboard.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: keyboard.c,v 1.13 2007/06/19 23:47:18 tbox Exp $ */
-
-#include <config.h>
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include <isc/keyboard.h>
-#include <isc/util.h>
-
-isc_result_t
-isc_keyboard_open(isc_keyboard_t *keyboard) {
- int fd;
- isc_result_t ret;
- struct termios current_mode;
-
- REQUIRE(keyboard != NULL);
-
- fd = open("/dev/tty", O_RDONLY, 0);
- if (fd < 0)
- return (ISC_R_IOERROR);
-
- keyboard->fd = fd;
-
- if (tcgetattr(fd, &keyboard->saved_mode) < 0) {
- ret = ISC_R_IOERROR;
- goto errout;
- }
-
- current_mode = keyboard->saved_mode;
-
- current_mode.c_iflag &=
- ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
- current_mode.c_oflag &= ~OPOST;
- current_mode.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
- current_mode.c_cflag &= ~(CSIZE|PARENB);
- current_mode.c_cflag |= CS8;
-
- current_mode.c_cc[VMIN] = 1;
- current_mode.c_cc[VTIME] = 0;
- if (tcsetattr(fd, TCSAFLUSH, &current_mode) < 0) {
- ret = ISC_R_IOERROR;
- goto errout;
- }
-
- keyboard->result = ISC_R_SUCCESS;
-
- return (ISC_R_SUCCESS);
-
- errout:
- close (fd);
-
- return (ret);
-}
-
-isc_result_t
-isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleeptime) {
- REQUIRE(keyboard != NULL);
-
- if (sleeptime > 0 && keyboard->result != ISC_R_CANCELED)
- (void)sleep(sleeptime);
-
- (void)tcsetattr(keyboard->fd, TCSAFLUSH, &keyboard->saved_mode);
- (void)close(keyboard->fd);
-
- keyboard->fd = -1;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp) {
- ssize_t cc;
- unsigned char c;
- cc_t *controlchars;
-
- REQUIRE(keyboard != NULL);
- REQUIRE(cp != NULL);
-
- cc = read(keyboard->fd, &c, 1);
- if (cc < 0) {
- keyboard->result = ISC_R_IOERROR;
- return (keyboard->result);
- }
-
- controlchars = keyboard->saved_mode.c_cc;
- if (c == controlchars[VINTR] || c == controlchars[VQUIT]) {
- keyboard->result = ISC_R_CANCELED;
- return (keyboard->result);
- }
-
- *cp = c;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_boolean_t
-isc_keyboard_canceled(isc_keyboard_t *keyboard) {
- return (ISC_TF(keyboard->result == ISC_R_CANCELED));
-}
diff --git a/contrib/ntp/lib/isc/unix/os.c b/contrib/ntp/lib/isc/unix/os.c
deleted file mode 100644
index c050d14c3b6e..000000000000
--- a/contrib/ntp/lib/isc/unix/os.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: os.c,v 1.18 2007/06/19 23:47:18 tbox Exp $ */
-
-#include <config.h>
-
-#include <isc/os.h>
-
-
-#ifdef HAVE_SYSCONF
-
-#include <unistd.h>
-
-#ifndef __hpux
-static inline long
-sysconf_ncpus(void) {
-#if defined(_SC_NPROCESSORS_ONLN)
- return sysconf((_SC_NPROCESSORS_ONLN));
-#elif defined(_SC_NPROC_ONLN)
- return sysconf((_SC_NPROC_ONLN));
-#else
- return (0);
-#endif
-}
-#endif
-#endif /* HAVE_SYSCONF */
-
-
-#ifdef __hpux
-
-#include <sys/pstat.h>
-
-static inline int
-hpux_ncpus(void) {
- struct pst_dynamic psd;
- if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) != -1)
- return (psd.psd_proc_cnt);
- else
- return (0);
-}
-
-#endif /* __hpux */
-
-#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)
-#include <sys/types.h> /* for FreeBSD */
-#include <sys/param.h> /* for NetBSD */
-#include <sys/sysctl.h>
-
-static int
-sysctl_ncpus(void) {
- int ncpu, result;
- size_t len;
-
- len = sizeof(ncpu);
- result = sysctlbyname("hw.ncpu", &ncpu, &len , 0, 0);
- if (result != -1)
- return (ncpu);
- return (0);
-}
-#endif
-
-unsigned int
-isc_os_ncpus(void) {
- long ncpus = 0;
-
-#ifdef __hpux
- ncpus = hpux_ncpus();
-#elif defined(HAVE_SYSCONF)
- ncpus = sysconf_ncpus();
-#endif
-#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)
- if (ncpus <= 0)
- ncpus = sysctl_ncpus();
-#endif
- if (ncpus <= 0)
- ncpus = 1;
-
- return ((unsigned int)ncpus);
-}
diff --git a/contrib/ntp/lib/isc/unix/resource.c b/contrib/ntp/lib/isc/unix/resource.c
deleted file mode 100644
index 29596e2aa6a1..000000000000
--- a/contrib/ntp/lib/isc/unix/resource.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: resource.c,v 1.23 2009/02/13 23:48:14 tbox Exp $ */
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <sys/time.h> /* Required on some systems for <sys/resource.h>. */
-#include <sys/resource.h>
-
-#include <isc/platform.h>
-#include <isc/resource.h>
-#include <isc/result.h>
-#include <isc/util.h>
-
-#ifdef __linux__
-#include <linux/fs.h> /* To get the large NR_OPEN. */
-#endif
-
-#if defined(__hpux) && defined(HAVE_SYS_DYNTUNE_H)
-#include <sys/dyntune.h>
-#endif
-
-#include "errno2result.h"
-
-static isc_result_t
-resource2rlim(isc_resource_t resource, int *rlim_resource) {
- isc_result_t result = ISC_R_SUCCESS;
-
- switch (resource) {
- case isc_resource_coresize:
- *rlim_resource = RLIMIT_CORE;
- break;
- case isc_resource_cputime:
- *rlim_resource = RLIMIT_CPU;
- break;
- case isc_resource_datasize:
- *rlim_resource = RLIMIT_DATA;
- break;
- case isc_resource_filesize:
- *rlim_resource = RLIMIT_FSIZE;
- break;
- case isc_resource_lockedmemory:
-#ifdef RLIMIT_MEMLOCK
- *rlim_resource = RLIMIT_MEMLOCK;
-#else
- result = ISC_R_NOTIMPLEMENTED;
-#endif
- break;
- case isc_resource_openfiles:
-#ifdef RLIMIT_NOFILE
- *rlim_resource = RLIMIT_NOFILE;
-#else
- result = ISC_R_NOTIMPLEMENTED;
-#endif
- break;
- case isc_resource_processes:
-#ifdef RLIMIT_NPROC
- *rlim_resource = RLIMIT_NPROC;
-#else
- result = ISC_R_NOTIMPLEMENTED;
-#endif
- break;
- case isc_resource_residentsize:
-#ifdef RLIMIT_RSS
- *rlim_resource = RLIMIT_RSS;
-#else
- result = ISC_R_NOTIMPLEMENTED;
-#endif
- break;
- case isc_resource_stacksize:
- *rlim_resource = RLIMIT_STACK;
- break;
- default:
- /*
- * This test is not very robust if isc_resource_t
- * changes, but generates a clear assertion message.
- */
- REQUIRE(resource >= isc_resource_coresize &&
- resource <= isc_resource_stacksize);
-
- result = ISC_R_RANGE;
- break;
- }
-
- return (result);
-}
-
-isc_result_t
-isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
- struct rlimit rl;
- ISC_PLATFORM_RLIMITTYPE rlim_value;
- int unixresult;
- int unixresource;
- isc_result_t result;
-
- result = resource2rlim(resource, &unixresource);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- if (value == ISC_RESOURCE_UNLIMITED)
- rlim_value = RLIM_INFINITY;
-
- else {
- /*
- * isc_resourcevalue_t was chosen as an unsigned 64 bit
- * integer so that it could contain the maximum range of
- * reasonable values. Unfortunately, this exceeds the typical
- * range on Unix systems. Ensure the range of
- * ISC_PLATFORM_RLIMITTYPE is not overflowed.
- */
- isc_resourcevalue_t rlim_max;
- isc_boolean_t rlim_t_is_signed =
- ISC_TF(((double)(ISC_PLATFORM_RLIMITTYPE)-1) < 0);
-
- if (rlim_t_is_signed)
- rlim_max = ~((ISC_PLATFORM_RLIMITTYPE)1 <<
- (sizeof(ISC_PLATFORM_RLIMITTYPE) * 8 - 1));
- else
- rlim_max = (ISC_PLATFORM_RLIMITTYPE)-1;
-
- if (value > rlim_max)
- value = rlim_max;
-
- rlim_value = value;
- }
-
- rl.rlim_cur = rl.rlim_max = rlim_value;
- unixresult = setrlimit(unixresource, &rl);
-
- if (unixresult == 0)
- return (ISC_R_SUCCESS);
-
-#if defined(OPEN_MAX) && defined(__APPLE__)
- /*
- * The Darwin kernel doesn't accept RLIM_INFINITY for rlim_cur; the
- * maximum possible value is OPEN_MAX. BIND8 used to use
- * sysconf(_SC_OPEN_MAX) for such a case, but this value is much
- * smaller than OPEN_MAX and is not really effective.
- */
- if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
- rl.rlim_cur = OPEN_MAX;
- unixresult = setrlimit(unixresource, &rl);
- if (unixresult == 0)
- return (ISC_R_SUCCESS);
- }
-#elif defined(__linux__)
-#ifndef NR_OPEN
-#define NR_OPEN (1024*1024)
-#endif
-
- /*
- * Some Linux kernels don't accept RLIM_INFINIT; the maximum
- * possible value is the NR_OPEN defined in linux/fs.h.
- */
- if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
- rl.rlim_cur = rl.rlim_max = NR_OPEN;
- unixresult = setrlimit(unixresource, &rl);
- if (unixresult == 0)
- return (ISC_R_SUCCESS);
- }
-#elif defined(__hpux) && defined(HAVE_SYS_DYNTUNE_H)
- if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
- uint64_t maxfiles;
- if (gettune("maxfiles_lim", &maxfiles) == 0) {
- rl.rlim_cur = rl.rlim_max = maxfiles;
- unixresult = setrlimit(unixresource, &rl);
- if (unixresult == 0)
- return (ISC_R_SUCCESS);
- }
- }
-#endif
- if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
- if (getrlimit(unixresource, &rl) == 0) {
- rl.rlim_cur = rl.rlim_max;
- unixresult = setrlimit(unixresource, &rl);
- if (unixresult == 0)
- return (ISC_R_SUCCESS);
- }
- }
- return (isc__errno2result(errno));
-}
-
-isc_result_t
-isc_resource_getlimit(isc_resource_t resource, isc_resourcevalue_t *value) {
- int unixresult;
- int unixresource;
- struct rlimit rl;
- isc_result_t result;
-
- result = resource2rlim(resource, &unixresource);
- if (result == ISC_R_SUCCESS) {
- unixresult = getrlimit(unixresource, &rl);
- INSIST(unixresult == 0);
- *value = rl.rlim_max;
- }
-
- return (result);
-}
-
-isc_result_t
-isc_resource_getcurlimit(isc_resource_t resource, isc_resourcevalue_t *value) {
- int unixresult;
- int unixresource;
- struct rlimit rl;
- isc_result_t result;
-
- result = resource2rlim(resource, &unixresource);
- if (result == ISC_R_SUCCESS) {
- unixresult = getrlimit(unixresource, &rl);
- INSIST(unixresult == 0);
- *value = rl.rlim_cur;
- }
-
- return (result);
-}
diff --git a/contrib/ntp/lib/isc/unix/socket.c b/contrib/ntp/lib/isc/unix/socket.c
deleted file mode 100644
index 5fed888a11ae..000000000000
--- a/contrib/ntp/lib/isc/unix/socket.c
+++ /dev/null
@@ -1,6011 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <isc/buffer.h>
-#include <isc/bufferlist.h>
-#include <isc/condition.h>
-#include <isc/formatcheck.h>
-#include <isc/list.h>
-#include <isc/log.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/mutex.h>
-#include <isc/net.h>
-#include <isc/once.h>
-#include <isc/platform.h>
-#include <isc/print.h>
-#include <isc/region.h>
-#include <isc/socket.h>
-#include <isc/stats.h>
-#include <isc/strerror.h>
-#include <isc/task.h>
-#include <isc/thread.h>
-#include <isc/util.h>
-#include <isc/xml.h>
-
-#ifdef ISC_PLATFORM_HAVESYSUNH
-#include <sys/un.h>
-#endif
-#ifdef ISC_PLATFORM_HAVEKQUEUE
-#include <sys/event.h>
-#endif
-#ifdef ISC_PLATFORM_HAVEEPOLL
-#include <sys/epoll.h>
-#endif
-#ifdef ISC_PLATFORM_HAVEDEVPOLL
-#if defined(HAVE_SYS_DEVPOLL_H)
-#include <sys/devpoll.h>
-#elif defined(HAVE_DEVPOLL_H)
-#include <devpoll.h>
-#endif
-#endif
-
-#include "errno2result.h"
-
-/* See task.c about the following definition: */
-#ifdef BIND9
-#ifdef ISC_PLATFORM_USETHREADS
-#define USE_WATCHER_THREAD
-#else
-#define USE_SHARED_MANAGER
-#endif /* ISC_PLATFORM_USETHREADS */
-#endif /* BIND9 */
-
-#ifndef USE_WATCHER_THREAD
-#include "socket_p.h"
-#include "../task_p.h"
-#endif /* USE_WATCHER_THREAD */
-
-#if defined(SO_BSDCOMPAT) && defined(__linux__)
-#include <sys/utsname.h>
-#endif
-
-/*%
- * Choose the most preferable multiplex method.
- */
-#ifdef ISC_PLATFORM_HAVEKQUEUE
-#define USE_KQUEUE
-#elif defined (ISC_PLATFORM_HAVEEPOLL)
-#define USE_EPOLL
-#elif defined (ISC_PLATFORM_HAVEDEVPOLL)
-#define USE_DEVPOLL
-typedef struct {
- unsigned int want_read : 1,
- want_write : 1;
-} pollinfo_t;
-#else
-#define USE_SELECT
-#endif /* ISC_PLATFORM_HAVEKQUEUE */
-
-#ifndef USE_WATCHER_THREAD
-#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
-struct isc_socketwait {
- int nevents;
-};
-#elif defined (USE_SELECT)
-struct isc_socketwait {
- fd_set *readset;
- fd_set *writeset;
- int nfds;
- int maxfd;
-};
-#endif /* USE_KQUEUE */
-#endif /* !USE_WATCHER_THREAD */
-
-/*%
- * Maximum number of allowable open sockets. This is also the maximum
- * allowable socket file descriptor.
- *
- * Care should be taken before modifying this value for select():
- * The API standard doesn't ensure select() accept more than (the system default
- * of) FD_SETSIZE descriptors, and the default size should in fact be fine in
- * the vast majority of cases. This constant should therefore be increased only
- * when absolutely necessary and possible, i.e., the server is exhausting all
- * available file descriptors (up to FD_SETSIZE) and the select() function
- * and FD_xxx macros support larger values than FD_SETSIZE (which may not
- * always by true, but we keep using some of them to ensure as much
- * portability as possible). Note also that overall server performance
- * may be rather worsened with a larger value of this constant due to
- * inherent scalability problems of select().
- *
- * As a special note, this value shouldn't have to be touched if
- * this is a build for an authoritative only DNS server.
- */
-#ifndef ISC_SOCKET_MAXSOCKETS
-#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
-#define ISC_SOCKET_MAXSOCKETS 4096
-#elif defined(USE_SELECT)
-#define ISC_SOCKET_MAXSOCKETS FD_SETSIZE
-#endif /* USE_KQUEUE... */
-#endif /* ISC_SOCKET_MAXSOCKETS */
-
-#ifdef USE_SELECT
-/*%
- * Mac OS X needs a special definition to support larger values in select().
- * We always define this because a larger value can be specified run-time.
- */
-#ifdef __APPLE__
-#define _DARWIN_UNLIMITED_SELECT
-#endif /* __APPLE__ */
-#endif /* USE_SELECT */
-
-#ifdef ISC_SOCKET_USE_POLLWATCH
-/*%
- * If this macro is defined, enable workaround for a Solaris /dev/poll kernel
- * bug: DP_POLL ioctl could keep sleeping even if socket I/O is possible for
- * some of the specified FD. The idea is based on the observation that it's
- * likely for a busy server to keep receiving packets. It specifically works
- * as follows: the socket watcher is first initialized with the state of
- * "poll_idle". While it's in the idle state it keeps sleeping until a socket
- * event occurs. When it wakes up for a socket I/O event, it moves to the
- * poll_active state, and sets the poll timeout to a short period
- * (ISC_SOCKET_POLLWATCH_TIMEOUT msec). If timeout occurs in this state, the
- * watcher goes to the poll_checking state with the same timeout period.
- * In this state, the watcher tries to detect whether this is a break
- * during intermittent events or the kernel bug is triggered. If the next
- * polling reports an event within the short period, the previous timeout is
- * likely to be a kernel bug, and so the watcher goes back to the active state.
- * Otherwise, it moves to the idle state again.
- *
- * It's not clear whether this is a thread-related bug, but since we've only
- * seen this with threads, this workaround is used only when enabling threads.
- */
-
-typedef enum { poll_idle, poll_active, poll_checking } pollstate_t;
-
-#ifndef ISC_SOCKET_POLLWATCH_TIMEOUT
-#define ISC_SOCKET_POLLWATCH_TIMEOUT 10
-#endif /* ISC_SOCKET_POLLWATCH_TIMEOUT */
-#endif /* ISC_SOCKET_USE_POLLWATCH */
-
-/*%
- * Size of per-FD lock buckets.
- */
-#ifdef ISC_PLATFORM_USETHREADS
-#define FDLOCK_COUNT 1024
-#define FDLOCK_ID(fd) ((fd) % FDLOCK_COUNT)
-#else
-#define FDLOCK_COUNT 1
-#define FDLOCK_ID(fd) 0
-#endif /* ISC_PLATFORM_USETHREADS */
-
-/*%
- * Maximum number of events communicated with the kernel. There should normally
- * be no need for having a large number.
- */
-#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
-#ifndef ISC_SOCKET_MAXEVENTS
-#define ISC_SOCKET_MAXEVENTS 64
-#endif
-#endif
-
-/*%
- * Some systems define the socket length argument as an int, some as size_t,
- * some as socklen_t. This is here so it can be easily changed if needed.
- */
-#ifndef ISC_SOCKADDR_LEN_T
-#define ISC_SOCKADDR_LEN_T unsigned int
-#endif
-
-/*%
- * Define what the possible "soft" errors can be. These are non-fatal returns
- * of various network related functions, like recv() and so on.
- *
- * For some reason, BSDI (and perhaps others) will sometimes return <0
- * from recv() but will have errno==0. This is broken, but we have to
- * work around it here.
- */
-#define SOFT_ERROR(e) ((e) == EAGAIN || \
- (e) == EWOULDBLOCK || \
- (e) == EINTR || \
- (e) == 0)
-
-#define DLVL(x) ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(x)
-
-/*!<
- * DLVL(90) -- Function entry/exit and other tracing.
- * DLVL(70) -- Socket "correctness" -- including returning of events, etc.
- * DLVL(60) -- Socket data send/receive
- * DLVL(50) -- Event tracing, including receiving/sending completion events.
- * DLVL(20) -- Socket creation/destruction.
- */
-#define TRACE_LEVEL 90
-#define CORRECTNESS_LEVEL 70
-#define IOEVENT_LEVEL 60
-#define EVENT_LEVEL 50
-#define CREATION_LEVEL 20
-
-#define TRACE DLVL(TRACE_LEVEL)
-#define CORRECTNESS DLVL(CORRECTNESS_LEVEL)
-#define IOEVENT DLVL(IOEVENT_LEVEL)
-#define EVENT DLVL(EVENT_LEVEL)
-#define CREATION DLVL(CREATION_LEVEL)
-
-typedef isc_event_t intev_t;
-
-#define SOCKET_MAGIC ISC_MAGIC('I', 'O', 'i', 'o')
-#define VALID_SOCKET(s) ISC_MAGIC_VALID(s, SOCKET_MAGIC)
-
-/*!
- * IPv6 control information. If the socket is an IPv6 socket we want
- * to collect the destination address and interface so the client can
- * set them on outgoing packets.
- */
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
-#ifndef USE_CMSG
-#define USE_CMSG 1
-#endif
-#endif
-
-/*%
- * NetBSD and FreeBSD can timestamp packets. XXXMLG Should we have
- * a setsockopt() like interface to request timestamps, and if the OS
- * doesn't do it for us, call gettimeofday() on every UDP receive?
- */
-#ifdef SO_TIMESTAMP
-#ifndef USE_CMSG
-#define USE_CMSG 1
-#endif
-#endif
-
-/*%
- * The size to raise the receive buffer to (from BIND 8).
- */
-#define RCVBUFSIZE (32*1024)
-
-/*%
- * The number of times a send operation is repeated if the result is EINTR.
- */
-#define NRETRIES 10
-
-typedef struct isc__socket isc__socket_t;
-typedef struct isc__socketmgr isc__socketmgr_t;
-
-#define NEWCONNSOCK(ev) ((isc__socket_t *)(ev)->newsocket)
-
-struct isc__socket {
- /* Not locked. */
- isc_socket_t common;
- isc__socketmgr_t *manager;
- isc_mutex_t lock;
- isc_sockettype_t type;
- const isc_statscounter_t *statsindex;
-
- /* Locked by socket lock. */
- ISC_LINK(isc__socket_t) link;
- unsigned int references;
- int fd;
- int pf;
- char name[16];
- void * tag;
-
- ISC_LIST(isc_socketevent_t) send_list;
- ISC_LIST(isc_socketevent_t) recv_list;
- ISC_LIST(isc_socket_newconnev_t) accept_list;
- isc_socket_connev_t *connect_ev;
-
- /*
- * Internal events. Posted when a descriptor is readable or
- * writable. These are statically allocated and never freed.
- * They will be set to non-purgable before use.
- */
- intev_t readable_ev;
- intev_t writable_ev;
-
- isc_sockaddr_t peer_address; /* remote address */
-
- unsigned int pending_recv : 1,
- pending_send : 1,
- pending_accept : 1,
- listener : 1, /* listener socket */
- connected : 1,
- connecting : 1, /* connect pending */
- bound : 1, /* bound to local addr */
- dupped : 1;
-
-#ifdef ISC_NET_RECVOVERFLOW
- unsigned char overflow; /* used for MSG_TRUNC fake */
-#endif
-
- char *recvcmsgbuf;
- ISC_SOCKADDR_LEN_T recvcmsgbuflen;
- char *sendcmsgbuf;
- ISC_SOCKADDR_LEN_T sendcmsgbuflen;
-
- void *fdwatcharg;
- isc_sockfdwatch_t fdwatchcb;
- int fdwatchflags;
- isc_task_t *fdwatchtask;
-};
-
-#define SOCKET_MANAGER_MAGIC ISC_MAGIC('I', 'O', 'm', 'g')
-#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, SOCKET_MANAGER_MAGIC)
-
-struct isc__socketmgr {
- /* Not locked. */
- isc_socketmgr_t common;
- isc_mem_t *mctx;
- isc_mutex_t lock;
- isc_mutex_t *fdlock;
- isc_stats_t *stats;
-#ifdef USE_KQUEUE
- int kqueue_fd;
- int nevents;
- struct kevent *events;
-#endif /* USE_KQUEUE */
-#ifdef USE_EPOLL
- int epoll_fd;
- int nevents;
- struct epoll_event *events;
-#endif /* USE_EPOLL */
-#ifdef USE_DEVPOLL
- int devpoll_fd;
- int nevents;
- struct pollfd *events;
-#endif /* USE_DEVPOLL */
-#ifdef USE_SELECT
- int fd_bufsize;
-#endif /* USE_SELECT */
- unsigned int maxsocks;
-#ifdef ISC_PLATFORM_USETHREADS
- int pipe_fds[2];
-#endif
-
- /* Locked by fdlock. */
- isc__socket_t **fds;
- int *fdstate;
-#ifdef USE_DEVPOLL
- pollinfo_t *fdpollinfo;
-#endif
-
- /* Locked by manager lock. */
- ISC_LIST(isc__socket_t) socklist;
-#ifdef USE_SELECT
- fd_set *read_fds;
- fd_set *read_fds_copy;
- fd_set *write_fds;
- fd_set *write_fds_copy;
- int maxfd;
-#endif /* USE_SELECT */
- int reserved; /* unlocked */
-#ifdef USE_WATCHER_THREAD
- isc_thread_t watcher;
- isc_condition_t shutdown_ok;
-#else /* USE_WATCHER_THREAD */
- unsigned int refs;
-#endif /* USE_WATCHER_THREAD */
- int maxudp;
-};
-
-#ifdef USE_SHARED_MANAGER
-static isc__socketmgr_t *socketmgr = NULL;
-#endif /* USE_SHARED_MANAGER */
-
-#define CLOSED 0 /* this one must be zero */
-#define MANAGED 1
-#define CLOSE_PENDING 2
-
-/*
- * send() and recv() iovec counts
- */
-#define MAXSCATTERGATHER_SEND (ISC_SOCKET_MAXSCATTERGATHER)
-#ifdef ISC_NET_RECVOVERFLOW
-# define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER + 1)
-#else
-# define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER)
-#endif
-
-static isc_result_t socket_create(isc_socketmgr_t *manager0, int pf,
- isc_sockettype_t type,
- isc_socket_t **socketp,
- isc_socket_t *dup_socket);
-static void send_recvdone_event(isc__socket_t *, isc_socketevent_t **);
-static void send_senddone_event(isc__socket_t *, isc_socketevent_t **);
-static void free_socket(isc__socket_t **);
-static isc_result_t allocate_socket(isc__socketmgr_t *, isc_sockettype_t,
- isc__socket_t **);
-static void destroy(isc__socket_t **);
-static void internal_accept(isc_task_t *, isc_event_t *);
-static void internal_connect(isc_task_t *, isc_event_t *);
-static void internal_recv(isc_task_t *, isc_event_t *);
-static void internal_send(isc_task_t *, isc_event_t *);
-static void internal_fdwatch_write(isc_task_t *, isc_event_t *);
-static void internal_fdwatch_read(isc_task_t *, isc_event_t *);
-static void process_cmsg(isc__socket_t *, struct msghdr *, isc_socketevent_t *);
-static void build_msghdr_send(isc__socket_t *, isc_socketevent_t *,
- struct msghdr *, struct iovec *, size_t *);
-static void build_msghdr_recv(isc__socket_t *, isc_socketevent_t *,
- struct msghdr *, struct iovec *, size_t *);
-#ifdef USE_WATCHER_THREAD
-static isc_boolean_t process_ctlfd(isc__socketmgr_t *manager);
-#endif
-
-/*%
- * The following can be either static or public, depending on build environment.
- */
-
-#ifdef BIND9
-#define ISC_SOCKETFUNC_SCOPE
-#else
-#define ISC_SOCKETFUNC_SCOPE static
-#endif
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
- isc_socket_t **socketp);
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_attach(isc_socket_t *sock, isc_socket_t **socketp);
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_detach(isc_socket_t **socketp);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
- unsigned int maxsocks);
-ISC_SOCKETFUNC_SCOPE void
-isc__socketmgr_destroy(isc_socketmgr_t **managerp);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- unsigned int minimum, isc_task_t *task,
- isc_taskaction_t action, const void *arg);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_recv(isc_socket_t *sock, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_taskaction_t action, const void *arg);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_recv2(isc_socket_t *sock, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_socketevent_t *event, unsigned int flags);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_send(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendto(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendto2(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
- isc_socketevent_t *event, unsigned int flags);
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
- isc_uint32_t owner, isc_uint32_t group);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
- unsigned int options);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_filter(isc_socket_t *sock, const char *filter);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_listen(isc_socket_t *sock, unsigned int backlog);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_accept(isc_socket_t *sock,
- isc_task_t *task, isc_taskaction_t action, const void *arg);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
- isc_task_t *task, isc_taskaction_t action,
- const void *arg);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp);
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how);
-ISC_SOCKETFUNC_SCOPE isc_sockettype_t
-isc__socket_gettype(isc_socket_t *sock);
-ISC_SOCKETFUNC_SCOPE isc_boolean_t
-isc__socket_isbound(isc_socket_t *sock);
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes);
-#if defined(HAVE_LIBXML2) && defined(BIND9)
-ISC_SOCKETFUNC_SCOPE void
-isc__socketmgr_renderxml(isc_socketmgr_t *mgr0, xmlTextWriterPtr writer);
-#endif
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_fdwatchcreate(isc_socketmgr_t *manager, int fd, int flags,
- isc_sockfdwatch_t callback, void *cbarg,
- isc_task_t *task, isc_socket_t **socketp);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_fdwatchpoke(isc_socket_t *sock, int flags);
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_dup(isc_socket_t *sock, isc_socket_t **socketp);
-ISC_SOCKETFUNC_SCOPE int
-isc__socket_getfd(isc_socket_t *sock);
-
-static struct {
- isc_socketmethods_t methods;
-
- /*%
- * The following are defined just for avoiding unused static functions.
- */
-#ifndef BIND9
- void *recvv, *send, *sendv, *sendto2, *cleanunix, *permunix, *filter,
- *listen, *accept, *getpeername, *isbound;
-#endif
-} socketmethods = {
- {
- isc__socket_attach,
- isc__socket_detach,
- isc__socket_bind,
- isc__socket_sendto,
- isc__socket_connect,
- isc__socket_recv,
- isc__socket_cancel,
- isc__socket_getsockname,
- isc__socket_gettype,
- isc__socket_ipv6only,
- isc__socket_fdwatchpoke,
- isc__socket_dup,
- isc__socket_getfd
- }
-#ifndef BIND9
- ,
- (void *)isc__socket_recvv, (void *)isc__socket_send,
- (void *)isc__socket_sendv, (void *)isc__socket_sendto2,
- (void *)isc__socket_cleanunix, (void *)isc__socket_permunix,
- (void *)isc__socket_filter, (void *)isc__socket_listen,
- (void *)isc__socket_accept, (void *)isc__socket_getpeername,
- (void *)isc__socket_isbound
-#endif
-};
-
-static isc_socketmgrmethods_t socketmgrmethods = {
- isc__socketmgr_destroy,
- isc__socket_create,
- isc__socket_fdwatchcreate
-};
-
-#define SELECT_POKE_SHUTDOWN (-1)
-#define SELECT_POKE_NOTHING (-2)
-#define SELECT_POKE_READ (-3)
-#define SELECT_POKE_ACCEPT (-3) /*%< Same as _READ */
-#define SELECT_POKE_WRITE (-4)
-#define SELECT_POKE_CONNECT (-4) /*%< Same as _WRITE */
-#define SELECT_POKE_CLOSE (-5)
-
-#define SOCK_DEAD(s) ((s)->references == 0)
-
-/*%
- * Shortcut index arrays to get access to statistics counters.
- */
-enum {
- STATID_OPEN = 0,
- STATID_OPENFAIL = 1,
- STATID_CLOSE = 2,
- STATID_BINDFAIL = 3,
- STATID_CONNECTFAIL = 4,
- STATID_CONNECT = 5,
- STATID_ACCEPTFAIL = 6,
- STATID_ACCEPT = 7,
- STATID_SENDFAIL = 8,
- STATID_RECVFAIL = 9
-};
-static const isc_statscounter_t upd4statsindex[] = {
- isc_sockstatscounter_udp4open,
- isc_sockstatscounter_udp4openfail,
- isc_sockstatscounter_udp4close,
- isc_sockstatscounter_udp4bindfail,
- isc_sockstatscounter_udp4connectfail,
- isc_sockstatscounter_udp4connect,
- -1,
- -1,
- isc_sockstatscounter_udp4sendfail,
- isc_sockstatscounter_udp4recvfail
-};
-static const isc_statscounter_t upd6statsindex[] = {
- isc_sockstatscounter_udp6open,
- isc_sockstatscounter_udp6openfail,
- isc_sockstatscounter_udp6close,
- isc_sockstatscounter_udp6bindfail,
- isc_sockstatscounter_udp6connectfail,
- isc_sockstatscounter_udp6connect,
- -1,
- -1,
- isc_sockstatscounter_udp6sendfail,
- isc_sockstatscounter_udp6recvfail
-};
-static const isc_statscounter_t tcp4statsindex[] = {
- isc_sockstatscounter_tcp4open,
- isc_sockstatscounter_tcp4openfail,
- isc_sockstatscounter_tcp4close,
- isc_sockstatscounter_tcp4bindfail,
- isc_sockstatscounter_tcp4connectfail,
- isc_sockstatscounter_tcp4connect,
- isc_sockstatscounter_tcp4acceptfail,
- isc_sockstatscounter_tcp4accept,
- isc_sockstatscounter_tcp4sendfail,
- isc_sockstatscounter_tcp4recvfail
-};
-static const isc_statscounter_t tcp6statsindex[] = {
- isc_sockstatscounter_tcp6open,
- isc_sockstatscounter_tcp6openfail,
- isc_sockstatscounter_tcp6close,
- isc_sockstatscounter_tcp6bindfail,
- isc_sockstatscounter_tcp6connectfail,
- isc_sockstatscounter_tcp6connect,
- isc_sockstatscounter_tcp6acceptfail,
- isc_sockstatscounter_tcp6accept,
- isc_sockstatscounter_tcp6sendfail,
- isc_sockstatscounter_tcp6recvfail
-};
-static const isc_statscounter_t unixstatsindex[] = {
- isc_sockstatscounter_unixopen,
- isc_sockstatscounter_unixopenfail,
- isc_sockstatscounter_unixclose,
- isc_sockstatscounter_unixbindfail,
- isc_sockstatscounter_unixconnectfail,
- isc_sockstatscounter_unixconnect,
- isc_sockstatscounter_unixacceptfail,
- isc_sockstatscounter_unixaccept,
- isc_sockstatscounter_unixsendfail,
- isc_sockstatscounter_unixrecvfail
-};
-static const isc_statscounter_t fdwatchstatsindex[] = {
- -1,
- -1,
- isc_sockstatscounter_fdwatchclose,
- isc_sockstatscounter_fdwatchbindfail,
- isc_sockstatscounter_fdwatchconnectfail,
- isc_sockstatscounter_fdwatchconnect,
- -1,
- -1,
- isc_sockstatscounter_fdwatchsendfail,
- isc_sockstatscounter_fdwatchrecvfail
-};
-
-#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL) || \
- defined(USE_WATCHER_THREAD)
-static void
-manager_log(isc__socketmgr_t *sockmgr,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
- const char *fmt, ...) ISC_FORMAT_PRINTF(5, 6);
-static void
-manager_log(isc__socketmgr_t *sockmgr,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
- const char *fmt, ...)
-{
- char msgbuf[2048];
- va_list ap;
-
- if (! isc_log_wouldlog(isc_lctx, level))
- return;
-
- va_start(ap, fmt);
- vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
- va_end(ap);
-
- isc_log_write(isc_lctx, category, module, level,
- "sockmgr %p: %s", sockmgr, msgbuf);
-}
-#endif
-
-static void
-socket_log(isc__socket_t *sock, isc_sockaddr_t *address,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *fmt, ...) ISC_FORMAT_PRINTF(9, 10);
-static void
-socket_log(isc__socket_t *sock, isc_sockaddr_t *address,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *fmt, ...)
-{
- char msgbuf[2048];
- char peerbuf[ISC_SOCKADDR_FORMATSIZE];
- va_list ap;
-
- if (! isc_log_wouldlog(isc_lctx, level))
- return;
-
- va_start(ap, fmt);
- vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
- va_end(ap);
-
- if (address == NULL) {
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p: %s", sock, msgbuf);
- } else {
- isc_sockaddr_format(address, peerbuf, sizeof(peerbuf));
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p %s: %s", sock, peerbuf, msgbuf);
- }
-}
-
-#if defined(_AIX) && defined(ISC_NET_BSD44MSGHDR) && \
- defined(USE_CMSG) && defined(IPV6_RECVPKTINFO)
-/*
- * AIX has a kernel bug where IPV6_RECVPKTINFO gets cleared by
- * setting IPV6_V6ONLY.
- */
-static void
-FIX_IPV6_RECVPKTINFO(isc__socket_t *sock)
-{
- char strbuf[ISC_STRERRORSIZE];
- int on = 1;
-
- if (sock->pf != AF_INET6 || sock->type != isc_sockettype_udp)
- return;
-
- if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
- (void *)&on, sizeof(on)) < 0) {
-
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_RECVPKTINFO) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
-}
-#else
-#define FIX_IPV6_RECVPKTINFO(sock) (void)0
-#endif
-
-/*%
- * Increment socket-related statistics counters.
- */
-static inline void
-inc_stats(isc_stats_t *stats, isc_statscounter_t counterid) {
- REQUIRE(counterid != -1);
-
- if (stats != NULL)
- isc_stats_increment(stats, counterid);
-}
-
-static inline isc_result_t
-watch_fd(isc__socketmgr_t *manager, int fd, int msg) {
- isc_result_t result = ISC_R_SUCCESS;
-
-#ifdef USE_KQUEUE
- struct kevent evchange;
-
- memset(&evchange, 0, sizeof(evchange));
- if (msg == SELECT_POKE_READ)
- evchange.filter = EVFILT_READ;
- else
- evchange.filter = EVFILT_WRITE;
- evchange.flags = EV_ADD;
- evchange.ident = fd;
- if (kevent(manager->kqueue_fd, &evchange, 1, NULL, 0, NULL) != 0)
- result = isc__errno2result(errno);
-
- return (result);
-#elif defined(USE_EPOLL)
- struct epoll_event event;
-
- if (msg == SELECT_POKE_READ)
- event.events = EPOLLIN;
- else
- event.events = EPOLLOUT;
- memset(&event.data, 0, sizeof(event.data));
- event.data.fd = fd;
- if (epoll_ctl(manager->epoll_fd, EPOLL_CTL_ADD, fd, &event) == -1 &&
- errno != EEXIST) {
- result = isc__errno2result(errno);
- }
-
- return (result);
-#elif defined(USE_DEVPOLL)
- struct pollfd pfd;
- int lockid = FDLOCK_ID(fd);
-
- memset(&pfd, 0, sizeof(pfd));
- if (msg == SELECT_POKE_READ)
- pfd.events = POLLIN;
- else
- pfd.events = POLLOUT;
- pfd.fd = fd;
- pfd.revents = 0;
- LOCK(&manager->fdlock[lockid]);
- if (write(manager->devpoll_fd, &pfd, sizeof(pfd)) == -1)
- result = isc__errno2result(errno);
- else {
- if (msg == SELECT_POKE_READ)
- manager->fdpollinfo[fd].want_read = 1;
- else
- manager->fdpollinfo[fd].want_write = 1;
- }
- UNLOCK(&manager->fdlock[lockid]);
-
- return (result);
-#elif defined(USE_SELECT)
- LOCK(&manager->lock);
- if (msg == SELECT_POKE_READ)
- FD_SET(fd, manager->read_fds);
- if (msg == SELECT_POKE_WRITE)
- FD_SET(fd, manager->write_fds);
- UNLOCK(&manager->lock);
-
- return (result);
-#endif
-}
-
-static inline isc_result_t
-unwatch_fd(isc__socketmgr_t *manager, int fd, int msg) {
- isc_result_t result = ISC_R_SUCCESS;
-
-#ifdef USE_KQUEUE
- struct kevent evchange;
-
- memset(&evchange, 0, sizeof(evchange));
- if (msg == SELECT_POKE_READ)
- evchange.filter = EVFILT_READ;
- else
- evchange.filter = EVFILT_WRITE;
- evchange.flags = EV_DELETE;
- evchange.ident = fd;
- if (kevent(manager->kqueue_fd, &evchange, 1, NULL, 0, NULL) != 0)
- result = isc__errno2result(errno);
-
- return (result);
-#elif defined(USE_EPOLL)
- struct epoll_event event;
-
- if (msg == SELECT_POKE_READ)
- event.events = EPOLLIN;
- else
- event.events = EPOLLOUT;
- memset(&event.data, 0, sizeof(event.data));
- event.data.fd = fd;
- if (epoll_ctl(manager->epoll_fd, EPOLL_CTL_DEL, fd, &event) == -1 &&
- errno != ENOENT) {
- char strbuf[ISC_STRERRORSIZE];
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "epoll_ctl(DEL), %d: %s", fd, strbuf);
- result = ISC_R_UNEXPECTED;
- }
- return (result);
-#elif defined(USE_DEVPOLL)
- struct pollfd pfds[2];
- size_t writelen = sizeof(pfds[0]);
- int lockid = FDLOCK_ID(fd);
-
- memset(pfds, 0, sizeof(pfds));
- pfds[0].events = POLLREMOVE;
- pfds[0].fd = fd;
-
- /*
- * Canceling read or write polling via /dev/poll is tricky. Since it
- * only provides a way of canceling per FD, we may need to re-poll the
- * socket for the other operation.
- */
- LOCK(&manager->fdlock[lockid]);
- if (msg == SELECT_POKE_READ &&
- manager->fdpollinfo[fd].want_write == 1) {
- pfds[1].events = POLLOUT;
- pfds[1].fd = fd;
- writelen += sizeof(pfds[1]);
- }
- if (msg == SELECT_POKE_WRITE &&
- manager->fdpollinfo[fd].want_read == 1) {
- pfds[1].events = POLLIN;
- pfds[1].fd = fd;
- writelen += sizeof(pfds[1]);
- }
-
- if (write(manager->devpoll_fd, pfds, writelen) == -1)
- result = isc__errno2result(errno);
- else {
- if (msg == SELECT_POKE_READ)
- manager->fdpollinfo[fd].want_read = 0;
- else
- manager->fdpollinfo[fd].want_write = 0;
- }
- UNLOCK(&manager->fdlock[lockid]);
-
- return (result);
-#elif defined(USE_SELECT)
- LOCK(&manager->lock);
- if (msg == SELECT_POKE_READ)
- FD_CLR(fd, manager->read_fds);
- else if (msg == SELECT_POKE_WRITE)
- FD_CLR(fd, manager->write_fds);
- UNLOCK(&manager->lock);
-
- return (result);
-#endif
-}
-
-static void
-wakeup_socket(isc__socketmgr_t *manager, int fd, int msg) {
- isc_result_t result;
- int lockid = FDLOCK_ID(fd);
-
- /*
- * This is a wakeup on a socket. If the socket is not in the
- * process of being closed, start watching it for either reads
- * or writes.
- */
-
- INSIST(fd >= 0 && fd < (int)manager->maxsocks);
-
- if (msg == SELECT_POKE_CLOSE) {
- /* No one should be updating fdstate, so no need to lock it */
- INSIST(manager->fdstate[fd] == CLOSE_PENDING);
- manager->fdstate[fd] = CLOSED;
- (void)unwatch_fd(manager, fd, SELECT_POKE_READ);
- (void)unwatch_fd(manager, fd, SELECT_POKE_WRITE);
- (void)close(fd);
- return;
- }
-
- LOCK(&manager->fdlock[lockid]);
- if (manager->fdstate[fd] == CLOSE_PENDING) {
- UNLOCK(&manager->fdlock[lockid]);
-
- /*
- * We accept (and ignore) any error from unwatch_fd() as we are
- * closing the socket, hoping it doesn't leave dangling state in
- * the kernel.
- * Note that unwatch_fd() must be called after releasing the
- * fdlock; otherwise it could cause deadlock due to a lock order
- * reversal.
- */
- (void)unwatch_fd(manager, fd, SELECT_POKE_READ);
- (void)unwatch_fd(manager, fd, SELECT_POKE_WRITE);
- return;
- }
- if (manager->fdstate[fd] != MANAGED) {
- UNLOCK(&manager->fdlock[lockid]);
- return;
- }
- UNLOCK(&manager->fdlock[lockid]);
-
- /*
- * Set requested bit.
- */
- result = watch_fd(manager, fd, msg);
- if (result != ISC_R_SUCCESS) {
- /*
- * XXXJT: what should we do? Ignoring the failure of watching
- * a socket will make the application dysfunctional, but there
- * seems to be no reasonable recovery process.
- */
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- "failed to start watching FD (%d): %s",
- fd, isc_result_totext(result));
- }
-}
-
-#ifdef USE_WATCHER_THREAD
-/*
- * Poke the select loop when there is something for us to do.
- * The write is required (by POSIX) to complete. That is, we
- * will not get partial writes.
- */
-static void
-select_poke(isc__socketmgr_t *mgr, int fd, int msg) {
- int cc;
- int buf[2];
- char strbuf[ISC_STRERRORSIZE];
-
- buf[0] = fd;
- buf[1] = msg;
-
- do {
- cc = write(mgr->pipe_fds[1], buf, sizeof(buf));
-#ifdef ENOSR
- /*
- * Treat ENOSR as EAGAIN but loop slowly as it is
- * unlikely to clear fast.
- */
- if (cc < 0 && errno == ENOSR) {
- sleep(1);
- errno = EAGAIN;
- }
-#endif
- } while (cc < 0 && SOFT_ERROR(errno));
-
- if (cc < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_WRITEFAILED,
- "write() failed "
- "during watcher poke: %s"),
- strbuf);
- }
-
- INSIST(cc == sizeof(buf));
-}
-
-/*
- * Read a message on the internal fd.
- */
-static void
-select_readmsg(isc__socketmgr_t *mgr, int *fd, int *msg) {
- int buf[2];
- int cc;
- char strbuf[ISC_STRERRORSIZE];
-
- cc = read(mgr->pipe_fds[0], buf, sizeof(buf));
- if (cc < 0) {
- *msg = SELECT_POKE_NOTHING;
- *fd = -1; /* Silence compiler. */
- if (SOFT_ERROR(errno))
- return;
-
- isc__strerror(errno, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_READFAILED,
- "read() failed "
- "during watcher poke: %s"),
- strbuf);
-
- return;
- }
- INSIST(cc == sizeof(buf));
-
- *fd = buf[0];
- *msg = buf[1];
-}
-#else /* USE_WATCHER_THREAD */
-/*
- * Update the state of the socketmgr when something changes.
- */
-static void
-select_poke(isc__socketmgr_t *manager, int fd, int msg) {
- if (msg == SELECT_POKE_SHUTDOWN)
- return;
- else if (fd >= 0)
- wakeup_socket(manager, fd, msg);
- return;
-}
-#endif /* USE_WATCHER_THREAD */
-
-/*
- * Make a fd non-blocking.
- */
-static isc_result_t
-make_nonblock(int fd) {
- int ret;
- int flags;
- char strbuf[ISC_STRERRORSIZE];
-#ifdef USE_FIONBIO_IOCTL
- int on = 1;
-
- ret = ioctl(fd, FIONBIO, (char *)&on);
-#else
- flags = fcntl(fd, F_GETFL, 0);
- flags |= PORT_NONBLOCK;
- ret = fcntl(fd, F_SETFL, flags);
-#endif
-
- if (ret == -1) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
-#ifdef USE_FIONBIO_IOCTL
- "ioctl(%d, FIONBIO, &on): %s", fd,
-#else
- "fcntl(%d, F_SETFL, %d): %s", fd, flags,
-#endif
- strbuf);
-
- return (ISC_R_UNEXPECTED);
- }
-
- return (ISC_R_SUCCESS);
-}
-
-#ifdef USE_CMSG
-/*
- * Not all OSes support advanced CMSG macros: CMSG_LEN and CMSG_SPACE.
- * In order to ensure as much portability as possible, we provide wrapper
- * functions of these macros.
- * Note that cmsg_space() could run slow on OSes that do not have
- * CMSG_SPACE.
- */
-static inline ISC_SOCKADDR_LEN_T
-cmsg_len(ISC_SOCKADDR_LEN_T len) {
-#ifdef CMSG_LEN
- return (CMSG_LEN(len));
-#else
- ISC_SOCKADDR_LEN_T hdrlen;
-
- /*
- * Cast NULL so that any pointer arithmetic performed by CMSG_DATA
- * is correct.
- */
- hdrlen = (ISC_SOCKADDR_LEN_T)CMSG_DATA(((struct cmsghdr *)NULL));
- return (hdrlen + len);
-#endif
-}
-
-static inline ISC_SOCKADDR_LEN_T
-cmsg_space(ISC_SOCKADDR_LEN_T len) {
-#ifdef CMSG_SPACE
- return (CMSG_SPACE(len));
-#else
- struct msghdr msg;
- struct cmsghdr *cmsgp;
- /*
- * XXX: The buffer length is an ad-hoc value, but should be enough
- * in a practical sense.
- */
- char dummybuf[sizeof(struct cmsghdr) + 1024];
-
- memset(&msg, 0, sizeof(msg));
- msg.msg_control = dummybuf;
- msg.msg_controllen = sizeof(dummybuf);
-
- cmsgp = (struct cmsghdr *)dummybuf;
- cmsgp->cmsg_len = cmsg_len(len);
-
- cmsgp = CMSG_NXTHDR(&msg, cmsgp);
- if (cmsgp != NULL)
- return ((char *)cmsgp - (char *)msg.msg_control);
- else
- return (0);
-#endif
-}
-#endif /* USE_CMSG */
-
-/*
- * Process control messages received on a socket.
- */
-static void
-process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
-#ifdef USE_CMSG
- struct cmsghdr *cmsgp;
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
- struct in6_pktinfo *pktinfop;
-#endif
-#ifdef SO_TIMESTAMP
- struct timeval *timevalp;
-#endif
-#endif
-
- /*
- * sock is used only when ISC_NET_BSD44MSGHDR and USE_CMSG are defined.
- * msg and dev are used only when ISC_NET_BSD44MSGHDR is defined.
- * They are all here, outside of the CPP tests, because it is
- * more consistent with the usual ISC coding style.
- */
- UNUSED(sock);
- UNUSED(msg);
- UNUSED(dev);
-
-#ifdef ISC_NET_BSD44MSGHDR
-
-#ifdef MSG_TRUNC
- if ((msg->msg_flags & MSG_TRUNC) == MSG_TRUNC)
- dev->attributes |= ISC_SOCKEVENTATTR_TRUNC;
-#endif
-
-#ifdef MSG_CTRUNC
- if ((msg->msg_flags & MSG_CTRUNC) == MSG_CTRUNC)
- dev->attributes |= ISC_SOCKEVENTATTR_CTRUNC;
-#endif
-
-#ifndef USE_CMSG
- return;
-#else
- if (msg->msg_controllen == 0U || msg->msg_control == NULL)
- return;
-
-#ifdef SO_TIMESTAMP
- timevalp = NULL;
-#endif
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
- pktinfop = NULL;
-#endif
-
- cmsgp = CMSG_FIRSTHDR(msg);
- while (cmsgp != NULL) {
- socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PROCESSCMSG,
- "processing cmsg %p", cmsgp);
-
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
- if (cmsgp->cmsg_level == IPPROTO_IPV6
- && cmsgp->cmsg_type == IPV6_PKTINFO) {
-
- pktinfop = (struct in6_pktinfo *)CMSG_DATA(cmsgp);
- memcpy(&dev->pktinfo, pktinfop,
- sizeof(struct in6_pktinfo));
- dev->attributes |= ISC_SOCKEVENTATTR_PKTINFO;
- socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_IFRECEIVED,
- "interface received on ifindex %u",
- dev->pktinfo.ipi6_ifindex);
- if (IN6_IS_ADDR_MULTICAST(&pktinfop->ipi6_addr))
- dev->attributes |= ISC_SOCKEVENTATTR_MULTICAST;
- goto next;
- }
-#endif
-
-#ifdef SO_TIMESTAMP
- if (cmsgp->cmsg_level == SOL_SOCKET
- && cmsgp->cmsg_type == SCM_TIMESTAMP) {
- timevalp = (struct timeval *)CMSG_DATA(cmsgp);
- dev->timestamp.seconds = timevalp->tv_sec;
- dev->timestamp.nanoseconds = timevalp->tv_usec * 1000;
- dev->attributes |= ISC_SOCKEVENTATTR_TIMESTAMP;
- goto next;
- }
-#endif
-
- next:
- cmsgp = CMSG_NXTHDR(msg, cmsgp);
- }
-#endif /* USE_CMSG */
-
-#endif /* ISC_NET_BSD44MSGHDR */
-}
-
-/*
- * Construct an iov array and attach it to the msghdr passed in. This is
- * the SEND constructor, which will use the used region of the buffer
- * (if using a buffer list) or will use the internal region (if a single
- * buffer I/O is requested).
- *
- * Nothing can be NULL, and the done event must list at least one buffer
- * on the buffer linked list for this function to be meaningful.
- *
- * If write_countp != NULL, *write_countp will hold the number of bytes
- * this transaction can send.
- */
-static void
-build_msghdr_send(isc__socket_t *sock, isc_socketevent_t *dev,
- struct msghdr *msg, struct iovec *iov, size_t *write_countp)
-{
- unsigned int iovcount;
- isc_buffer_t *buffer;
- isc_region_t used;
- size_t write_count;
- size_t skip_count;
-
- memset(msg, 0, sizeof(*msg));
-
- if (!sock->connected) {
- msg->msg_name = (void *)&dev->address.type.sa;
- msg->msg_namelen = dev->address.length;
- } else {
- msg->msg_name = NULL;
- msg->msg_namelen = 0;
- }
-
- buffer = ISC_LIST_HEAD(dev->bufferlist);
- write_count = 0;
- iovcount = 0;
-
- /*
- * Single buffer I/O? Skip what we've done so far in this region.
- */
- if (buffer == NULL) {
- write_count = dev->region.length - dev->n;
- iov[0].iov_base = (void *)(dev->region.base + dev->n);
- iov[0].iov_len = write_count;
- iovcount = 1;
-
- goto config;
- }
-
- /*
- * Multibuffer I/O.
- * Skip the data in the buffer list that we have already written.
- */
- skip_count = dev->n;
- while (buffer != NULL) {
- REQUIRE(ISC_BUFFER_VALID(buffer));
- if (skip_count < isc_buffer_usedlength(buffer))
- break;
- skip_count -= isc_buffer_usedlength(buffer);
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- while (buffer != NULL) {
- INSIST(iovcount < MAXSCATTERGATHER_SEND);
-
- isc_buffer_usedregion(buffer, &used);
-
- if (used.length > 0) {
- iov[iovcount].iov_base = (void *)(used.base
- + skip_count);
- iov[iovcount].iov_len = used.length - skip_count;
- write_count += (used.length - skip_count);
- skip_count = 0;
- iovcount++;
- }
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- INSIST(skip_count == 0U);
-
- config:
- msg->msg_iov = iov;
- msg->msg_iovlen = iovcount;
-
-#ifdef ISC_NET_BSD44MSGHDR
- msg->msg_control = NULL;
- msg->msg_controllen = 0;
- msg->msg_flags = 0;
-#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
- if ((sock->type == isc_sockettype_udp)
- && ((dev->attributes & ISC_SOCKEVENTATTR_PKTINFO) != 0)) {
-#if defined(IPV6_USE_MIN_MTU)
- int use_min_mtu = 1; /* -1, 0, 1 */
-#endif
- struct cmsghdr *cmsgp;
- struct in6_pktinfo *pktinfop;
-
- socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_SENDTODATA,
- "sendto pktinfo data, ifindex %u",
- dev->pktinfo.ipi6_ifindex);
-
- msg->msg_controllen = cmsg_space(sizeof(struct in6_pktinfo));
- INSIST(msg->msg_controllen <= sock->sendcmsgbuflen);
- msg->msg_control = (void *)sock->sendcmsgbuf;
-
- cmsgp = (struct cmsghdr *)sock->sendcmsgbuf;
- cmsgp->cmsg_level = IPPROTO_IPV6;
- cmsgp->cmsg_type = IPV6_PKTINFO;
- cmsgp->cmsg_len = cmsg_len(sizeof(struct in6_pktinfo));
- pktinfop = (struct in6_pktinfo *)CMSG_DATA(cmsgp);
- memcpy(pktinfop, &dev->pktinfo, sizeof(struct in6_pktinfo));
-#if defined(IPV6_USE_MIN_MTU)
- /*
- * Set IPV6_USE_MIN_MTU as a per packet option as FreeBSD
- * ignores setsockopt(IPV6_USE_MIN_MTU) when IPV6_PKTINFO
- * is used.
- */
- cmsgp = (struct cmsghdr *)(sock->sendcmsgbuf +
- msg->msg_controllen);
- msg->msg_controllen += cmsg_space(sizeof(use_min_mtu));
- INSIST(msg->msg_controllen <= sock->sendcmsgbuflen);
-
- cmsgp->cmsg_level = IPPROTO_IPV6;
- cmsgp->cmsg_type = IPV6_USE_MIN_MTU;
- cmsgp->cmsg_len = cmsg_len(sizeof(use_min_mtu));
- memcpy(CMSG_DATA(cmsgp), &use_min_mtu, sizeof(use_min_mtu));
-#endif
- }
-#endif /* USE_CMSG && ISC_PLATFORM_HAVEIPV6 */
-#else /* ISC_NET_BSD44MSGHDR */
- msg->msg_accrights = NULL;
- msg->msg_accrightslen = 0;
-#endif /* ISC_NET_BSD44MSGHDR */
-
- if (write_countp != NULL)
- *write_countp = write_count;
-}
-
-/*
- * Construct an iov array and attach it to the msghdr passed in. This is
- * the RECV constructor, which will use the available region of the buffer
- * (if using a buffer list) or will use the internal region (if a single
- * buffer I/O is requested).
- *
- * Nothing can be NULL, and the done event must list at least one buffer
- * on the buffer linked list for this function to be meaningful.
- *
- * If read_countp != NULL, *read_countp will hold the number of bytes
- * this transaction can receive.
- */
-static void
-build_msghdr_recv(isc__socket_t *sock, isc_socketevent_t *dev,
- struct msghdr *msg, struct iovec *iov, size_t *read_countp)
-{
- unsigned int iovcount;
- isc_buffer_t *buffer;
- isc_region_t available;
- size_t read_count;
-
- memset(msg, 0, sizeof(struct msghdr));
-
- if (sock->type == isc_sockettype_udp) {
- memset(&dev->address, 0, sizeof(dev->address));
-#ifdef BROKEN_RECVMSG
- if (sock->pf == AF_INET) {
- msg->msg_name = (void *)&dev->address.type.sin;
- msg->msg_namelen = sizeof(dev->address.type.sin6);
- } else if (sock->pf == AF_INET6) {
- msg->msg_name = (void *)&dev->address.type.sin6;
- msg->msg_namelen = sizeof(dev->address.type.sin6);
-#ifdef ISC_PLATFORM_HAVESYSUNH
- } else if (sock->pf == AF_UNIX) {
- msg->msg_name = (void *)&dev->address.type.sunix;
- msg->msg_namelen = sizeof(dev->address.type.sunix);
-#endif
- } else {
- msg->msg_name = (void *)&dev->address.type.sa;
- msg->msg_namelen = sizeof(dev->address.type);
- }
-#else
- msg->msg_name = (void *)&dev->address.type.sa;
- msg->msg_namelen = sizeof(dev->address.type);
-#endif
-#ifdef ISC_NET_RECVOVERFLOW
- /* If needed, steal one iovec for overflow detection. */
- maxiov--;
-#endif
- } else { /* TCP */
- msg->msg_name = NULL;
- msg->msg_namelen = 0;
- dev->address = sock->peer_address;
- }
-
- buffer = ISC_LIST_HEAD(dev->bufferlist);
- read_count = 0;
-
- /*
- * Single buffer I/O? Skip what we've done so far in this region.
- */
- if (buffer == NULL) {
- read_count = dev->region.length - dev->n;
- iov[0].iov_base = (void *)(dev->region.base + dev->n);
- iov[0].iov_len = read_count;
- iovcount = 1;
-
- goto config;
- }
-
- /*
- * Multibuffer I/O.
- * Skip empty buffers.
- */
- while (buffer != NULL) {
- REQUIRE(ISC_BUFFER_VALID(buffer));
- if (isc_buffer_availablelength(buffer) != 0)
- break;
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- iovcount = 0;
- while (buffer != NULL) {
- INSIST(iovcount < MAXSCATTERGATHER_RECV);
-
- isc_buffer_availableregion(buffer, &available);
-
- if (available.length > 0) {
- iov[iovcount].iov_base = (void *)(available.base);
- iov[iovcount].iov_len = available.length;
- read_count += available.length;
- iovcount++;
- }
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- config:
-
- /*
- * If needed, set up to receive that one extra byte. Note that
- * we know there is at least one iov left, since we stole it
- * at the top of this function.
- */
-#ifdef ISC_NET_RECVOVERFLOW
- if (sock->type == isc_sockettype_udp) {
- iov[iovcount].iov_base = (void *)(&sock->overflow);
- iov[iovcount].iov_len = 1;
- iovcount++;
- }
-#endif
-
- msg->msg_iov = iov;
- msg->msg_iovlen = iovcount;
-
-#ifdef ISC_NET_BSD44MSGHDR
- msg->msg_control = NULL;
- msg->msg_controllen = 0;
- msg->msg_flags = 0;
-#if defined(USE_CMSG)
- if (sock->type == isc_sockettype_udp) {
- msg->msg_control = sock->recvcmsgbuf;
- msg->msg_controllen = sock->recvcmsgbuflen;
- }
-#endif /* USE_CMSG */
-#else /* ISC_NET_BSD44MSGHDR */
- msg->msg_accrights = NULL;
- msg->msg_accrightslen = 0;
-#endif /* ISC_NET_BSD44MSGHDR */
-
- if (read_countp != NULL)
- *read_countp = read_count;
-}
-
-static void
-set_dev_address(isc_sockaddr_t *address, isc__socket_t *sock,
- isc_socketevent_t *dev)
-{
- if (sock->type == isc_sockettype_udp) {
- if (address != NULL)
- dev->address = *address;
- else
- dev->address = sock->peer_address;
- } else if (sock->type == isc_sockettype_tcp) {
- INSIST(address == NULL);
- dev->address = sock->peer_address;
- }
-}
-
-static void
-destroy_socketevent(isc_event_t *event) {
- isc_socketevent_t *ev = (isc_socketevent_t *)event;
-
- INSIST(ISC_LIST_EMPTY(ev->bufferlist));
-
- (ev->destroy)(event);
-}
-
-static isc_socketevent_t *
-allocate_socketevent(isc__socket_t *sock, isc_eventtype_t eventtype,
- isc_taskaction_t action, const void *arg)
-{
- isc_socketevent_t *ev;
-
- ev = (isc_socketevent_t *)isc_event_allocate(sock->manager->mctx,
- sock, eventtype,
- action, arg,
- sizeof(*ev));
-
- if (ev == NULL)
- return (NULL);
-
- ev->result = ISC_R_UNSET;
- ISC_LINK_INIT(ev, ev_link);
- ISC_LIST_INIT(ev->bufferlist);
- ev->region.base = NULL;
- ev->n = 0;
- ev->offset = 0;
- ev->attributes = 0;
- ev->destroy = ev->ev_destroy;
- ev->ev_destroy = destroy_socketevent;
-
- return (ev);
-}
-
-#if defined(ISC_SOCKET_DEBUG)
-static void
-dump_msg(struct msghdr *msg) {
- unsigned int i;
-
- printf("MSGHDR %p\n", msg);
- printf("\tname %p, namelen %ld\n", msg->msg_name,
- (long) msg->msg_namelen);
- printf("\tiov %p, iovlen %ld\n", msg->msg_iov,
- (long) msg->msg_iovlen);
- for (i = 0; i < (unsigned int)msg->msg_iovlen; i++)
- printf("\t\t%d\tbase %p, len %ld\n", i,
- msg->msg_iov[i].iov_base,
- (long) msg->msg_iov[i].iov_len);
-#ifdef ISC_NET_BSD44MSGHDR
- printf("\tcontrol %p, controllen %ld\n", msg->msg_control,
- (long) msg->msg_controllen);
-#endif
-}
-#endif
-
-#define DOIO_SUCCESS 0 /* i/o ok, event sent */
-#define DOIO_SOFT 1 /* i/o ok, soft error, no event sent */
-#define DOIO_HARD 2 /* i/o error, event sent */
-#define DOIO_EOF 3 /* EOF, no event sent */
-
-static int
-doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
- int cc;
- struct iovec iov[MAXSCATTERGATHER_RECV];
- size_t read_count;
- size_t actual_count;
- struct msghdr msghdr;
- isc_buffer_t *buffer;
- int recv_errno;
- char strbuf[ISC_STRERRORSIZE];
-
- build_msghdr_recv(sock, dev, &msghdr, iov, &read_count);
-
-#if defined(ISC_SOCKET_DEBUG)
- dump_msg(&msghdr);
-#endif
-
- cc = recvmsg(sock->fd, &msghdr, 0);
- recv_errno = errno;
-
-#if defined(ISC_SOCKET_DEBUG)
- dump_msg(&msghdr);
-#endif
-
- if (cc < 0) {
- if (SOFT_ERROR(recv_errno))
- return (DOIO_SOFT);
-
- if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
- isc__strerror(recv_errno, strbuf, sizeof(strbuf));
- socket_log(sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DOIORECV,
- "doio_recv: recvmsg(%d) %d bytes, err %d/%s",
- sock->fd, cc, recv_errno, strbuf);
- }
-
-#define SOFT_OR_HARD(_system, _isc) \
- if (recv_errno == _system) { \
- if (sock->connected) { \
- dev->result = _isc; \
- inc_stats(sock->manager->stats, \
- sock->statsindex[STATID_RECVFAIL]); \
- return (DOIO_HARD); \
- } \
- return (DOIO_SOFT); \
- }
-#define ALWAYS_HARD(_system, _isc) \
- if (recv_errno == _system) { \
- dev->result = _isc; \
- inc_stats(sock->manager->stats, \
- sock->statsindex[STATID_RECVFAIL]); \
- return (DOIO_HARD); \
- }
-
- SOFT_OR_HARD(ECONNREFUSED, ISC_R_CONNREFUSED);
- SOFT_OR_HARD(ENETUNREACH, ISC_R_NETUNREACH);
- SOFT_OR_HARD(EHOSTUNREACH, ISC_R_HOSTUNREACH);
- SOFT_OR_HARD(EHOSTDOWN, ISC_R_HOSTDOWN);
- /* HPUX 11.11 can return EADDRNOTAVAIL. */
- SOFT_OR_HARD(EADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL);
- ALWAYS_HARD(ENOBUFS, ISC_R_NORESOURCES);
- /*
- * HPUX returns EPROTO and EINVAL on receiving some ICMP/ICMPv6
- * errors.
- */
-#ifdef EPROTO
- SOFT_OR_HARD(EPROTO, ISC_R_HOSTUNREACH);
-#endif
- SOFT_OR_HARD(EINVAL, ISC_R_HOSTUNREACH);
-
-#undef SOFT_OR_HARD
-#undef ALWAYS_HARD
-
- dev->result = isc__errno2result(recv_errno);
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_RECVFAIL]);
- return (DOIO_HARD);
- }
-
- /*
- * On TCP and UNIX sockets, zero length reads indicate EOF,
- * while on UDP sockets, zero length reads are perfectly valid,
- * although strange.
- */
- switch (sock->type) {
- case isc_sockettype_tcp:
- case isc_sockettype_unix:
- if (cc == 0)
- return (DOIO_EOF);
- break;
- case isc_sockettype_udp:
- break;
- case isc_sockettype_fdwatch:
- default:
- INSIST(0);
- }
-
- if (sock->type == isc_sockettype_udp) {
- dev->address.length = msghdr.msg_namelen;
- if (isc_sockaddr_getport(&dev->address) == 0) {
- if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
- socket_log(sock, &dev->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_ZEROPORT,
- "dropping source port zero packet");
- }
- return (DOIO_SOFT);
- }
- /*
- * Simulate a firewall blocking UDP responses bigger than
- * 512 bytes.
- */
- if (sock->manager->maxudp != 0 && cc > sock->manager->maxudp)
- return (DOIO_SOFT);
- }
-
- socket_log(sock, &dev->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PKTRECV,
- "packet received correctly");
-
- /*
- * Overflow bit detection. If we received MORE bytes than we should,
- * this indicates an overflow situation. Set the flag in the
- * dev entry and adjust how much we read by one.
- */
-#ifdef ISC_NET_RECVOVERFLOW
- if ((sock->type == isc_sockettype_udp) && ((size_t)cc > read_count)) {
- dev->attributes |= ISC_SOCKEVENTATTR_TRUNC;
- cc--;
- }
-#endif
-
- /*
- * If there are control messages attached, run through them and pull
- * out the interesting bits.
- */
- if (sock->type == isc_sockettype_udp)
- process_cmsg(sock, &msghdr, dev);
-
- /*
- * update the buffers (if any) and the i/o count
- */
- dev->n += cc;
- actual_count = cc;
- buffer = ISC_LIST_HEAD(dev->bufferlist);
- while (buffer != NULL && actual_count > 0U) {
- REQUIRE(ISC_BUFFER_VALID(buffer));
- if (isc_buffer_availablelength(buffer) <= actual_count) {
- actual_count -= isc_buffer_availablelength(buffer);
- isc_buffer_add(buffer,
- isc_buffer_availablelength(buffer));
- } else {
- isc_buffer_add(buffer, actual_count);
- actual_count = 0;
- POST(actual_count);
- break;
- }
- buffer = ISC_LIST_NEXT(buffer, link);
- if (buffer == NULL) {
- INSIST(actual_count == 0U);
- }
- }
-
- /*
- * If we read less than we expected, update counters,
- * and let the upper layer poke the descriptor.
- */
- if (((size_t)cc != read_count) && (dev->n < dev->minimum))
- return (DOIO_SOFT);
-
- /*
- * Full reads are posted, or partials if partials are ok.
- */
- dev->result = ISC_R_SUCCESS;
- return (DOIO_SUCCESS);
-}
-
-/*
- * Returns:
- * DOIO_SUCCESS The operation succeeded. dev->result contains
- * ISC_R_SUCCESS.
- *
- * DOIO_HARD A hard or unexpected I/O error was encountered.
- * dev->result contains the appropriate error.
- *
- * DOIO_SOFT A soft I/O error was encountered. No senddone
- * event was sent. The operation should be retried.
- *
- * No other return values are possible.
- */
-static int
-doio_send(isc__socket_t *sock, isc_socketevent_t *dev) {
- int cc;
- struct iovec iov[MAXSCATTERGATHER_SEND];
- size_t write_count;
- struct msghdr msghdr;
- char addrbuf[ISC_SOCKADDR_FORMATSIZE];
- int attempts = 0;
- int send_errno;
- char strbuf[ISC_STRERRORSIZE];
-
- build_msghdr_send(sock, dev, &msghdr, iov, &write_count);
-
- resend:
- cc = sendmsg(sock->fd, &msghdr, 0);
- send_errno = errno;
-
- /*
- * Check for error or block condition.
- */
- if (cc < 0) {
- if (send_errno == EINTR && ++attempts < NRETRIES)
- goto resend;
-
- if (SOFT_ERROR(send_errno))
- return (DOIO_SOFT);
-
-#define SOFT_OR_HARD(_system, _isc) \
- if (send_errno == _system) { \
- if (sock->connected) { \
- dev->result = _isc; \
- inc_stats(sock->manager->stats, \
- sock->statsindex[STATID_SENDFAIL]); \
- return (DOIO_HARD); \
- } \
- return (DOIO_SOFT); \
- }
-#define ALWAYS_HARD(_system, _isc) \
- if (send_errno == _system) { \
- dev->result = _isc; \
- inc_stats(sock->manager->stats, \
- sock->statsindex[STATID_SENDFAIL]); \
- return (DOIO_HARD); \
- }
-
- SOFT_OR_HARD(ECONNREFUSED, ISC_R_CONNREFUSED);
- ALWAYS_HARD(EACCES, ISC_R_NOPERM);
- ALWAYS_HARD(EAFNOSUPPORT, ISC_R_ADDRNOTAVAIL);
- ALWAYS_HARD(EADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL);
- ALWAYS_HARD(EHOSTUNREACH, ISC_R_HOSTUNREACH);
-#ifdef EHOSTDOWN
- ALWAYS_HARD(EHOSTDOWN, ISC_R_HOSTUNREACH);
-#endif
- ALWAYS_HARD(ENETUNREACH, ISC_R_NETUNREACH);
- ALWAYS_HARD(ENOBUFS, ISC_R_NORESOURCES);
- ALWAYS_HARD(EPERM, ISC_R_HOSTUNREACH);
- ALWAYS_HARD(EPIPE, ISC_R_NOTCONNECTED);
- ALWAYS_HARD(ECONNRESET, ISC_R_CONNECTIONRESET);
-
-#undef SOFT_OR_HARD
-#undef ALWAYS_HARD
-
- /*
- * The other error types depend on whether or not the
- * socket is UDP or TCP. If it is UDP, some errors
- * that we expect to be fatal under TCP are merely
- * annoying, and are really soft errors.
- *
- * However, these soft errors are still returned as
- * a status.
- */
- isc_sockaddr_format(&dev->address, addrbuf, sizeof(addrbuf));
- isc__strerror(send_errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "internal_send: %s: %s",
- addrbuf, strbuf);
- dev->result = isc__errno2result(send_errno);
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_SENDFAIL]);
- return (DOIO_HARD);
- }
-
- if (cc == 0) {
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_SENDFAIL]);
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "doio_send: send() %s 0",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_RETURNED, "returned"));
- }
-
- /*
- * If we write less than we expected, update counters, poke.
- */
- dev->n += cc;
- if ((size_t)cc != write_count)
- return (DOIO_SOFT);
-
- /*
- * Exactly what we wanted to write. We're done with this
- * entry. Post its completion event.
- */
- dev->result = ISC_R_SUCCESS;
- return (DOIO_SUCCESS);
-}
-
-/*
- * Kill.
- *
- * Caller must ensure that the socket is not locked and no external
- * references exist.
- */
-static void
-closesocket(isc__socketmgr_t *manager, isc__socket_t *sock, int fd) {
- isc_sockettype_t type = sock->type;
- int lockid = FDLOCK_ID(fd);
-
- /*
- * No one has this socket open, so the watcher doesn't have to be
- * poked, and the socket doesn't have to be locked.
- */
- LOCK(&manager->fdlock[lockid]);
- manager->fds[fd] = NULL;
- if (type == isc_sockettype_fdwatch)
- manager->fdstate[fd] = CLOSED;
- else
- manager->fdstate[fd] = CLOSE_PENDING;
- UNLOCK(&manager->fdlock[lockid]);
- if (type == isc_sockettype_fdwatch) {
- /*
- * The caller may close the socket once this function returns,
- * and `fd' may be reassigned for a new socket. So we do
- * unwatch_fd() here, rather than defer it via select_poke().
- * Note: this may complicate data protection among threads and
- * may reduce performance due to additional locks. One way to
- * solve this would be to dup() the watched descriptor, but we
- * take a simpler approach at this moment.
- */
- (void)unwatch_fd(manager, fd, SELECT_POKE_READ);
- (void)unwatch_fd(manager, fd, SELECT_POKE_WRITE);
- } else
- select_poke(manager, fd, SELECT_POKE_CLOSE);
-
- inc_stats(manager->stats, sock->statsindex[STATID_CLOSE]);
-
- /*
- * update manager->maxfd here (XXX: this should be implemented more
- * efficiently)
- */
-#ifdef USE_SELECT
- LOCK(&manager->lock);
- if (manager->maxfd == fd) {
- int i;
-
- manager->maxfd = 0;
- for (i = fd - 1; i >= 0; i--) {
- lockid = FDLOCK_ID(i);
-
- LOCK(&manager->fdlock[lockid]);
- if (manager->fdstate[i] == MANAGED) {
- manager->maxfd = i;
- UNLOCK(&manager->fdlock[lockid]);
- break;
- }
- UNLOCK(&manager->fdlock[lockid]);
- }
-#ifdef ISC_PLATFORM_USETHREADS
- if (manager->maxfd < manager->pipe_fds[0])
- manager->maxfd = manager->pipe_fds[0];
-#endif
- }
- UNLOCK(&manager->lock);
-#endif /* USE_SELECT */
-}
-
-static void
-destroy(isc__socket_t **sockp) {
- int fd;
- isc__socket_t *sock = *sockp;
- isc__socketmgr_t *manager = sock->manager;
-
- socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DESTROYING, "destroying");
-
- INSIST(ISC_LIST_EMPTY(sock->accept_list));
- INSIST(ISC_LIST_EMPTY(sock->recv_list));
- INSIST(ISC_LIST_EMPTY(sock->send_list));
- INSIST(sock->connect_ev == NULL);
- REQUIRE(sock->fd == -1 || sock->fd < (int)manager->maxsocks);
-
- if (sock->fd >= 0) {
- fd = sock->fd;
- sock->fd = -1;
- closesocket(manager, sock, fd);
- }
-
- LOCK(&manager->lock);
-
- ISC_LIST_UNLINK(manager->socklist, sock, link);
-
-#ifdef USE_WATCHER_THREAD
- if (ISC_LIST_EMPTY(manager->socklist))
- SIGNAL(&manager->shutdown_ok);
-#endif /* USE_WATCHER_THREAD */
-
- /* can't unlock manager as its memory context is still used */
- free_socket(sockp);
-
- UNLOCK(&manager->lock);
-}
-
-static isc_result_t
-allocate_socket(isc__socketmgr_t *manager, isc_sockettype_t type,
- isc__socket_t **socketp)
-{
- isc__socket_t *sock;
- isc_result_t result;
- ISC_SOCKADDR_LEN_T cmsgbuflen;
-
- sock = isc_mem_get(manager->mctx, sizeof(*sock));
-
- if (sock == NULL)
- return (ISC_R_NOMEMORY);
-
- sock->common.magic = 0;
- sock->common.impmagic = 0;
- sock->references = 0;
-
- sock->manager = manager;
- sock->type = type;
- sock->fd = -1;
- sock->dupped = 0;
- sock->statsindex = NULL;
-
- ISC_LINK_INIT(sock, link);
-
- sock->recvcmsgbuf = NULL;
- sock->sendcmsgbuf = NULL;
-
- /*
- * set up cmsg buffers
- */
- cmsgbuflen = 0;
-#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
- cmsgbuflen += cmsg_space(sizeof(struct in6_pktinfo));
-#endif
-#if defined(USE_CMSG) && defined(SO_TIMESTAMP)
- cmsgbuflen += cmsg_space(sizeof(struct timeval));
-#endif
- sock->recvcmsgbuflen = cmsgbuflen;
- if (sock->recvcmsgbuflen != 0U) {
- sock->recvcmsgbuf = isc_mem_get(manager->mctx, cmsgbuflen);
- if (sock->recvcmsgbuf == NULL) {
- result = ISC_R_NOMEMORY;
- goto error;
- }
- }
-
- cmsgbuflen = 0;
-#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
- cmsgbuflen += cmsg_space(sizeof(struct in6_pktinfo));
-#if defined(IPV6_USE_MIN_MTU)
- /*
- * Provide space for working around FreeBSD's broken IPV6_USE_MIN_MTU
- * support.
- */
- cmsgbuflen += cmsg_space(sizeof(int));
-#endif
-#endif
- sock->sendcmsgbuflen = cmsgbuflen;
- if (sock->sendcmsgbuflen != 0U) {
- sock->sendcmsgbuf = isc_mem_get(manager->mctx, cmsgbuflen);
- if (sock->sendcmsgbuf == NULL) {
- result = ISC_R_NOMEMORY;
- goto error;
- }
- }
-
- memset(sock->name, 0, sizeof(sock->name));
- sock->tag = NULL;
-
- /*
- * set up list of readers and writers to be initially empty
- */
- ISC_LIST_INIT(sock->recv_list);
- ISC_LIST_INIT(sock->send_list);
- ISC_LIST_INIT(sock->accept_list);
- sock->connect_ev = NULL;
- sock->pending_recv = 0;
- sock->pending_send = 0;
- sock->pending_accept = 0;
- sock->listener = 0;
- sock->connected = 0;
- sock->connecting = 0;
- sock->bound = 0;
-
- /*
- * initialize the lock
- */
- result = isc_mutex_init(&sock->lock);
- if (result != ISC_R_SUCCESS) {
- sock->common.magic = 0;
- sock->common.impmagic = 0;
- goto error;
- }
-
- /*
- * Initialize readable and writable events
- */
- ISC_EVENT_INIT(&sock->readable_ev, sizeof(intev_t),
- ISC_EVENTATTR_NOPURGE, NULL, ISC_SOCKEVENT_INTR,
- NULL, sock, sock, NULL, NULL);
- ISC_EVENT_INIT(&sock->writable_ev, sizeof(intev_t),
- ISC_EVENTATTR_NOPURGE, NULL, ISC_SOCKEVENT_INTW,
- NULL, sock, sock, NULL, NULL);
-
- sock->common.magic = ISCAPI_SOCKET_MAGIC;
- sock->common.impmagic = SOCKET_MAGIC;
- *socketp = sock;
-
- return (ISC_R_SUCCESS);
-
- error:
- if (sock->recvcmsgbuf != NULL)
- isc_mem_put(manager->mctx, sock->recvcmsgbuf,
- sock->recvcmsgbuflen);
- if (sock->sendcmsgbuf != NULL)
- isc_mem_put(manager->mctx, sock->sendcmsgbuf,
- sock->sendcmsgbuflen);
- isc_mem_put(manager->mctx, sock, sizeof(*sock));
-
- return (result);
-}
-
-/*
- * This event requires that the various lists be empty, that the reference
- * count be 1, and that the magic number is valid. The other socket bits,
- * like the lock, must be initialized as well. The fd associated must be
- * marked as closed, by setting it to -1 on close, or this routine will
- * also close the socket.
- */
-static void
-free_socket(isc__socket_t **socketp) {
- isc__socket_t *sock = *socketp;
-
- INSIST(sock->references == 0);
- INSIST(VALID_SOCKET(sock));
- INSIST(!sock->connecting);
- INSIST(!sock->pending_recv);
- INSIST(!sock->pending_send);
- INSIST(!sock->pending_accept);
- INSIST(ISC_LIST_EMPTY(sock->recv_list));
- INSIST(ISC_LIST_EMPTY(sock->send_list));
- INSIST(ISC_LIST_EMPTY(sock->accept_list));
- INSIST(!ISC_LINK_LINKED(sock, link));
-
- if (sock->recvcmsgbuf != NULL)
- isc_mem_put(sock->manager->mctx, sock->recvcmsgbuf,
- sock->recvcmsgbuflen);
- if (sock->sendcmsgbuf != NULL)
- isc_mem_put(sock->manager->mctx, sock->sendcmsgbuf,
- sock->sendcmsgbuflen);
-
- sock->common.magic = 0;
- sock->common.impmagic = 0;
-
- DESTROYLOCK(&sock->lock);
-
- isc_mem_put(sock->manager->mctx, sock, sizeof(*sock));
-
- *socketp = NULL;
-}
-
-#ifdef SO_BSDCOMPAT
-/*
- * This really should not be necessary to do. Having to workout
- * which kernel version we are on at run time so that we don't cause
- * the kernel to issue a warning about us using a deprecated socket option.
- * Such warnings should *never* be on by default in production kernels.
- *
- * We can't do this a build time because executables are moved between
- * machines and hence kernels.
- *
- * We can't just not set SO_BSDCOMAT because some kernels require it.
- */
-
-static isc_once_t bsdcompat_once = ISC_ONCE_INIT;
-isc_boolean_t bsdcompat = ISC_TRUE;
-
-static void
-clear_bsdcompat(void) {
-#ifdef __linux__
- struct utsname buf;
- char *endp;
- long int major;
- long int minor;
-
- uname(&buf); /* Can only fail if buf is bad in Linux. */
-
- /* Paranoia in parsing can be increased, but we trust uname(). */
- major = strtol(buf.release, &endp, 10);
- if (*endp == '.') {
- minor = strtol(endp+1, &endp, 10);
- if ((major > 2) || ((major == 2) && (minor >= 4))) {
- bsdcompat = ISC_FALSE;
- }
- }
-#endif /* __linux __ */
-}
-#endif
-
-static isc_result_t
-opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
- isc__socket_t *dup_socket)
-{
- isc_result_t result;
- char strbuf[ISC_STRERRORSIZE];
- const char *err = "socket";
- int tries = 0;
-#if defined(USE_CMSG) || defined(SO_BSDCOMPAT)
- int on = 1;
-#endif
-#if defined(SO_RCVBUF)
- ISC_SOCKADDR_LEN_T optlen;
- int size;
-#endif
-
- again:
- if (dup_socket == NULL) {
- switch (sock->type) {
- case isc_sockettype_udp:
- sock->fd = socket(sock->pf, SOCK_DGRAM, IPPROTO_UDP);
- break;
- case isc_sockettype_tcp:
- sock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP);
- break;
- case isc_sockettype_unix:
- sock->fd = socket(sock->pf, SOCK_STREAM, 0);
- break;
- case isc_sockettype_fdwatch:
- /*
- * We should not be called for isc_sockettype_fdwatch
- * sockets.
- */
- INSIST(0);
- break;
- }
- } else {
- sock->fd = dup(dup_socket->fd);
- sock->dupped = 1;
- sock->bound = dup_socket->bound;
- }
- if (sock->fd == -1 && errno == EINTR && tries++ < 42)
- goto again;
-
-#ifdef F_DUPFD
- /*
- * Leave a space for stdio and TCP to work in.
- */
- if (manager->reserved != 0 && sock->type == isc_sockettype_udp &&
- sock->fd >= 0 && sock->fd < manager->reserved) {
- int new, tmp;
- new = fcntl(sock->fd, F_DUPFD, manager->reserved);
- tmp = errno;
- (void)close(sock->fd);
- errno = tmp;
- sock->fd = new;
- err = "isc_socket_create: fcntl/reserved";
- } else if (sock->fd >= 0 && sock->fd < 20) {
- int new, tmp;
- new = fcntl(sock->fd, F_DUPFD, 20);
- tmp = errno;
- (void)close(sock->fd);
- errno = tmp;
- sock->fd = new;
- err = "isc_socket_create: fcntl";
- }
-#endif
-
- if (sock->fd >= (int)manager->maxsocks) {
- (void)close(sock->fd);
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "socket: file descriptor exceeds limit (%d/%u)",
- sock->fd, manager->maxsocks);
- return (ISC_R_NORESOURCES);
- }
-
- if (sock->fd < 0) {
- switch (errno) {
- case EMFILE:
- case ENFILE:
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "%s: %s", err, strbuf);
- /* fallthrough */
- case ENOBUFS:
- return (ISC_R_NORESOURCES);
-
- case EPROTONOSUPPORT:
- case EPFNOSUPPORT:
- case EAFNOSUPPORT:
- /*
- * Linux 2.2 (and maybe others) return EINVAL instead of
- * EAFNOSUPPORT.
- */
- case EINVAL:
- return (ISC_R_FAMILYNOSUPPORT);
-
- default:
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "%s() %s: %s", err,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
- }
-
- if (dup_socket != NULL)
- goto setup_done;
-
- result = make_nonblock(sock->fd);
- if (result != ISC_R_SUCCESS) {
- (void)close(sock->fd);
- return (result);
- }
-
-#ifdef SO_BSDCOMPAT
- RUNTIME_CHECK(isc_once_do(&bsdcompat_once,
- clear_bsdcompat) == ISC_R_SUCCESS);
- if (sock->type != isc_sockettype_unix && bsdcompat &&
- setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
- (void *)&on, sizeof(on)) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_BSDCOMPAT) %s: %s",
- sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- strbuf);
- /* Press on... */
- }
-#endif
-
-#ifdef SO_NOSIGPIPE
- if (setsockopt(sock->fd, SOL_SOCKET, SO_NOSIGPIPE,
- (void *)&on, sizeof(on)) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_NOSIGPIPE) %s: %s",
- sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- strbuf);
- /* Press on... */
- }
-#endif
-
-#if defined(USE_CMSG) || defined(SO_RCVBUF)
- if (sock->type == isc_sockettype_udp) {
-
-#if defined(USE_CMSG)
-#if defined(SO_TIMESTAMP)
- if (setsockopt(sock->fd, SOL_SOCKET, SO_TIMESTAMP,
- (void *)&on, sizeof(on)) < 0
- && errno != ENOPROTOOPT) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_TIMESTAMP) %s: %s",
- sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- /* Press on... */
- }
-#endif /* SO_TIMESTAMP */
-
-#if defined(ISC_PLATFORM_HAVEIPV6)
- if (sock->pf == AF_INET6 && sock->recvcmsgbuflen == 0U) {
- /*
- * Warn explicitly because this anomaly can be hidden
- * in usual operation (and unexpectedly appear later).
- */
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "No buffer available to receive "
- "IPv6 destination");
- }
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
-#ifdef IPV6_RECVPKTINFO
- /* RFC 3542 */
- if ((sock->pf == AF_INET6)
- && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
- (void *)&on, sizeof(on)) < 0)) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_RECVPKTINFO) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
-#else
- /* RFC 2292 */
- if ((sock->pf == AF_INET6)
- && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO,
- (void *)&on, sizeof(on)) < 0)) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_PKTINFO) %s: %s",
- sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
-#endif /* IPV6_RECVPKTINFO */
-#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
-#ifdef IPV6_USE_MIN_MTU /* RFC 3542, not too common yet*/
- /* use minimum MTU */
- if (sock->pf == AF_INET6 &&
- setsockopt(sock->fd, IPPROTO_IPV6, IPV6_USE_MIN_MTU,
- (void *)&on, sizeof(on)) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_USE_MIN_MTU) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
-#endif
-#if defined(IPV6_MTU)
- /*
- * Use minimum MTU on IPv6 sockets.
- */
- if (sock->pf == AF_INET6) {
- int mtu = 1280;
- (void)setsockopt(sock->fd, IPPROTO_IPV6, IPV6_MTU,
- &mtu, sizeof(mtu));
- }
-#endif
-#if defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DONT)
- /*
- * Turn off Path MTU discovery on IPv6/UDP sockets.
- */
- if (sock->pf == AF_INET6) {
- int action = IPV6_PMTUDISC_DONT;
- (void)setsockopt(sock->fd, IPPROTO_IPV6,
- IPV6_MTU_DISCOVER, &action,
- sizeof(action));
- }
-#endif
-#endif /* ISC_PLATFORM_HAVEIPV6 */
-#endif /* defined(USE_CMSG) */
-
-#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
- /*
- * Turn off Path MTU discovery on IPv4/UDP sockets.
- */
- if (sock->pf == AF_INET) {
- int action = IP_PMTUDISC_DONT;
- (void)setsockopt(sock->fd, IPPROTO_IP, IP_MTU_DISCOVER,
- &action, sizeof(action));
- }
-#endif
-#if defined(IP_DONTFRAG)
- /*
- * Turn off Path MTU discovery on IPv4/UDP sockets.
- */
- if (sock->pf == AF_INET) {
- int off = 0;
- (void)setsockopt(sock->fd, IPPROTO_IP, IP_DONTFRAG,
- &off, sizeof(off));
- }
-#endif
-
-#if defined(SO_RCVBUF)
- optlen = sizeof(size);
- if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
- (void *)&size, &optlen) >= 0 &&
- size < RCVBUFSIZE) {
- size = RCVBUFSIZE;
- if (setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
- (void *)&size, sizeof(size)) == -1) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, SO_RCVBUF, %d) %s: %s",
- sock->fd, size,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
- }
-#endif
- }
-#endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */
-
-setup_done:
- inc_stats(manager->stats, sock->statsindex[STATID_OPEN]);
-
- return (ISC_R_SUCCESS);
-}
-
-/*
- * Create a 'type' socket or duplicate an existing socket, managed
- * by 'manager'. Events will be posted to 'task' and when dispatched
- * 'action' will be called with 'arg' as the arg value. The new
- * socket is returned in 'socketp'.
- */
-static isc_result_t
-socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
- isc_socket_t **socketp, isc_socket_t *dup_socket)
-{
- isc__socket_t *sock = NULL;
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
- isc_result_t result;
- int lockid;
-
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(socketp != NULL && *socketp == NULL);
- REQUIRE(type != isc_sockettype_fdwatch);
-
- result = allocate_socket(manager, type, &sock);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- switch (sock->type) {
- case isc_sockettype_udp:
- sock->statsindex =
- (pf == AF_INET) ? upd4statsindex : upd6statsindex;
- break;
- case isc_sockettype_tcp:
- sock->statsindex =
- (pf == AF_INET) ? tcp4statsindex : tcp6statsindex;
- break;
- case isc_sockettype_unix:
- sock->statsindex = unixstatsindex;
- break;
- default:
- INSIST(0);
- }
-
- sock->pf = pf;
-
- result = opensocket(manager, sock, (isc__socket_t *)dup_socket);
- if (result != ISC_R_SUCCESS) {
- inc_stats(manager->stats, sock->statsindex[STATID_OPENFAIL]);
- free_socket(&sock);
- return (result);
- }
-
- sock->common.methods = (isc_socketmethods_t *)&socketmethods;
- sock->references = 1;
- *socketp = (isc_socket_t *)sock;
-
- /*
- * Note we don't have to lock the socket like we normally would because
- * there are no external references to it yet.
- */
-
- lockid = FDLOCK_ID(sock->fd);
- LOCK(&manager->fdlock[lockid]);
- manager->fds[sock->fd] = sock;
- manager->fdstate[sock->fd] = MANAGED;
-#ifdef USE_DEVPOLL
- INSIST(sock->manager->fdpollinfo[sock->fd].want_read == 0 &&
- sock->manager->fdpollinfo[sock->fd].want_write == 0);
-#endif
- UNLOCK(&manager->fdlock[lockid]);
-
- LOCK(&manager->lock);
- ISC_LIST_APPEND(manager->socklist, sock, link);
-#ifdef USE_SELECT
- if (manager->maxfd < sock->fd)
- manager->maxfd = sock->fd;
-#endif
- UNLOCK(&manager->lock);
-
- socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_CREATED, dup_socket == NULL ? "dupped" : "created");
-
- return (ISC_R_SUCCESS);
-}
-
-/*%
- * Create a new 'type' socket managed by 'manager'. Events
- * will be posted to 'task' and when dispatched 'action' will be
- * called with 'arg' as the arg value. The new socket is returned
- * in 'socketp'.
- */
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
- isc_socket_t **socketp)
-{
- return (socket_create(manager0, pf, type, socketp, NULL));
-}
-
-/*%
- * Duplicate an existing socket. The new socket is returned
- * in 'socketp'.
- */
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_dup(isc_socket_t *sock0, isc_socket_t **socketp) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(socketp != NULL && *socketp == NULL);
-
- return (socket_create((isc_socketmgr_t *) sock->manager,
- sock->pf, sock->type, socketp,
- sock0));
-}
-
-#ifdef BIND9
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_open(isc_socket_t *sock0) {
- isc_result_t result;
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- REQUIRE(sock->references == 1);
- REQUIRE(sock->type != isc_sockettype_fdwatch);
- UNLOCK(&sock->lock);
- /*
- * We don't need to retain the lock hereafter, since no one else has
- * this socket.
- */
- REQUIRE(sock->fd == -1);
-
- result = opensocket(sock->manager, sock, NULL);
- if (result != ISC_R_SUCCESS)
- sock->fd = -1;
-
- if (result == ISC_R_SUCCESS) {
- int lockid = FDLOCK_ID(sock->fd);
-
- LOCK(&sock->manager->fdlock[lockid]);
- sock->manager->fds[sock->fd] = sock;
- sock->manager->fdstate[sock->fd] = MANAGED;
-#ifdef USE_DEVPOLL
- INSIST(sock->manager->fdpollinfo[sock->fd].want_read == 0 &&
- sock->manager->fdpollinfo[sock->fd].want_write == 0);
-#endif
- UNLOCK(&sock->manager->fdlock[lockid]);
-
-#ifdef USE_SELECT
- LOCK(&sock->manager->lock);
- if (sock->manager->maxfd < sock->fd)
- sock->manager->maxfd = sock->fd;
- UNLOCK(&sock->manager->lock);
-#endif
- }
-
- return (result);
-}
-#endif /* BIND9 */
-
-/*
- * Create a new 'type' socket managed by 'manager'. Events
- * will be posted to 'task' and when dispatched 'action' will be
- * called with 'arg' as the arg value. The new socket is returned
- * in 'socketp'.
- */
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_fdwatchcreate(isc_socketmgr_t *manager0, int fd, int flags,
- isc_sockfdwatch_t callback, void *cbarg,
- isc_task_t *task, isc_socket_t **socketp)
-{
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
- isc__socket_t *sock = NULL;
- isc_result_t result;
- int lockid;
-
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(socketp != NULL && *socketp == NULL);
-
- result = allocate_socket(manager, isc_sockettype_fdwatch, &sock);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- sock->fd = fd;
- sock->fdwatcharg = cbarg;
- sock->fdwatchcb = callback;
- sock->fdwatchflags = flags;
- sock->fdwatchtask = task;
- sock->statsindex = fdwatchstatsindex;
-
- sock->common.methods = (isc_socketmethods_t *)&socketmethods;
- sock->references = 1;
- *socketp = (isc_socket_t *)sock;
-
- /*
- * Note we don't have to lock the socket like we normally would because
- * there are no external references to it yet.
- */
-
- lockid = FDLOCK_ID(sock->fd);
- LOCK(&manager->fdlock[lockid]);
- manager->fds[sock->fd] = sock;
- manager->fdstate[sock->fd] = MANAGED;
- UNLOCK(&manager->fdlock[lockid]);
-
- LOCK(&manager->lock);
- ISC_LIST_APPEND(manager->socklist, sock, link);
-#ifdef USE_SELECT
- if (manager->maxfd < sock->fd)
- manager->maxfd = sock->fd;
-#endif
- UNLOCK(&manager->lock);
-
- if (flags & ISC_SOCKFDWATCH_READ)
- select_poke(sock->manager, sock->fd, SELECT_POKE_READ);
- if (flags & ISC_SOCKFDWATCH_WRITE)
- select_poke(sock->manager, sock->fd, SELECT_POKE_WRITE);
-
- socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_CREATED, "fdwatch-created");
-
- return (ISC_R_SUCCESS);
-}
-
-/*
- * Indicate to the manager that it should watch the socket again.
- * This can be used to restart watching if the previous event handler
- * didn't indicate there was more data to be processed. Primarily
- * it is for writing but could be used for reading if desired
- */
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_fdwatchpoke(isc_socket_t *sock0, int flags)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- REQUIRE(VALID_SOCKET(sock));
-
- /*
- * We check both flags first to allow us to get the lock
- * once but only if we need it.
- */
-
- if ((flags & (ISC_SOCKFDWATCH_READ | ISC_SOCKFDWATCH_WRITE)) != 0) {
- LOCK(&sock->lock);
- if (((flags & ISC_SOCKFDWATCH_READ) != 0) &&
- !sock->pending_recv)
- select_poke(sock->manager, sock->fd,
- SELECT_POKE_READ);
- if (((flags & ISC_SOCKFDWATCH_WRITE) != 0) &&
- !sock->pending_send)
- select_poke(sock->manager, sock->fd,
- SELECT_POKE_WRITE);
- UNLOCK(&sock->lock);
- }
-
- socket_log(sock, NULL, TRACE, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_POKED, "fdwatch-poked flags: %d", flags);
-
- return (ISC_R_SUCCESS);
-}
-
-/*
- * Attach to a socket. Caller must explicitly detach when it is done.
- */
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_attach(isc_socket_t *sock0, isc_socket_t **socketp) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(socketp != NULL && *socketp == NULL);
-
- LOCK(&sock->lock);
- sock->references++;
- UNLOCK(&sock->lock);
-
- *socketp = (isc_socket_t *)sock;
-}
-
-/*
- * Dereference a socket. If this is the last reference to it, clean things
- * up by destroying the socket.
- */
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_detach(isc_socket_t **socketp) {
- isc__socket_t *sock;
- isc_boolean_t kill_socket = ISC_FALSE;
-
- REQUIRE(socketp != NULL);
- sock = (isc__socket_t *)*socketp;
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- REQUIRE(sock->references > 0);
- sock->references--;
- if (sock->references == 0)
- kill_socket = ISC_TRUE;
- UNLOCK(&sock->lock);
-
- if (kill_socket)
- destroy(&sock);
-
- *socketp = NULL;
-}
-
-#ifdef BIND9
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_close(isc_socket_t *sock0) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
- int fd;
- isc__socketmgr_t *manager;
-
- fflush(stdout);
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
-
- REQUIRE(sock->references == 1);
- REQUIRE(sock->type != isc_sockettype_fdwatch);
- REQUIRE(sock->fd >= 0 && sock->fd < (int)sock->manager->maxsocks);
-
- INSIST(!sock->connecting);
- INSIST(!sock->pending_recv);
- INSIST(!sock->pending_send);
- INSIST(!sock->pending_accept);
- INSIST(ISC_LIST_EMPTY(sock->recv_list));
- INSIST(ISC_LIST_EMPTY(sock->send_list));
- INSIST(ISC_LIST_EMPTY(sock->accept_list));
- INSIST(sock->connect_ev == NULL);
-
- manager = sock->manager;
- fd = sock->fd;
- sock->fd = -1;
- sock->dupped = 0;
- memset(sock->name, 0, sizeof(sock->name));
- sock->tag = NULL;
- sock->listener = 0;
- sock->connected = 0;
- sock->connecting = 0;
- sock->bound = 0;
- isc_sockaddr_any(&sock->peer_address);
-
- UNLOCK(&sock->lock);
-
- closesocket(manager, sock, fd);
-
- return (ISC_R_SUCCESS);
-}
-#endif /* BIND9 */
-
-/*
- * I/O is possible on a given socket. Schedule an event to this task that
- * will call an internal function to do the I/O. This will charge the
- * task with the I/O operation and let our select loop handler get back
- * to doing something real as fast as possible.
- *
- * The socket and manager must be locked before calling this function.
- */
-static void
-dispatch_recv(isc__socket_t *sock) {
- intev_t *iev;
- isc_socketevent_t *ev;
- isc_task_t *sender;
-
- INSIST(!sock->pending_recv);
-
- if (sock->type != isc_sockettype_fdwatch) {
- ev = ISC_LIST_HEAD(sock->recv_list);
- if (ev == NULL)
- return;
- socket_log(sock, NULL, EVENT, NULL, 0, 0,
- "dispatch_recv: event %p -> task %p",
- ev, ev->ev_sender);
- sender = ev->ev_sender;
- } else {
- sender = sock->fdwatchtask;
- }
-
- sock->pending_recv = 1;
- iev = &sock->readable_ev;
-
- sock->references++;
- iev->ev_sender = sock;
- if (sock->type == isc_sockettype_fdwatch)
- iev->ev_action = internal_fdwatch_read;
- else
- iev->ev_action = internal_recv;
- iev->ev_arg = sock;
-
- isc_task_send(sender, (isc_event_t **)&iev);
-}
-
-static void
-dispatch_send(isc__socket_t *sock) {
- intev_t *iev;
- isc_socketevent_t *ev;
- isc_task_t *sender;
-
- INSIST(!sock->pending_send);
-
- if (sock->type != isc_sockettype_fdwatch) {
- ev = ISC_LIST_HEAD(sock->send_list);
- if (ev == NULL)
- return;
- socket_log(sock, NULL, EVENT, NULL, 0, 0,
- "dispatch_send: event %p -> task %p",
- ev, ev->ev_sender);
- sender = ev->ev_sender;
- } else {
- sender = sock->fdwatchtask;
- }
-
- sock->pending_send = 1;
- iev = &sock->writable_ev;
-
- sock->references++;
- iev->ev_sender = sock;
- if (sock->type == isc_sockettype_fdwatch)
- iev->ev_action = internal_fdwatch_write;
- else
- iev->ev_action = internal_send;
- iev->ev_arg = sock;
-
- isc_task_send(sender, (isc_event_t **)&iev);
-}
-
-/*
- * Dispatch an internal accept event.
- */
-static void
-dispatch_accept(isc__socket_t *sock) {
- intev_t *iev;
- isc_socket_newconnev_t *ev;
-
- INSIST(!sock->pending_accept);
-
- /*
- * Are there any done events left, or were they all canceled
- * before the manager got the socket lock?
- */
- ev = ISC_LIST_HEAD(sock->accept_list);
- if (ev == NULL)
- return;
-
- sock->pending_accept = 1;
- iev = &sock->readable_ev;
-
- sock->references++; /* keep socket around for this internal event */
- iev->ev_sender = sock;
- iev->ev_action = internal_accept;
- iev->ev_arg = sock;
-
- isc_task_send(ev->ev_sender, (isc_event_t **)&iev);
-}
-
-static void
-dispatch_connect(isc__socket_t *sock) {
- intev_t *iev;
- isc_socket_connev_t *ev;
-
- iev = &sock->writable_ev;
-
- ev = sock->connect_ev;
- INSIST(ev != NULL); /* XXX */
-
- INSIST(sock->connecting);
-
- sock->references++; /* keep socket around for this internal event */
- iev->ev_sender = sock;
- iev->ev_action = internal_connect;
- iev->ev_arg = sock;
-
- isc_task_send(ev->ev_sender, (isc_event_t **)&iev);
-}
-
-/*
- * Dequeue an item off the given socket's read queue, set the result code
- * in the done event to the one provided, and send it to the task it was
- * destined for.
- *
- * If the event to be sent is on a list, remove it before sending. If
- * asked to, send and detach from the socket as well.
- *
- * Caller must have the socket locked if the event is attached to the socket.
- */
-static void
-send_recvdone_event(isc__socket_t *sock, isc_socketevent_t **dev) {
- isc_task_t *task;
-
- task = (*dev)->ev_sender;
-
- (*dev)->ev_sender = sock;
-
- if (ISC_LINK_LINKED(*dev, ev_link))
- ISC_LIST_DEQUEUE(sock->recv_list, *dev, ev_link);
-
- if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
- == ISC_SOCKEVENTATTR_ATTACHED)
- isc_task_sendanddetach(&task, (isc_event_t **)dev);
- else
- isc_task_send(task, (isc_event_t **)dev);
-}
-
-/*
- * See comments for send_recvdone_event() above.
- *
- * Caller must have the socket locked if the event is attached to the socket.
- */
-static void
-send_senddone_event(isc__socket_t *sock, isc_socketevent_t **dev) {
- isc_task_t *task;
-
- INSIST(dev != NULL && *dev != NULL);
-
- task = (*dev)->ev_sender;
- (*dev)->ev_sender = sock;
-
- if (ISC_LINK_LINKED(*dev, ev_link))
- ISC_LIST_DEQUEUE(sock->send_list, *dev, ev_link);
-
- if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
- == ISC_SOCKEVENTATTR_ATTACHED)
- isc_task_sendanddetach(&task, (isc_event_t **)dev);
- else
- isc_task_send(task, (isc_event_t **)dev);
-}
-
-/*
- * Call accept() on a socket, to get the new file descriptor. The listen
- * socket is used as a prototype to create a new isc_socket_t. The new
- * socket has one outstanding reference. The task receiving the event
- * will be detached from just after the event is delivered.
- *
- * On entry to this function, the event delivered is the internal
- * readable event, and the first item on the accept_list should be
- * the done event we want to send. If the list is empty, this is a no-op,
- * so just unlock and return.
- */
-static void
-internal_accept(isc_task_t *me, isc_event_t *ev) {
- isc__socket_t *sock;
- isc__socketmgr_t *manager;
- isc_socket_newconnev_t *dev;
- isc_task_t *task;
- ISC_SOCKADDR_LEN_T addrlen;
- int fd;
- isc_result_t result = ISC_R_SUCCESS;
- char strbuf[ISC_STRERRORSIZE];
- const char *err = "accept";
-
- UNUSED(me);
-
- sock = ev->ev_sender;
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- socket_log(sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "internal_accept called, locked socket");
-
- manager = sock->manager;
- INSIST(VALID_MANAGER(manager));
-
- INSIST(sock->listener);
- INSIST(sock->pending_accept == 1);
- sock->pending_accept = 0;
-
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy(&sock);
- return;
- }
-
- /*
- * Get the first item off the accept list.
- * If it is empty, unlock the socket and return.
- */
- dev = ISC_LIST_HEAD(sock->accept_list);
- if (dev == NULL) {
- UNLOCK(&sock->lock);
- return;
- }
-
- /*
- * Try to accept the new connection. If the accept fails with
- * EAGAIN or EINTR, simply poke the watcher to watch this socket
- * again. Also ignore ECONNRESET, which has been reported to
- * be spuriously returned on Linux 2.2.19 although it is not
- * a documented error for accept(). ECONNABORTED has been
- * reported for Solaris 8. The rest are thrown in not because
- * we have seen them but because they are ignored by other
- * daemons such as BIND 8 and Apache.
- */
-
- addrlen = sizeof(NEWCONNSOCK(dev)->peer_address.type);
- memset(&NEWCONNSOCK(dev)->peer_address.type, 0, addrlen);
- fd = accept(sock->fd, &NEWCONNSOCK(dev)->peer_address.type.sa,
- (void *)&addrlen);
-
-#ifdef F_DUPFD
- /*
- * Leave a space for stdio to work in.
- */
- if (fd >= 0 && fd < 20) {
- int new, tmp;
- new = fcntl(fd, F_DUPFD, 20);
- tmp = errno;
- (void)close(fd);
- errno = tmp;
- fd = new;
- err = "accept/fcntl";
- }
-#endif
-
- if (fd < 0) {
- if (SOFT_ERROR(errno))
- goto soft_error;
- switch (errno) {
- case ENFILE:
- case EMFILE:
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "%s: too many open file descriptors",
- err);
- goto soft_error;
-
- case ENOBUFS:
- case ENOMEM:
- case ECONNRESET:
- case ECONNABORTED:
- case EHOSTUNREACH:
- case EHOSTDOWN:
- case ENETUNREACH:
- case ENETDOWN:
- case ECONNREFUSED:
-#ifdef EPROTO
- case EPROTO:
-#endif
-#ifdef ENONET
- case ENONET:
-#endif
- goto soft_error;
- default:
- break;
- }
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_accept: %s() %s: %s", err,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- fd = -1;
- result = ISC_R_UNEXPECTED;
- } else {
- if (addrlen == 0U) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_accept(): "
- "accept() failed to return "
- "remote address");
-
- (void)close(fd);
- goto soft_error;
- } else if (NEWCONNSOCK(dev)->peer_address.type.sa.sa_family !=
- sock->pf)
- {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_accept(): "
- "accept() returned peer address "
- "family %u (expected %u)",
- NEWCONNSOCK(dev)->peer_address.
- type.sa.sa_family,
- sock->pf);
- (void)close(fd);
- goto soft_error;
- } else if (fd >= (int)manager->maxsocks) {
- isc_log_iwrite(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYFDS,
- "accept: "
- "file descriptor exceeds limit (%d/%u)",
- fd, manager->maxsocks);
- (void)close(fd);
- goto soft_error;
- }
- }
-
- if (fd != -1) {
- NEWCONNSOCK(dev)->peer_address.length = addrlen;
- NEWCONNSOCK(dev)->pf = sock->pf;
- }
-
- /*
- * Pull off the done event.
- */
- ISC_LIST_UNLINK(sock->accept_list, dev, ev_link);
-
- /*
- * Poke watcher if there are more pending accepts.
- */
- if (!ISC_LIST_EMPTY(sock->accept_list))
- select_poke(sock->manager, sock->fd, SELECT_POKE_ACCEPT);
-
- UNLOCK(&sock->lock);
-
- if (fd != -1) {
- result = make_nonblock(fd);
- if (result != ISC_R_SUCCESS) {
- (void)close(fd);
- fd = -1;
- }
- }
-
- /*
- * -1 means the new socket didn't happen.
- */
- if (fd != -1) {
- int lockid = FDLOCK_ID(fd);
-
- LOCK(&manager->fdlock[lockid]);
- manager->fds[fd] = NEWCONNSOCK(dev);
- manager->fdstate[fd] = MANAGED;
- UNLOCK(&manager->fdlock[lockid]);
-
- LOCK(&manager->lock);
- ISC_LIST_APPEND(manager->socklist, NEWCONNSOCK(dev), link);
-
- NEWCONNSOCK(dev)->fd = fd;
- NEWCONNSOCK(dev)->bound = 1;
- NEWCONNSOCK(dev)->connected = 1;
-
- /*
- * Save away the remote address
- */
- dev->address = NEWCONNSOCK(dev)->peer_address;
-
-#ifdef USE_SELECT
- if (manager->maxfd < fd)
- manager->maxfd = fd;
-#endif
-
- socket_log(sock, &NEWCONNSOCK(dev)->peer_address, CREATION,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
- "accepted connection, new socket %p",
- dev->newsocket);
-
- UNLOCK(&manager->lock);
-
- inc_stats(manager->stats, sock->statsindex[STATID_ACCEPT]);
- } else {
- inc_stats(manager->stats, sock->statsindex[STATID_ACCEPTFAIL]);
- NEWCONNSOCK(dev)->references--;
- free_socket((isc__socket_t **)&dev->newsocket);
- }
-
- /*
- * Fill in the done event details and send it off.
- */
- dev->result = result;
- task = dev->ev_sender;
- dev->ev_sender = sock;
-
- isc_task_sendanddetach(&task, ISC_EVENT_PTR(&dev));
- return;
-
- soft_error:
- select_poke(sock->manager, sock->fd, SELECT_POKE_ACCEPT);
- UNLOCK(&sock->lock);
-
- inc_stats(manager->stats, sock->statsindex[STATID_ACCEPTFAIL]);
- return;
-}
-
-static void
-internal_recv(isc_task_t *me, isc_event_t *ev) {
- isc_socketevent_t *dev;
- isc__socket_t *sock;
-
- INSIST(ev->ev_type == ISC_SOCKEVENT_INTR);
-
- sock = ev->ev_sender;
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- socket_log(sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
- "internal_recv: task %p got event %p", me, ev);
-
- INSIST(sock->pending_recv == 1);
- sock->pending_recv = 0;
-
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy(&sock);
- return;
- }
-
- /*
- * Try to do as much I/O as possible on this socket. There are no
- * limits here, currently.
- */
- dev = ISC_LIST_HEAD(sock->recv_list);
- while (dev != NULL) {
- switch (doio_recv(sock, dev)) {
- case DOIO_SOFT:
- goto poke;
-
- case DOIO_EOF:
- /*
- * read of 0 means the remote end was closed.
- * Run through the event queue and dispatch all
- * the events with an EOF result code.
- */
- do {
- dev->result = ISC_R_EOF;
- send_recvdone_event(sock, &dev);
- dev = ISC_LIST_HEAD(sock->recv_list);
- } while (dev != NULL);
- goto poke;
-
- case DOIO_SUCCESS:
- case DOIO_HARD:
- send_recvdone_event(sock, &dev);
- break;
- }
-
- dev = ISC_LIST_HEAD(sock->recv_list);
- }
-
- poke:
- if (!ISC_LIST_EMPTY(sock->recv_list))
- select_poke(sock->manager, sock->fd, SELECT_POKE_READ);
-
- UNLOCK(&sock->lock);
-}
-
-static void
-internal_send(isc_task_t *me, isc_event_t *ev) {
- isc_socketevent_t *dev;
- isc__socket_t *sock;
-
- INSIST(ev->ev_type == ISC_SOCKEVENT_INTW);
-
- /*
- * Find out what socket this is and lock it.
- */
- sock = (isc__socket_t *)ev->ev_sender;
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- socket_log(sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALSEND,
- "internal_send: task %p got event %p", me, ev);
-
- INSIST(sock->pending_send == 1);
- sock->pending_send = 0;
-
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy(&sock);
- return;
- }
-
- /*
- * Try to do as much I/O as possible on this socket. There are no
- * limits here, currently.
- */
- dev = ISC_LIST_HEAD(sock->send_list);
- while (dev != NULL) {
- switch (doio_send(sock, dev)) {
- case DOIO_SOFT:
- goto poke;
-
- case DOIO_HARD:
- case DOIO_SUCCESS:
- send_senddone_event(sock, &dev);
- break;
- }
-
- dev = ISC_LIST_HEAD(sock->send_list);
- }
-
- poke:
- if (!ISC_LIST_EMPTY(sock->send_list))
- select_poke(sock->manager, sock->fd, SELECT_POKE_WRITE);
-
- UNLOCK(&sock->lock);
-}
-
-static void
-internal_fdwatch_write(isc_task_t *me, isc_event_t *ev) {
- isc__socket_t *sock;
- int more_data;
-
- INSIST(ev->ev_type == ISC_SOCKEVENT_INTW);
-
- /*
- * Find out what socket this is and lock it.
- */
- sock = (isc__socket_t *)ev->ev_sender;
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- socket_log(sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALSEND,
- "internal_fdwatch_write: task %p got event %p", me, ev);
-
- INSIST(sock->pending_send == 1);
-
- UNLOCK(&sock->lock);
- more_data = (sock->fdwatchcb)(me, (isc_socket_t *)sock,
- sock->fdwatcharg, ISC_SOCKFDWATCH_WRITE);
- LOCK(&sock->lock);
-
- sock->pending_send = 0;
-
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy(&sock);
- return;
- }
-
- if (more_data)
- select_poke(sock->manager, sock->fd, SELECT_POKE_WRITE);
-
- UNLOCK(&sock->lock);
-}
-
-static void
-internal_fdwatch_read(isc_task_t *me, isc_event_t *ev) {
- isc__socket_t *sock;
- int more_data;
-
- INSIST(ev->ev_type == ISC_SOCKEVENT_INTR);
-
- /*
- * Find out what socket this is and lock it.
- */
- sock = (isc__socket_t *)ev->ev_sender;
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- socket_log(sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
- "internal_fdwatch_read: task %p got event %p", me, ev);
-
- INSIST(sock->pending_recv == 1);
-
- UNLOCK(&sock->lock);
- more_data = (sock->fdwatchcb)(me, (isc_socket_t *)sock,
- sock->fdwatcharg, ISC_SOCKFDWATCH_READ);
- LOCK(&sock->lock);
-
- sock->pending_recv = 0;
-
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy(&sock);
- return;
- }
-
- if (more_data)
- select_poke(sock->manager, sock->fd, SELECT_POKE_READ);
-
- UNLOCK(&sock->lock);
-}
-
-/*
- * Process read/writes on each fd here. Avoid locking
- * and unlocking twice if both reads and writes are possible.
- */
-static void
-process_fd(isc__socketmgr_t *manager, int fd, isc_boolean_t readable,
- isc_boolean_t writeable)
-{
- isc__socket_t *sock;
- isc_boolean_t unlock_sock;
- isc_boolean_t unwatch_read = ISC_FALSE, unwatch_write = ISC_FALSE;
- int lockid = FDLOCK_ID(fd);
-
- /*
- * If the socket is going to be closed, don't do more I/O.
- */
- LOCK(&manager->fdlock[lockid]);
- if (manager->fdstate[fd] == CLOSE_PENDING) {
- UNLOCK(&manager->fdlock[lockid]);
-
- (void)unwatch_fd(manager, fd, SELECT_POKE_READ);
- (void)unwatch_fd(manager, fd, SELECT_POKE_WRITE);
- return;
- }
-
- sock = manager->fds[fd];
- unlock_sock = ISC_FALSE;
- if (readable) {
- if (sock == NULL) {
- unwatch_read = ISC_TRUE;
- goto check_write;
- }
- unlock_sock = ISC_TRUE;
- LOCK(&sock->lock);
- if (!SOCK_DEAD(sock)) {
- if (sock->listener)
- dispatch_accept(sock);
- else
- dispatch_recv(sock);
- }
- unwatch_read = ISC_TRUE;
- }
-check_write:
- if (writeable) {
- if (sock == NULL) {
- unwatch_write = ISC_TRUE;
- goto unlock_fd;
- }
- if (!unlock_sock) {
- unlock_sock = ISC_TRUE;
- LOCK(&sock->lock);
- }
- if (!SOCK_DEAD(sock)) {
- if (sock->connecting)
- dispatch_connect(sock);
- else
- dispatch_send(sock);
- }
- unwatch_write = ISC_TRUE;
- }
- if (unlock_sock)
- UNLOCK(&sock->lock);
-
- unlock_fd:
- UNLOCK(&manager->fdlock[lockid]);
- if (unwatch_read)
- (void)unwatch_fd(manager, fd, SELECT_POKE_READ);
- if (unwatch_write)
- (void)unwatch_fd(manager, fd, SELECT_POKE_WRITE);
-
-}
-
-#ifdef USE_KQUEUE
-static isc_boolean_t
-process_fds(isc__socketmgr_t *manager, struct kevent *events, int nevents) {
- int i;
- isc_boolean_t readable, writable;
- isc_boolean_t done = ISC_FALSE;
-#ifdef USE_WATCHER_THREAD
- isc_boolean_t have_ctlevent = ISC_FALSE;
-#endif
-
- if (nevents == manager->nevents) {
- /*
- * This is not an error, but something unexpected. If this
- * happens, it may indicate the need for increasing
- * ISC_SOCKET_MAXEVENTS.
- */
- manager_log(manager, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_INFO,
- "maximum number of FD events (%d) received",
- nevents);
- }
-
- for (i = 0; i < nevents; i++) {
- REQUIRE(events[i].ident < manager->maxsocks);
-#ifdef USE_WATCHER_THREAD
- if (events[i].ident == (uintptr_t)manager->pipe_fds[0]) {
- have_ctlevent = ISC_TRUE;
- continue;
- }
-#endif
- readable = ISC_TF(events[i].filter == EVFILT_READ);
- writable = ISC_TF(events[i].filter == EVFILT_WRITE);
- process_fd(manager, events[i].ident, readable, writable);
- }
-
-#ifdef USE_WATCHER_THREAD
- if (have_ctlevent)
- done = process_ctlfd(manager);
-#endif
-
- return (done);
-}
-#elif defined(USE_EPOLL)
-static isc_boolean_t
-process_fds(isc__socketmgr_t *manager, struct epoll_event *events, int nevents)
-{
- int i;
- isc_boolean_t done = ISC_FALSE;
-#ifdef USE_WATCHER_THREAD
- isc_boolean_t have_ctlevent = ISC_FALSE;
-#endif
-
- if (nevents == manager->nevents) {
- manager_log(manager, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_INFO,
- "maximum number of FD events (%d) received",
- nevents);
- }
-
- for (i = 0; i < nevents; i++) {
- REQUIRE(events[i].data.fd < (int)manager->maxsocks);
-#ifdef USE_WATCHER_THREAD
- if (events[i].data.fd == manager->pipe_fds[0]) {
- have_ctlevent = ISC_TRUE;
- continue;
- }
-#endif
- if ((events[i].events & EPOLLERR) != 0 ||
- (events[i].events & EPOLLHUP) != 0) {
- /*
- * epoll does not set IN/OUT bits on an erroneous
- * condition, so we need to try both anyway. This is a
- * bit inefficient, but should be okay for such rare
- * events. Note also that the read or write attempt
- * won't block because we use non-blocking sockets.
- */
- events[i].events |= (EPOLLIN | EPOLLOUT);
- }
- process_fd(manager, events[i].data.fd,
- (events[i].events & EPOLLIN) != 0,
- (events[i].events & EPOLLOUT) != 0);
- }
-
-#ifdef USE_WATCHER_THREAD
- if (have_ctlevent)
- done = process_ctlfd(manager);
-#endif
-
- return (done);
-}
-#elif defined(USE_DEVPOLL)
-static isc_boolean_t
-process_fds(isc__socketmgr_t *manager, struct pollfd *events, int nevents) {
- int i;
- isc_boolean_t done = ISC_FALSE;
-#ifdef USE_WATCHER_THREAD
- isc_boolean_t have_ctlevent = ISC_FALSE;
-#endif
-
- if (nevents == manager->nevents) {
- manager_log(manager, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_INFO,
- "maximum number of FD events (%d) received",
- nevents);
- }
-
- for (i = 0; i < nevents; i++) {
- REQUIRE(events[i].fd < (int)manager->maxsocks);
-#ifdef USE_WATCHER_THREAD
- if (events[i].fd == manager->pipe_fds[0]) {
- have_ctlevent = ISC_TRUE;
- continue;
- }
-#endif
- process_fd(manager, events[i].fd,
- (events[i].events & POLLIN) != 0,
- (events[i].events & POLLOUT) != 0);
- }
-
-#ifdef USE_WATCHER_THREAD
- if (have_ctlevent)
- done = process_ctlfd(manager);
-#endif
-
- return (done);
-}
-#elif defined(USE_SELECT)
-static void
-process_fds(isc__socketmgr_t *manager, int maxfd, fd_set *readfds,
- fd_set *writefds)
-{
- int i;
-
- REQUIRE(maxfd <= (int)manager->maxsocks);
-
- for (i = 0; i < maxfd; i++) {
-#ifdef USE_WATCHER_THREAD
- if (i == manager->pipe_fds[0] || i == manager->pipe_fds[1])
- continue;
-#endif /* USE_WATCHER_THREAD */
- process_fd(manager, i, FD_ISSET(i, readfds),
- FD_ISSET(i, writefds));
- }
-}
-#endif
-
-#ifdef USE_WATCHER_THREAD
-static isc_boolean_t
-process_ctlfd(isc__socketmgr_t *manager) {
- int msg, fd;
-
- for (;;) {
- select_readmsg(manager, &fd, &msg);
-
- manager_log(manager, IOEVENT,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_WATCHERMSG,
- "watcher got message %d "
- "for socket %d"), msg, fd);
-
- /*
- * Nothing to read?
- */
- if (msg == SELECT_POKE_NOTHING)
- break;
-
- /*
- * Handle shutdown message. We really should
- * jump out of this loop right away, but
- * it doesn't matter if we have to do a little
- * more work first.
- */
- if (msg == SELECT_POKE_SHUTDOWN)
- return (ISC_TRUE);
-
- /*
- * This is a wakeup on a socket. Look
- * at the event queue for both read and write,
- * and decide if we need to watch on it now
- * or not.
- */
- wakeup_socket(manager, fd, msg);
- }
-
- return (ISC_FALSE);
-}
-
-/*
- * This is the thread that will loop forever, always in a select or poll
- * call.
- *
- * When select returns something to do, track down what thread gets to do
- * this I/O and post the event to it.
- */
-static isc_threadresult_t
-watcher(void *uap) {
- isc__socketmgr_t *manager = uap;
- isc_boolean_t done;
- int cc;
-#ifdef USE_KQUEUE
- const char *fnname = "kevent()";
-#elif defined (USE_EPOLL)
- const char *fnname = "epoll_wait()";
-#elif defined(USE_DEVPOLL)
- const char *fnname = "ioctl(DP_POLL)";
- struct dvpoll dvp;
-#elif defined (USE_SELECT)
- const char *fnname = "select()";
- int maxfd;
- int ctlfd;
-#endif
- char strbuf[ISC_STRERRORSIZE];
-#ifdef ISC_SOCKET_USE_POLLWATCH
- pollstate_t pollstate = poll_idle;
-#endif
-
-#if defined (USE_SELECT)
- /*
- * Get the control fd here. This will never change.
- */
- ctlfd = manager->pipe_fds[0];
-#endif
- done = ISC_FALSE;
- while (!done) {
- do {
-#ifdef USE_KQUEUE
- cc = kevent(manager->kqueue_fd, NULL, 0,
- manager->events, manager->nevents, NULL);
-#elif defined(USE_EPOLL)
- cc = epoll_wait(manager->epoll_fd, manager->events,
- manager->nevents, -1);
-#elif defined(USE_DEVPOLL)
- dvp.dp_fds = manager->events;
- dvp.dp_nfds = manager->nevents;
-#ifndef ISC_SOCKET_USE_POLLWATCH
- dvp.dp_timeout = -1;
-#else
- if (pollstate == poll_idle)
- dvp.dp_timeout = -1;
- else
- dvp.dp_timeout = ISC_SOCKET_POLLWATCH_TIMEOUT;
-#endif /* ISC_SOCKET_USE_POLLWATCH */
- cc = ioctl(manager->devpoll_fd, DP_POLL, &dvp);
-#elif defined(USE_SELECT)
- LOCK(&manager->lock);
- memcpy(manager->read_fds_copy, manager->read_fds,
- manager->fd_bufsize);
- memcpy(manager->write_fds_copy, manager->write_fds,
- manager->fd_bufsize);
- maxfd = manager->maxfd + 1;
- UNLOCK(&manager->lock);
-
- cc = select(maxfd, manager->read_fds_copy,
- manager->write_fds_copy, NULL, NULL);
-#endif /* USE_KQUEUE */
-
- if (cc < 0 && !SOFT_ERROR(errno)) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- "%s %s: %s", fnname,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"), strbuf);
- }
-
-#if defined(USE_DEVPOLL) && defined(ISC_SOCKET_USE_POLLWATCH)
- if (cc == 0) {
- if (pollstate == poll_active)
- pollstate = poll_checking;
- else if (pollstate == poll_checking)
- pollstate = poll_idle;
- } else if (cc > 0) {
- if (pollstate == poll_checking) {
- /*
- * XXX: We'd like to use a more
- * verbose log level as it's actually an
- * unexpected event, but the kernel bug
- * reportedly happens pretty frequently
- * (and it can also be a false positive)
- * so it would be just too noisy.
- */
- manager_log(manager,
- ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET,
- ISC_LOG_DEBUG(1),
- "unexpected POLL timeout");
- }
- pollstate = poll_active;
- }
-#endif
- } while (cc < 0);
-
-#if defined(USE_KQUEUE) || defined (USE_EPOLL) || defined (USE_DEVPOLL)
- done = process_fds(manager, manager->events, cc);
-#elif defined(USE_SELECT)
- process_fds(manager, maxfd, manager->read_fds_copy,
- manager->write_fds_copy);
-
- /*
- * Process reads on internal, control fd.
- */
- if (FD_ISSET(ctlfd, manager->read_fds_copy))
- done = process_ctlfd(manager);
-#endif
- }
-
- manager_log(manager, TRACE, "%s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_EXITING, "watcher exiting"));
-
- return ((isc_threadresult_t)0);
-}
-#endif /* USE_WATCHER_THREAD */
-
-#ifdef BIND9
-ISC_SOCKETFUNC_SCOPE void
-isc__socketmgr_setreserved(isc_socketmgr_t *manager0, isc_uint32_t reserved) {
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
-
- REQUIRE(VALID_MANAGER(manager));
-
- manager->reserved = reserved;
-}
-
-ISC_SOCKETFUNC_SCOPE void
-isc___socketmgr_maxudp(isc_socketmgr_t *manager0, int maxudp) {
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
-
- REQUIRE(VALID_MANAGER(manager));
-
- manager->maxudp = maxudp;
-}
-#endif /* BIND9 */
-
-/*
- * Create a new socket manager.
- */
-
-static isc_result_t
-setup_watcher(isc_mem_t *mctx, isc__socketmgr_t *manager) {
- isc_result_t result;
-#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
- char strbuf[ISC_STRERRORSIZE];
-#endif
-
-#ifdef USE_KQUEUE
- manager->nevents = ISC_SOCKET_MAXEVENTS;
- manager->events = isc_mem_get(mctx, sizeof(struct kevent) *
- manager->nevents);
- if (manager->events == NULL)
- return (ISC_R_NOMEMORY);
- manager->kqueue_fd = kqueue();
- if (manager->kqueue_fd == -1) {
- result = isc__errno2result(errno);
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "kqueue %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- strbuf);
- isc_mem_put(mctx, manager->events,
- sizeof(struct kevent) * manager->nevents);
- return (result);
- }
-
-#ifdef USE_WATCHER_THREAD
- result = watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
- if (result != ISC_R_SUCCESS) {
- close(manager->kqueue_fd);
- isc_mem_put(mctx, manager->events,
- sizeof(struct kevent) * manager->nevents);
- return (result);
- }
-#endif /* USE_WATCHER_THREAD */
-#elif defined(USE_EPOLL)
- manager->nevents = ISC_SOCKET_MAXEVENTS;
- manager->events = isc_mem_get(mctx, sizeof(struct epoll_event) *
- manager->nevents);
- if (manager->events == NULL)
- return (ISC_R_NOMEMORY);
- manager->epoll_fd = epoll_create(manager->nevents);
- if (manager->epoll_fd == -1) {
- result = isc__errno2result(errno);
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "epoll_create %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- strbuf);
- isc_mem_put(mctx, manager->events,
- sizeof(struct epoll_event) * manager->nevents);
- return (result);
- }
-#ifdef USE_WATCHER_THREAD
- result = watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
- if (result != ISC_R_SUCCESS) {
- close(manager->epoll_fd);
- isc_mem_put(mctx, manager->events,
- sizeof(struct epoll_event) * manager->nevents);
- return (result);
- }
-#endif /* USE_WATCHER_THREAD */
-#elif defined(USE_DEVPOLL)
- /*
- * XXXJT: /dev/poll seems to reject large numbers of events,
- * so we should be careful about redefining ISC_SOCKET_MAXEVENTS.
- */
- manager->nevents = ISC_SOCKET_MAXEVENTS;
- manager->events = isc_mem_get(mctx, sizeof(struct pollfd) *
- manager->nevents);
- if (manager->events == NULL)
- return (ISC_R_NOMEMORY);
- /*
- * Note: fdpollinfo should be able to support all possible FDs, so
- * it must have maxsocks entries (not nevents).
- */
- manager->fdpollinfo = isc_mem_get(mctx, sizeof(pollinfo_t) *
- manager->maxsocks);
- if (manager->fdpollinfo == NULL) {
- isc_mem_put(mctx, manager->events,
- sizeof(struct pollfd) * manager->nevents);
- return (ISC_R_NOMEMORY);
- }
- memset(manager->fdpollinfo, 0, sizeof(pollinfo_t) * manager->maxsocks);
- manager->devpoll_fd = open("/dev/poll", O_RDWR);
- if (manager->devpoll_fd == -1) {
- result = isc__errno2result(errno);
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "open(/dev/poll) %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- strbuf);
- isc_mem_put(mctx, manager->events,
- sizeof(struct pollfd) * manager->nevents);
- isc_mem_put(mctx, manager->fdpollinfo,
- sizeof(pollinfo_t) * manager->maxsocks);
- return (result);
- }
-#ifdef USE_WATCHER_THREAD
- result = watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
- if (result != ISC_R_SUCCESS) {
- close(manager->devpoll_fd);
- isc_mem_put(mctx, manager->events,
- sizeof(struct pollfd) * manager->nevents);
- isc_mem_put(mctx, manager->fdpollinfo,
- sizeof(pollinfo_t) * manager->maxsocks);
- return (result);
- }
-#endif /* USE_WATCHER_THREAD */
-#elif defined(USE_SELECT)
- UNUSED(result);
-
-#if ISC_SOCKET_MAXSOCKETS > FD_SETSIZE
- /*
- * Note: this code should also cover the case of MAXSOCKETS <=
- * FD_SETSIZE, but we separate the cases to avoid possible portability
- * issues regarding howmany() and the actual representation of fd_set.
- */
- manager->fd_bufsize = howmany(manager->maxsocks, NFDBITS) *
- sizeof(fd_mask);
-#else
- manager->fd_bufsize = sizeof(fd_set);
-#endif
-
- manager->read_fds = NULL;
- manager->read_fds_copy = NULL;
- manager->write_fds = NULL;
- manager->write_fds_copy = NULL;
-
- manager->read_fds = isc_mem_get(mctx, manager->fd_bufsize);
- if (manager->read_fds != NULL)
- manager->read_fds_copy = isc_mem_get(mctx, manager->fd_bufsize);
- if (manager->read_fds_copy != NULL)
- manager->write_fds = isc_mem_get(mctx, manager->fd_bufsize);
- if (manager->write_fds != NULL) {
- manager->write_fds_copy = isc_mem_get(mctx,
- manager->fd_bufsize);
- }
- if (manager->write_fds_copy == NULL) {
- if (manager->write_fds != NULL) {
- isc_mem_put(mctx, manager->write_fds,
- manager->fd_bufsize);
- }
- if (manager->read_fds_copy != NULL) {
- isc_mem_put(mctx, manager->read_fds_copy,
- manager->fd_bufsize);
- }
- if (manager->read_fds != NULL) {
- isc_mem_put(mctx, manager->read_fds,
- manager->fd_bufsize);
- }
- return (ISC_R_NOMEMORY);
- }
- memset(manager->read_fds, 0, manager->fd_bufsize);
- memset(manager->write_fds, 0, manager->fd_bufsize);
-
-#ifdef USE_WATCHER_THREAD
- (void)watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
- manager->maxfd = manager->pipe_fds[0];
-#else /* USE_WATCHER_THREAD */
- manager->maxfd = 0;
-#endif /* USE_WATCHER_THREAD */
-#endif /* USE_KQUEUE */
-
- return (ISC_R_SUCCESS);
-}
-
-static void
-cleanup_watcher(isc_mem_t *mctx, isc__socketmgr_t *manager) {
-#ifdef USE_WATCHER_THREAD
- isc_result_t result;
-
- result = unwatch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
- if (result != ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "epoll_ctl(DEL) %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- }
-#endif /* USE_WATCHER_THREAD */
-
-#ifdef USE_KQUEUE
- close(manager->kqueue_fd);
- isc_mem_put(mctx, manager->events,
- sizeof(struct kevent) * manager->nevents);
-#elif defined(USE_EPOLL)
- close(manager->epoll_fd);
- isc_mem_put(mctx, manager->events,
- sizeof(struct epoll_event) * manager->nevents);
-#elif defined(USE_DEVPOLL)
- close(manager->devpoll_fd);
- isc_mem_put(mctx, manager->events,
- sizeof(struct pollfd) * manager->nevents);
- isc_mem_put(mctx, manager->fdpollinfo,
- sizeof(pollinfo_t) * manager->maxsocks);
-#elif defined(USE_SELECT)
- if (manager->read_fds != NULL)
- isc_mem_put(mctx, manager->read_fds, manager->fd_bufsize);
- if (manager->read_fds_copy != NULL)
- isc_mem_put(mctx, manager->read_fds_copy, manager->fd_bufsize);
- if (manager->write_fds != NULL)
- isc_mem_put(mctx, manager->write_fds, manager->fd_bufsize);
- if (manager->write_fds_copy != NULL)
- isc_mem_put(mctx, manager->write_fds_copy, manager->fd_bufsize);
-#endif /* USE_KQUEUE */
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
- return (isc__socketmgr_create2(mctx, managerp, 0));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
- unsigned int maxsocks)
-{
- int i;
- isc__socketmgr_t *manager;
-#ifdef USE_WATCHER_THREAD
- char strbuf[ISC_STRERRORSIZE];
-#endif
- isc_result_t result;
-
- REQUIRE(managerp != NULL && *managerp == NULL);
-
-#ifdef USE_SHARED_MANAGER
- if (socketmgr != NULL) {
- /* Don't allow maxsocks to be updated */
- if (maxsocks > 0 && socketmgr->maxsocks != maxsocks)
- return (ISC_R_EXISTS);
-
- socketmgr->refs++;
- *managerp = (isc_socketmgr_t *)socketmgr;
- return (ISC_R_SUCCESS);
- }
-#endif /* USE_SHARED_MANAGER */
-
- if (maxsocks == 0)
- maxsocks = ISC_SOCKET_MAXSOCKETS;
-
- manager = isc_mem_get(mctx, sizeof(*manager));
- if (manager == NULL)
- return (ISC_R_NOMEMORY);
-
- /* zero-clear so that necessary cleanup on failure will be easy */
- memset(manager, 0, sizeof(*manager));
- manager->maxsocks = maxsocks;
- manager->reserved = 0;
- manager->maxudp = 0;
- manager->fds = isc_mem_get(mctx,
- manager->maxsocks * sizeof(isc__socket_t *));
- if (manager->fds == NULL) {
- result = ISC_R_NOMEMORY;
- goto free_manager;
- }
- manager->fdstate = isc_mem_get(mctx, manager->maxsocks * sizeof(int));
- if (manager->fdstate == NULL) {
- result = ISC_R_NOMEMORY;
- goto free_manager;
- }
- manager->stats = NULL;
-
- manager->common.methods = &socketmgrmethods;
- manager->common.magic = ISCAPI_SOCKETMGR_MAGIC;
- manager->common.impmagic = SOCKET_MANAGER_MAGIC;
- manager->mctx = NULL;
- memset(manager->fds, 0, manager->maxsocks * sizeof(isc_socket_t *));
- ISC_LIST_INIT(manager->socklist);
- result = isc_mutex_init(&manager->lock);
- if (result != ISC_R_SUCCESS)
- goto free_manager;
- manager->fdlock = isc_mem_get(mctx, FDLOCK_COUNT * sizeof(isc_mutex_t));
- if (manager->fdlock == NULL) {
- result = ISC_R_NOMEMORY;
- goto cleanup_lock;
- }
- for (i = 0; i < FDLOCK_COUNT; i++) {
- result = isc_mutex_init(&manager->fdlock[i]);
- if (result != ISC_R_SUCCESS) {
- while (--i >= 0)
- DESTROYLOCK(&manager->fdlock[i]);
- isc_mem_put(mctx, manager->fdlock,
- FDLOCK_COUNT * sizeof(isc_mutex_t));
- manager->fdlock = NULL;
- goto cleanup_lock;
- }
- }
-
-#ifdef USE_WATCHER_THREAD
- if (isc_condition_init(&manager->shutdown_ok) != ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_condition_init() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- result = ISC_R_UNEXPECTED;
- goto cleanup_lock;
- }
-
- /*
- * Create the special fds that will be used to wake up the
- * select/poll loop when something internal needs to be done.
- */
- if (pipe(manager->pipe_fds) != 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "pipe() %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- strbuf);
- result = ISC_R_UNEXPECTED;
- goto cleanup_condition;
- }
-
- RUNTIME_CHECK(make_nonblock(manager->pipe_fds[0]) == ISC_R_SUCCESS);
-#if 0
- RUNTIME_CHECK(make_nonblock(manager->pipe_fds[1]) == ISC_R_SUCCESS);
-#endif
-#endif /* USE_WATCHER_THREAD */
-
-#ifdef USE_SHARED_MANAGER
- manager->refs = 1;
-#endif /* USE_SHARED_MANAGER */
-
- /*
- * Set up initial state for the select loop
- */
- result = setup_watcher(mctx, manager);
- if (result != ISC_R_SUCCESS)
- goto cleanup;
- memset(manager->fdstate, 0, manager->maxsocks * sizeof(int));
-#ifdef USE_WATCHER_THREAD
- /*
- * Start up the select/poll thread.
- */
- if (isc_thread_create(watcher, manager, &manager->watcher) !=
- ISC_R_SUCCESS) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_create() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- cleanup_watcher(mctx, manager);
- result = ISC_R_UNEXPECTED;
- goto cleanup;
- }
-#endif /* USE_WATCHER_THREAD */
- isc_mem_attach(mctx, &manager->mctx);
-
-#ifdef USE_SHARED_MANAGER
- socketmgr = manager;
-#endif /* USE_SHARED_MANAGER */
- *managerp = (isc_socketmgr_t *)manager;
-
- return (ISC_R_SUCCESS);
-
-cleanup:
-#ifdef USE_WATCHER_THREAD
- (void)close(manager->pipe_fds[0]);
- (void)close(manager->pipe_fds[1]);
-#endif /* USE_WATCHER_THREAD */
-
-#ifdef USE_WATCHER_THREAD
-cleanup_condition:
- (void)isc_condition_destroy(&manager->shutdown_ok);
-#endif /* USE_WATCHER_THREAD */
-
-
-cleanup_lock:
- if (manager->fdlock != NULL) {
- for (i = 0; i < FDLOCK_COUNT; i++)
- DESTROYLOCK(&manager->fdlock[i]);
- }
- DESTROYLOCK(&manager->lock);
-
-free_manager:
- if (manager->fdlock != NULL) {
- isc_mem_put(mctx, manager->fdlock,
- FDLOCK_COUNT * sizeof(isc_mutex_t));
- }
- if (manager->fdstate != NULL) {
- isc_mem_put(mctx, manager->fdstate,
- manager->maxsocks * sizeof(int));
- }
- if (manager->fds != NULL) {
- isc_mem_put(mctx, manager->fds,
- manager->maxsocks * sizeof(isc_socket_t *));
- }
- isc_mem_put(mctx, manager, sizeof(*manager));
-
- return (result);
-}
-
-#ifdef BIND9
-isc_result_t
-isc__socketmgr_getmaxsockets(isc_socketmgr_t *manager0, unsigned int *nsockp) {
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(nsockp != NULL);
-
- *nsockp = manager->maxsocks;
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc__socketmgr_setstats(isc_socketmgr_t *manager0, isc_stats_t *stats) {
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
-
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(ISC_LIST_EMPTY(manager->socklist));
- REQUIRE(manager->stats == NULL);
- REQUIRE(isc_stats_ncounters(stats) == isc_sockstatscounter_max);
-
- isc_stats_attach(stats, &manager->stats);
-}
-#endif
-
-ISC_SOCKETFUNC_SCOPE void
-isc__socketmgr_destroy(isc_socketmgr_t **managerp) {
- isc__socketmgr_t *manager;
- int i;
- isc_mem_t *mctx;
-
- /*
- * Destroy a socket manager.
- */
-
- REQUIRE(managerp != NULL);
- manager = (isc__socketmgr_t *)*managerp;
- REQUIRE(VALID_MANAGER(manager));
-
-#ifdef USE_SHARED_MANAGER
- manager->refs--;
- if (manager->refs > 0) {
- *managerp = NULL;
- return;
- }
- socketmgr = NULL;
-#endif /* USE_SHARED_MANAGER */
-
- LOCK(&manager->lock);
-
- /*
- * Wait for all sockets to be destroyed.
- */
- while (!ISC_LIST_EMPTY(manager->socklist)) {
-#ifdef USE_WATCHER_THREAD
- manager_log(manager, CREATION, "%s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_SOCKETSREMAIN,
- "sockets exist"));
- WAIT(&manager->shutdown_ok, &manager->lock);
-#else /* USE_WATCHER_THREAD */
- UNLOCK(&manager->lock);
- isc__taskmgr_dispatch(NULL);
- LOCK(&manager->lock);
-#endif /* USE_WATCHER_THREAD */
- }
-
- UNLOCK(&manager->lock);
-
- /*
- * Here, poke our select/poll thread. Do this by closing the write
- * half of the pipe, which will send EOF to the read half.
- * This is currently a no-op in the non-threaded case.
- */
- select_poke(manager, 0, SELECT_POKE_SHUTDOWN);
-
-#ifdef USE_WATCHER_THREAD
- /*
- * Wait for thread to exit.
- */
- if (isc_thread_join(manager->watcher, NULL) != ISC_R_SUCCESS)
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_join() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
-#endif /* USE_WATCHER_THREAD */
-
- /*
- * Clean up.
- */
- cleanup_watcher(manager->mctx, manager);
-
-#ifdef USE_WATCHER_THREAD
- (void)close(manager->pipe_fds[0]);
- (void)close(manager->pipe_fds[1]);
- (void)isc_condition_destroy(&manager->shutdown_ok);
-#endif /* USE_WATCHER_THREAD */
-
- for (i = 0; i < (int)manager->maxsocks; i++)
- if (manager->fdstate[i] == CLOSE_PENDING) /* no need to lock */
- (void)close(i);
-
- isc_mem_put(manager->mctx, manager->fds,
- manager->maxsocks * sizeof(isc__socket_t *));
- isc_mem_put(manager->mctx, manager->fdstate,
- manager->maxsocks * sizeof(int));
-
- if (manager->stats != NULL)
- isc_stats_detach(&manager->stats);
-
- if (manager->fdlock != NULL) {
- for (i = 0; i < FDLOCK_COUNT; i++)
- DESTROYLOCK(&manager->fdlock[i]);
- isc_mem_put(manager->mctx, manager->fdlock,
- FDLOCK_COUNT * sizeof(isc_mutex_t));
- }
- DESTROYLOCK(&manager->lock);
- manager->common.magic = 0;
- manager->common.impmagic = 0;
- mctx= manager->mctx;
- isc_mem_put(mctx, manager, sizeof(*manager));
-
- isc_mem_detach(&mctx);
-
- *managerp = NULL;
-
-#ifdef USE_SHARED_MANAGER
- socketmgr = NULL;
-#endif
-}
-
-static isc_result_t
-socket_recv(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
- unsigned int flags)
-{
- int io_state;
- isc_boolean_t have_lock = ISC_FALSE;
- isc_task_t *ntask = NULL;
- isc_result_t result = ISC_R_SUCCESS;
-
- dev->ev_sender = task;
-
- if (sock->type == isc_sockettype_udp) {
- io_state = doio_recv(sock, dev);
- } else {
- LOCK(&sock->lock);
- have_lock = ISC_TRUE;
-
- if (ISC_LIST_EMPTY(sock->recv_list))
- io_state = doio_recv(sock, dev);
- else
- io_state = DOIO_SOFT;
- }
-
- switch (io_state) {
- case DOIO_SOFT:
- /*
- * We couldn't read all or part of the request right now, so
- * queue it.
- *
- * Attach to socket and to task
- */
- isc_task_attach(task, &ntask);
- dev->attributes |= ISC_SOCKEVENTATTR_ATTACHED;
-
- if (!have_lock) {
- LOCK(&sock->lock);
- have_lock = ISC_TRUE;
- }
-
- /*
- * Enqueue the request. If the socket was previously not being
- * watched, poke the watcher to start paying attention to it.
- */
- if (ISC_LIST_EMPTY(sock->recv_list) && !sock->pending_recv)
- select_poke(sock->manager, sock->fd, SELECT_POKE_READ);
- ISC_LIST_ENQUEUE(sock->recv_list, dev, ev_link);
-
- socket_log(sock, NULL, EVENT, NULL, 0, 0,
- "socket_recv: event %p -> task %p",
- dev, ntask);
-
- if ((flags & ISC_SOCKFLAG_IMMEDIATE) != 0)
- result = ISC_R_INPROGRESS;
- break;
-
- case DOIO_EOF:
- dev->result = ISC_R_EOF;
- /* fallthrough */
-
- case DOIO_HARD:
- case DOIO_SUCCESS:
- if ((flags & ISC_SOCKFLAG_IMMEDIATE) == 0)
- send_recvdone_event(sock, &dev);
- break;
- }
-
- if (have_lock)
- UNLOCK(&sock->lock);
-
- return (result);
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_recvv(isc_socket_t *sock0, isc_bufferlist_t *buflist,
- unsigned int minimum, isc_task_t *task,
- isc_taskaction_t action, const void *arg)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_socketevent_t *dev;
- isc__socketmgr_t *manager;
- unsigned int iocount;
- isc_buffer_t *buffer;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(buflist != NULL);
- REQUIRE(!ISC_LIST_EMPTY(*buflist));
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- iocount = isc_bufferlist_availablecount(buflist);
- REQUIRE(iocount > 0);
-
- INSIST(sock->bound);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_RECVDONE, action, arg);
- if (dev == NULL)
- return (ISC_R_NOMEMORY);
-
- /*
- * UDP sockets are always partial read
- */
- if (sock->type == isc_sockettype_udp)
- dev->minimum = 1;
- else {
- if (minimum == 0)
- dev->minimum = iocount;
- else
- dev->minimum = minimum;
- }
-
- /*
- * Move each buffer from the passed in list to our internal one.
- */
- buffer = ISC_LIST_HEAD(*buflist);
- while (buffer != NULL) {
- ISC_LIST_DEQUEUE(*buflist, buffer, link);
- ISC_LIST_ENQUEUE(dev->bufferlist, buffer, link);
- buffer = ISC_LIST_HEAD(*buflist);
- }
-
- return (socket_recv(sock, dev, task, 0));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_recv(isc_socket_t *sock0, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_taskaction_t action, const void *arg)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_socketevent_t *dev;
- isc__socketmgr_t *manager;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- INSIST(sock->bound);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_RECVDONE, action, arg);
- if (dev == NULL)
- return (ISC_R_NOMEMORY);
-
- return (isc__socket_recv2(sock0, region, minimum, task, dev, 0));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_recv2(isc_socket_t *sock0, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_socketevent_t *event, unsigned int flags)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- event->ev_sender = sock;
- event->result = ISC_R_UNSET;
- ISC_LIST_INIT(event->bufferlist);
- event->region = *region;
- event->n = 0;
- event->offset = 0;
- event->attributes = 0;
-
- /*
- * UDP sockets are always partial read.
- */
- if (sock->type == isc_sockettype_udp)
- event->minimum = 1;
- else {
- if (minimum == 0)
- event->minimum = region->length;
- else
- event->minimum = minimum;
- }
-
- return (socket_recv(sock, event, task, flags));
-}
-
-static isc_result_t
-socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
- unsigned int flags)
-{
- int io_state;
- isc_boolean_t have_lock = ISC_FALSE;
- isc_task_t *ntask = NULL;
- isc_result_t result = ISC_R_SUCCESS;
-
- dev->ev_sender = task;
-
- set_dev_address(address, sock, dev);
- if (pktinfo != NULL) {
- dev->attributes |= ISC_SOCKEVENTATTR_PKTINFO;
- dev->pktinfo = *pktinfo;
-
- if (!isc_sockaddr_issitelocal(&dev->address) &&
- !isc_sockaddr_islinklocal(&dev->address)) {
- socket_log(sock, NULL, TRACE, isc_msgcat,
- ISC_MSGSET_SOCKET, ISC_MSG_PKTINFOPROVIDED,
- "pktinfo structure provided, ifindex %u "
- "(set to 0)", pktinfo->ipi6_ifindex);
-
- /*
- * Set the pktinfo index to 0 here, to let the
- * kernel decide what interface it should send on.
- */
- dev->pktinfo.ipi6_ifindex = 0;
- }
- }
-
- if (sock->type == isc_sockettype_udp)
- io_state = doio_send(sock, dev);
- else {
- LOCK(&sock->lock);
- have_lock = ISC_TRUE;
-
- if (ISC_LIST_EMPTY(sock->send_list))
- io_state = doio_send(sock, dev);
- else
- io_state = DOIO_SOFT;
- }
-
- switch (io_state) {
- case DOIO_SOFT:
- /*
- * We couldn't send all or part of the request right now, so
- * queue it unless ISC_SOCKFLAG_NORETRY is set.
- */
- if ((flags & ISC_SOCKFLAG_NORETRY) == 0) {
- isc_task_attach(task, &ntask);
- dev->attributes |= ISC_SOCKEVENTATTR_ATTACHED;
-
- if (!have_lock) {
- LOCK(&sock->lock);
- have_lock = ISC_TRUE;
- }
-
- /*
- * Enqueue the request. If the socket was previously
- * not being watched, poke the watcher to start
- * paying attention to it.
- */
- if (ISC_LIST_EMPTY(sock->send_list) &&
- !sock->pending_send)
- select_poke(sock->manager, sock->fd,
- SELECT_POKE_WRITE);
- ISC_LIST_ENQUEUE(sock->send_list, dev, ev_link);
-
- socket_log(sock, NULL, EVENT, NULL, 0, 0,
- "socket_send: event %p -> task %p",
- dev, ntask);
-
- if ((flags & ISC_SOCKFLAG_IMMEDIATE) != 0)
- result = ISC_R_INPROGRESS;
- break;
- }
-
- case DOIO_HARD:
- case DOIO_SUCCESS:
- if ((flags & ISC_SOCKFLAG_IMMEDIATE) == 0)
- send_senddone_event(sock, &dev);
- break;
- }
-
- if (have_lock)
- UNLOCK(&sock->lock);
-
- return (result);
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_send(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- /*
- * REQUIRE() checking is performed in isc_socket_sendto().
- */
- return (isc__socket_sendto(sock, region, task, action, arg, NULL,
- NULL));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendto(isc_socket_t *sock0, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_socketevent_t *dev;
- isc__socketmgr_t *manager;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(region != NULL);
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- INSIST(sock->bound);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_SENDDONE, action, arg);
- if (dev == NULL)
- return (ISC_R_NOMEMORY);
-
- dev->region = *region;
-
- return (socket_send(sock, dev, task, address, pktinfo, 0));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- return (isc__socket_sendtov(sock, buflist, task, action, arg, NULL,
- NULL));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendtov(isc_socket_t *sock0, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_socketevent_t *dev;
- isc__socketmgr_t *manager;
- unsigned int iocount;
- isc_buffer_t *buffer;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(buflist != NULL);
- REQUIRE(!ISC_LIST_EMPTY(*buflist));
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- iocount = isc_bufferlist_usedcount(buflist);
- REQUIRE(iocount > 0);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_SENDDONE, action, arg);
- if (dev == NULL)
- return (ISC_R_NOMEMORY);
-
- /*
- * Move each buffer from the passed in list to our internal one.
- */
- buffer = ISC_LIST_HEAD(*buflist);
- while (buffer != NULL) {
- ISC_LIST_DEQUEUE(*buflist, buffer, link);
- ISC_LIST_ENQUEUE(dev->bufferlist, buffer, link);
- buffer = ISC_LIST_HEAD(*buflist);
- }
-
- return (socket_send(sock, dev, task, address, pktinfo, 0));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_sendto2(isc_socket_t *sock0, isc_region_t *region,
- isc_task_t *task,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
- isc_socketevent_t *event, unsigned int flags)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE((flags & ~(ISC_SOCKFLAG_IMMEDIATE|ISC_SOCKFLAG_NORETRY)) == 0);
- if ((flags & ISC_SOCKFLAG_NORETRY) != 0)
- REQUIRE(sock->type == isc_sockettype_udp);
- event->ev_sender = sock;
- event->result = ISC_R_UNSET;
- ISC_LIST_INIT(event->bufferlist);
- event->region = *region;
- event->n = 0;
- event->offset = 0;
- event->attributes = 0;
-
- return (socket_send(sock, event, task, address, pktinfo, flags));
-}
-
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) {
-#ifdef ISC_PLATFORM_HAVESYSUNH
- int s;
- struct stat sb;
- char strbuf[ISC_STRERRORSIZE];
-
- if (sockaddr->type.sa.sa_family != AF_UNIX)
- return;
-
-#ifndef S_ISSOCK
-#if defined(S_IFMT) && defined(S_IFSOCK)
-#define S_ISSOCK(mode) ((mode & S_IFMT)==S_IFSOCK)
-#elif defined(_S_IFMT) && defined(S_IFSOCK)
-#define S_ISSOCK(mode) ((mode & _S_IFMT)==S_IFSOCK)
-#endif
-#endif
-
-#ifndef S_ISFIFO
-#if defined(S_IFMT) && defined(S_IFIFO)
-#define S_ISFIFO(mode) ((mode & S_IFMT)==S_IFIFO)
-#elif defined(_S_IFMT) && defined(S_IFIFO)
-#define S_ISFIFO(mode) ((mode & _S_IFMT)==S_IFIFO)
-#endif
-#endif
-
-#if !defined(S_ISFIFO) && !defined(S_ISSOCK)
-#error You need to define S_ISFIFO and S_ISSOCK as appropriate for your platform. See <sys/stat.h>.
-#endif
-
-#ifndef S_ISFIFO
-#define S_ISFIFO(mode) 0
-#endif
-
-#ifndef S_ISSOCK
-#define S_ISSOCK(mode) 0
-#endif
-
- if (active) {
- if (stat(sockaddr->type.sunix.sun_path, &sb) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- "isc_socket_cleanunix: stat(%s): %s",
- sockaddr->type.sunix.sun_path, strbuf);
- return;
- }
- if (!(S_ISSOCK(sb.st_mode) || S_ISFIFO(sb.st_mode))) {
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- "isc_socket_cleanunix: %s: not a socket",
- sockaddr->type.sunix.sun_path);
- return;
- }
- if (unlink(sockaddr->type.sunix.sun_path) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- "isc_socket_cleanunix: unlink(%s): %s",
- sockaddr->type.sunix.sun_path, strbuf);
- }
- return;
- }
-
- s = socket(AF_UNIX, SOCK_STREAM, 0);
- if (s < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
- "isc_socket_cleanunix: socket(%s): %s",
- sockaddr->type.sunix.sun_path, strbuf);
- return;
- }
-
- if (stat(sockaddr->type.sunix.sun_path, &sb) < 0) {
- switch (errno) {
- case ENOENT: /* We exited cleanly last time */
- break;
- default:
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
- "isc_socket_cleanunix: stat(%s): %s",
- sockaddr->type.sunix.sun_path, strbuf);
- break;
- }
- goto cleanup;
- }
-
- if (!(S_ISSOCK(sb.st_mode) || S_ISFIFO(sb.st_mode))) {
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
- "isc_socket_cleanunix: %s: not a socket",
- sockaddr->type.sunix.sun_path);
- goto cleanup;
- }
-
- if (connect(s, (struct sockaddr *)&sockaddr->type.sunix,
- sizeof(sockaddr->type.sunix)) < 0) {
- switch (errno) {
- case ECONNREFUSED:
- case ECONNRESET:
- if (unlink(sockaddr->type.sunix.sun_path) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET,
- ISC_LOG_WARNING,
- "isc_socket_cleanunix: "
- "unlink(%s): %s",
- sockaddr->type.sunix.sun_path,
- strbuf);
- }
- break;
- default:
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
- "isc_socket_cleanunix: connect(%s): %s",
- sockaddr->type.sunix.sun_path, strbuf);
- break;
- }
- }
- cleanup:
- close(s);
-#else
- UNUSED(sockaddr);
- UNUSED(active);
-#endif
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
- isc_uint32_t owner, isc_uint32_t group)
-{
-#ifdef ISC_PLATFORM_HAVESYSUNH
- isc_result_t result = ISC_R_SUCCESS;
- char strbuf[ISC_STRERRORSIZE];
- char path[sizeof(sockaddr->type.sunix.sun_path)];
-#ifdef NEED_SECURE_DIRECTORY
- char *slash;
-#endif
-
- REQUIRE(sockaddr->type.sa.sa_family == AF_UNIX);
- INSIST(strlen(sockaddr->type.sunix.sun_path) < sizeof(path));
- strcpy(path, sockaddr->type.sunix.sun_path);
-
-#ifdef NEED_SECURE_DIRECTORY
- slash = strrchr(path, '/');
- if (slash != NULL) {
- if (slash != path)
- *slash = '\0';
- else
- strcpy(path, "/");
- } else
- strcpy(path, ".");
-#endif
-
- if (chmod(path, perm) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- "isc_socket_permunix: chmod(%s, %d): %s",
- path, perm, strbuf);
- result = ISC_R_FAILURE;
- }
- if (chown(path, owner, group) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- "isc_socket_permunix: chown(%s, %d, %d): %s",
- path, owner, group,
- strbuf);
- result = ISC_R_FAILURE;
- }
- return (result);
-#else
- UNUSED(sockaddr);
- UNUSED(perm);
- UNUSED(owner);
- UNUSED(group);
- return (ISC_R_NOTIMPLEMENTED);
-#endif
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_bind(isc_socket_t *sock0, isc_sockaddr_t *sockaddr,
- unsigned int options) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
- char strbuf[ISC_STRERRORSIZE];
- int on = 1;
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
-
- INSIST(!sock->bound);
- INSIST(!sock->dupped);
-
- if (sock->pf != sockaddr->type.sa.sa_family) {
- UNLOCK(&sock->lock);
- return (ISC_R_FAMILYMISMATCH);
- }
-
- /*
- * Only set SO_REUSEADDR when we want a specific port.
- */
-#ifdef AF_UNIX
- if (sock->pf == AF_UNIX)
- goto bind_socket;
-#endif
- if ((options & ISC_SOCKET_REUSEADDRESS) != 0 &&
- isc_sockaddr_getport(sockaddr) != (in_port_t)0 &&
- setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on,
- sizeof(on)) < 0) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d) %s", sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- /* Press on... */
- }
-#ifdef AF_UNIX
- bind_socket:
-#endif
- if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) {
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_BINDFAIL]);
-
- UNLOCK(&sock->lock);
- switch (errno) {
- case EACCES:
- return (ISC_R_NOPERM);
- case EADDRNOTAVAIL:
- return (ISC_R_ADDRNOTAVAIL);
- case EADDRINUSE:
- return (ISC_R_ADDRINUSE);
- case EINVAL:
- return (ISC_R_BOUND);
- default:
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "bind: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
- }
-
- socket_log(sock, sockaddr, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "bound");
- sock->bound = 1;
-
- UNLOCK(&sock->lock);
- return (ISC_R_SUCCESS);
-}
-
-/*
- * Enable this only for specific OS versions, and only when they have repaired
- * their problems with it. Until then, this is is broken and needs to be
- * diabled by default. See RT22589 for details.
- */
-#undef ENABLE_ACCEPTFILTER
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_filter(isc_socket_t *sock0, const char *filter) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
-#if defined(SO_ACCEPTFILTER) && defined(ENABLE_ACCEPTFILTER)
- char strbuf[ISC_STRERRORSIZE];
- struct accept_filter_arg afa;
-#else
- UNUSED(sock);
- UNUSED(filter);
-#endif
-
- REQUIRE(VALID_SOCKET(sock));
-
-#if defined(SO_ACCEPTFILTER) && defined(ENABLE_ACCEPTFILTER)
- bzero(&afa, sizeof(afa));
- strncpy(afa.af_name, filter, sizeof(afa.af_name));
- if (setsockopt(sock->fd, SOL_SOCKET, SO_ACCEPTFILTER,
- &afa, sizeof(afa)) == -1) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FILTER, "setsockopt(SO_ACCEPTFILTER): %s",
- strbuf);
- return (ISC_R_FAILURE);
- }
- return (ISC_R_SUCCESS);
-#else
- return (ISC_R_NOTIMPLEMENTED);
-#endif
-}
-
-/*
- * Set up to listen on a given socket. We do this by creating an internal
- * event that will be dispatched when the socket has read activity. The
- * watcher will send the internal event to the task when there is a new
- * connection.
- *
- * Unlike in read, we don't preallocate a done event here. Every time there
- * is a new connection we'll have to allocate a new one anyway, so we might
- * as well keep things simple rather than having to track them.
- */
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_listen(isc_socket_t *sock0, unsigned int backlog) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
-
- REQUIRE(!sock->listener);
- REQUIRE(sock->bound);
- REQUIRE(sock->type == isc_sockettype_tcp ||
- sock->type == isc_sockettype_unix);
-
- if (backlog == 0)
- backlog = SOMAXCONN;
-
- if (listen(sock->fd, (int)backlog) < 0) {
- UNLOCK(&sock->lock);
- isc__strerror(errno, strbuf, sizeof(strbuf));
-
- UNEXPECTED_ERROR(__FILE__, __LINE__, "listen: %s", strbuf);
-
- return (ISC_R_UNEXPECTED);
- }
-
- sock->listener = 1;
-
- UNLOCK(&sock->lock);
- return (ISC_R_SUCCESS);
-}
-
-/*
- * This should try to do aggressive accept() XXXMLG
- */
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_accept(isc_socket_t *sock0,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_socket_newconnev_t *dev;
- isc__socketmgr_t *manager;
- isc_task_t *ntask = NULL;
- isc__socket_t *nsock;
- isc_result_t result;
- isc_boolean_t do_poke = ISC_FALSE;
-
- REQUIRE(VALID_SOCKET(sock));
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- LOCK(&sock->lock);
-
- REQUIRE(sock->listener);
-
- /*
- * Sender field is overloaded here with the task we will be sending
- * this event to. Just before the actual event is delivered the
- * actual ev_sender will be touched up to be the socket.
- */
- dev = (isc_socket_newconnev_t *)
- isc_event_allocate(manager->mctx, task, ISC_SOCKEVENT_NEWCONN,
- action, arg, sizeof(*dev));
- if (dev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
- ISC_LINK_INIT(dev, ev_link);
-
- result = allocate_socket(manager, sock->type, &nsock);
- if (result != ISC_R_SUCCESS) {
- isc_event_free(ISC_EVENT_PTR(&dev));
- UNLOCK(&sock->lock);
- return (result);
- }
-
- /*
- * Attach to socket and to task.
- */
- isc_task_attach(task, &ntask);
- if (isc_task_exiting(ntask)) {
- free_socket(&nsock);
- isc_task_detach(&ntask);
- isc_event_free(ISC_EVENT_PTR(&dev));
- UNLOCK(&sock->lock);
- return (ISC_R_SHUTTINGDOWN);
- }
- nsock->references++;
- nsock->statsindex = sock->statsindex;
-
- dev->ev_sender = ntask;
- dev->newsocket = (isc_socket_t *)nsock;
-
- /*
- * Poke watcher here. We still have the socket locked, so there
- * is no race condition. We will keep the lock for such a short
- * bit of time waking it up now or later won't matter all that much.
- */
- if (ISC_LIST_EMPTY(sock->accept_list))
- do_poke = ISC_TRUE;
-
- ISC_LIST_ENQUEUE(sock->accept_list, dev, ev_link);
-
- if (do_poke)
- select_poke(manager, sock->fd, SELECT_POKE_ACCEPT);
-
- UNLOCK(&sock->lock);
- return (ISC_R_SUCCESS);
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_connect(isc_socket_t *sock0, isc_sockaddr_t *addr,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_socket_connev_t *dev;
- isc_task_t *ntask = NULL;
- isc__socketmgr_t *manager;
- int cc;
- char strbuf[ISC_STRERRORSIZE];
- char addrbuf[ISC_SOCKADDR_FORMATSIZE];
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(addr != NULL);
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(addr != NULL);
-
- if (isc_sockaddr_ismulticast(addr))
- return (ISC_R_MULTICAST);
-
- LOCK(&sock->lock);
-
- REQUIRE(!sock->connecting);
-
- dev = (isc_socket_connev_t *)isc_event_allocate(manager->mctx, sock,
- ISC_SOCKEVENT_CONNECT,
- action, arg,
- sizeof(*dev));
- if (dev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
- ISC_LINK_INIT(dev, ev_link);
-
- /*
- * Try to do the connect right away, as there can be only one
- * outstanding, and it might happen to complete.
- */
- sock->peer_address = *addr;
- cc = connect(sock->fd, &addr->type.sa, addr->length);
- if (cc < 0) {
- /*
- * HP-UX "fails" to connect a UDP socket and sets errno to
- * EINPROGRESS if it's non-blocking. We'd rather regard this as
- * a success and let the user detect it if it's really an error
- * at the time of sending a packet on the socket.
- */
- if (sock->type == isc_sockettype_udp && errno == EINPROGRESS) {
- cc = 0;
- goto success;
- }
- if (SOFT_ERROR(errno) || errno == EINPROGRESS)
- goto queue;
-
- switch (errno) {
-#define ERROR_MATCH(a, b) case a: dev->result = b; goto err_exit;
- ERROR_MATCH(EACCES, ISC_R_NOPERM);
- ERROR_MATCH(EADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL);
- ERROR_MATCH(EAFNOSUPPORT, ISC_R_ADDRNOTAVAIL);
- ERROR_MATCH(ECONNREFUSED, ISC_R_CONNREFUSED);
- ERROR_MATCH(EHOSTUNREACH, ISC_R_HOSTUNREACH);
-#ifdef EHOSTDOWN
- ERROR_MATCH(EHOSTDOWN, ISC_R_HOSTUNREACH);
-#endif
- ERROR_MATCH(ENETUNREACH, ISC_R_NETUNREACH);
- ERROR_MATCH(ENOBUFS, ISC_R_NORESOURCES);
- ERROR_MATCH(EPERM, ISC_R_HOSTUNREACH);
- ERROR_MATCH(EPIPE, ISC_R_NOTCONNECTED);
- ERROR_MATCH(ECONNRESET, ISC_R_CONNECTIONRESET);
-#undef ERROR_MATCH
- }
-
- sock->connected = 0;
-
- isc__strerror(errno, strbuf, sizeof(strbuf));
- isc_sockaddr_format(addr, addrbuf, sizeof(addrbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "connect(%s) %d/%s",
- addrbuf, errno, strbuf);
-
- UNLOCK(&sock->lock);
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_CONNECTFAIL]);
- isc_event_free(ISC_EVENT_PTR(&dev));
- return (ISC_R_UNEXPECTED);
-
- err_exit:
- sock->connected = 0;
- isc_task_send(task, ISC_EVENT_PTR(&dev));
-
- UNLOCK(&sock->lock);
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_CONNECTFAIL]);
- return (ISC_R_SUCCESS);
- }
-
- /*
- * If connect completed, fire off the done event.
- */
- success:
- if (cc == 0) {
- sock->connected = 1;
- sock->bound = 1;
- dev->result = ISC_R_SUCCESS;
- isc_task_send(task, ISC_EVENT_PTR(&dev));
-
- UNLOCK(&sock->lock);
-
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_CONNECT]);
-
- return (ISC_R_SUCCESS);
- }
-
- queue:
-
- /*
- * Attach to task.
- */
- isc_task_attach(task, &ntask);
-
- sock->connecting = 1;
-
- dev->ev_sender = ntask;
-
- /*
- * Poke watcher here. We still have the socket locked, so there
- * is no race condition. We will keep the lock for such a short
- * bit of time waking it up now or later won't matter all that much.
- */
- if (sock->connect_ev == NULL)
- select_poke(manager, sock->fd, SELECT_POKE_CONNECT);
-
- sock->connect_ev = dev;
-
- UNLOCK(&sock->lock);
- return (ISC_R_SUCCESS);
-}
-
-/*
- * Called when a socket with a pending connect() finishes.
- */
-static void
-internal_connect(isc_task_t *me, isc_event_t *ev) {
- isc__socket_t *sock;
- isc_socket_connev_t *dev;
- isc_task_t *task;
- int cc;
- ISC_SOCKADDR_LEN_T optlen;
- char strbuf[ISC_STRERRORSIZE];
- char peerbuf[ISC_SOCKADDR_FORMATSIZE];
-
- UNUSED(me);
- INSIST(ev->ev_type == ISC_SOCKEVENT_INTW);
-
- sock = ev->ev_sender;
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
-
- /*
- * When the internal event was sent the reference count was bumped
- * to keep the socket around for us. Decrement the count here.
- */
- INSIST(sock->references > 0);
- sock->references--;
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy(&sock);
- return;
- }
-
- /*
- * Has this event been canceled?
- */
- dev = sock->connect_ev;
- if (dev == NULL) {
- INSIST(!sock->connecting);
- UNLOCK(&sock->lock);
- return;
- }
-
- INSIST(sock->connecting);
- sock->connecting = 0;
-
- /*
- * Get any possible error status here.
- */
- optlen = sizeof(cc);
- if (getsockopt(sock->fd, SOL_SOCKET, SO_ERROR,
- (void *)&cc, (void *)&optlen) < 0)
- cc = errno;
- else
- errno = cc;
-
- if (errno != 0) {
- /*
- * If the error is EAGAIN, just re-select on this
- * fd and pretend nothing strange happened.
- */
- if (SOFT_ERROR(errno) || errno == EINPROGRESS) {
- sock->connecting = 1;
- select_poke(sock->manager, sock->fd,
- SELECT_POKE_CONNECT);
- UNLOCK(&sock->lock);
-
- return;
- }
-
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_CONNECTFAIL]);
-
- /*
- * Translate other errors into ISC_R_* flavors.
- */
- switch (errno) {
-#define ERROR_MATCH(a, b) case a: dev->result = b; break;
- ERROR_MATCH(EACCES, ISC_R_NOPERM);
- ERROR_MATCH(EADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL);
- ERROR_MATCH(EAFNOSUPPORT, ISC_R_ADDRNOTAVAIL);
- ERROR_MATCH(ECONNREFUSED, ISC_R_CONNREFUSED);
- ERROR_MATCH(EHOSTUNREACH, ISC_R_HOSTUNREACH);
-#ifdef EHOSTDOWN
- ERROR_MATCH(EHOSTDOWN, ISC_R_HOSTUNREACH);
-#endif
- ERROR_MATCH(ENETUNREACH, ISC_R_NETUNREACH);
- ERROR_MATCH(ENOBUFS, ISC_R_NORESOURCES);
- ERROR_MATCH(EPERM, ISC_R_HOSTUNREACH);
- ERROR_MATCH(EPIPE, ISC_R_NOTCONNECTED);
- ERROR_MATCH(ETIMEDOUT, ISC_R_TIMEDOUT);
- ERROR_MATCH(ECONNRESET, ISC_R_CONNECTIONRESET);
-#undef ERROR_MATCH
- default:
- dev->result = ISC_R_UNEXPECTED;
- isc_sockaddr_format(&sock->peer_address, peerbuf,
- sizeof(peerbuf));
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_connect: connect(%s) %s",
- peerbuf, strbuf);
- }
- } else {
- inc_stats(sock->manager->stats,
- sock->statsindex[STATID_CONNECT]);
- dev->result = ISC_R_SUCCESS;
- sock->connected = 1;
- sock->bound = 1;
- }
-
- sock->connect_ev = NULL;
-
- UNLOCK(&sock->lock);
-
- task = dev->ev_sender;
- dev->ev_sender = sock;
- isc_task_sendanddetach(&task, ISC_EVENT_PTR(&dev));
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_getpeername(isc_socket_t *sock0, isc_sockaddr_t *addressp) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_result_t result;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(addressp != NULL);
-
- LOCK(&sock->lock);
-
- if (sock->connected) {
- *addressp = sock->peer_address;
- result = ISC_R_SUCCESS;
- } else {
- result = ISC_R_NOTCONNECTED;
- }
-
- UNLOCK(&sock->lock);
-
- return (result);
-}
-
-ISC_SOCKETFUNC_SCOPE isc_result_t
-isc__socket_getsockname(isc_socket_t *sock0, isc_sockaddr_t *addressp) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
- ISC_SOCKADDR_LEN_T len;
- isc_result_t result;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(addressp != NULL);
-
- LOCK(&sock->lock);
-
- if (!sock->bound) {
- result = ISC_R_NOTBOUND;
- goto out;
- }
-
- result = ISC_R_SUCCESS;
-
- len = sizeof(addressp->type);
- if (getsockname(sock->fd, &addressp->type.sa, (void *)&len) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "getsockname: %s",
- strbuf);
- result = ISC_R_UNEXPECTED;
- goto out;
- }
- addressp->length = (unsigned int)len;
-
- out:
- UNLOCK(&sock->lock);
-
- return (result);
-}
-
-/*
- * Run through the list of events on this socket, and cancel the ones
- * queued for task "task" of type "how". "how" is a bitmask.
- */
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_cancel(isc_socket_t *sock0, isc_task_t *task, unsigned int how) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- REQUIRE(VALID_SOCKET(sock));
-
- /*
- * Quick exit if there is nothing to do. Don't even bother locking
- * in this case.
- */
- if (how == 0)
- return;
-
- LOCK(&sock->lock);
-
- /*
- * All of these do the same thing, more or less.
- * Each will:
- * o If the internal event is marked as "posted" try to
- * remove it from the task's queue. If this fails, mark it
- * as canceled instead, and let the task clean it up later.
- * o For each I/O request for that task of that type, post
- * its done event with status of "ISC_R_CANCELED".
- * o Reset any state needed.
- */
- if (((how & ISC_SOCKCANCEL_RECV) == ISC_SOCKCANCEL_RECV)
- && !ISC_LIST_EMPTY(sock->recv_list)) {
- isc_socketevent_t *dev;
- isc_socketevent_t *next;
- isc_task_t *current_task;
-
- dev = ISC_LIST_HEAD(sock->recv_list);
-
- while (dev != NULL) {
- current_task = dev->ev_sender;
- next = ISC_LIST_NEXT(dev, ev_link);
-
- if ((task == NULL) || (task == current_task)) {
- dev->result = ISC_R_CANCELED;
- send_recvdone_event(sock, &dev);
- }
- dev = next;
- }
- }
-
- if (((how & ISC_SOCKCANCEL_SEND) == ISC_SOCKCANCEL_SEND)
- && !ISC_LIST_EMPTY(sock->send_list)) {
- isc_socketevent_t *dev;
- isc_socketevent_t *next;
- isc_task_t *current_task;
-
- dev = ISC_LIST_HEAD(sock->send_list);
-
- while (dev != NULL) {
- current_task = dev->ev_sender;
- next = ISC_LIST_NEXT(dev, ev_link);
-
- if ((task == NULL) || (task == current_task)) {
- dev->result = ISC_R_CANCELED;
- send_senddone_event(sock, &dev);
- }
- dev = next;
- }
- }
-
- if (((how & ISC_SOCKCANCEL_ACCEPT) == ISC_SOCKCANCEL_ACCEPT)
- && !ISC_LIST_EMPTY(sock->accept_list)) {
- isc_socket_newconnev_t *dev;
- isc_socket_newconnev_t *next;
- isc_task_t *current_task;
-
- dev = ISC_LIST_HEAD(sock->accept_list);
- while (dev != NULL) {
- current_task = dev->ev_sender;
- next = ISC_LIST_NEXT(dev, ev_link);
-
- if ((task == NULL) || (task == current_task)) {
-
- ISC_LIST_UNLINK(sock->accept_list, dev,
- ev_link);
-
- NEWCONNSOCK(dev)->references--;
- free_socket((isc__socket_t **)&dev->newsocket);
-
- dev->result = ISC_R_CANCELED;
- dev->ev_sender = sock;
- isc_task_sendanddetach(&current_task,
- ISC_EVENT_PTR(&dev));
- }
-
- dev = next;
- }
- }
-
- /*
- * Connecting is not a list.
- */
- if (((how & ISC_SOCKCANCEL_CONNECT) == ISC_SOCKCANCEL_CONNECT)
- && sock->connect_ev != NULL) {
- isc_socket_connev_t *dev;
- isc_task_t *current_task;
-
- INSIST(sock->connecting);
- sock->connecting = 0;
-
- dev = sock->connect_ev;
- current_task = dev->ev_sender;
-
- if ((task == NULL) || (task == current_task)) {
- sock->connect_ev = NULL;
-
- dev->result = ISC_R_CANCELED;
- dev->ev_sender = sock;
- isc_task_sendanddetach(&current_task,
- ISC_EVENT_PTR(&dev));
- }
- }
-
- UNLOCK(&sock->lock);
-}
-
-ISC_SOCKETFUNC_SCOPE isc_sockettype_t
-isc__socket_gettype(isc_socket_t *sock0) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
-
- REQUIRE(VALID_SOCKET(sock));
-
- return (sock->type);
-}
-
-ISC_SOCKETFUNC_SCOPE isc_boolean_t
-isc__socket_isbound(isc_socket_t *sock0) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
- isc_boolean_t val;
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- val = ((sock->bound) ? ISC_TRUE : ISC_FALSE);
- UNLOCK(&sock->lock);
-
- return (val);
-}
-
-ISC_SOCKETFUNC_SCOPE void
-isc__socket_ipv6only(isc_socket_t *sock0, isc_boolean_t yes) {
- isc__socket_t *sock = (isc__socket_t *)sock0;
-#if defined(IPV6_V6ONLY)
- int onoff = yes ? 1 : 0;
-#else
- UNUSED(yes);
- UNUSED(sock);
-#endif
-
- REQUIRE(VALID_SOCKET(sock));
- INSIST(!sock->dupped);
-
-#ifdef IPV6_V6ONLY
- if (sock->pf == AF_INET6) {
- if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
- (void *)&onoff, sizeof(int)) < 0) {
- char strbuf[ISC_STRERRORSIZE];
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_V6ONLY) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
- }
- FIX_IPV6_RECVPKTINFO(sock); /* AIX */
-#endif
-}
-
-#ifndef USE_WATCHER_THREAD
-/*
- * In our assumed scenario, we can simply use a single static object.
- * XXX: this is not true if the application uses multiple threads with
- * 'multi-context' mode. Fixing this is a future TODO item.
- */
-static isc_socketwait_t swait_private;
-
-int
-isc__socketmgr_waitevents(isc_socketmgr_t *manager0, struct timeval *tvp,
- isc_socketwait_t **swaitp)
-{
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
-
-
- int n;
-#ifdef USE_KQUEUE
- struct timespec ts, *tsp;
-#endif
-#ifdef USE_EPOLL
- int timeout;
-#endif
-#ifdef USE_DEVPOLL
- struct dvpoll dvp;
-#endif
-
- REQUIRE(swaitp != NULL && *swaitp == NULL);
-
-#ifdef USE_SHARED_MANAGER
- if (manager == NULL)
- manager = socketmgr;
-#endif
- if (manager == NULL)
- return (0);
-
-#ifdef USE_KQUEUE
- if (tvp != NULL) {
- ts.tv_sec = tvp->tv_sec;
- ts.tv_nsec = tvp->tv_usec * 1000;
- tsp = &ts;
- } else
- tsp = NULL;
- swait_private.nevents = kevent(manager->kqueue_fd, NULL, 0,
- manager->events, manager->nevents,
- tsp);
- n = swait_private.nevents;
-#elif defined(USE_EPOLL)
- if (tvp != NULL)
- timeout = tvp->tv_sec * 1000 + (tvp->tv_usec + 999) / 1000;
- else
- timeout = -1;
- swait_private.nevents = epoll_wait(manager->epoll_fd,
- manager->events,
- manager->nevents, timeout);
- n = swait_private.nevents;
-#elif defined(USE_DEVPOLL)
- dvp.dp_fds = manager->events;
- dvp.dp_nfds = manager->nevents;
- if (tvp != NULL) {
- dvp.dp_timeout = tvp->tv_sec * 1000 +
- (tvp->tv_usec + 999) / 1000;
- } else
- dvp.dp_timeout = -1;
- swait_private.nevents = ioctl(manager->devpoll_fd, DP_POLL, &dvp);
- n = swait_private.nevents;
-#elif defined(USE_SELECT)
- memcpy(manager->read_fds_copy, manager->read_fds, manager->fd_bufsize);
- memcpy(manager->write_fds_copy, manager->write_fds,
- manager->fd_bufsize);
-
- swait_private.readset = manager->read_fds_copy;
- swait_private.writeset = manager->write_fds_copy;
- swait_private.maxfd = manager->maxfd + 1;
-
- n = select(swait_private.maxfd, swait_private.readset,
- swait_private.writeset, NULL, tvp);
-#endif
-
- *swaitp = &swait_private;
- return (n);
-}
-
-isc_result_t
-isc__socketmgr_dispatch(isc_socketmgr_t *manager0, isc_socketwait_t *swait) {
- isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
-
- REQUIRE(swait == &swait_private);
-
-#ifdef USE_SHARED_MANAGER
- if (manager == NULL)
- manager = socketmgr;
-#endif
- if (manager == NULL)
- return (ISC_R_NOTFOUND);
-
-#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
- (void)process_fds(manager, manager->events, swait->nevents);
- return (ISC_R_SUCCESS);
-#elif defined(USE_SELECT)
- process_fds(manager, swait->maxfd, swait->readset, swait->writeset);
- return (ISC_R_SUCCESS);
-#endif
-}
-#endif /* USE_WATCHER_THREAD */
-
-#ifdef BIND9
-void
-isc__socket_setname(isc_socket_t *socket0, const char *name, void *tag) {
- isc__socket_t *socket = (isc__socket_t *)socket0;
-
- /*
- * Name 'socket'.
- */
-
- REQUIRE(VALID_SOCKET(socket));
-
- LOCK(&socket->lock);
- memset(socket->name, 0, sizeof(socket->name));
- strncpy(socket->name, name, sizeof(socket->name) - 1);
- socket->tag = tag;
- UNLOCK(&socket->lock);
-}
-
-ISC_SOCKETFUNC_SCOPE const char *
-isc__socket_getname(isc_socket_t *socket0) {
- isc__socket_t *socket = (isc__socket_t *)socket0;
-
- return (socket->name);
-}
-
-void *
-isc__socket_gettag(isc_socket_t *socket0) {
- isc__socket_t *socket = (isc__socket_t *)socket0;
-
- return (socket->tag);
-}
-#endif /* BIND9 */
-
-#ifdef USE_SOCKETIMPREGISTER
-isc_result_t
-isc__socket_register() {
- return (isc_socket_register(isc__socketmgr_create));
-}
-#endif
-
-ISC_SOCKETFUNC_SCOPE int
-isc__socket_getfd(isc_socket_t *socket0) {
- isc__socket_t *socket = (isc__socket_t *)socket0;
-
- return ((short) socket->fd);
-}
-
-#if defined(HAVE_LIBXML2) && defined(BIND9)
-
-static const char *
-_socktype(isc_sockettype_t type)
-{
- if (type == isc_sockettype_udp)
- return ("udp");
- else if (type == isc_sockettype_tcp)
- return ("tcp");
- else if (type == isc_sockettype_unix)
- return ("unix");
- else if (type == isc_sockettype_fdwatch)
- return ("fdwatch");
- else
- return ("not-initialized");
-}
-
-ISC_SOCKETFUNC_SCOPE void
-isc_socketmgr_renderxml(isc_socketmgr_t *mgr0, xmlTextWriterPtr writer) {
- isc__socketmgr_t *mgr = (isc__socketmgr_t *)mgr0;
- isc__socket_t *sock;
- char peerbuf[ISC_SOCKADDR_FORMATSIZE];
- isc_sockaddr_t addr;
- ISC_SOCKADDR_LEN_T len;
-
- LOCK(&mgr->lock);
-
-#ifdef USE_SHARED_MANAGER
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
- xmlTextWriterWriteFormatString(writer, "%d", mgr->refs);
- xmlTextWriterEndElement(writer);
-#endif /* USE_SHARED_MANAGER */
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "sockets");
- sock = ISC_LIST_HEAD(mgr->socklist);
- while (sock != NULL) {
- LOCK(&sock->lock);
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "socket");
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "id");
- xmlTextWriterWriteFormatString(writer, "%p", sock);
- xmlTextWriterEndElement(writer);
-
- if (sock->name[0] != 0) {
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "name");
- xmlTextWriterWriteFormatString(writer, "%s",
- sock->name);
- xmlTextWriterEndElement(writer); /* name */
- }
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
- xmlTextWriterWriteFormatString(writer, "%d", sock->references);
- xmlTextWriterEndElement(writer);
-
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "type",
- ISC_XMLCHAR _socktype(sock->type));
-
- if (sock->connected) {
- isc_sockaddr_format(&sock->peer_address, peerbuf,
- sizeof(peerbuf));
- xmlTextWriterWriteElement(writer,
- ISC_XMLCHAR "peer-address",
- ISC_XMLCHAR peerbuf);
- }
-
- len = sizeof(addr);
- if (getsockname(sock->fd, &addr.type.sa, (void *)&len) == 0) {
- isc_sockaddr_format(&addr, peerbuf, sizeof(peerbuf));
- xmlTextWriterWriteElement(writer,
- ISC_XMLCHAR "local-address",
- ISC_XMLCHAR peerbuf);
- }
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "states");
- if (sock->pending_recv)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "pending-receive");
- if (sock->pending_send)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "pending-send");
- if (sock->pending_accept)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "pending_accept");
- if (sock->listener)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "listener");
- if (sock->connected)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "connected");
- if (sock->connecting)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "connecting");
- if (sock->bound)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "bound");
-
- xmlTextWriterEndElement(writer); /* states */
-
- xmlTextWriterEndElement(writer); /* socket */
-
- UNLOCK(&sock->lock);
- sock = ISC_LIST_NEXT(sock, link);
- }
- xmlTextWriterEndElement(writer); /* sockets */
-
- UNLOCK(&mgr->lock);
-}
-#endif /* HAVE_LIBXML2 */
diff --git a/contrib/ntp/lib/isc/unix/socket_p.h b/contrib/ntp/lib/isc/unix/socket_p.h
deleted file mode 100644
index 13160117391f..000000000000
--- a/contrib/ntp/lib/isc/unix/socket_p.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: socket_p.h,v 1.15 2009/09/02 23:48:03 tbox Exp $ */
-
-#ifndef ISC_SOCKET_P_H
-#define ISC_SOCKET_P_H
-
-/*! \file */
-
-#ifdef ISC_PLATFORM_NEEDSYSSELECTH
-#include <sys/select.h>
-#endif
-
-typedef struct isc_socketwait isc_socketwait_t;
-int isc__socketmgr_waitevents(isc_socketmgr_t *, struct timeval *,
- isc_socketwait_t **);
-isc_result_t isc__socketmgr_dispatch(isc_socketmgr_t *, isc_socketwait_t *);
-#endif /* ISC_SOCKET_P_H */
diff --git a/contrib/ntp/lib/isc/unix/syslog.c b/contrib/ntp/lib/isc/unix/syslog.c
deleted file mode 100644
index 997508e32b44..000000000000
--- a/contrib/ntp/lib/isc/unix/syslog.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: syslog.c,v 1.8 2007/09/13 04:45:18 each Exp $ */
-
-/*! \file */
-
-#include <config.h>
-
-#include <stdlib.h>
-#include <syslog.h>
-
-#include <isc/result.h>
-#include <isc/string.h>
-#include <isc/syslog.h>
-#include <isc/util.h>
-
-static struct dsn_c_pvt_sfnt {
- int val;
- const char *strval;
-} facilities[] = {
- { LOG_KERN, "kern" },
- { LOG_USER, "user" },
- { LOG_MAIL, "mail" },
- { LOG_DAEMON, "daemon" },
- { LOG_AUTH, "auth" },
- { LOG_SYSLOG, "syslog" },
- { LOG_LPR, "lpr" },
-#ifdef LOG_NEWS
- { LOG_NEWS, "news" },
-#endif
-#ifdef LOG_UUCP
- { LOG_UUCP, "uucp" },
-#endif
-#ifdef LOG_CRON
- { LOG_CRON, "cron" },
-#endif
-#ifdef LOG_AUTHPRIV
- { LOG_AUTHPRIV, "authpriv" },
-#endif
-#ifdef LOG_FTP
- { LOG_FTP, "ftp" },
-#endif
- { LOG_LOCAL0, "local0"},
- { LOG_LOCAL1, "local1"},
- { LOG_LOCAL2, "local2"},
- { LOG_LOCAL3, "local3"},
- { LOG_LOCAL4, "local4"},
- { LOG_LOCAL5, "local5"},
- { LOG_LOCAL6, "local6"},
- { LOG_LOCAL7, "local7"},
- { 0, NULL }
-};
-
-isc_result_t
-isc_syslog_facilityfromstring(const char *str, int *facilityp) {
- int i;
-
- REQUIRE(str != NULL);
- REQUIRE(facilityp != NULL);
-
- for (i = 0; facilities[i].strval != NULL; i++) {
- if (strcasecmp(facilities[i].strval, str) == 0) {
- *facilityp = facilities[i].val;
- return (ISC_R_SUCCESS);
- }
- }
- return (ISC_R_NOTFOUND);
-
-}
diff --git a/contrib/ntp/lib/isc/version.c b/contrib/ntp/lib/isc/version.c
deleted file mode 100644
index bfe4d6d6e100..000000000000
--- a/contrib/ntp/lib/isc/version.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: version.c,v 1.15 2007/06/19 23:47:17 tbox Exp $ */
-
-/*! \file */
-
-#include <isc/version.h>
-
-const char isc_version[] = VERSION;
-
-const unsigned int isc_libinterface = LIBINTERFACE;
-const unsigned int isc_librevision = LIBREVISION;
-const unsigned int isc_libage = LIBAGE;
diff --git a/contrib/ntp/lib/isc/win32/DLLMain.c b/contrib/ntp/lib/isc/win32/DLLMain.c
deleted file mode 100644
index ed84fcf6c35c..000000000000
--- a/contrib/ntp/lib/isc/win32/DLLMain.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: DLLMain.c,v 1.7 2007/06/18 23:47:49 tbox Exp $ */
-
-#include <windows.h>
-#include <stdio.h>
-
-/*
- * Called when we enter the DLL
- */
-__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL,
- DWORD fdwReason, LPVOID lpvReserved)
-{
- switch (fdwReason)
- {
- /*
- * The DLL is loading due to process
- * initialization or a call to LoadLibrary.
- */
- case DLL_PROCESS_ATTACH:
- break;
-
- /* The attached process creates a new thread. */
- case DLL_THREAD_ATTACH:
- break;
-
- /* The thread of the attached process terminates. */
- case DLL_THREAD_DETACH:
- break;
-
- /*
- * The DLL is unloading from a process due to
- * process termination or a call to FreeLibrary.
- */
- case DLL_PROCESS_DETACH:
- break;
-
- default:
- break;
- }
- return (TRUE);
-}
-
diff --git a/contrib/ntp/lib/isc/win32/app.c b/contrib/ntp/lib/isc/win32/app.c
deleted file mode 100644
index 04b1638783eb..000000000000
--- a/contrib/ntp/lib/isc/win32/app.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: app.c,v 1.9 2009/09/02 23:48:03 tbox Exp $ */
-
-#include <config.h>
-
-#include <sys/types.h>
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <process.h>
-
-#include <isc/app.h>
-#include <isc/boolean.h>
-#include <isc/condition.h>
-#include <isc/msgs.h>
-#include <isc/mutex.h>
-#include <isc/event.h>
-#include <isc/platform.h>
-#include <isc/string.h>
-#include <isc/task.h>
-#include <isc/time.h>
-#include <isc/util.h>
-#include <isc/thread.h>
-
-static isc_eventlist_t on_run;
-static isc_mutex_t lock;
-static isc_boolean_t shutdown_requested = ISC_FALSE;
-static isc_boolean_t running = ISC_FALSE;
-/*
- * We assume that 'want_shutdown' can be read and written atomically.
- */
-static isc_boolean_t want_shutdown = ISC_FALSE;
-/*
- * We assume that 'want_reload' can be read and written atomically.
- */
-static isc_boolean_t want_reload = ISC_FALSE;
-
-static isc_boolean_t blocked = ISC_FALSE;
-
-static isc_thread_t blockedthread;
-
-/* Events to wait for */
-
-#define NUM_EVENTS 2
-
-enum {
- RELOAD_EVENT,
- SHUTDOWN_EVENT
-};
-
-static HANDLE hEvents[NUM_EVENTS];
-DWORD dwWaitResult;
-
-/*
- * We need to remember which thread is the main thread...
- */
-static isc_thread_t main_thread;
-
-isc_result_t
-isc__app_start(void) {
- isc_result_t result;
-
- /*
- * Start an ISC library application.
- */
-
- main_thread = GetCurrentThread();
-
- result = isc_mutex_init(&lock);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- /* Create the reload event in a non-signaled state */
- hEvents[RELOAD_EVENT] = CreateEvent(NULL, FALSE, FALSE, NULL);
-
- /* Create the shutdown event in a non-signaled state */
- hEvents[SHUTDOWN_EVENT] = CreateEvent(NULL, FALSE, FALSE, NULL);
-
- ISC_LIST_INIT(on_run);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
- void *arg) {
- isc_event_t *event;
- isc_task_t *cloned_task = NULL;
- isc_result_t result;
-
-
- LOCK(&lock);
- if (running) {
- result = ISC_R_ALREADYRUNNING;
- goto unlock;
- }
-
- /*
- * Note that we store the task to which we're going to send the event
- * in the event's "sender" field.
- */
- isc_task_attach(task, &cloned_task);
- event = isc_event_allocate(mctx, cloned_task, ISC_APPEVENT_SHUTDOWN,
- action, arg, sizeof(*event));
- if (event == NULL) {
- result = ISC_R_NOMEMORY;
- goto unlock;
- }
-
- ISC_LIST_APPEND(on_run, event, ev_link);
- result = ISC_R_SUCCESS;
-
- unlock:
- UNLOCK(&lock);
- return (result);
-}
-
-isc_result_t
-isc__app_run(void) {
- isc_event_t *event, *next_event;
- isc_task_t *task;
- HANDLE *pHandles = NULL;
-
- REQUIRE(main_thread == GetCurrentThread());
- LOCK(&lock);
- if (!running) {
- running = ISC_TRUE;
-
- /*
- * Post any on-run events (in FIFO order).
- */
- for (event = ISC_LIST_HEAD(on_run);
- event != NULL;
- event = next_event) {
- next_event = ISC_LIST_NEXT(event, ev_link);
- ISC_LIST_UNLINK(on_run, event, ev_link);
- task = event->ev_sender;
- event->ev_sender = NULL;
- isc_task_sendanddetach(&task, &event);
- }
-
- }
-
- UNLOCK(&lock);
-
- /*
- * There is no danger if isc_app_shutdown() is called before we wait
- * for events.
- */
-
- while (!want_shutdown) {
- dwWaitResult = WaitForMultipleObjects(NUM_EVENTS, hEvents,
- FALSE, INFINITE);
-
- /* See why we returned */
-
- if (WaitSucceeded(dwWaitResult, NUM_EVENTS)) {
- /*
- * The return was due to one of the events
- * being signaled
- */
- switch (WaitSucceededIndex(dwWaitResult)) {
- case RELOAD_EVENT:
- want_reload = ISC_TRUE;
- break;
-
- case SHUTDOWN_EVENT:
- want_shutdown = ISC_TRUE;
- break;
- }
- }
- if (want_reload) {
- want_reload = ISC_FALSE;
- return (ISC_R_RELOAD);
- }
-
- if (want_shutdown && blocked)
- exit(-1);
- }
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__app_shutdown(void) {
- isc_boolean_t want_kill = ISC_TRUE;
-
- LOCK(&lock);
- REQUIRE(running);
-
- if (shutdown_requested)
- want_kill = ISC_FALSE; /* We're only signaling once */
- else
- shutdown_requested = ISC_TRUE;
-
- UNLOCK(&lock);
- if (want_kill)
- SetEvent(hEvents[SHUTDOWN_EVENT]);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__app_reload(void) {
- isc_boolean_t want_reload = ISC_TRUE;
-
- LOCK(&lock);
- REQUIRE(running);
-
- /*
- * Don't send the reload signal if we're shutting down.
- */
- if (shutdown_requested)
- want_reload = ISC_FALSE;
-
- UNLOCK(&lock);
- if (want_reload)
- SetEvent(hEvents[RELOAD_EVENT]);
-
- return (ISC_R_SUCCESS);
-}
-
-void
-isc__app_finish(void) {
- DESTROYLOCK(&lock);
-}
-
-void
-isc__app_block(void) {
- REQUIRE(running);
- REQUIRE(!blocked);
-
- blocked = ISC_TRUE;
- blockedthread = GetCurrentThread();
-}
-
-void
-isc__app_unblock(void) {
- REQUIRE(running);
- REQUIRE(blocked);
- blocked = ISC_FALSE;
- REQUIRE(blockedthread == GetCurrentThread());
-}
diff --git a/contrib/ntp/lib/isc/win32/dir.c b/contrib/ntp/lib/isc/win32/dir.c
deleted file mode 100644
index 14fadde46af3..000000000000
--- a/contrib/ntp/lib/isc/win32/dir.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/* Principal Authors: DCL */
-
-#include <config.h>
-
-#include <string.h>
-#include <direct.h>
-#include <process.h>
-#include <io.h>
-
-#include <sys/stat.h>
-
-#include <isc/dir.h>
-#include <isc/magic.h>
-#include <isc/assertions.h>
-#include <isc/util.h>
-
-#include "errno2result.h"
-
-#define ISC_DIR_MAGIC ISC_MAGIC('D', 'I', 'R', '*')
-#define VALID_DIR(dir) ISC_MAGIC_VALID(dir, ISC_DIR_MAGIC)
-
-static isc_result_t
-start_directory(isc_dir_t *p);
-
-void
-isc_dir_init(isc_dir_t *dir) {
- REQUIRE(dir != NULL);
-
- dir->dirname[0] = '\0';
-
- dir->entry.name[0] = '\0';
- dir->entry.length = 0;
- memset(&(dir->entry.find_data), 0, sizeof(dir->entry.find_data));
-
- dir->entry_filled = ISC_FALSE;
- dir->search_handle = INVALID_HANDLE_VALUE;
-
- dir->magic = ISC_DIR_MAGIC;
-}
-
-/*
- * Allocate workspace and open directory stream. If either one fails,
- * NULL will be returned.
- */
-isc_result_t
-isc_dir_open(isc_dir_t *dir, const char *dirname) {
- char *p;
- isc_result_t result;
-
- REQUIRE(dirname != NULL);
- REQUIRE(VALID_DIR(dir) && dir->search_handle == INVALID_HANDLE_VALUE);
-
- /*
- * Copy directory name. Need to have enough space for the name,
- * a possible path separator, the wildcard, and the final NUL.
- */
- if (strlen(dirname) + 3 > sizeof(dir->dirname))
- /* XXXDCL ? */
- return (ISC_R_NOSPACE);
- strcpy(dir->dirname, dirname);
-
- /*
- * Append path separator, if needed, and "*".
- */
- p = dir->dirname + strlen(dir->dirname);
- if (dir->dirname < p && *(p - 1) != '\\' && *(p - 1) != ':')
- *p++ = '\\';
- *p++ = '*';
- *p = '\0';
-
- /*
- * Open stream.
- */
- result = start_directory(dir);
-
- return (result);
-}
-
-/*
- * Return previously retrieved file or get next one. Unix's dirent has
- * separate open and read functions, but the Win32 and DOS interfaces open
- * the dir stream and reads the first file in one operation.
- */
-isc_result_t
-isc_dir_read(isc_dir_t *dir) {
- REQUIRE(VALID_DIR(dir) && dir->search_handle != INVALID_HANDLE_VALUE);
-
- if (dir->entry_filled)
- /*
- * start_directory() already filled in the first entry.
- */
- dir->entry_filled = ISC_FALSE;
-
- else {
- /*
- * Fetch next file in directory.
- */
- if (FindNextFile(dir->search_handle,
- &dir->entry.find_data) == FALSE)
- /*
- * Either the last file has been processed or
- * an error has occurred. The former is not
- * really an error, but the latter is.
- */
- if (GetLastError() == ERROR_NO_MORE_FILES)
- return (ISC_R_NOMORE);
- else
- return (ISC_R_UNEXPECTED);
- }
-
- /*
- * Make sure that the space for the name is long enough.
- */
- strcpy(dir->entry.name, dir->entry.find_data.cFileName);
- dir->entry.length = strlen(dir->entry.name);
-
- return (ISC_R_SUCCESS);
-}
-
-/*
- * Close directory stream.
- */
-void
-isc_dir_close(isc_dir_t *dir) {
- REQUIRE(VALID_DIR(dir) && dir->search_handle != INVALID_HANDLE_VALUE);
-
- FindClose(dir->search_handle);
- dir->search_handle = INVALID_HANDLE_VALUE;
-}
-
-/*
- * Reposition directory stream at start.
- */
-isc_result_t
-isc_dir_reset(isc_dir_t *dir) {
- isc_result_t result;
-
- REQUIRE(VALID_DIR(dir) && dir->search_handle != INVALID_HANDLE_VALUE);
- REQUIRE(dir->dirname != NULL);
-
- /*
- * NT cannot reposition the seek pointer to the beginning of the
- * the directory stream, but rather the directory needs to be
- * closed and reopened. The latter might fail.
- */
-
- isc_dir_close(dir);
-
- result = start_directory(dir);
-
- return (result);
-}
-
-/*
- * Initialize isc_dir_t structure with new directory. The function
- * returns 0 on failure and nonzero on success.
- *
- * Note:
- * - Be sure to close previous stream before opening new one
- */
-static isc_result_t
-start_directory(isc_dir_t *dir)
-{
- REQUIRE(VALID_DIR(dir));
- REQUIRE(dir->search_handle == INVALID_HANDLE_VALUE);
-
- dir->entry_filled = ISC_FALSE;
-
- /*
- * Open stream and retrieve first file.
- */
- dir->search_handle = FindFirstFile(dir->dirname,
- &dir->entry.find_data);
-
- if (dir->search_handle == INVALID_HANDLE_VALUE) {
- /*
- * Something went wrong but we don't know what. GetLastError()
- * could give us more information about the error, but the
- * MSDN documentation is frustratingly thin about what
- * possible errors could have resulted. (Score one for
- * the Unix manual pages.) So there is just this lame error
- * instead of being able to differentiate ISC_R_NOTFOUND
- * from ISC_R_UNEXPECTED.
- */
- return (ISC_R_FAILURE);
- }
-
- /*
- * Make sure that the space for the name is long enough.
- */
- INSIST(sizeof(dir->entry.name) >
- strlen(dir->entry.find_data.cFileName));
-
- /*
- * Fill in the data for the first entry of the directory.
- */
- strcpy(dir->entry.name, dir->entry.find_data.cFileName);
- dir->entry.length = strlen(dir->entry.name);
-
- dir->entry_filled = ISC_TRUE;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_dir_chdir(const char *dirname) {
- /*
- * Change the current directory to 'dirname'.
- */
-
- REQUIRE(dirname != NULL);
-
- if (chdir(dirname) < 0)
- return (isc__errno2result(errno));
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_dir_chroot(const char *dirname) {
- return (ISC_R_NOTIMPLEMENTED);
-}
-
-isc_result_t
-isc_dir_createunique(char *templet) {
- isc_result_t result;
- char *x;
- char *p;
- int i;
- int pid;
-
- REQUIRE(templet != NULL);
-
- /*
- * mkdtemp is not portable, so this emulates it.
- */
-
- pid = getpid();
-
- /*
- * Replace trailing Xs with the process-id, zero-filled.
- */
- for (x = templet + strlen(templet) - 1; *x == 'X' && x >= templet;
- x--, pid /= 10)
- *x = pid % 10 + '0';
-
- x++; /* Set x to start of ex-Xs. */
-
- do {
- i = mkdir(templet);
- i = chmod(templet, 0700);
-
- if (i == 0 || errno != EEXIST)
- break;
-
- /*
- * The BSD algorithm.
- */
- p = x;
- while (*p != '\0') {
- if (isdigit(*p & 0xff))
- *p = 'a';
- else if (*p != 'z')
- ++*p;
- else {
- /*
- * Reset character and move to next.
- */
- *p++ = 'a';
- continue;
- }
-
- break;
- }
-
- if (*p == '\0') {
- /*
- * Tried all combinations. errno should already
- * be EEXIST, but ensure it is anyway for
- * isc__errno2result().
- */
- errno = EEXIST;
- break;
- }
- } while (1);
-
- if (i == -1)
- result = isc__errno2result(errno);
- else
- result = ISC_R_SUCCESS;
-
- return (result);
-}
diff --git a/contrib/ntp/lib/isc/win32/entropy.c b/contrib/ntp/lib/isc/win32/entropy.c
deleted file mode 100644
index 5a316e6e5cff..000000000000
--- a/contrib/ntp/lib/isc/win32/entropy.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: entropy.c,v 1.10 2009/01/18 23:48:14 tbox Exp $ */
-
-/*
- * This is the system dependent part of the ISC entropy API.
- */
-
-#include <config.h>
-
-#include <windows.h>
-#include <wincrypt.h>
-
-#include <process.h>
-#include <io.h>
-#include <share.h>
-
-/*
- * There is only one variable in the entropy data structures that is not
- * system independent, but pulling the structure that uses it into this file
- * ultimately means pulling several other independent structures here also to
- * resolve their interdependencies. Thus only the problem variable's type
- * is defined here.
- */
-#define FILESOURCE_HANDLE_TYPE HCRYPTPROV
-
-typedef struct {
- int dummy;
-} isc_entropyusocketsource_t;
-
-#include "../entropy.c"
-
-static unsigned int
-get_from_filesource(isc_entropysource_t *source, isc_uint32_t desired) {
- isc_entropy_t *ent = source->ent;
- unsigned char buf[128];
- HCRYPTPROV hcryptprov = source->sources.file.handle;
- ssize_t ndesired;
- unsigned int added;
-
- if (source->bad)
- return (0);
-
- desired = desired / 8 + (((desired & 0x07) > 0) ? 1 : 0);
-
- added = 0;
- while (desired > 0) {
- ndesired = ISC_MIN(desired, sizeof(buf));
- if (!CryptGenRandom(hcryptprov, ndesired, buf)) {
- CryptReleaseContext(hcryptprov, 0);
- source->bad = ISC_TRUE;
- goto out;
- }
-
- entropypool_adddata(ent, buf, ndesired, ndesired * 8);
- added += ndesired * 8;
- desired -= ndesired;
- }
-
- out:
- return (added);
-}
-
-/*
- * Poll each source, trying to get data from it to stuff into the entropy
- * pool.
- */
-static void
-fillpool(isc_entropy_t *ent, unsigned int desired, isc_boolean_t blocking) {
- unsigned int added;
- unsigned int remaining;
- unsigned int needed;
- unsigned int nsource;
- isc_entropysource_t *source;
- isc_entropysource_t *firstsource;
-
- REQUIRE(VALID_ENTROPY(ent));
-
- needed = desired;
-
- /*
- * This logic is a little strange, so an explanation is in order.
- *
- * If needed is 0, it means we are being asked to "fill to whatever
- * we think is best." This means that if we have at least a
- * partially full pool (say, > 1/4th of the pool) we probably don't
- * need to add anything.
- *
- * Also, we will check to see if the "pseudo" count is too high.
- * If it is, try to mix in better data. Too high is currently
- * defined as 1/4th of the pool.
- *
- * Next, if we are asked to add a specific bit of entropy, make
- * certain that we will do so. Clamp how much we try to add to
- * (DIGEST_SIZE * 8 < needed < POOLBITS - entropy).
- *
- * Note that if we are in a blocking mode, we will only try to
- * get as much data as we need, not as much as we might want
- * to build up.
- */
- if (needed == 0) {
- REQUIRE(!blocking);
-
- if ((ent->pool.entropy >= RND_POOLBITS / 4)
- && (ent->pool.pseudo <= RND_POOLBITS / 4))
- return;
-
- needed = THRESHOLD_BITS * 4;
- } else {
- needed = ISC_MAX(needed, THRESHOLD_BITS);
- needed = ISC_MIN(needed, RND_POOLBITS);
- }
-
- /*
- * In any case, clamp how much we need to how much we can add.
- */
- needed = ISC_MIN(needed, RND_POOLBITS - ent->pool.entropy);
-
- /*
- * But wait! If we're not yet initialized, we need at least
- * THRESHOLD_BITS
- * of randomness.
- */
- if (ent->initialized < THRESHOLD_BITS)
- needed = ISC_MAX(needed, THRESHOLD_BITS - ent->initialized);
-
- /*
- * Poll each file source to see if we can read anything useful from
- * it. XXXMLG When where are multiple sources, we should keep a
- * record of which one we last used so we can start from it (or the
- * next one) to avoid letting some sources build up entropy while
- * others are always drained.
- */
-
- added = 0;
- remaining = needed;
- if (ent->nextsource == NULL) {
- ent->nextsource = ISC_LIST_HEAD(ent->sources);
- if (ent->nextsource == NULL)
- return;
- }
- source = ent->nextsource;
- /*
- * Remember the first source so we can break if we have looped back to
- * the beginning and still have nothing
- */
- firstsource = source;
- again_file:
- for (nsource = 0; nsource < ent->nsources; nsource++) {
- unsigned int got;
-
- if (remaining == 0)
- break;
-
- got = 0;
-
- if (source->type == ENTROPY_SOURCETYPE_FILE)
- got = get_from_filesource(source, remaining);
-
- added += got;
-
- remaining -= ISC_MIN(remaining, got);
-
- source = ISC_LIST_NEXT(source, link);
- if (source == NULL)
- source = ISC_LIST_HEAD(ent->sources);
- }
- ent->nextsource = source;
-
- /*
- * Go again only if there's been progress and we've not
- * gone back to the beginning
- */
- if (!(ent->nextsource == firstsource && added == 0)) {
- if (blocking && remaining != 0) {
- goto again_file;
- }
- }
-
- /*
- * Here, if there are bits remaining to be had and we can block,
- * check to see if we have a callback source. If so, call them.
- */
- source = ISC_LIST_HEAD(ent->sources);
- while ((remaining != 0) && (source != NULL)) {
- unsigned int got;
-
- got = 0;
-
- if (source->type == ENTROPY_SOURCETYPE_CALLBACK)
- got = get_from_callback(source, remaining, blocking);
-
- added += got;
- remaining -= ISC_MIN(remaining, got);
-
- if (added >= needed)
- break;
-
- source = ISC_LIST_NEXT(source, link);
- }
-
- /*
- * Mark as initialized if we've added enough data.
- */
- if (ent->initialized < THRESHOLD_BITS)
- ent->initialized += added;
-}
-
-
-
-/*
- * Requires "ent" be locked.
- */
-static void
-destroyfilesource(isc_entropyfilesource_t *source) {
- CryptReleaseContext(source->handle, 0);
-}
-
-static void
-destroyusocketsource(isc_entropyusocketsource_t *source) {
- UNUSED(source);
-}
-
-
-isc_result_t
-isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
- isc_result_t ret;
- isc_entropysource_t *source;
- HCRYPTPROV hcryptprov;
- DWORD errval;
- BOOL err;
-
- REQUIRE(VALID_ENTROPY(ent));
- REQUIRE(fname != NULL);
-
- LOCK(&ent->lock);
-
- source = NULL;
-
- /*
- * The first time we just try to acquire the context
- */
- err = CryptAcquireContext(&hcryptprov, NULL, NULL, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT);
- if (!err){
- errval = GetLastError();
- ret = ISC_R_IOERROR;
- goto errout;
- }
-
- source = isc_mem_get(ent->mctx, sizeof(isc_entropysource_t));
- if (source == NULL) {
- ret = ISC_R_NOMEMORY;
- goto closecontext;
- }
-
- /*
- * From here down, no failures can occur.
- */
- source->magic = SOURCE_MAGIC;
- source->type = ENTROPY_SOURCETYPE_FILE;
- source->ent = ent;
- source->total = 0;
- source->bad = ISC_FALSE;
- memset(source->name, 0, sizeof(source->name));
- ISC_LINK_INIT(source, link);
- source->sources.file.handle = hcryptprov;
-
- /*
- * Hook it into the entropy system.
- */
- ISC_LIST_APPEND(ent->sources, source, link);
- ent->nsources++;
-
- UNLOCK(&ent->lock);
- return (ISC_R_SUCCESS);
-
- closecontext:
- CryptReleaseContext(hcryptprov, 0);
-
- errout:
- if (source != NULL)
- isc_mem_put(ent->mctx, source, sizeof(isc_entropysource_t));
-
- UNLOCK(&ent->lock);
-
- return (ret);
-}
-
-
-
-
diff --git a/contrib/ntp/lib/isc/win32/errno2result.c b/contrib/ntp/lib/isc/win32/errno2result.c
deleted file mode 100644
index c3d54d632e8d..000000000000
--- a/contrib/ntp/lib/isc/win32/errno2result.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: errno2result.c,v 1.17 2008/09/12 04:46:25 marka Exp $ */
-
-#include <config.h>
-
-#include <winsock2.h>
-#include "errno2result.h"
-#include <isc/result.h>
-#include <isc/strerror.h>
-#include <isc/util.h>
-
-/*
- * Convert a POSIX errno value into an isc_result_t. The
- * list of supported errno values is not complete; new users
- * of this function should add any expected errors that are
- * not already there.
- */
-isc_result_t
-isc__errno2resultx(int posixerrno, const char *file, int line) {
- char strbuf[ISC_STRERRORSIZE];
-
- switch (posixerrno) {
- case ENOTDIR:
- case WSAELOOP:
- case WSAEINVAL:
- case EINVAL: /* XXX sometimes this is not for files */
- case ENAMETOOLONG:
- case WSAENAMETOOLONG:
- case EBADF:
- case WSAEBADF:
- return (ISC_R_INVALIDFILE);
- case ENOENT:
- return (ISC_R_FILENOTFOUND);
- case EACCES:
- case WSAEACCES:
- case EPERM:
- return (ISC_R_NOPERM);
- case EEXIST:
- return (ISC_R_FILEEXISTS);
- case EIO:
- return (ISC_R_IOERROR);
- case ENOMEM:
- return (ISC_R_NOMEMORY);
- case ENFILE:
- case EMFILE:
- case WSAEMFILE:
- return (ISC_R_TOOMANYOPENFILES);
- case ERROR_CANCELLED:
- return (ISC_R_CANCELED);
- case ERROR_CONNECTION_REFUSED:
- case WSAECONNREFUSED:
- return (ISC_R_CONNREFUSED);
- case WSAENOTCONN:
- case ERROR_CONNECTION_INVALID:
- return (ISC_R_NOTCONNECTED);
- case ERROR_HOST_UNREACHABLE:
- case WSAEHOSTUNREACH:
- return (ISC_R_HOSTUNREACH);
- case ERROR_NETWORK_UNREACHABLE:
- case WSAENETUNREACH:
- return (ISC_R_NETUNREACH);
- case ERROR_NO_NETWORK:
- return (ISC_R_NETUNREACH);
- case ERROR_PORT_UNREACHABLE:
- return (ISC_R_HOSTUNREACH);
- case ERROR_SEM_TIMEOUT:
- return (ISC_R_TIMEDOUT);
- case WSAECONNRESET:
- case WSAENETRESET:
- case WSAECONNABORTED:
- case WSAEDISCON:
- case ERROR_OPERATION_ABORTED:
- case ERROR_CONNECTION_ABORTED:
- case ERROR_REQUEST_ABORTED:
- return (ISC_R_CONNECTIONRESET);
- case WSAEADDRNOTAVAIL:
- return (ISC_R_ADDRNOTAVAIL);
- case ERROR_NETNAME_DELETED:
- case WSAENETDOWN:
- return (ISC_R_NETUNREACH);
- case WSAEHOSTDOWN:
- return (ISC_R_HOSTUNREACH);
- case WSAENOBUFS:
- return (ISC_R_NORESOURCES);
- default:
- isc__strerror(posixerrno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(file, line, "unable to convert errno "
- "to isc_result: %d: %s", posixerrno, strbuf);
- /*
- * XXXDCL would be nice if perhaps this function could
- * return the system's error string, so the caller
- * might have something more descriptive than "unexpected
- * error" to log with.
- */
- return (ISC_R_UNEXPECTED);
- }
-}
diff --git a/contrib/ntp/lib/isc/win32/errno2result.h b/contrib/ntp/lib/isc/win32/errno2result.h
deleted file mode 100644
index 41682db39bd0..000000000000
--- a/contrib/ntp/lib/isc/win32/errno2result.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: errno2result.h,v 1.10 2007/06/19 23:47:19 tbox Exp $ */
-
-#ifndef UNIX_ERRNO2RESULT_H
-#define UNIX_ERRNO2RESULT_H 1
-
-/* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */
-
-#include <errno.h> /* Provides errno. */
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-#define isc__errno2result(posixerrno) \
- isc__errno2resultx(posixerrno, __FILE__, __LINE__)
-
-isc_result_t
-isc__errno2resultx(int posixerrno, const char *file, int line);
-
-ISC_LANG_ENDDECLS
-
-#endif /* UNIX_ERRNO2RESULT_H */
diff --git a/contrib/ntp/lib/isc/win32/file.c b/contrib/ntp/lib/isc/win32/file.c
deleted file mode 100644
index c6b9e4f56f1f..000000000000
--- a/contrib/ntp/lib/isc/win32/file.c
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-#include <config.h>
-
-#undef rename
-#include <errno.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <io.h>
-#include <process.h>
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/utime.h>
-
-#include <isc/file.h>
-#include <isc/mem.h>
-#include <isc/result.h>
-#include <isc/time.h>
-#include <isc/util.h>
-#include <isc/stat.h>
-#include <isc/string.h>
-
-#include "errno2result.h"
-
-/*
- * Emulate UNIX mkstemp, which returns an open FD to the new file
- *
- */
-static int
-gettemp(char *path, int *doopen) {
- char *start, *trv;
- struct stat sbuf;
- int pid;
-
- trv = strrchr(path, 'X');
- trv++;
- pid = getpid();
- /* extra X's get set to 0's */
- while (*--trv == 'X') {
- *trv = (pid % 10) + '0';
- pid /= 10;
- }
- /*
- * check the target directory; if you have six X's and it
- * doesn't exist this runs for a *very* long time.
- */
- for (start = trv + 1;; --trv) {
- if (trv <= path)
- break;
- if (*trv == '\\') {
- *trv = '\0';
- if (stat(path, &sbuf))
- return (0);
- if (!S_ISDIR(sbuf.st_mode)) {
- errno = ENOTDIR;
- return (0);
- }
- *trv = '\\';
- break;
- }
- }
-
- for (;;) {
- if (doopen) {
- if ((*doopen =
- open(path, O_CREAT|O_EXCL|O_RDWR,
- _S_IREAD | _S_IWRITE)) >= 0)
- return (1);
- if (errno != EEXIST)
- return (0);
- } else if (stat(path, &sbuf))
- return (errno == ENOENT ? 1 : 0);
-
- /* tricky little algorithm for backward compatibility */
- for (trv = start;;) {
- if (!*trv)
- return (0);
- if (*trv == 'z')
- *trv++ = 'a';
- else {
- if (isdigit(*trv))
- *trv = 'a';
- else
- ++*trv;
- break;
- }
- }
- }
- /*NOTREACHED*/
-}
-
-static int
-mkstemp(char *path) {
- int fd;
-
- return (gettemp(path, &fd) ? fd : -1);
-}
-
-/*
- * XXXDCL As the API for accessing file statistics undoubtedly gets expanded,
- * it might be good to provide a mechanism that allows for the results
- * of a previous stat() to be used again without having to do another stat,
- * such as perl's mechanism of using "_" in place of a file name to indicate
- * that the results of the last stat should be used. But then you get into
- * annoying MP issues. BTW, Win32 has stat().
- */
-static isc_result_t
-file_stats(const char *file, struct stat *stats) {
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(file != NULL);
- REQUIRE(stats != NULL);
-
- if (stat(file, stats) != 0)
- result = isc__errno2result(errno);
-
- return (result);
-}
-
-/*
- * isc_file_safemovefile is needed to be defined here to ensure that
- * any file with the new name is renamed to a backup name and then the
- * rename is done. If all goes well then the backup can be deleted,
- * otherwise it gets renamed back.
- */
-
-int
-isc_file_safemovefile(const char *oldname, const char *newname) {
- BOOL filestatus;
- char buf[512];
- struct stat sbuf;
- BOOL exists = FALSE;
- int tmpfd;
-
- /*
- * Make sure we have something to do
- */
- if (stat(oldname, &sbuf) != 0) {
- errno = ENOENT;
- return (-1);
- }
-
- /*
- * Rename to a backup the new file if it still exists
- */
- if (stat(newname, &sbuf) == 0) {
- exists = TRUE;
- strcpy(buf, newname);
- strcat(buf, ".XXXXX");
- tmpfd = mkstemp(buf);
- if (tmpfd > 0)
- _close(tmpfd);
- DeleteFile(buf);
- _chmod(newname, _S_IREAD | _S_IWRITE);
-
- filestatus = MoveFile(newname, buf);
- }
- /* Now rename the file to the new name
- */
- _chmod(oldname, _S_IREAD | _S_IWRITE);
-
- filestatus = MoveFile(oldname, newname);
- if (filestatus == 0) {
- /*
- * Try to rename the backup back to the original name
- * if the backup got created
- */
- if (exists == TRUE) {
- filestatus = MoveFile(buf, newname);
- if (filestatus == 0)
- errno = EACCES;
- }
- return (-1);
- }
-
- /*
- * Delete the backup file if it got created
- */
- if (exists == TRUE)
- filestatus = DeleteFile(buf);
- return (0);
-}
-
-isc_result_t
-isc_file_getmodtime(const char *file, isc_time_t *time) {
- int fh;
-
- REQUIRE(file != NULL);
- REQUIRE(time != NULL);
-
- if ((fh = open(file, _O_RDONLY | _O_BINARY)) < 0)
- return (isc__errno2result(errno));
-
- if (!GetFileTime((HANDLE) _get_osfhandle(fh),
- NULL,
- NULL,
- &time->absolute))
- {
- close(fh);
- errno = EINVAL;
- return (isc__errno2result(errno));
- }
- close(fh);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_file_settime(const char *file, isc_time_t *time) {
- int fh;
-
- REQUIRE(file != NULL && time != NULL);
-
- if ((fh = open(file, _O_RDWR | _O_BINARY)) < 0)
- return (isc__errno2result(errno));
-
- /*
- * Set the date via the filedate system call and return. Failing
- * this call implies the new file times are not supported by the
- * underlying file system.
- */
- if (!SetFileTime((HANDLE) _get_osfhandle(fh),
- NULL,
- &time->absolute,
- &time->absolute))
- {
- close(fh);
- errno = EINVAL;
- return (isc__errno2result(errno));
- }
-
- close(fh);
- return (ISC_R_SUCCESS);
-
-}
-
-#undef TEMPLATE
-#define TEMPLATE "XXXXXXXXXX.tmp" /* 14 characters. */
-
-isc_result_t
-isc_file_mktemplate(const char *path, char *buf, size_t buflen) {
- return (isc_file_template(path, TEMPLATE, buf, buflen));
-}
-
-isc_result_t
-isc_file_template(const char *path, const char *templet, char *buf,
- size_t buflen) {
- char *s;
-
- REQUIRE(path != NULL);
- REQUIRE(templet != NULL);
- REQUIRE(buf != NULL);
-
- s = strrchr(templet, '\\');
- if (s != NULL)
- templet = s + 1;
-
- s = strrchr(path, '\\');
-
- if (s != NULL) {
- if ((s - path + 1 + strlen(templet) + 1) > buflen)
- return (ISC_R_NOSPACE);
-
- strncpy(buf, path, s - path + 1);
- buf[s - path + 1] = '\0';
- strcat(buf, templet);
- } else {
- if ((strlen(templet) + 1) > buflen)
- return (ISC_R_NOSPACE);
-
- strcpy(buf, templet);
- }
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_file_renameunique(const char *file, char *templet) {
- int fd = -1;
- int res = 0;
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(file != NULL);
- REQUIRE(templet != NULL);
-
- fd = mkstemp(templet);
- if (fd == -1)
- result = isc__errno2result(errno);
- else
- close(fd);
-
- if (result == ISC_R_SUCCESS) {
- res = isc_file_safemovefile(file, templet);
- if (res != 0) {
- result = isc__errno2result(errno);
- (void)unlink(templet);
- }
- }
- return (result);
-}
-
-isc_result_t
-isc_file_openuniqueprivate(char *templet, FILE **fp) {
- int mode = _S_IREAD | _S_IWRITE;
- return (isc_file_openuniquemode(templet, mode, fp));
-}
-
-isc_result_t
-isc_file_openunique(char *templet, FILE **fp) {
- int mode = _S_IREAD | _S_IWRITE;
- return (isc_file_openuniquemode(templet, mode, fp));
-}
-
-isc_result_t
-isc_file_openuniquemode(char *templet, int mode, FILE **fp) {
- int fd;
- FILE *f;
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(templet != NULL);
- REQUIRE(fp != NULL && *fp == NULL);
-
- /*
- * Win32 does not have mkstemp. Using emulation above.
- */
- fd = mkstemp(templet);
-
- if (fd == -1)
- result = isc__errno2result(errno);
- if (result == ISC_R_SUCCESS) {
-#if 1
- UNUSED(mode);
-#else
- (void)fchmod(fd, mode);
-#endif
- f = fdopen(fd, "w+");
- if (f == NULL) {
- result = isc__errno2result(errno);
- (void)remove(templet);
- (void)close(fd);
- } else
- *fp = f;
- }
-
- return (result);
-}
-
-isc_result_t
-isc_file_remove(const char *filename) {
- int r;
-
- REQUIRE(filename != NULL);
-
- r = unlink(filename);
- if (r == 0)
- return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
-}
-
-isc_result_t
-isc_file_rename(const char *oldname, const char *newname) {
- int r;
-
- REQUIRE(oldname != NULL);
- REQUIRE(newname != NULL);
-
- r = isc_file_safemovefile(oldname, newname);
- if (r == 0)
- return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
-}
-
-isc_boolean_t
-isc_file_exists(const char *pathname) {
- struct stat stats;
-
- REQUIRE(pathname != NULL);
-
- return (ISC_TF(file_stats(pathname, &stats) == ISC_R_SUCCESS));
-}
-
-isc_result_t
-isc_file_isplainfile(const char *filename) {
- /*
- * This function returns success if filename is a plain file.
- */
- struct stat filestat;
- memset(&filestat,0,sizeof(struct stat));
-
- if ((stat(filename, &filestat)) == -1)
- return(isc__errno2result(errno));
-
- if(! S_ISREG(filestat.st_mode))
- return(ISC_R_INVALIDFILE);
-
- return(ISC_R_SUCCESS);
-}
-
-isc_boolean_t
-isc_file_isabsolute(const char *filename) {
- REQUIRE(filename != NULL);
- /*
- * Look for c:\path\... style, c:/path/... or \\computer\shar\path...
- * the UNC style file specs
- */
- if ((filename[0] == '\\') && (filename[1] == '\\'))
- return (ISC_TRUE);
- if (isalpha(filename[0]) && filename[1] == ':' && filename[2] == '\\')
- return (ISC_TRUE);
- if (isalpha(filename[0]) && filename[1] == ':' && filename[2] == '/')
- return (ISC_TRUE);
- return (ISC_FALSE);
-}
-
-isc_boolean_t
-isc_file_iscurrentdir(const char *filename) {
- REQUIRE(filename != NULL);
- return (ISC_TF(filename[0] == '.' && filename[1] == '\0'));
-}
-
-isc_boolean_t
-isc_file_ischdiridempotent(const char *filename) {
- REQUIRE(filename != NULL);
-
- if (isc_file_isabsolute(filename))
- return (ISC_TRUE);
- if (filename[0] == '\\')
- return (ISC_TRUE);
- if (filename[0] == '/')
- return (ISC_TRUE);
- if (isc_file_iscurrentdir(filename))
- return (ISC_TRUE);
- return (ISC_FALSE);
-}
-
-const char *
-isc_file_basename(const char *filename) {
- char *s;
-
- REQUIRE(filename != NULL);
-
- s = strrchr(filename, '\\');
- if (s == NULL)
- return (filename);
- return (s + 1);
-}
-
-isc_result_t
-isc_file_progname(const char *filename, char *progname, size_t namelen) {
- const char *s;
- char *p;
- size_t len;
-
- REQUIRE(filename != NULL);
- REQUIRE(progname != NULL);
-
- /*
- * Strip the path from the name
- */
- s = isc_file_basename(filename);
- if (s == NULL) {
- return (ISC_R_NOSPACE);
- }
-
- /*
- * Strip any and all suffixes
- */
- p = strchr(s, '.');
- if (p == NULL) {
- if (namelen <= strlen(s))
- return (ISC_R_NOSPACE);
-
- strcpy(progname, s);
- return (ISC_R_SUCCESS);
- }
-
- /*
- * Copy the result to the buffer
- */
- len = p - s;
- if (len >= namelen)
- return (ISC_R_NOSPACE);
-
- strncpy(progname, s, len);
- progname[len] = '\0';
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_file_absolutepath(const char *filename, char *path, size_t pathlen) {
- char *ptrname;
- DWORD retval;
-
- REQUIRE(filename != NULL);
- REQUIRE(path != NULL);
-
- retval = GetFullPathName(filename, pathlen, path, &ptrname);
-
- /* Something went wrong in getting the path */
- if (retval == 0)
- return (ISC_R_NOTFOUND);
- /* Caller needs to provide a larger buffer to contain the string */
- if (retval >= pathlen)
- return (ISC_R_NOSPACE);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_file_truncate(const char *filename, isc_offset_t size) {
- int fh;
-
- REQUIRE(filename != NULL && size >= 0);
-
- if ((fh = open(filename, _O_RDWR | _O_BINARY)) < 0)
- return (isc__errno2result(errno));
-
- if(_chsize(fh, size) != 0) {
- close(fh);
- return (isc__errno2result(errno));
- }
- close(fh);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_file_safecreate(const char *filename, FILE **fp) {
- isc_result_t result;
- int flags;
- struct stat sb;
- FILE *f;
- int fd;
-
- REQUIRE(filename != NULL);
- REQUIRE(fp != NULL && *fp == NULL);
-
- result = file_stats(filename, &sb);
- if (result == ISC_R_SUCCESS) {
- if ((sb.st_mode & S_IFREG) == 0)
- return (ISC_R_INVALIDFILE);
- flags = O_WRONLY | O_TRUNC;
- } else if (result == ISC_R_FILENOTFOUND) {
- flags = O_WRONLY | O_CREAT | O_EXCL;
- } else
- return (result);
-
- fd = open(filename, flags, S_IRUSR | S_IWUSR);
- if (fd == -1)
- return (isc__errno2result(errno));
-
- f = fdopen(fd, "w");
- if (f == NULL) {
- result = isc__errno2result(errno);
- close(fd);
- return (result);
- }
-
- *fp = f;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
-{
- char *dir, *file, *slash;
- char *backslash;
-
- slash = strrchr(path, '/');
-
- backslash = strrchr(path, '\\');
- if ((slash != NULL && backslash != NULL && backslash > slash) ||
- (slash == NULL && backslash != NULL))
- slash = backslash;
-
- if (slash == path) {
- file = ++slash;
- dir = isc_mem_strdup(mctx, "/");
- } else if (slash != NULL) {
- file = ++slash;
- dir = isc_mem_allocate(mctx, slash - path);
- if (dir != NULL)
- strlcpy(dir, path, slash - path);
- } else {
- file = path;
- dir = isc_mem_strdup(mctx, ".");
- }
-
- if (dir == NULL)
- return (ISC_R_NOMEMORY);
-
- if (*file == '\0') {
- isc_mem_free(mctx, dir);
- return (ISC_R_INVALIDFILE);
- }
-
- *dirname = dir;
- *basename = file;
-
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/win32/fsaccess.c b/contrib/ntp/lib/isc/win32/fsaccess.c
deleted file mode 100644
index 8de793f0a858..000000000000
--- a/contrib/ntp/lib/isc/win32/fsaccess.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: fsaccess.c,v 1.15 2007/06/19 23:47:19 tbox Exp $ */
-
-/*
- * Note that Win32 does not have the concept of files having access
- * and ownership bits. The FAT File system only has a readonly flag
- * for everyone and that's all. NTFS uses ACL's which is a totally
- * different concept of controlling access.
- *
- * This code needs to be revisited to set up proper access control for
- * NTFS file systems. Nothing can be done for FAT file systems.
- */
-
-#include <config.h>
-
-#include <aclapi.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <io.h>
-#include <errno.h>
-
-#include <isc/file.h>
-#include <isc/stat.h>
-
-#include "errno2result.h"
-
-/*
- * The OS-independent part of the API is in lib/isc.
- */
-#include "../fsaccess.c"
-
-/* Store the user account name locally */
-static char username[255] = "\0";
-static DWORD namelen = 0;
-
-/*
- * In order to set or retrieve access information, we need to obtain
- * the File System type. These could be UNC-type shares.
- */
-
-BOOL
-is_ntfs(const char * file) {
-
- char drive[255];
- char FSType[20];
- char tmpbuf[256];
- char *machinename;
- char *sharename;
- char filename[1024];
-
- REQUIRE(filename != NULL);
-
- if (isc_file_absolutepath(file, filename,
- sizeof(filename)) != ISC_R_SUCCESS) {
- return (FALSE);
- }
-
- /*
- * Look for c:\path\... style, c:/path/... or \\computer\shar\path...
- * the UNC style file specs
- */
- if (isalpha(filename[0]) && filename[1] == ':' &&
- (filename[2] == '\\' || filename[2] == '/')) {
- strncpy(drive, filename, 3);
- drive[3] = '\0';
- }
-
- else if ((filename[0] == '\\') && (filename[1] == '\\')) {
- /* Find the machine and share name and rebuild the UNC */
- strcpy(tmpbuf, filename);
- machinename = strtok(tmpbuf, "\\");
- sharename = strtok(NULL, "\\");
- strcpy(drive, "\\\\");
- strcat(drive, machinename);
- strcat(drive, "\\");
- strcat(drive, sharename);
- strcat(drive, "\\");
-
- }
- else /* Not determinable */
- return (FALSE);
-
- GetVolumeInformation(drive, NULL, 0, NULL, 0, NULL, FSType,
- sizeof(FSType));
- if(strcmp(FSType,"NTFS") == 0)
- return (TRUE);
- else
- return (FALSE);
-}
-
-/*
- * If it's not NTFS, we assume that it is FAT and proceed
- * with almost nothing to do. Only the write flag can be set or
- * cleared.
- */
-isc_result_t
-FAT_fsaccess_set(const char *path, isc_fsaccess_t access) {
- int mode;
- isc_fsaccess_t bits;
-
- /*
- * Done with checking bad bits. Set mode_t.
- */
- mode = 0;
-
-#define SET_AND_CLEAR1(modebit) \
- if ((access & bits) != 0) { \
- mode |= modebit; \
- access &= ~bits; \
- }
-#define SET_AND_CLEAR(user, group, other) \
- SET_AND_CLEAR1(user); \
- bits <<= STEP; \
- SET_AND_CLEAR1(group); \
- bits <<= STEP; \
- SET_AND_CLEAR1(other);
-
- bits = ISC_FSACCESS_READ | ISC_FSACCESS_LISTDIRECTORY;
-
- SET_AND_CLEAR(S_IRUSR, S_IRGRP, S_IROTH);
-
- bits = ISC_FSACCESS_WRITE |
- ISC_FSACCESS_CREATECHILD |
- ISC_FSACCESS_DELETECHILD;
-
- SET_AND_CLEAR(S_IWUSR, S_IWGRP, S_IWOTH);
-
- INSIST(access == 0);
-
- if (_chmod(path, mode) < 0)
- return (isc__errno2result(errno));
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-NTFS_Access_Control(const char *filename, const char *user, int access,
- isc_boolean_t isdir) {
- SECURITY_DESCRIPTOR sd;
- BYTE aclBuffer[1024];
- PACL pacl=(PACL)&aclBuffer;
- BYTE sidBuffer[100];
- PSID psid=(PSID) &sidBuffer;
- DWORD sidBufferSize = sizeof(sidBuffer);
- BYTE adminSidBuffer[100];
- PSID padminsid=(PSID) &adminSidBuffer;
- DWORD adminSidBufferSize = sizeof(adminSidBuffer);
- BYTE otherSidBuffer[100];
- PSID pothersid=(PSID) &otherSidBuffer;
- DWORD otherSidBufferSize = sizeof(otherSidBuffer);
- char domainBuffer[100];
- DWORD domainBufferSize = sizeof(domainBuffer);
- SID_NAME_USE snu;
- int errval;
- DWORD NTFSbits;
- int caccess;
-
-
- /* Initialize an ACL */
- if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION))
- return (ISC_R_NOPERM);
- if (!InitializeAcl(pacl, sizeof(aclBuffer), ACL_REVISION))
- return (ISC_R_NOPERM);
- if (!LookupAccountName(0, user, psid, &sidBufferSize, domainBuffer,
- &domainBufferSize, &snu))
- return (ISC_R_NOPERM);
- domainBufferSize = sizeof(domainBuffer);
- if (!LookupAccountName(0, "Administrators", padminsid,
- &adminSidBufferSize, domainBuffer, &domainBufferSize, &snu)) {
- errval = GetLastError();
- return (ISC_R_NOPERM);
- }
- domainBufferSize = sizeof(domainBuffer);
- if (!LookupAccountName(0, "Everyone", pothersid,
- &otherSidBufferSize, domainBuffer, &domainBufferSize, &snu)) {
- errval = GetLastError();
- return (ISC_R_NOPERM);
- }
-
- caccess = access;
- /* Owner check */
-
- NTFSbits = 0;
- if (caccess & ISC_FSACCESS_READ)
- NTFSbits |= FILE_GENERIC_READ;
- if (caccess & ISC_FSACCESS_WRITE)
- NTFSbits |= FILE_GENERIC_WRITE;
- if (caccess & ISC_FSACCESS_EXECUTE)
- NTFSbits |= FILE_GENERIC_EXECUTE;
-
- /* For directories check the directory-specific bits */
- if (isdir == ISC_TRUE) {
- if (caccess & ISC_FSACCESS_CREATECHILD)
- NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE;
- if (caccess & ISC_FSACCESS_DELETECHILD)
- NTFSbits |= FILE_DELETE_CHILD;
- if (caccess & ISC_FSACCESS_LISTDIRECTORY)
- NTFSbits |= FILE_LIST_DIRECTORY;
- if (caccess & ISC_FSACCESS_ACCESSCHILD)
- NTFSbits |= FILE_TRAVERSE;
- }
-
- if (NTFSbits == (FILE_GENERIC_READ | FILE_GENERIC_WRITE
- | FILE_GENERIC_EXECUTE))
- NTFSbits |= FILE_ALL_ACCESS;
- /*
- * Owner and Administrator also get STANDARD_RIGHTS_ALL
- * to ensure that they have full control
- */
-
- NTFSbits |= STANDARD_RIGHTS_ALL;
-
- /* Add the ACE to the ACL */
- if (!AddAccessAllowedAce(pacl, ACL_REVISION, NTFSbits, psid))
- return (ISC_R_NOPERM);
- if (!AddAccessAllowedAce(pacl, ACL_REVISION, NTFSbits, padminsid))
- return (ISC_R_NOPERM);
-
- /*
- * Group is ignored since we can be in multiple groups or no group
- * and its meaning is not clear on Win32
- */
-
- caccess = caccess >> STEP;
-
- /*
- * Other check. We translate this to be the same as Everyone
- */
-
- caccess = caccess >> STEP;
-
- NTFSbits = 0;
- if (caccess & ISC_FSACCESS_READ)
- NTFSbits |= FILE_GENERIC_READ;
- if (caccess & ISC_FSACCESS_WRITE)
- NTFSbits |= FILE_GENERIC_WRITE;
- if (caccess & ISC_FSACCESS_EXECUTE)
- NTFSbits |= FILE_GENERIC_EXECUTE;
-
- /* For directories check the directory-specific bits */
- if (isdir == TRUE) {
- if (caccess & ISC_FSACCESS_CREATECHILD)
- NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE;
- if (caccess & ISC_FSACCESS_DELETECHILD)
- NTFSbits |= FILE_DELETE_CHILD;
- if (caccess & ISC_FSACCESS_LISTDIRECTORY)
- NTFSbits |= FILE_LIST_DIRECTORY;
- if (caccess & ISC_FSACCESS_ACCESSCHILD)
- NTFSbits |= FILE_TRAVERSE;
- }
- /* Add the ACE to the ACL */
- if (!AddAccessAllowedAce(pacl, ACL_REVISION, NTFSbits,
- pothersid))
- return (ISC_R_NOPERM);
-
- if (!SetSecurityDescriptorDacl(&sd, TRUE, pacl, FALSE))
- return (ISC_R_NOPERM);
- if (!SetFileSecurity(filename, DACL_SECURITY_INFORMATION, &sd)) {
- return (ISC_R_NOPERM);
- }
-
- return(ISC_R_SUCCESS);
-}
-
-isc_result_t
-NTFS_fsaccess_set(const char *path, isc_fsaccess_t access,
- isc_boolean_t isdir){
-
- /*
- * For NTFS we first need to get the name of the account under
- * which BIND is running
- */
- if (namelen <= 0) {
- namelen = sizeof(username);
- if (GetUserName(username, &namelen) == 0)
- return (ISC_R_FAILURE);
- }
- return (NTFS_Access_Control(path, username, access, isdir));
-}
-
-isc_result_t
-isc_fsaccess_set(const char *path, isc_fsaccess_t access) {
- struct stat statb;
- isc_boolean_t is_dir = ISC_FALSE;
- isc_result_t result;
-
- if (stat(path, &statb) != 0)
- return (isc__errno2result(errno));
-
- if ((statb.st_mode & S_IFDIR) != 0)
- is_dir = ISC_TRUE;
- else if ((statb.st_mode & S_IFREG) == 0)
- return (ISC_R_INVALIDFILE);
-
- result = check_bad_bits(access, is_dir);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- /*
- * Determine if this is a FAT or NTFS disk and
- * call the appropriate function to set the permissions
- */
- if (is_ntfs(path))
- return (NTFS_fsaccess_set(path, access, is_dir));
- else
- return (FAT_fsaccess_set(path, access));
-}
-
-isc_result_t
-isc_fsaccess_changeowner(const char *filename, const char *user) {
- SECURITY_DESCRIPTOR psd;
- BYTE sidBuffer[500];
- BYTE groupBuffer[500];
- PSID psid=(PSID) &sidBuffer;
- DWORD sidBufferSize = sizeof(sidBuffer);
- char domainBuffer[100];
- DWORD domainBufferSize = sizeof(domainBuffer);
- SID_NAME_USE snu;
- PSID pSidGroup = (PSID) &groupBuffer;
- DWORD groupBufferSize = sizeof(groupBuffer);
-
-
- /*
- * Determine if this is a FAT or NTFS disk and
- * call the appropriate function to set the ownership
- * FAT disks do not have ownership attributes so it's
- * a noop.
- */
- if (is_ntfs(filename) == FALSE)
- return (ISC_R_SUCCESS);
-
- if (!InitializeSecurityDescriptor(&psd, SECURITY_DESCRIPTOR_REVISION))
- return (ISC_R_NOPERM);
-
- if (!LookupAccountName(0, user, psid, &sidBufferSize, domainBuffer,
- &domainBufferSize, &snu))
- return (ISC_R_NOPERM);
-
- /* Make sure administrators can get to it */
- domainBufferSize = sizeof(domainBuffer);
- if (!LookupAccountName(0, "Administrators", pSidGroup,
- &groupBufferSize, domainBuffer, &domainBufferSize, &snu))
- return (ISC_R_NOPERM);
-
- if (!SetSecurityDescriptorOwner(&psd, psid, FALSE))
- return (ISC_R_NOPERM);
-
- if (!SetSecurityDescriptorGroup(&psd, pSidGroup, FALSE))
- return (ISC_R_NOPERM);
-
- if (!SetFileSecurity(filename,
- OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION,
- &psd))
- return (ISC_R_NOPERM);
-
- return (ISC_R_SUCCESS);
-}
-
diff --git a/contrib/ntp/lib/isc/win32/include/isc/bind_registry.h b/contrib/ntp/lib/isc/win32/include/isc/bind_registry.h
deleted file mode 100644
index c4dc8768d881..000000000000
--- a/contrib/ntp/lib/isc/win32/include/isc/bind_registry.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: bind_registry.h,v 1.8 2007/06/19 23:47:20 tbox Exp $ */
-
-#ifndef ISC_BINDREGISTRY_H
-#define ISC_BINDREGISTRY_H
-
-/*
- * BIND makes use of the following Registry keys in various places, especially
- * during startup and installation
- */
-
-#define BIND_SUBKEY "Software\\ISC\\BIND"
-#define BIND_SESSION "CurrentSession"
-#define BIND_SESSION_SUBKEY "Software\\ISC\\BIND\\CurrentSession"
-#define BIND_UNINSTALL_SUBKEY \
- "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ISC BIND"
-
-#define EVENTLOG_APP_SUBKEY \
- "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application"
-#define BIND_MESSAGE_SUBKEY \
- "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\named"
-#define BIND_MESSAGE_NAME "named"
-
-#define BIND_SERVICE_SUBKEY \
- "SYSTEM\\CurrentControlSet\\Services\\named"
-
-
-#define BIND_CONFIGFILE 0
-#define BIND_DEBUGLEVEL 1
-#define BIND_QUERYLOG 2
-#define BIND_FOREGROUND 3
-#define BIND_PORT 4
-
-#endif /* ISC_BINDREGISTRY_H */
diff --git a/contrib/ntp/lib/isc/win32/include/isc/bindevt.h b/contrib/ntp/lib/isc/win32/include/isc/bindevt.h
deleted file mode 100644
index 72cf2d1fc506..000000000000
--- a/contrib/ntp/lib/isc/win32/include/isc/bindevt.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: bindevt.h,v 1.6 2007/06/19 23:47:20 tbox Exp $ */
-
-#ifndef ISC_BINDEVT_H
-#define ISC_BINDEVT_H 1
-
-/*
- * This is used for the event log for both logging the messages and
- * later on by the event viewer when looking at the events
- */
-
-/*
- * Values are 32 bit values layed out as follows:
- *
- * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
- * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
- * +---+-+-+-----------------------+-------------------------------+
- * |Sev|C|R| Facility | Code |
- * +---+-+-+-----------------------+-------------------------------+
- *
- * where
- *
- * Sev - is the severity code
- *
- * 00 - Success
- * 01 - Informational
- * 10 - Warning
- * 11 - Error
- *
- * C - is the Customer code flag
- *
- * R - is a reserved bit
- *
- * Facility - is the facility code
- *
- * Code - is the facility's status code
- *
- *
- * Define the facility codes
- */
-
-
-/*
- * Define the severity codes
- */
-
-
-/*
- * MessageId: BIND_ERR_MSG
- *
- * MessageText:
- *
- * %1
- */
-#define BIND_ERR_MSG ((DWORD)0xC0000001L)
-
-/*
- * MessageId: BIND_WARN_MSG
- *
- * MessageText:
- *
- * %1
- */
-#define BIND_WARN_MSG ((DWORD)0x80000002L)
-
-/*
- * MessageId: BIND_INFO_MSG
- *
- * MessageText:
- *
- * %1
- */
-#define BIND_INFO_MSG ((DWORD)0x40000003L)
-
-#endif /* ISC_BINDEVT_H */
diff --git a/contrib/ntp/lib/isc/win32/include/isc/keyboard.h b/contrib/ntp/lib/isc/win32/include/isc/keyboard.h
deleted file mode 100644
index e781c5fa167c..000000000000
--- a/contrib/ntp/lib/isc/win32/include/isc/keyboard.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: keyboard.h,v 1.6 2007/06/19 23:47:20 tbox Exp $ */
-
-#ifndef ISC_KEYBOARD_H
-#define ISC_KEYBOARD_H 1
-
-#include <isc/lang.h>
-#include <isc/result.h>
-
-ISC_LANG_BEGINDECLS
-
-typedef struct {
- int fd;
- isc_result_t result;
-} isc_keyboard_t;
-
-isc_result_t
-isc_keyboard_open(isc_keyboard_t *keyboard);
-
-isc_result_t
-isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleepseconds);
-
-isc_result_t
-isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp);
-
-isc_boolean_t
-isc_keyboard_canceled(isc_keyboard_t *keyboard);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_KEYBOARD_H */
diff --git a/contrib/ntp/lib/isc/win32/include/isc/netdb.h b/contrib/ntp/lib/isc/win32/include/isc/netdb.h
deleted file mode 100644
index 6625afdbd354..000000000000
--- a/contrib/ntp/lib/isc/win32/include/isc/netdb.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: netdb.h,v 1.9 2007/06/19 23:47:20 tbox Exp $ */
-
-#ifndef ISC_NETDB_H
-#define ISC_NETDB_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*
- * Portable netdb.h support.
- *
- * This module is responsible for defining the get<x>by<y> APIs.
- *
- * MP:
- * No impact.
- *
- * Reliability:
- * No anticipated impact.
- *
- * Resources:
- * N/A.
- *
- * Security:
- * No anticipated impact.
- *
- * Standards:
- * BSD API
- */
-
-/***
- *** Imports.
- ***/
-
-#include <isc/net.h>
-
-#endif /* ISC_NETDB_H */
diff --git a/contrib/ntp/lib/isc/win32/include/isc/ntgroups.h b/contrib/ntp/lib/isc/win32/include/isc/ntgroups.h
deleted file mode 100644
index b4cd020e5132..000000000000
--- a/contrib/ntp/lib/isc/win32/include/isc/ntgroups.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ntgroups.h,v 1.5 2007/06/19 23:47:20 tbox Exp $ */
-
-#ifndef ISC_NTGROUPS_H
-#define ISC_NTGROUPS_H 1
-
-#include <isc/lang.h>
-#include <isc/result.h>
-
-ISC_LANG_BEGINDECLS
-
-
-isc_result_t
-isc_ntsecurity_getaccountgroups(char *name, char **Groups, unsigned int maxgroups,
- unsigned int *total);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_NTGROUPS_H */
diff --git a/contrib/ntp/lib/isc/win32/include/isc/ntpaths.h b/contrib/ntp/lib/isc/win32/include/isc/ntpaths.h
deleted file mode 100644
index 39bcb6276f6c..000000000000
--- a/contrib/ntp/lib/isc/win32/include/isc/ntpaths.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ntpaths.h,v 1.20 2009/07/14 22:54:57 each Exp $ */
-
-/*
- * Windows-specific path definitions
- * These routines are used to set up and return system-specific path
- * information about the files enumerated in NtPaths
- */
-
-#ifndef ISC_NTPATHS_H
-#define ISC_NTPATHS_H
-
-#include <isc/lang.h>
-
-/*
- * Index of paths needed
- */
-enum NtPaths {
- NAMED_CONF_PATH,
- LWRES_CONF_PATH,
- RESOLV_CONF_PATH,
- RNDC_CONF_PATH,
- NAMED_PID_PATH,
- LWRESD_PID_PATH,
- LOCAL_STATE_DIR,
- SYS_CONF_DIR,
- RNDC_KEY_PATH,
- SESSION_KEY_PATH
-};
-
-/*
- * Define macros to get the path of the config files
- */
-#define NAMED_CONFFILE isc_ntpaths_get(NAMED_CONF_PATH)
-#define RNDC_CONFFILE isc_ntpaths_get(RNDC_CONF_PATH)
-#define RNDC_KEYFILE isc_ntpaths_get(RNDC_KEY_PATH)
-#define SESSION_KEYFILE isc_ntpaths_get(SESSION_KEY_PATH)
-#define RESOLV_CONF isc_ntpaths_get(RESOLV_CONF_PATH)
-
-/*
- * Information about where the files are on disk
- */
-#define NS_LOCALSTATEDIR "/dns/bin"
-#define NS_SYSCONFDIR "/dns/etc"
-
-ISC_LANG_BEGINDECLS
-
-void
-isc_ntpaths_init(void);
-
-char *
-isc_ntpaths_get(int);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_NTPATHS_H */
diff --git a/contrib/ntp/lib/isc/win32/include/isc/syslog.h b/contrib/ntp/lib/isc/win32/include/isc/syslog.h
deleted file mode 100644
index 765c0e532e8f..000000000000
--- a/contrib/ntp/lib/isc/win32/include/isc/syslog.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: syslog.h,v 1.5 2007/06/19 23:47:20 tbox Exp $ */
-
-#ifndef ISC_SYSLOG_H
-#define ISC_SYSLOG_H 1
-
-#include <isc/lang.h>
-#include <isc/types.h>
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-isc_syslog_facilityfromstring(const char *str, int *facilityp);
-/*
- * Convert 'str' to the appropriate syslog facility constant.
- *
- * Requires:
- *
- * 'str' is not NULL
- * 'facilityp' is not NULL
- *
- * Returns:
- * ISC_R_SUCCESS
- * ISC_R_NOTFOUND
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_SYSLOG_H */
diff --git a/contrib/ntp/lib/isc/win32/ipv6.c b/contrib/ntp/lib/isc/win32/ipv6.c
deleted file mode 100644
index 511ae21f4255..000000000000
--- a/contrib/ntp/lib/isc/win32/ipv6.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ipv6.c,v 1.8 2007/06/19 23:47:19 tbox Exp $ */
-
-#include <isc/net.h>
-#include <isc/platform.h>
-
-LIBISC_EXTERNAL_DATA const struct in6_addr isc_in6addr_any =
- IN6ADDR_ANY_INIT;
-
-LIBISC_EXTERNAL_DATA const struct in6_addr isc_in6addr_loopback =
- IN6ADDR_LOOPBACK_INIT;
diff --git a/contrib/ntp/lib/isc/win32/keyboard.c b/contrib/ntp/lib/isc/win32/keyboard.c
deleted file mode 100644
index d569e7ca8ee9..000000000000
--- a/contrib/ntp/lib/isc/win32/keyboard.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: keyboard.c,v 1.7 2007/06/19 23:47:19 tbox Exp $ */
-
-#include <config.h>
-
-#include <sys/types.h>
-
-#include <windows.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include <io.h>
-
-#include <isc/keyboard.h>
-#include <isc/util.h>
-
-isc_result_t
-isc_keyboard_open(isc_keyboard_t *keyboard) {
- int fd;
-
- REQUIRE(keyboard != NULL);
-
- fd = _fileno(stdin);
- if (fd < 0)
- return (ISC_R_IOERROR);
-
- keyboard->fd = fd;
-
- keyboard->result = ISC_R_SUCCESS;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_keyboard_close(isc_keyboard_t *keyboard, unsigned int sleeptime) {
- REQUIRE(keyboard != NULL);
-
- if (sleeptime > 0 && keyboard->result != ISC_R_CANCELED)
- (void)Sleep(sleeptime*1000);
-
- keyboard->fd = -1;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_keyboard_getchar(isc_keyboard_t *keyboard, unsigned char *cp) {
- ssize_t cc;
- unsigned char c;
-
- REQUIRE(keyboard != NULL);
- REQUIRE(cp != NULL);
-
- cc = read(keyboard->fd, &c, 1);
- if (cc < 0) {
- keyboard->result = ISC_R_IOERROR;
- return (keyboard->result);
- }
-
- *cp = c;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_boolean_t
-isc_keyboard_canceled(isc_keyboard_t *keyboard) {
- return (ISC_TF(keyboard->result == ISC_R_CANCELED));
-}
-
diff --git a/contrib/ntp/lib/isc/win32/libgen.h b/contrib/ntp/lib/isc/win32/libgen.h
deleted file mode 100644
index 1c58a9569a0e..000000000000
--- a/contrib/ntp/lib/isc/win32/libgen.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: libgen.h,v 1.3 2009/07/17 23:47:41 tbox Exp $ */
-
-#ifndef LIBGEN_H
-#define LIBGEN_H 1
-
-char *basename(const char *);
-char *dirname(const char *);
-
-#endif
diff --git a/contrib/ntp/lib/isc/win32/libisc.def b/contrib/ntp/lib/isc/win32/libisc.def
deleted file mode 100644
index fb084103da53..000000000000
--- a/contrib/ntp/lib/isc/win32/libisc.def
+++ /dev/null
@@ -1,583 +0,0 @@
-LIBRARY libisc
-
-; Exported Functions
-EXPORTS
-
-NTReportError
-closelog
-isc___mem_allocate
-isc___mem_free
-isc___mem_get
-isc___mem_put
-isc___mem_putanddetach
-isc___mem_reallocate
-isc___mem_strdup
-isc___mempool_get
-isc___mempool_put
-isc___socketmgr_maxudp
-isc__app_block
-isc__app_finish
-isc__app_onrun
-isc__app_reload
-isc__app_run
-isc__app_shutdown
-isc__app_start
-isc__app_unblock
-isc__backtrace_nsymbols
-isc__backtrace_symtable
-isc__buffer_activeregion
-isc__buffer_add
-isc__buffer_availableregion
-isc__buffer_back
-isc__buffer_clear
-isc__buffer_consumedregion
-isc__buffer_first
-isc__buffer_forward
-isc__buffer_init
-isc__buffer_invalidate
-isc__buffer_putmem
-isc__buffer_putstr
-isc__buffer_putuint16
-isc__buffer_putuint32
-isc__buffer_putuint48
-isc__buffer_putuint8
-isc__buffer_region
-isc__buffer_remainingregion
-isc__buffer_setactive
-isc__buffer_subtract
-isc__buffer_usedregion
-isc__mem_attach
-isc__mem_checkdestroyed
-isc__mem_create
-isc__mem_create2
-isc__mem_createx
-isc__mem_createx2
-isc__mem_destroy
-isc__mem_detach
-isc__mem_getname
-isc__mem_getquota
-isc__mem_gettag
-isc__mem_inuse
-isc__mem_isovermem
-isc__mem_ondestroy
-isc__mem_references
-isc__mem_setdestroycheck
-isc__mem_setname
-isc__mem_setquota
-isc__mem_setwater
-isc__mem_stats
-isc__mem_waterack
-isc__mempool_associatelock
-isc__mempool_create
-isc__mempool_destroy
-isc__mempool_getallocated
-isc__mempool_getfillcount
-isc__mempool_getfreecount
-isc__mempool_getfreemax
-isc__mempool_getmaxalloc
-isc__mempool_setfillcount
-isc__mempool_setfreemax
-isc__mempool_setmaxalloc
-isc__mempool_setname
-isc__socket_accept
-isc__socket_attach
-isc__socket_bind
-isc__socket_cancel
-isc__socket_cleanunix
-isc__socket_close
-isc__socket_connect
-isc__socket_create
-isc__socket_detach
-isc__socket_dup
-isc__socket_filter
-isc__socket_getfd
-isc__socket_getname
-isc__socket_getpeername
-isc__socket_getsockname
-isc__socket_gettag
-isc__socket_gettype
-isc__socket_ipv6only
-isc__socket_isbound
-isc__socket_listen
-isc__socket_open
-isc__socket_permunix
-isc__socket_recv
-isc__socket_recv2
-isc__socket_recvv
-isc__socket_send
-isc__socket_sendto
-isc__socket_sendto2
-isc__socket_sendtov
-isc__socket_sendv
-isc__socket_setname
-isc__socketmgr_create
-isc__socketmgr_create2
-isc__socketmgr_destroy
-isc__socketmgr_getmaxsockets
-isc__socketmgr_setreserved
-isc__socketmgr_setstats
-isc__strerror
-isc__task_attach
-isc__task_beginexclusive
-isc__task_create
-isc__task_destroy
-isc__task_detach
-isc__task_endexclusive
-isc__task_getcurrenttime
-isc__task_getname
-isc__task_gettag
-isc__task_onshutdown
-isc__task_privilege
-isc__task_purge
-isc__task_purgeevent
-isc__task_purgerange
-isc__task_send
-isc__task_sendanddetach
-isc__task_setname
-isc__task_setprivilege
-isc__task_shutdown
-isc__task_unsend
-isc__task_unsendrange
-isc__taskmgr_create
-isc__taskmgr_destroy
-isc__taskmgr_mode
-isc__taskmgr_setmode
-isc__timer_attach
-isc__timer_create
-isc__timer_detach
-isc__timer_reset
-isc__timer_touch
-isc__timermgr_create
-isc__timermgr_destroy
-isc__timermgr_poke
-isc_assertion_failed
-isc_assertion_setcallback
-isc_assertion_typetotext
-isc_backtrace_getsymbol
-isc_backtrace_getsymbolfromindex
-isc_backtrace_gettrace
-isc_base32_decoderegion
-isc_base32_decodestring
-isc_base32_tobuffer
-isc_base32_totext
-isc_base32hex_decoderegion
-isc_base32hex_decodestring
-isc_base32hex_tobuffer
-isc_base32hex_totext
-isc_base64_decodestring
-isc_base64_tobuffer
-isc_base64_totext
-isc_bitstring_copy
-isc_bitstring_init
-isc_bitstring_invalidate
-isc_buffer_allocate
-isc_buffer_compact
-isc_buffer_copyregion
-isc_buffer_free
-isc_buffer_getuint16
-isc_buffer_getuint32
-isc_buffer_getuint8
-isc_buffer_reinit
-isc_bufferlist_availablecount
-isc_bufferlist_usedcount
-isc_commandline_parse
-isc_condition_broadcast
-isc_condition_destroy
-isc_condition_init
-isc_condition_signal
-isc_condition_wait
-isc_condition_waituntil
-isc_dir_chdir
-isc_dir_chroot
-isc_dir_close
-isc_dir_init
-isc_dir_open
-isc_dir_read
-isc_dir_reset
-isc_entropy_addcallbacksample
-isc_entropy_addsample
-isc_entropy_attach
-isc_entropy_create
-isc_entropy_createcallbacksource
-isc_entropy_createfilesource
-isc_entropy_createsamplesource
-isc_entropy_destroysource
-isc_entropy_detach
-isc_entropy_getdata
-isc_entropy_putdata
-isc_entropy_stats
-isc_entropy_status
-isc_entropy_stopcallbacksources
-isc_entropy_usebestsource
-isc_error_fatal
-isc_error_runtimecheck
-isc_error_setfatal
-isc_error_setunexpected
-isc_error_unexpected
-isc_event_allocate
-isc_event_free
-isc_file_absolutepath
-isc_file_basename
-isc_file_exists
-isc_file_getmodtime
-isc_file_isabsolute
-isc_file_ischdiridempotent
-isc_file_iscurrentdir
-isc_file_isplainfile
-isc_file_mktemplate
-isc_file_openunique
-isc_file_openuniquemode
-isc_file_openuniqueprivate
-isc_file_progname
-isc_file_remove
-isc_file_rename
-isc_file_renameunique
-isc_file_safecreate
-isc_file_safemovefile
-isc_file_settime
-isc_file_splitpath
-isc_file_template
-isc_file_truncate
-isc_fsaccess_add
-isc_fsaccess_changeowner
-isc_fsaccess_remove
-isc_fsaccess_set
-isc_hash_calc
-isc_hash_create
-isc_hash_ctxattach
-isc_hash_ctxcalc
-isc_hash_ctxcreate
-isc_hash_ctxdetach
-isc_hash_ctxinit
-isc_hash_destroy
-isc_hash_init
-isc_heap_create
-isc_heap_decreased
-isc_heap_delete
-isc_heap_destroy
-isc_heap_element
-isc_heap_increased
-isc_heap_insert
-isc_hex_decodestring
-isc_hex_tobuffer
-isc_hex_totext
-isc_hmacmd5_init
-isc_hmacmd5_invalidate
-isc_hmacmd5_sign
-isc_hmacmd5_update
-isc_hmacmd5_verify
-isc_hmacmd5_verify2
-isc_hmacsha1_init
-isc_hmacsha1_invalidate
-isc_hmacsha1_sign
-isc_hmacsha1_update
-isc_hmacsha1_verify
-isc_hmacsha224_init
-isc_hmacsha224_invalidate
-isc_hmacsha224_sign
-isc_hmacsha224_update
-isc_hmacsha224_verify
-isc_hmacsha256_init
-isc_hmacsha256_invalidate
-isc_hmacsha256_sign
-isc_hmacsha256_update
-isc_hmacsha256_verify
-isc_hmacsha384_init
-isc_hmacsha384_invalidate
-isc_hmacsha384_sign
-isc_hmacsha384_update
-isc_hmacsha384_verify
-isc_hmacsha512_init
-isc_hmacsha512_invalidate
-isc_hmacsha512_sign
-isc_hmacsha512_update
-isc_hmacsha512_verify
-isc_httpdmgr_addurl
-isc_httpdmgr_create
-isc_httpdmgr_shutdown
-isc_interfaceiter_create
-isc_interfaceiter_current
-isc_interfaceiter_destroy
-isc_interfaceiter_first
-isc_interfaceiter_next
-isc_interval_iszero
-isc_interval_set
-isc_iterated_hash
-isc_keyboard_canceled
-isc_keyboard_close
-isc_keyboard_getchar
-isc_keyboard_open
-isc_lex_close
-isc_lex_create
-isc_lex_destroy
-isc_lex_getcomments
-isc_lex_getlasttokentext
-isc_lex_getmastertoken
-isc_lex_getoctaltoken
-isc_lex_getsourceline
-isc_lex_getsourcename
-isc_lex_getspecials
-isc_lex_gettoken
-isc_lex_isfile
-isc_lex_openbuffer
-isc_lex_openfile
-isc_lex_openstream
-isc_lex_setcomments
-isc_lex_setspecials
-isc_lex_ungettoken
-isc_lfsr_generate
-isc_lfsr_generate32
-isc_lfsr_init
-isc_lfsr_skip
-isc_lib_initmsgcat
-isc_log_categorybyname
-isc_log_closefilelogs
-isc_log_create
-isc_log_createchannel
-isc_log_destroy
-isc_log_getdebuglevel
-isc_log_getduplicateinterval
-isc_log_gettag
-isc_log_ivwrite
-isc_log_ivwrite1
-isc_log_iwrite
-isc_log_iwrite1
-isc_log_modulebyname
-isc_log_opensyslog
-isc_log_registercategories
-isc_log_registermodules
-isc_log_setcontext
-isc_log_setdebuglevel
-isc_log_setduplicateinterval
-isc_log_settag
-isc_log_usechannel
-isc_log_vwrite
-isc_log_vwrite1
-isc_log_wouldlog
-isc_log_write
-isc_log_write1
-isc_logconfig_create
-isc_logconfig_destroy
-isc_logconfig_get
-isc_logconfig_use
-isc_md5_final
-isc_md5_init
-isc_md5_invalidate
-isc_md5_update
-isc_mem_renderxml
-isc_msgcat_close
-isc_msgcat_get
-isc_msgcat_open
-isc_mutexblock_destroy
-isc_mutexblock_init
-isc_net_aton
-isc_net_disableipv4
-isc_net_disableipv6
-isc_net_getudpportrange
-isc_net_ntop
-isc_net_probe_ipv6only
-isc_net_probe_ipv6pktinfo
-isc_net_probeipv4
-isc_net_probeipv6
-isc_net_probeunix
-isc_net_pton
-isc_netaddr_any
-isc_netaddr_any6
-isc_netaddr_eqprefix
-isc_netaddr_equal
-isc_netaddr_format
-isc_netaddr_fromin
-isc_netaddr_fromin6
-isc_netaddr_frompath
-isc_netaddr_fromsockaddr
-isc_netaddr_fromv4mapped
-isc_netaddr_getzone
-isc_netaddr_ismulticast
-isc_netaddr_masktoprefixlen
-isc_netaddr_prefixok
-isc_netaddr_setzone
-isc_netaddr_totext
-isc_netscope_pton
-isc_ntpaths_get
-isc_ntpaths_init
-isc_once_do
-isc_ondestroy_init
-isc_ondestroy_notify
-isc_ondestroy_register
-isc_os_ncpus
-isc_parse_uint16
-isc_parse_uint32
-isc_parse_uint8
-isc_portset_add
-isc_portset_addrange
-isc_portset_create
-isc_portset_destroy
-isc_portset_isset
-isc_portset_nports
-isc_portset_remove
-isc_portset_removerange
-isc_quota_attach
-isc_quota_destroy
-isc_quota_detach
-isc_quota_init
-isc_quota_max
-isc_quota_release
-isc_quota_reserve
-isc_quota_soft
-isc_radix_create
-isc_radix_destroy
-isc_radix_insert
-isc_radix_process
-isc_radix_remove
-isc_radix_search
-isc_random_get
-isc_random_jitter
-isc_random_seed
-isc_ratelimiter_attach
-isc_ratelimiter_create
-isc_ratelimiter_detach
-isc_ratelimiter_enqueue
-isc_ratelimiter_setinterval
-isc_ratelimiter_setpertic
-isc_ratelimiter_shutdown
-isc_refcount_init
-isc_region_compare
-isc_resource_getcurlimit
-isc_resource_getlimit
-isc_resource_setlimit
-isc_result_register
-isc_result_totext
-isc_rwlock_destroy
-isc_rwlock_downgrade
-isc_rwlock_init
-isc_rwlock_lock
-isc_rwlock_trylock
-isc_rwlock_tryupgrade
-isc_rwlock_unlock
-isc_serial_eq
-isc_serial_ge
-isc_serial_gt
-isc_serial_le
-isc_serial_lt
-isc_serial_ne
-isc_sha1_final
-isc_sha1_init
-isc_sha1_invalidate
-isc_sha1_update
-isc_sha224_final
-isc_sha224_init
-isc_sha224_invalidate
-isc_sha224_update
-isc_sha256_data
-isc_sha256_final
-isc_sha256_init
-isc_sha256_invalidate
-isc_sha256_update
-isc_sha384_final
-isc_sha384_init
-isc_sha384_invalidate
-isc_sha384_update
-isc_sha512_final
-isc_sha512_init
-isc_sha512_invalidate
-isc_sha512_update
-isc_sockaddr_any
-isc_sockaddr_any6
-isc_sockaddr_anyofpf
-isc_sockaddr_compare
-isc_sockaddr_eqaddr
-isc_sockaddr_eqaddrprefix
-isc_sockaddr_equal
-isc_sockaddr_format
-isc_sockaddr_fromin
-isc_sockaddr_fromin6
-isc_sockaddr_fromnetaddr
-isc_sockaddr_frompath
-isc_sockaddr_getport
-isc_sockaddr_hash
-isc_sockaddr_isexperimental
-isc_sockaddr_ismulticast
-isc_sockaddr_pf
-isc_sockaddr_setport
-isc_sockaddr_totext
-isc_sockaddr_v6fromin
-isc_socketmgr_renderxml
-isc_stats_attach
-isc_stats_create
-isc_stats_decrement
-isc_stats_detach
-isc_stats_dump
-isc_stats_increment
-isc_stats_ncounters
-isc_stdio_close
-isc_stdio_flush
-isc_stdio_open
-isc_stdio_read
-isc_stdio_seek
-isc_stdio_sync
-isc_stdio_write
-isc_stdtime_get
-isc_string_append
-isc_string_append_truncate
-isc_string_copy
-isc_string_copy_truncate
-isc_string_printf
-isc_string_printf_truncate
-isc_string_regiondup
-isc_string_separate
-isc_string_strlcat
-isc_string_strlcpy
-isc_string_touint64
-isc_symtab_create
-isc_symtab_define
-isc_symtab_destroy
-isc_symtab_lookup
-isc_symtab_undefine
-isc_syslog_facilityfromstring
-isc_taskmgr_renderxml
-isc_taskpool_create
-isc_taskpool_destroy
-isc_taskpool_expand
-isc_taskpool_gettask
-isc_taskpool_setprivilege
-isc_taskpool_size
-isc_thread_create
-isc_thread_join
-isc_thread_key_create
-isc_thread_key_delete
-isc_thread_key_getspecific
-isc_thread_key_setspecific
-isc_thread_setconcurrency
-isc_time_add
-isc_time_compare
-isc_time_formatISO8601
-isc_time_formattimestamp
-isc_time_isepoch
-isc_time_microdiff
-isc_time_nanoseconds
-isc_time_now
-isc_time_nowplusinterval
-isc_time_seconds
-isc_time_set
-isc_time_settoepoch
-isc_time_subtract
-isc_win32os_majorversion
-isc_win32os_minorversion
-isc_win32os_servicepackmajor
-isc_win32os_servicepackminor
-isc_win32os_versioncheck
-openlog
-syslog
-
-; Exported Data
-
-EXPORTS
-
-isc_commandline_argument DATA
-isc_commandline_errprint DATA
-isc_commandline_index DATA
-isc_commandline_option DATA
-isc_commandline_progname DATA
-isc_commandline_reset DATA
-isc_mem_debugging DATA
-
diff --git a/contrib/ntp/lib/isc/win32/libisc.dsp b/contrib/ntp/lib/isc/win32/libisc.dsp
deleted file mode 100644
index 8e4441c39fab..000000000000
--- a/contrib/ntp/lib/isc/win32/libisc.dsp
+++ /dev/null
@@ -1,802 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libisc" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=libisc - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libisc.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libisc.mak" CFG="libisc - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libisc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libisc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "BIND9" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../../libxml2-2.7.3/include" /I "include" /I "../include" /I "../noatomic/include" /I "win32" /I "../../isccfg/include" /D "BIND9" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 ../../../../libxml2-2.7.3/win32/bin.msvc/libxml2.lib
-# ADD LINK32 user32.lib advapi32.lib ws2_32.lib /nologo /dll /machine:I386 /out:"../../../Build/Release/libisc.dll"
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "BIND9" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../../libxml2-2.7.3/include" /I "include" /I "../include" /I "../noatomic/include" /I "win32" /I "../../isccfg/include" /D "BIND9" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ../../../../libxml2-2.7.3/win32/bin.msvc/libxml2.lib
-# ADD LINK32 user32.lib advapi32.lib ws2_32.lib /nologo /dll /map /debug /machine:I386 /out:"../../../Build/Debug/libisc.dll" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "libisc - Win32 Release"
-# Name "libisc - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\app.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\condition.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\dir.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\DLLMain.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\entropy.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\errno2result.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\fsaccess.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\interfaceiter.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ipv6.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\iterated_hash.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\keyboard.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\net.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ntpaths.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\once.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\os.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\resource.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\socket.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strerror.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stdio.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\stdtime.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\syslog.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\thread.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\time.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\version.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\include\isc\app.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\assertions.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\backtrace.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\backtrace-emptytbl.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\base32.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\base64.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\bind_registry.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\bindevt.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\bitstring.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\boolean.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\buffer.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\bufferlist.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\commandline.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\condition.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\config.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\dir.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\entropy.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\errno2result.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\error.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\event.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\eventclass.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\file.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\formatcheck.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\fsaccess.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\heap.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\hex.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\hmacmd5.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\hmacsha.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\httpd.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\int.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\interfaceiter.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\ipv6.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\iterated_hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\keyboard.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\lang.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\lex.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\lfsr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\lib.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\list.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\log.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\magic.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\md5.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\mem.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\msgcat.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\msioctl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\mutex.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\mutexblock.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\net.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\netaddr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\netscope.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\netdb.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\ntpaths.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\offset.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\once.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\ondestroy.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\parseint.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\portset.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\os.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\platform.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\print.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\quota.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\radix.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\random.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\ratelimiter.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\refcount.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\region.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\resource.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\result.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\resultclass.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\rwlock.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\serial.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\sha1.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\sha2.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\sockaddr.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\socket.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\stats.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\stdio.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\strerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\stdtime.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\string.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\symtab.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\syslog.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\syslog.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\task.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\taskpool.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\thread.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\time.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\timer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\isc\win32os.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\types.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\unistd.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\isc\util.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\versions.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Group "Main Isc Lib"
-
-# PROP Default_Filter "c"
-# Begin Source File
-
-SOURCE=..\assertions.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\backtrace.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\backtrace-emptytbl.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\base32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\base64.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\bitstring.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\buffer.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\bufferlist.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\commandline.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\error.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\event.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\hash.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\heap.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\hex.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\hmacmd5.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\hmacsha.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\httpd.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\inet_aton.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\inet_ntop.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\inet_pton.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lex.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lfsr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\lib.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\log.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\md5.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\mem.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\nls\msgcat.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\mutexblock.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\netaddr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\netscope.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ondestroy.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\parseint.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\portset.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\quota.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\radix.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\random.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ratelimiter.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\refcount.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\region.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\result.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\rwlock.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\serial.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\sha1.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\sha2.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\sockaddr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\stats.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\string.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\symtab.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\task.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\taskpool.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\timer.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\win32os.c
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=..\noatomic\include\atomic.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\libisc.def
-# End Source File
-# End Target
-# End Project
diff --git a/contrib/ntp/lib/isc/win32/libisc.dsw b/contrib/ntp/lib/isc/win32/libisc.dsw
deleted file mode 100644
index c66c56e531d1..000000000000
--- a/contrib/ntp/lib/isc/win32/libisc.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "libisc"=".\libisc.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/contrib/ntp/lib/isc/win32/libisc.mak b/contrib/ntp/lib/isc/win32/libisc.mak
deleted file mode 100644
index e15b46b3f862..000000000000
--- a/contrib/ntp/lib/isc/win32/libisc.mak
+++ /dev/null
@@ -1,2055 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on libisc.dsp
-!IF "$(CFG)" == ""
-CFG=libisc - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to libisc - Win32 Debug.
-!ENDIF
-
-!IF "$(CFG)" != "libisc - Win32 Release" && "$(CFG)" != "libisc - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libisc.mak" CFG="libisc - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libisc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libisc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-LIBXML=../../../../libxml2-2.7.3/win32/bin.msvc/libxml2.lib
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-_VC_MANIFEST_INC=0
-_VC_MANIFEST_BASENAME=__VC80
-!ELSE
-_VC_MANIFEST_INC=1
-_VC_MANIFEST_BASENAME=__VC80.Debug
-!ENDIF
-
-####################################################
-# Specifying name of temporary resource file used only in incremental builds:
-
-!if "$(_VC_MANIFEST_INC)" == "1"
-_VC_MANIFEST_AUTO_RES=$(_VC_MANIFEST_BASENAME).auto.res
-!else
-_VC_MANIFEST_AUTO_RES=
-!endif
-
-####################################################
-# _VC_MANIFEST_EMBED_EXE - command to embed manifest in EXE:
-
-!if "$(_VC_MANIFEST_INC)" == "1"
-
-#MT_SPECIAL_RETURN=1090650113
-#MT_SPECIAL_SWITCH=-notify_resource_update
-MT_SPECIAL_RETURN=0
-MT_SPECIAL_SWITCH=
-_VC_MANIFEST_EMBED_EXE= \
-if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \
-if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \
-rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \
-link $** /out:$@ $(LFLAGS)
-
-!else
-
-_VC_MANIFEST_EMBED_EXE= \
-if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
-
-!endif
-
-####################################################
-# _VC_MANIFEST_EMBED_DLL - command to embed manifest in DLL:
-
-!if "$(_VC_MANIFEST_INC)" == "1"
-
-#MT_SPECIAL_RETURN=1090650113
-#MT_SPECIAL_SWITCH=-notify_resource_update
-MT_SPECIAL_RETURN=0
-MT_SPECIAL_SWITCH=
-_VC_MANIFEST_EMBED_EXE= \
-if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \
-if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \
-rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \
-link $** /out:$@ $(LFLAGS)
-
-!else
-
-_VC_MANIFEST_EMBED_EXE= \
-if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;2
-
-!endif
-####################################################
-# _VC_MANIFEST_CLEAN - command to clean resources files generated temporarily:
-
-!if "$(_VC_MANIFEST_INC)" == "1"
-
-_VC_MANIFEST_CLEAN=-del $(_VC_MANIFEST_BASENAME).auto.res \
- $(_VC_MANIFEST_BASENAME).auto.rc \
- $(_VC_MANIFEST_BASENAME).auto.manifest
-
-!else
-
-_VC_MANIFEST_CLEAN=
-
-!endif
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-OUTDIR=.\Release
-INTDIR=.\Release
-
-ALL : "..\..\..\Build\Release\libisc.dll"
-
-
-CLEAN :
- -@erase "$(INTDIR)\app.obj"
- -@erase "$(INTDIR)\assertions.obj"
- -@erase "$(INTDIR)\backtrace.obj"
- -@erase "$(INTDIR)\backtrace-emptytbl.obj"
- -@erase "$(INTDIR)\base32.obj"
- -@erase "$(INTDIR)\base64.obj"
- -@erase "$(INTDIR)\bitstring.obj"
- -@erase "$(INTDIR)\buffer.obj"
- -@erase "$(INTDIR)\bufferlist.obj"
- -@erase "$(INTDIR)\commandline.obj"
- -@erase "$(INTDIR)\condition.obj"
- -@erase "$(INTDIR)\dir.obj"
- -@erase "$(INTDIR)\DLLMain.obj"
- -@erase "$(INTDIR)\entropy.obj"
- -@erase "$(INTDIR)\errno2result.obj"
- -@erase "$(INTDIR)\error.obj"
- -@erase "$(INTDIR)\event.obj"
- -@erase "$(INTDIR)\file.obj"
- -@erase "$(INTDIR)\fsaccess.obj"
- -@erase "$(INTDIR)\hash.obj"
- -@erase "$(INTDIR)\heap.obj"
- -@erase "$(INTDIR)\hex.obj"
- -@erase "$(INTDIR)\hmacmd5.obj"
- -@erase "$(INTDIR)\hmacsha.obj"
- -@erase "$(INTDIR)\httpd.obj"
- -@erase "$(INTDIR)\inet_aton.obj"
- -@erase "$(INTDIR)\inet_ntop.obj"
- -@erase "$(INTDIR)\inet_pton.obj"
- -@erase "$(INTDIR)\interfaceiter.obj"
- -@erase "$(INTDIR)\ipv6.obj"
- -@erase "$(INTDIR)\iterated_hash.obj"
- -@erase "$(INTDIR)\keyboard.obj"
- -@erase "$(INTDIR)\lex.obj"
- -@erase "$(INTDIR)\lfsr.obj"
- -@erase "$(INTDIR)\lib.obj"
- -@erase "$(INTDIR)\log.obj"
- -@erase "$(INTDIR)\md5.obj"
- -@erase "$(INTDIR)\mem.obj"
- -@erase "$(INTDIR)\msgcat.obj"
- -@erase "$(INTDIR)\mutexblock.obj"
- -@erase "$(INTDIR)\net.obj"
- -@erase "$(INTDIR)\netaddr.obj"
- -@erase "$(INTDIR)\netscope.obj"
- -@erase "$(INTDIR)\ntpaths.obj"
- -@erase "$(INTDIR)\once.obj"
- -@erase "$(INTDIR)\ondestroy.obj"
- -@erase "$(INTDIR)\os.obj"
- -@erase "$(INTDIR)\parseint.obj"
- -@erase "$(INTDIR)\portset.obj"
- -@erase "$(INTDIR)\quota.obj"
- -@erase "$(INTDIR)\radix.obj"
- -@erase "$(INTDIR)\random.obj"
- -@erase "$(INTDIR)\ratelimiter.obj"
- -@erase "$(INTDIR)\refcount.obj"
- -@erase "$(INTDIR)\region.obj"
- -@erase "$(INTDIR)\resource.obj"
- -@erase "$(INTDIR)\result.obj"
- -@erase "$(INTDIR)\rwlock.obj"
- -@erase "$(INTDIR)\serial.obj"
- -@erase "$(INTDIR)\sha1.obj"
- -@erase "$(INTDIR)\sha2.obj"
- -@erase "$(INTDIR)\sockaddr.obj"
- -@erase "$(INTDIR)\socket.obj"
- -@erase "$(INTDIR)\stats.obj"
- -@erase "$(INTDIR)\stdio.obj"
- -@erase "$(INTDIR)\stdtime.obj"
- -@erase "$(INTDIR)\strerror.obj"
- -@erase "$(INTDIR)\string.obj"
- -@erase "$(INTDIR)\symtab.obj"
- -@erase "$(INTDIR)\syslog.obj"
- -@erase "$(INTDIR)\task.obj"
- -@erase "$(INTDIR)\taskpool.obj"
- -@erase "$(INTDIR)\thread.obj"
- -@erase "$(INTDIR)\time.obj"
- -@erase "$(INTDIR)\timer.obj"
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(INTDIR)\version.obj"
- -@erase "$(INTDIR)\win32os.obj"
- -@erase "$(OUTDIR)\libisc.exp"
- -@erase "$(OUTDIR)\libisc.lib"
- -@erase "..\..\..\Build\Release\libisc.dll"
- -@$(_VC_MANIFEST_CLEAN)
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "include" /I "../include" /I "../../../lib/isc/noatomic/include" /I "win32" /I "../../isccfg/include" /I "../../../../libxml2-2.7.3/include" /D "BIND9" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /Fp"$(INTDIR)\libisc.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\libisc.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib $(LIBXML) /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libisc.pdb" /machine:I386 /def:".\libisc.def" /out:"../../../Build/Release/libisc.dll" /implib:"$(OUTDIR)\libisc.lib"
-DEF_FILE= \
- ".\libisc.def"
-LINK32_OBJS= \
- "$(INTDIR)\app.obj" \
- "$(INTDIR)\condition.obj" \
- "$(INTDIR)\dir.obj" \
- "$(INTDIR)\DLLMain.obj" \
- "$(INTDIR)\entropy.obj" \
- "$(INTDIR)\errno2result.obj" \
- "$(INTDIR)\file.obj" \
- "$(INTDIR)\fsaccess.obj" \
- "$(INTDIR)\interfaceiter.obj" \
- "$(INTDIR)\ipv6.obj" \
- "$(INTDIR)\iterated_hash.obj" \
- "$(INTDIR)\keyboard.obj" \
- "$(INTDIR)\net.obj" \
- "$(INTDIR)\ntpaths.obj" \
- "$(INTDIR)\once.obj" \
- "$(INTDIR)\os.obj" \
- "$(INTDIR)\resource.obj" \
- "$(INTDIR)\socket.obj" \
- "$(INTDIR)\stdio.obj" \
- "$(INTDIR)\stdtime.obj" \
- "$(INTDIR)\strerror.obj" \
- "$(INTDIR)\syslog.obj" \
- "$(INTDIR)\thread.obj" \
- "$(INTDIR)\time.obj" \
- "$(INTDIR)\version.obj" \
- "$(INTDIR)\win32os.obj" \
- "$(INTDIR)\assertions.obj" \
- "$(INTDIR)\backtrace.obj" \
- "$(INTDIR)\backtrace-emptytbl.obj" \
- "$(INTDIR)\base32.obj" \
- "$(INTDIR)\base64.obj" \
- "$(INTDIR)\bitstring.obj" \
- "$(INTDIR)\buffer.obj" \
- "$(INTDIR)\bufferlist.obj" \
- "$(INTDIR)\commandline.obj" \
- "$(INTDIR)\error.obj" \
- "$(INTDIR)\event.obj" \
- "$(INTDIR)\hash.obj" \
- "$(INTDIR)\heap.obj" \
- "$(INTDIR)\hex.obj" \
- "$(INTDIR)\hmacmd5.obj" \
- "$(INTDIR)\hmacsha.obj" \
- "$(INTDIR)\httpd.obj" \
- "$(INTDIR)\inet_aton.obj" \
- "$(INTDIR)\inet_ntop.obj" \
- "$(INTDIR)\inet_pton.obj" \
- "$(INTDIR)\lex.obj" \
- "$(INTDIR)\lfsr.obj" \
- "$(INTDIR)\lib.obj" \
- "$(INTDIR)\log.obj" \
- "$(INTDIR)\md5.obj" \
- "$(INTDIR)\mem.obj" \
- "$(INTDIR)\msgcat.obj" \
- "$(INTDIR)\mutexblock.obj" \
- "$(INTDIR)\netaddr.obj" \
- "$(INTDIR)\netscope.obj" \
- "$(INTDIR)\ondestroy.obj" \
- "$(INTDIR)\quota.obj" \
- "$(INTDIR)\radix.obj" \
- "$(INTDIR)\random.obj" \
- "$(INTDIR)\ratelimiter.obj" \
- "$(INTDIR)\refcount.obj" \
- "$(INTDIR)\result.obj" \
- "$(INTDIR)\rwlock.obj" \
- "$(INTDIR)\serial.obj" \
- "$(INTDIR)\sha1.obj" \
- "$(INTDIR)\sha2.obj" \
- "$(INTDIR)\sockaddr.obj" \
- "$(INTDIR)\stats.obj" \
- "$(INTDIR)\string.obj" \
- "$(INTDIR)\symtab.obj" \
- "$(INTDIR)\task.obj" \
- "$(INTDIR)\taskpool.obj" \
- "$(INTDIR)\timer.obj" \
- "$(INTDIR)\parseint.obj" \
- "$(INTDIR)\portset.obj" \
- "$(INTDIR)\region.obj"
-
-"..\..\..\Build\Release\libisc.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
- $(_VC_MANIFEST_EMBED_DLL)
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-OUTDIR=.\Debug
-INTDIR=.\Debug
-# Begin Custom Macros
-OutDir=.\Debug
-# End Custom Macros
-
-ALL : "..\..\..\Build\Debug\libisc.dll" "$(OUTDIR)\libisc.bsc"
-
-
-CLEAN :
- -@erase "$(INTDIR)\app.obj"
- -@erase "$(INTDIR)\app.sbr"
- -@erase "$(INTDIR)\assertions.obj"
- -@erase "$(INTDIR)\assertions.sbr"
- -@erase "$(INTDIR)\backtrace.obj"
- -@erase "$(INTDIR)\backtrace-emptytbl.obj"
- -@erase "$(INTDIR)\backtrace.sbr"
- -@erase "$(INTDIR)\backtrace-emptytbl.sbr"
- -@erase "$(INTDIR)\base32.obj"
- -@erase "$(INTDIR)\base32.sbr"
- -@erase "$(INTDIR)\base64.obj"
- -@erase "$(INTDIR)\base64.sbr"
- -@erase "$(INTDIR)\bitstring.obj"
- -@erase "$(INTDIR)\bitstring.sbr"
- -@erase "$(INTDIR)\buffer.obj"
- -@erase "$(INTDIR)\buffer.sbr"
- -@erase "$(INTDIR)\bufferlist.obj"
- -@erase "$(INTDIR)\bufferlist.sbr"
- -@erase "$(INTDIR)\commandline.obj"
- -@erase "$(INTDIR)\commandline.sbr"
- -@erase "$(INTDIR)\condition.obj"
- -@erase "$(INTDIR)\condition.sbr"
- -@erase "$(INTDIR)\dir.obj"
- -@erase "$(INTDIR)\dir.sbr"
- -@erase "$(INTDIR)\DLLMain.obj"
- -@erase "$(INTDIR)\DLLMain.sbr"
- -@erase "$(INTDIR)\entropy.obj"
- -@erase "$(INTDIR)\entropy.sbr"
- -@erase "$(INTDIR)\errno2result.obj"
- -@erase "$(INTDIR)\errno2result.sbr"
- -@erase "$(INTDIR)\error.obj"
- -@erase "$(INTDIR)\error.sbr"
- -@erase "$(INTDIR)\event.obj"
- -@erase "$(INTDIR)\event.sbr"
- -@erase "$(INTDIR)\file.obj"
- -@erase "$(INTDIR)\file.sbr"
- -@erase "$(INTDIR)\fsaccess.obj"
- -@erase "$(INTDIR)\fsaccess.sbr"
- -@erase "$(INTDIR)\hash.obj"
- -@erase "$(INTDIR)\hash.sbr"
- -@erase "$(INTDIR)\heap.obj"
- -@erase "$(INTDIR)\heap.sbr"
- -@erase "$(INTDIR)\hex.obj"
- -@erase "$(INTDIR)\hex.sbr"
- -@erase "$(INTDIR)\hmacmd5.obj"
- -@erase "$(INTDIR)\hmacmd5.sbr"
- -@erase "$(INTDIR)\hmacsha.obj"
- -@erase "$(INTDIR)\hmacsha.sbr"
- -@erase "$(INTDIR)\httpd.obj"
- -@erase "$(INTDIR)\httpd.sbr"
- -@erase "$(INTDIR)\inet_aton.obj"
- -@erase "$(INTDIR)\inet_aton.sbr"
- -@erase "$(INTDIR)\inet_ntop.obj"
- -@erase "$(INTDIR)\inet_ntop.sbr"
- -@erase "$(INTDIR)\inet_pton.obj"
- -@erase "$(INTDIR)\inet_pton.sbr"
- -@erase "$(INTDIR)\interfaceiter.obj"
- -@erase "$(INTDIR)\interfaceiter.sbr"
- -@erase "$(INTDIR)\ipv6.obj"
- -@erase "$(INTDIR)\ipv6.sbr"
- -@erase "$(INTDIR)\iterated_hash.obj"
- -@erase "$(INTDIR)\iterated_hash.sbr"
- -@erase "$(INTDIR)\keyboard.obj"
- -@erase "$(INTDIR)\keyboard.sbr"
- -@erase "$(INTDIR)\lex.obj"
- -@erase "$(INTDIR)\lex.sbr"
- -@erase "$(INTDIR)\lfsr.obj"
- -@erase "$(INTDIR)\lfsr.sbr"
- -@erase "$(INTDIR)\lib.obj"
- -@erase "$(INTDIR)\lib.sbr"
- -@erase "$(INTDIR)\log.obj"
- -@erase "$(INTDIR)\log.sbr"
- -@erase "$(INTDIR)\md5.obj"
- -@erase "$(INTDIR)\md5.sbr"
- -@erase "$(INTDIR)\mem.obj"
- -@erase "$(INTDIR)\mem.sbr"
- -@erase "$(INTDIR)\msgcat.obj"
- -@erase "$(INTDIR)\msgcat.sbr"
- -@erase "$(INTDIR)\mutexblock.obj"
- -@erase "$(INTDIR)\mutexblock.sbr"
- -@erase "$(INTDIR)\net.obj"
- -@erase "$(INTDIR)\net.sbr"
- -@erase "$(INTDIR)\netaddr.obj"
- -@erase "$(INTDIR)\netaddr.sbr"
- -@erase "$(INTDIR)\netscope.obj"
- -@erase "$(INTDIR)\netscope.sbr"
- -@erase "$(INTDIR)\ntpaths.obj"
- -@erase "$(INTDIR)\ntpaths.sbr"
- -@erase "$(INTDIR)\once.obj"
- -@erase "$(INTDIR)\once.sbr"
- -@erase "$(INTDIR)\ondestroy.obj"
- -@erase "$(INTDIR)\ondestroy.sbr"
- -@erase "$(INTDIR)\os.obj"
- -@erase "$(INTDIR)\os.sbr"
- -@erase "$(INTDIR)\parseint.obj"
- -@erase "$(INTDIR)\parseint.sbr"
- -@erase "$(INTDIR)\portset.obj"
- -@erase "$(INTDIR)\portset.sbr"
- -@erase "$(INTDIR)\quota.obj"
- -@erase "$(INTDIR)\quota.sbr"
- -@erase "$(INTDIR)\radix.obj"
- -@erase "$(INTDIR)\radix.sbr"
- -@erase "$(INTDIR)\random.obj"
- -@erase "$(INTDIR)\random.sbr"
- -@erase "$(INTDIR)\ratelimiter.obj"
- -@erase "$(INTDIR)\ratelimiter.sbr"
- -@erase "$(INTDIR)\refcount.obj"
- -@erase "$(INTDIR)\refcount.sbr"
- -@erase "$(INTDIR)\region.obj"
- -@erase "$(INTDIR)\region.sbr"
- -@erase "$(INTDIR)\resource.obj"
- -@erase "$(INTDIR)\resource.sbr"
- -@erase "$(INTDIR)\result.obj"
- -@erase "$(INTDIR)\result.sbr"
- -@erase "$(INTDIR)\rwlock.obj"
- -@erase "$(INTDIR)\rwlock.sbr"
- -@erase "$(INTDIR)\serial.obj"
- -@erase "$(INTDIR)\serial.sbr"
- -@erase "$(INTDIR)\sha1.obj"
- -@erase "$(INTDIR)\sha1.sbr"
- -@erase "$(INTDIR)\sha2.obj"
- -@erase "$(INTDIR)\sha2.sbr"
- -@erase "$(INTDIR)\sockaddr.obj"
- -@erase "$(INTDIR)\sockaddr.sbr"
- -@erase "$(INTDIR)\socket.obj"
- -@erase "$(INTDIR)\socket.sbr"
- -@erase "$(INTDIR)\stats.obj"
- -@erase "$(INTDIR)\stats.sbr"
- -@erase "$(INTDIR)\stdio.obj"
- -@erase "$(INTDIR)\stdio.sbr"
- -@erase "$(INTDIR)\stdtime.obj"
- -@erase "$(INTDIR)\stdtime.sbr"
- -@erase "$(INTDIR)\strerror.obj"
- -@erase "$(INTDIR)\strerror.sbr"
- -@erase "$(INTDIR)\string.obj"
- -@erase "$(INTDIR)\string.sbr"
- -@erase "$(INTDIR)\symtab.obj"
- -@erase "$(INTDIR)\symtab.sbr"
- -@erase "$(INTDIR)\syslog.obj"
- -@erase "$(INTDIR)\syslog.sbr"
- -@erase "$(INTDIR)\task.obj"
- -@erase "$(INTDIR)\task.sbr"
- -@erase "$(INTDIR)\taskpool.obj"
- -@erase "$(INTDIR)\taskpool.sbr"
- -@erase "$(INTDIR)\thread.obj"
- -@erase "$(INTDIR)\thread.sbr"
- -@erase "$(INTDIR)\time.obj"
- -@erase "$(INTDIR)\time.sbr"
- -@erase "$(INTDIR)\timer.obj"
- -@erase "$(INTDIR)\timer.sbr"
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(INTDIR)\vc60.pdb"
- -@erase "$(INTDIR)\version.obj"
- -@erase "$(INTDIR)\version.sbr"
- -@erase "$(INTDIR)\win32os.obj"
- -@erase "$(INTDIR)\win32os.sbr"
- -@erase "$(OUTDIR)\libisc.bsc"
- -@erase "$(OUTDIR)\libisc.exp"
- -@erase "$(OUTDIR)\libisc.lib"
- -@erase "$(OUTDIR)\libisc.map"
- -@erase "$(OUTDIR)\libisc.pdb"
- -@erase "..\..\..\Build\Debug\libisc.dll"
- -@erase "..\..\..\Build\Debug\libisc.ilk"
- -@$(_VC_MANIFEST_CLEAN)
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../../lib/isc/noatomic/include" /I "win32" /I "../../isccfg/include" /I "../../../../libxml2-2.7.3/include" /D "BIND9" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libisc.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\libisc.bsc"
-BSC32_SBRS= \
- "$(INTDIR)\app.sbr" \
- "$(INTDIR)\condition.sbr" \
- "$(INTDIR)\dir.sbr" \
- "$(INTDIR)\DLLMain.sbr" \
- "$(INTDIR)\entropy.sbr" \
- "$(INTDIR)\errno2result.sbr" \
- "$(INTDIR)\file.sbr" \
- "$(INTDIR)\fsaccess.sbr" \
- "$(INTDIR)\interfaceiter.sbr" \
- "$(INTDIR)\ipv6.sbr" \
- "$(INTDIR)\iterated_hash.sbr" \
- "$(INTDIR)\keyboard.sbr" \
- "$(INTDIR)\net.sbr" \
- "$(INTDIR)\ntpaths.sbr" \
- "$(INTDIR)\once.sbr" \
- "$(INTDIR)\os.sbr" \
- "$(INTDIR)\resource.sbr" \
- "$(INTDIR)\socket.sbr" \
- "$(INTDIR)\stdio.sbr" \
- "$(INTDIR)\stdtime.sbr" \
- "$(INTDIR)\strerror.sbr" \
- "$(INTDIR)\syslog.sbr" \
- "$(INTDIR)\thread.sbr" \
- "$(INTDIR)\time.sbr" \
- "$(INTDIR)\version.sbr" \
- "$(INTDIR)\win32os.sbr" \
- "$(INTDIR)\assertions.sbr" \
- "$(INTDIR)\backtrace.sbr" \
- "$(INTDIR)\backtrace-emptytbl.sbr" \
- "$(INTDIR)\base32.sbr" \
- "$(INTDIR)\base64.sbr" \
- "$(INTDIR)\bitstring.sbr" \
- "$(INTDIR)\buffer.sbr" \
- "$(INTDIR)\bufferlist.sbr" \
- "$(INTDIR)\commandline.sbr" \
- "$(INTDIR)\error.sbr" \
- "$(INTDIR)\event.sbr" \
- "$(INTDIR)\hash.sbr" \
- "$(INTDIR)\heap.sbr" \
- "$(INTDIR)\hex.sbr" \
- "$(INTDIR)\hmacmd5.sbr" \
- "$(INTDIR)\hmacsha.sbr" \
- "$(INTDIR)\httpd.sbr" \
- "$(INTDIR)\inet_aton.sbr" \
- "$(INTDIR)\inet_ntop.sbr" \
- "$(INTDIR)\inet_pton.sbr" \
- "$(INTDIR)\lex.sbr" \
- "$(INTDIR)\lfsr.sbr" \
- "$(INTDIR)\lib.sbr" \
- "$(INTDIR)\log.sbr" \
- "$(INTDIR)\md5.sbr" \
- "$(INTDIR)\mem.sbr" \
- "$(INTDIR)\msgcat.sbr" \
- "$(INTDIR)\mutexblock.sbr" \
- "$(INTDIR)\netaddr.sbr" \
- "$(INTDIR)\netscope.sbr" \
- "$(INTDIR)\ondestroy.sbr" \
- "$(INTDIR)\quota.sbr" \
- "$(INTDIR)\radix.sbr" \
- "$(INTDIR)\random.sbr" \
- "$(INTDIR)\ratelimiter.sbr" \
- "$(INTDIR)\refcount.sbr" \
- "$(INTDIR)\result.sbr" \
- "$(INTDIR)\rwlock.sbr" \
- "$(INTDIR)\serial.sbr" \
- "$(INTDIR)\sha1.sbr" \
- "$(INTDIR)\sha2.sbr" \
- "$(INTDIR)\sockaddr.sbr" \
- "$(INTDIR)\stats.sbr" \
- "$(INTDIR)\string.sbr" \
- "$(INTDIR)\symtab.sbr" \
- "$(INTDIR)\task.sbr" \
- "$(INTDIR)\taskpool.sbr" \
- "$(INTDIR)\timer.sbr" \
- "$(INTDIR)\parseint.sbr" \
- "$(INTDIR)\portset.sbr" \
- "$(INTDIR)\region.sbr"
-
-"$(OUTDIR)\libisc.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
- $(BSC32) @<<
- $(BSC32_FLAGS) $(BSC32_SBRS)
-<<
-
-LINK32=link.exe
-LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib $(LIBXML) /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libisc.pdb" /map:"$(INTDIR)\libisc.map" /debug /machine:I386 /def:".\libisc.def" /out:"../../../Build/Debug/libisc.dll" /implib:"$(OUTDIR)\libisc.lib" /pdbtype:sept
-DEF_FILE= \
- ".\libisc.def"
-LINK32_OBJS= \
- "$(INTDIR)\app.obj" \
- "$(INTDIR)\condition.obj" \
- "$(INTDIR)\dir.obj" \
- "$(INTDIR)\DLLMain.obj" \
- "$(INTDIR)\entropy.obj" \
- "$(INTDIR)\errno2result.obj" \
- "$(INTDIR)\file.obj" \
- "$(INTDIR)\fsaccess.obj" \
- "$(INTDIR)\interfaceiter.obj" \
- "$(INTDIR)\ipv6.obj" \
- "$(INTDIR)\iterated_hash.obj" \
- "$(INTDIR)\keyboard.obj" \
- "$(INTDIR)\net.obj" \
- "$(INTDIR)\ntpaths.obj" \
- "$(INTDIR)\once.obj" \
- "$(INTDIR)\os.obj" \
- "$(INTDIR)\resource.obj" \
- "$(INTDIR)\socket.obj" \
- "$(INTDIR)\stdio.obj" \
- "$(INTDIR)\stdtime.obj" \
- "$(INTDIR)\strerror.obj" \
- "$(INTDIR)\syslog.obj" \
- "$(INTDIR)\thread.obj" \
- "$(INTDIR)\time.obj" \
- "$(INTDIR)\version.obj" \
- "$(INTDIR)\win32os.obj" \
- "$(INTDIR)\assertions.obj" \
- "$(INTDIR)\backtrace.obj" \
- "$(INTDIR)\backtrace-emptytbl.obj" \
- "$(INTDIR)\base32.obj" \
- "$(INTDIR)\base64.obj" \
- "$(INTDIR)\bitstring.obj" \
- "$(INTDIR)\buffer.obj" \
- "$(INTDIR)\bufferlist.obj" \
- "$(INTDIR)\commandline.obj" \
- "$(INTDIR)\error.obj" \
- "$(INTDIR)\event.obj" \
- "$(INTDIR)\hash.obj" \
- "$(INTDIR)\heap.obj" \
- "$(INTDIR)\hex.obj" \
- "$(INTDIR)\hmacmd5.obj" \
- "$(INTDIR)\hmacsha.obj" \
- "$(INTDIR)\httpd.obj" \
- "$(INTDIR)\inet_aton.obj" \
- "$(INTDIR)\inet_ntop.obj" \
- "$(INTDIR)\inet_pton.obj" \
- "$(INTDIR)\lex.obj" \
- "$(INTDIR)\lfsr.obj" \
- "$(INTDIR)\lib.obj" \
- "$(INTDIR)\log.obj" \
- "$(INTDIR)\md5.obj" \
- "$(INTDIR)\mem.obj" \
- "$(INTDIR)\msgcat.obj" \
- "$(INTDIR)\mutexblock.obj" \
- "$(INTDIR)\netaddr.obj" \
- "$(INTDIR)\netscope.obj" \
- "$(INTDIR)\ondestroy.obj" \
- "$(INTDIR)\quota.obj" \
- "$(INTDIR)\radix.obj" \
- "$(INTDIR)\random.obj" \
- "$(INTDIR)\ratelimiter.obj" \
- "$(INTDIR)\refcount.obj" \
- "$(INTDIR)\result.obj" \
- "$(INTDIR)\rwlock.obj" \
- "$(INTDIR)\serial.obj" \
- "$(INTDIR)\sha1.obj" \
- "$(INTDIR)\sha2.obj" \
- "$(INTDIR)\sockaddr.obj" \
- "$(INTDIR)\stats.obj" \
- "$(INTDIR)\string.obj" \
- "$(INTDIR)\symtab.obj" \
- "$(INTDIR)\task.obj" \
- "$(INTDIR)\taskpool.obj" \
- "$(INTDIR)\timer.obj" \
- "$(INTDIR)\parseint.obj" \
- "$(INTDIR)\portset.obj" \
- "$(INTDIR)\region.obj"
-
-"..\..\..\Build\Debug\libisc.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
- $(_VC_MANIFEST_EMBED_DLL)
-
-!ENDIF
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("libisc.dep")
-!INCLUDE "libisc.dep"
-!ELSE
-!MESSAGE Warning: cannot find "libisc.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "libisc - Win32 Release" || "$(CFG)" == "libisc - Win32 Debug"
-SOURCE=.\app.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\app.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\app.obj" "$(INTDIR)\app.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\condition.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\condition.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\condition.obj" "$(INTDIR)\condition.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\dir.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\dir.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\dir.obj" "$(INTDIR)\dir.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\DLLMain.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\DLLMain.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\DLLMain.obj" "$(INTDIR)\DLLMain.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\entropy.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\entropy.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\entropy.obj" "$(INTDIR)\entropy.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\errno2result.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\errno2result.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\errno2result.obj" "$(INTDIR)\errno2result.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\file.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\file.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\file.obj" "$(INTDIR)\file.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\fsaccess.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\fsaccess.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\fsaccess.obj" "$(INTDIR)\fsaccess.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\interfaceiter.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\interfaceiter.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\interfaceiter.obj" "$(INTDIR)\interfaceiter.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\ipv6.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\ipv6.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\ipv6.obj" "$(INTDIR)\ipv6.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-
-SOURCE=.\keyboard.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\keyboard.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\keyboard.obj" "$(INTDIR)\keyboard.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\net.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\net.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\net.obj" "$(INTDIR)\net.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\ntpaths.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\ntpaths.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\ntpaths.obj" "$(INTDIR)\ntpaths.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\once.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\once.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\once.obj" "$(INTDIR)\once.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\os.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\os.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\os.obj" "$(INTDIR)\os.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\resource.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\resource.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\resource.obj" "$(INTDIR)\resource.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\socket.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\socket.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\socket.obj" "$(INTDIR)\socket.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\stdio.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\stdio.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\stdio.obj" "$(INTDIR)\stdio.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\stdtime.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\stdtime.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\stdtime.obj" "$(INTDIR)\stdtime.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\strerror.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\strerror.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\strerror.obj" "$(INTDIR)\strerror.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\syslog.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\syslog.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\syslog.obj" "$(INTDIR)\syslog.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\thread.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\thread.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\thread.obj" "$(INTDIR)\thread.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\time.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\time.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\time.obj" "$(INTDIR)\time.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\version.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\version.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\version.obj" "$(INTDIR)\version.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=.\win32os.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\win32os.obj" : $(SOURCE) "$(INTDIR)"
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\win32os.obj" "$(INTDIR)\win32os.sbr" : $(SOURCE) "$(INTDIR)"
-
-
-!ENDIF
-
-SOURCE=..\assertions.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\assertions.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\assertions.obj" "$(INTDIR)\assertions.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\backtrace.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\backtrace.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\backtrace.obj" "$(INTDIR)\backtrace.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\backtrace-emptytbl.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\backtrace-emptytbl.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\backtrace-emptytbl.obj" "$(INTDIR)\backtrace-emptytbl.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\base32.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\base32.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\base32.obj" "$(INTDIR)\base32.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\base64.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\base64.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\base64.obj" "$(INTDIR)\base64.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\bitstring.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\bitstring.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\bitstring.obj" "$(INTDIR)\bitstring.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\buffer.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\buffer.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\buffer.obj" "$(INTDIR)\buffer.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\bufferlist.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\bufferlist.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\bufferlist.obj" "$(INTDIR)\bufferlist.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\commandline.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\commandline.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\commandline.obj" "$(INTDIR)\commandline.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\error.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\error.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\error.obj" "$(INTDIR)\error.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\event.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\event.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\event.obj" "$(INTDIR)\event.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\hash.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\hash.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\hash.obj" "$(INTDIR)\hash.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\heap.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\heap.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\heap.obj" "$(INTDIR)\heap.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\hex.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\hex.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\hex.obj" "$(INTDIR)\hex.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\hmacmd5.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\hmacmd5.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\hmacmd5.obj" "$(INTDIR)\hmacmd5.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\hmacsha.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\hmacsha.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\hmacsha.obj" "$(INTDIR)\hmacsha.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\httpd.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\httpd.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\httpd.obj" "$(INTDIR)\httpd.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\inet_aton.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\inet_aton.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\inet_aton.obj" "$(INTDIR)\inet_aton.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\inet_ntop.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\inet_ntop.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\inet_ntop.obj" "$(INTDIR)\inet_ntop.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\inet_pton.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\inet_pton.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\inet_pton.obj" "$(INTDIR)\inet_pton.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\iterated_hash.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\iterated_hash.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\iterated_hash.obj" "$(INTDIR)\iterated_hash.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\lex.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\lex.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\lex.obj" "$(INTDIR)\lex.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\lfsr.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\lfsr.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\lfsr.obj" "$(INTDIR)\lfsr.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\lib.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\lib.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\lib.obj" "$(INTDIR)\lib.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\log.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\log.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\log.obj" "$(INTDIR)\log.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\md5.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\md5.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\md5.obj" "$(INTDIR)\md5.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\mem.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\mem.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\mem.obj" "$(INTDIR)\mem.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\nls\msgcat.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\msgcat.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\msgcat.obj" "$(INTDIR)\msgcat.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\mutexblock.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\mutexblock.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\mutexblock.obj" "$(INTDIR)\mutexblock.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\netaddr.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\netaddr.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\netaddr.obj" "$(INTDIR)\netaddr.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\netscope.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\netscope.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\netscope.obj" "$(INTDIR)\netscope.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\ondestroy.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\ondestroy.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\ondestroy.obj" "$(INTDIR)\ondestroy.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\parseint.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\parseint.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\parseint.obj" "$(INTDIR)\parseint.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\portset.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\portset.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\portset.obj" "$(INTDIR)\portset.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\quota.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\quota.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\quota.obj" "$(INTDIR)\quota.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\radix.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\radix.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\radix.obj" "$(INTDIR)\radix.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\random.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\random.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\random.obj" "$(INTDIR)\random.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\ratelimiter.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\ratelimiter.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\ratelimiter.obj" "$(INTDIR)\ratelimiter.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\refcount.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\refcount.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\refcount.obj" "$(INTDIR)\refcount.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\region.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\region.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\region.obj" "$(INTDIR)\region.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\result.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\result.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\result.obj" "$(INTDIR)\result.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\rwlock.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\rwlock.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\rwlock.obj" "$(INTDIR)\rwlock.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\serial.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\serial.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\serial.obj" "$(INTDIR)\serial.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\sha1.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\sha1.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\sha1.obj" "$(INTDIR)\sha1.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\sha2.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\sha2.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\sha2.obj" "$(INTDIR)\sha2.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\sockaddr.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\sockaddr.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\sockaddr.obj" "$(INTDIR)\sockaddr.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\stats.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\stats.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\stats.obj" "$(INTDIR)\stats.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\string.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\string.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\string.obj" "$(INTDIR)\string.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\symtab.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\symtab.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\symtab.obj" "$(INTDIR)\symtab.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\task.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\task.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\task.obj" "$(INTDIR)\task.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\taskpool.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\taskpool.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\taskpool.obj" "$(INTDIR)\taskpool.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-SOURCE=..\timer.c
-
-!IF "$(CFG)" == "libisc - Win32 Release"
-
-
-"$(INTDIR)\timer.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
-
-
-"$(INTDIR)\timer.obj" "$(INTDIR)\timer.sbr" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-!ENDIF
-
-
-!ENDIF
-
-####################################################
-# Commands to generate initial empty manifest file and the RC file
-# that references it, and for generating the .res file:
-
-$(_VC_MANIFEST_BASENAME).auto.res : $(_VC_MANIFEST_BASENAME).auto.rc
-
-$(_VC_MANIFEST_BASENAME).auto.rc : $(_VC_MANIFEST_BASENAME).auto.manifest
- type <<$@
-#include <winuser.h>
-1RT_MANIFEST"$(_VC_MANIFEST_BASENAME).auto.manifest"
-<< KEEP
-
-$(_VC_MANIFEST_BASENAME).auto.manifest :
- type <<$@
-<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
-</assembly>
-<< KEEP
diff --git a/contrib/ntp/lib/isc/win32/netdb.h b/contrib/ntp/lib/isc/win32/netdb.h
deleted file mode 100644
index f8d936a99f35..000000000000
--- a/contrib/ntp/lib/isc/win32/netdb.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (C) 2004, 2006, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: netdb.h,v 1.9 2009/01/18 23:48:14 tbox Exp $ */
-
-#ifndef NETDB_H
-#define NETDB_H 1
-
-#include <stddef.h>
-#include <winsock2.h>
-
-/*
- * Define if <netdb.h> does not declare struct addrinfo.
- */
-
-struct addrinfo {
- int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
- int ai_family; /* PF_xxx */
- int ai_socktype; /* SOCK_xxx */
- int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
- size_t ai_addrlen; /* Length of ai_addr */
- char *ai_canonname; /* Canonical name for hostname */
- struct sockaddr *ai_addr; /* Binary address */
- struct addrinfo *ai_next; /* Next structure in linked list */
-};
-
-
-/*
- * Undefine all \#defines we are interested in as <netdb.h> may or may not have
- * defined them.
- */
-
-/*
- * Error return codes from gethostbyname() and gethostbyaddr()
- * (left in extern int h_errno).
- */
-
-#undef NETDB_INTERNAL
-#undef NETDB_SUCCESS
-#undef HOST_NOT_FOUND
-#undef TRY_AGAIN
-#undef NO_RECOVERY
-#undef NO_DATA
-#undef NO_ADDRESS
-
-#define NETDB_INTERNAL -1 /* see errno */
-#define NETDB_SUCCESS 0 /* no problem */
-#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
-#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
-#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
-#define NO_DATA 4 /* Valid name, no data record of requested type */
-#define NO_ADDRESS NO_DATA /* no address, look for MX record */
-
-/*
- * Error return codes from getaddrinfo()
- */
-
-#undef EAI_ADDRFAMILY
-#undef EAI_AGAIN
-#undef EAI_BADFLAGS
-#undef EAI_FAIL
-#undef EAI_FAMILY
-#undef EAI_MEMORY
-#undef EAI_NODATA
-#undef EAI_NONAME
-#undef EAI_SERVICE
-#undef EAI_SOCKTYPE
-#undef EAI_SYSTEM
-#undef EAI_BADHINTS
-#undef EAI_PROTOCOL
-#undef EAI_MAX
-
-#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
-#define EAI_AGAIN 2 /* temporary failure in name resolution */
-#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
-#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
-#define EAI_FAMILY 5 /* ai_family not supported */
-#define EAI_MEMORY 6 /* memory allocation failure */
-#define EAI_NODATA 7 /* no address associated with hostname */
-#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
-#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
-#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
-#define EAI_SYSTEM 11 /* system error returned in errno */
-#define EAI_BADHINTS 12
-#define EAI_PROTOCOL 13
-#define EAI_MAX 14
-
-/*
- * Flag values for getaddrinfo()
- */
-#undef AI_PASSIVE
-#undef AI_CANONNAME
-#undef AI_NUMERICHOST
-
-#define AI_PASSIVE 0x00000001
-#define AI_CANONNAME 0x00000002
-#define AI_NUMERICHOST 0x00000004
-
-/*
- * Flag values for getipnodebyname()
- */
-#undef AI_V4MAPPED
-#undef AI_ALL
-#undef AI_ADDRCONFIG
-#undef AI_DEFAULT
-
-#define AI_V4MAPPED 0x00000008
-#define AI_ALL 0x00000010
-#define AI_ADDRCONFIG 0x00000020
-#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG)
-
-/*
- * Constants for getnameinfo()
- */
-#undef NI_MAXHOST
-#undef NI_MAXSERV
-
-#define NI_MAXHOST 1025
-#define NI_MAXSERV 32
-
-/*
- * Flag values for getnameinfo()
- */
-#undef NI_NOFQDN
-#undef NI_NUMERICHOST
-#undef NI_NAMEREQD
-#undef NI_NUMERICSERV
-#undef NI_DGRAM
-#undef NI_NUMERICSCOPE
-
-#define NI_NOFQDN 0x00000001
-#define NI_NUMERICHOST 0x00000002
-#define NI_NAMEREQD 0x00000004
-#define NI_NUMERICSERV 0x00000008
-#define NI_DGRAM 0x00000010
-#define NI_NUMERICSCOPE 0x00000020 /*2553bis-00*/
-
-/*
- * Structures for getrrsetbyname()
- */
-struct rdatainfo {
- unsigned int rdi_length;
- unsigned char *rdi_data;
-};
-
-struct rrsetinfo {
- unsigned int rri_flags;
- int rri_rdclass;
- int rri_rdtype;
- unsigned int rri_ttl;
- unsigned int rri_nrdatas;
- unsigned int rri_nsigs;
- char *rri_name;
- struct rdatainfo *rri_rdatas;
- struct rdatainfo *rri_sigs;
-};
-
-/*
- * Flags for getrrsetbyname()
- */
-#define RRSET_VALIDATED 0x00000001
- /* Set was dnssec validated */
-
-/*
- * Return codes for getrrsetbyname()
- */
-#define ERRSET_SUCCESS 0
-#define ERRSET_NOMEMORY 1
-#define ERRSET_FAIL 2
-#define ERRSET_INVAL 3
-
-
-#endif /* NETDB_H */
diff --git a/contrib/ntp/lib/isc/win32/ntgroups.c b/contrib/ntp/lib/isc/win32/ntgroups.c
deleted file mode 100644
index 729cf07e74f0..000000000000
--- a/contrib/ntp/lib/isc/win32/ntgroups.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (C) 2004, 2006, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ntgroups.c,v 1.12 2009/09/29 23:48:04 tbox Exp $ */
-
-/*
- * The NT Groups have two groups that are not well documented and are
- * not normally seen: None and Everyone. A user account belongs to
- * any number of groups, but if it is not a member of any group then
- * it is a member of the None Group. The None group is not listed
- * anywhere. You cannot remove an account from the none group except
- * by making it a member of some other group, The second group is the
- * Everyone group. All accounts, no matter how many groups that they
- * belong to, also belong to the Everyone group. You cannot remove an
- * account from the Everyone group.
- */
-
-#ifndef UNICODE
-#define UNICODE
-#endif /* UNICODE */
-
-/*
- * Silence warnings.
- */
-#define _CRT_SECURE_NO_DEPRECATE 1
-
-#include <windows.h>
-#include <assert.h>
-#include <lm.h>
-
-#include <isc/ntgroups.h>
-#include <isc/result.h>
-
-#define MAX_NAME_LENGTH 256
-
-isc_result_t
-isc_ntsecurity_getaccountgroups(char *username, char **GroupList,
- unsigned int maxgroups,
- unsigned int *totalGroups) {
- LPGROUP_USERS_INFO_0 pTmpBuf;
- LPLOCALGROUP_USERS_INFO_0 pTmpLBuf;
- DWORD i;
- LPLOCALGROUP_USERS_INFO_0 pBuf = NULL;
- LPGROUP_USERS_INFO_0 pgrpBuf = NULL;
- DWORD dwLevel = 0;
- DWORD dwFlags = LG_INCLUDE_INDIRECT;
- DWORD dwPrefMaxLen = MAX_PREFERRED_LENGTH;
- DWORD dwEntriesRead = 0;
- DWORD dwTotalEntries = 0;
- NET_API_STATUS nStatus;
- DWORD dwTotalCount = 0;
- size_t retlen;
- wchar_t user[MAX_NAME_LENGTH];
-
- retlen = mbstowcs(user, username, MAX_NAME_LENGTH);
-
- *totalGroups = 0;
- /*
- * Call the NetUserGetLocalGroups function
- * specifying information level 0.
- *
- * The LG_INCLUDE_INDIRECT flag specifies that the
- * function should also return the names of the local
- * groups in which the user is indirectly a member.
- */
- nStatus = NetUserGetLocalGroups(NULL,
- user,
- dwLevel,
- dwFlags,
- (LPBYTE *) &pBuf,
- dwPrefMaxLen,
- &dwEntriesRead,
- &dwTotalEntries);
- /*
- * See if the call succeeds,
- */
- if (nStatus != NERR_Success) {
- if (nStatus == ERROR_ACCESS_DENIED)
- return (ISC_R_NOPERM);
- if (nStatus == ERROR_MORE_DATA)
- return (ISC_R_NOSPACE);
- if (nStatus == NERR_UserNotFound)
- dwEntriesRead = 0;
- }
-
- dwTotalCount = 0;
- if (pBuf != NULL) {
- pTmpLBuf = pBuf;
- /*
- * Loop through the entries
- */
- for (i = 0;
- (i < dwEntriesRead && *totalGroups < maxgroups); i++) {
- assert(pTmpLBuf != NULL);
- if (pTmpLBuf == NULL)
- break;
- retlen = wcslen(pTmpLBuf->lgrui0_name);
- GroupList[*totalGroups] = (char *) malloc(retlen +1);
- if (GroupList[*totalGroups] == NULL)
- return (ISC_R_NOMEMORY);
-
- retlen = wcstombs(GroupList[*totalGroups],
- pTmpLBuf->lgrui0_name, retlen);
- GroupList[*totalGroups][retlen] = '\0';
- if (strcmp(GroupList[*totalGroups], "None") == 0)
- free(GroupList[*totalGroups]);
- else
- (*totalGroups)++;
- pTmpLBuf++;
- }
- }
- /* Free the allocated memory. */
- if (pBuf != NULL)
- NetApiBufferFree(pBuf);
-
-
- /*
- * Call the NetUserGetGroups function, specifying level 0.
- */
- nStatus = NetUserGetGroups(NULL,
- user,
- dwLevel,
- (LPBYTE*)&pgrpBuf,
- dwPrefMaxLen,
- &dwEntriesRead,
- &dwTotalEntries);
- /*
- * See if the call succeeds,
- */
- if (nStatus != NERR_Success) {
- if (nStatus == ERROR_ACCESS_DENIED)
- return (ISC_R_NOPERM);
- if (nStatus == ERROR_MORE_DATA)
- return (ISC_R_NOSPACE);
- if (nStatus == NERR_UserNotFound)
- dwEntriesRead = 0;
- }
-
- if (pgrpBuf != NULL) {
- pTmpBuf = pgrpBuf;
- /*
- * Loop through the entries
- */
- for (i = 0;
- (i < dwEntriesRead && *totalGroups < maxgroups); i++) {
- assert(pTmpBuf != NULL);
-
- if (pTmpBuf == NULL)
- break;
- retlen = wcslen(pTmpBuf->grui0_name);
- GroupList[*totalGroups] = (char *) malloc(retlen +1);
- if (GroupList[*totalGroups] == NULL)
- return (ISC_R_NOMEMORY);
-
- retlen = wcstombs(GroupList[*totalGroups],
- pTmpBuf->grui0_name, retlen);
- GroupList[*totalGroups][retlen] = '\0';
- if (strcmp(GroupList[*totalGroups], "None") == 0)
- free(GroupList[*totalGroups]);
- else
- (*totalGroups)++;
- pTmpBuf++;
- }
- }
- /*
- * Free the allocated memory.
- */
- if (pgrpBuf != NULL)
- NetApiBufferFree(pgrpBuf);
-
- return (ISC_R_SUCCESS);
-}
diff --git a/contrib/ntp/lib/isc/win32/ntpaths.c b/contrib/ntp/lib/isc/win32/ntpaths.c
deleted file mode 100644
index 1ff8c5a9b5c3..000000000000
--- a/contrib/ntp/lib/isc/win32/ntpaths.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: ntpaths.c,v 1.15 2009/07/14 22:54:57 each Exp $ */
-
-/*
- * This module fetches the required path information that is specific
- * to NT systems which can have its configuration and system files
- * almost anywhere. It can be used to override whatever the application
- * had previously assigned to the pointer. Basic information about the
- * file locations are stored in the registry.
- */
-
-#include <config.h>
-#include <isc/bind_registry.h>
-#include <isc/ntpaths.h>
-
-/*
- * Module Variables
- */
-
-static char systemDir[MAX_PATH];
-static char namedBase[MAX_PATH];
-static char ns_confFile[MAX_PATH];
-static char lwresd_confFile[MAX_PATH];
-static char lwresd_resolvconfFile[MAX_PATH];
-static char rndc_confFile[MAX_PATH];
-static char ns_defaultpidfile[MAX_PATH];
-static char lwresd_defaultpidfile[MAX_PATH];
-static char local_state_dir[MAX_PATH];
-static char sys_conf_dir[MAX_PATH];
-static char rndc_keyFile[MAX_PATH];
-static char session_keyFile[MAX_PATH];
-
-static DWORD baseLen = MAX_PATH;
-static BOOL Initialized = FALSE;
-
-void
-isc_ntpaths_init() {
- HKEY hKey;
- BOOL keyFound = TRUE;
-
- memset(namedBase, 0, MAX_PATH);
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, BIND_SUBKEY, 0, KEY_READ, &hKey)
- != ERROR_SUCCESS)
- keyFound = FALSE;
-
- if (keyFound == TRUE) {
- /* Get the named directory */
- if (RegQueryValueEx(hKey, "InstallDir", NULL, NULL,
- (LPBYTE)namedBase, &baseLen) != ERROR_SUCCESS)
- keyFound = FALSE;
- RegCloseKey(hKey);
- }
-
- GetSystemDirectory(systemDir, MAX_PATH);
-
- if (keyFound == FALSE)
- /* Use the System Directory as a default */
- strcpy(namedBase, systemDir);
-
- strcpy(ns_confFile, namedBase);
- strcat(ns_confFile, "\\etc\\named.conf");
-
- strcpy(lwresd_confFile, namedBase);
- strcat(lwresd_confFile, "\\etc\\lwresd.conf");
-
- strcpy(lwresd_resolvconfFile, systemDir);
- strcat(lwresd_resolvconfFile, "\\Drivers\\etc\\resolv.conf");
-
- strcpy(rndc_keyFile, namedBase);
- strcat(rndc_keyFile, "\\etc\\rndc.key");
-
- strcpy(session_keyFile, namedBase);
- strcat(session_keyFile, "\\etc\\session.key");
-
- strcpy(rndc_confFile, namedBase);
- strcat(rndc_confFile, "\\etc\\rndc.conf");
- strcpy(ns_defaultpidfile, namedBase);
- strcat(ns_defaultpidfile, "\\etc\\named.pid");
-
- strcpy(lwresd_defaultpidfile, namedBase);
- strcat(lwresd_defaultpidfile, "\\etc\\lwresd.pid");
-
- strcpy(local_state_dir, namedBase);
- strcat(local_state_dir, "\\bin");
-
- strcpy(sys_conf_dir, namedBase);
- strcat(sys_conf_dir, "\\etc");
-
- Initialized = TRUE;
-}
-
-char *
-isc_ntpaths_get(int ind) {
- if (!Initialized)
- isc_ntpaths_init();
-
- switch (ind) {
- case NAMED_CONF_PATH:
- return (ns_confFile);
- break;
- case LWRES_CONF_PATH:
- return (lwresd_confFile);
- break;
- case RESOLV_CONF_PATH:
- return (lwresd_resolvconfFile);
- break;
- case RNDC_CONF_PATH:
- return (rndc_confFile);
- break;
- case NAMED_PID_PATH:
- return (ns_defaultpidfile);
- break;
- case LWRESD_PID_PATH:
- return (lwresd_defaultpidfile);
- break;
- case LOCAL_STATE_DIR:
- return (local_state_dir);
- break;
- case SYS_CONF_DIR:
- return (sys_conf_dir);
- break;
- case RNDC_KEY_PATH:
- return (rndc_keyFile);
- break;
- case SESSION_KEY_PATH:
- return (session_keyFile);
- break;
- default:
- return (NULL);
- }
-}
diff --git a/contrib/ntp/lib/isc/win32/os.c b/contrib/ntp/lib/isc/win32/os.c
deleted file mode 100644
index bbd5f1d6c190..000000000000
--- a/contrib/ntp/lib/isc/win32/os.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: os.c,v 1.8 2007/06/19 23:47:19 tbox Exp $ */
-
-#include <windows.h>
-
-#include <isc/os.h>
-
-static BOOL bInit = FALSE;
-static SYSTEM_INFO SystemInfo;
-
-static void
-initialize_action(void) {
- if (bInit)
- return;
-
- GetSystemInfo(&SystemInfo);
- bInit = TRUE;
-}
-
-unsigned int
-isc_os_ncpus(void) {
- long ncpus = 1;
- initialize_action();
- ncpus = SystemInfo.dwNumberOfProcessors;
- if (ncpus <= 0)
- ncpus = 1;
-
- return ((unsigned int)ncpus);
-}
diff --git a/contrib/ntp/lib/isc/win32/resource.c b/contrib/ntp/lib/isc/win32/resource.c
deleted file mode 100644
index e7e7cf414646..000000000000
--- a/contrib/ntp/lib/isc/win32/resource.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: resource.c,v 1.10 2008/07/11 23:47:09 tbox Exp $ */
-
-#include <config.h>
-
-#include <stdio.h>
-
-#include <isc/platform.h>
-#include <isc/resource.h>
-#include <isc/result.h>
-#include <isc/util.h>
-
-#include "errno2result.h"
-
-/*
- * Windows limits the maximum number of open files to 2048
- */
-
-#define WIN32_MAX_OPEN_FILES 2048
-
-isc_result_t
-isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
- isc_resourcevalue_t rlim_value;
- int wresult;
-
- if (resource != isc_resource_openfiles)
- return (ISC_R_NOTIMPLEMENTED);
-
-
- if (value == ISC_RESOURCE_UNLIMITED)
- rlim_value = WIN32_MAX_OPEN_FILES;
- else
- rlim_value = min(value, WIN32_MAX_OPEN_FILES);
-
- wresult = _setmaxstdio((int) rlim_value);
-
- if (wresult > 0)
- return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
-}
-
-isc_result_t
-isc_resource_getlimit(isc_resource_t resource, isc_resourcevalue_t *value) {
-
- if (resource != isc_resource_openfiles)
- return (ISC_R_NOTIMPLEMENTED);
-
- *value = WIN32_MAX_OPEN_FILES;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_resource_getcurlimit(isc_resource_t resource, isc_resourcevalue_t *value) {
- return (isc_resource_getlimit(resource, value));
-}
diff --git a/contrib/ntp/lib/isc/win32/socket.c b/contrib/ntp/lib/isc/win32/socket.c
deleted file mode 100644
index ffcefb0606c8..000000000000
--- a/contrib/ntp/lib/isc/win32/socket.c
+++ /dev/null
@@ -1,3967 +0,0 @@
-/*
- * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-/* This code uses functions which are only available on Server 2003 and
- * higher, and Windows XP and higher.
- *
- * This code is by nature multithreaded and takes advantage of various
- * features to pass on information through the completion port for
- * when I/O is completed. All sends, receives, accepts, and connects are
- * completed through the completion port.
- *
- * The number of Completion Port Worker threads used is the total number
- * of CPU's + 1. This increases the likelihood that a Worker Thread is
- * available for processing a completed request.
- *
- * XXXPDM 5 August, 2002
- */
-
-#define MAKE_EXTERNAL 1
-#include <config.h>
-
-#include <sys/types.h>
-
-#ifndef _WINSOCKAPI_
-#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
-#endif
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <io.h>
-#include <fcntl.h>
-#include <process.h>
-
-#include <isc/buffer.h>
-#include <isc/bufferlist.h>
-#include <isc/condition.h>
-#include <isc/list.h>
-#include <isc/log.h>
-#include <isc/mem.h>
-#include <isc/msgs.h>
-#include <isc/mutex.h>
-#include <isc/net.h>
-#include <isc/once.h>
-#include <isc/os.h>
-#include <isc/platform.h>
-#include <isc/print.h>
-#include <isc/region.h>
-#include <isc/socket.h>
-#include <isc/stats.h>
-#include <isc/strerror.h>
-#include <isc/syslog.h>
-#include <isc/task.h>
-#include <isc/thread.h>
-#include <isc/util.h>
-#include <isc/win32os.h>
-
-#include <mswsock.h>
-
-#include "errno2result.h"
-
-/*
- * How in the world can Microsoft exist with APIs like this?
- * We can't actually call this directly, because it turns out
- * no library exports this function. Instead, we need to
- * issue a runtime call to get the address.
- */
-LPFN_CONNECTEX ISCConnectEx;
-LPFN_ACCEPTEX ISCAcceptEx;
-LPFN_GETACCEPTEXSOCKADDRS ISCGetAcceptExSockaddrs;
-
-/*
- * Run expensive internal consistency checks.
- */
-#ifdef ISC_SOCKET_CONSISTENCY_CHECKS
-#define CONSISTENT(sock) consistent(sock)
-#else
-#define CONSISTENT(sock) do {} while (0)
-#endif
-static void consistent(isc_socket_t *sock);
-
-/*
- * Define this macro to control the behavior of connection
- * resets on UDP sockets. See Microsoft KnowledgeBase Article Q263823
- * for details.
- * NOTE: This requires that Windows 2000 systems install Service Pack 2
- * or later.
- */
-#ifndef SIO_UDP_CONNRESET
-#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
-#endif
-
-/*
- * Some systems define the socket length argument as an int, some as size_t,
- * some as socklen_t. This is here so it can be easily changed if needed.
- */
-#ifndef ISC_SOCKADDR_LEN_T
-#define ISC_SOCKADDR_LEN_T unsigned int
-#endif
-
-/*
- * Define what the possible "soft" errors can be. These are non-fatal returns
- * of various network related functions, like recv() and so on.
- */
-#define SOFT_ERROR(e) ((e) == WSAEINTR || \
- (e) == WSAEWOULDBLOCK || \
- (e) == EWOULDBLOCK || \
- (e) == EINTR || \
- (e) == EAGAIN || \
- (e) == 0)
-
-/*
- * Pending errors are not really errors and should be
- * kept separate
- */
-#define PENDING_ERROR(e) ((e) == WSA_IO_PENDING || (e) == 0)
-
-#define DOIO_SUCCESS 0 /* i/o ok, event sent */
-#define DOIO_SOFT 1 /* i/o ok, soft error, no event sent */
-#define DOIO_HARD 2 /* i/o error, event sent */
-#define DOIO_EOF 3 /* EOF, no event sent */
-#define DOIO_PENDING 4 /* status when i/o is in process */
-#define DOIO_NEEDMORE 5 /* IO was processed, but we need more due to minimum */
-
-#define DLVL(x) ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(x)
-
-/*
- * DLVL(90) -- Function entry/exit and other tracing.
- * DLVL(70) -- Socket "correctness" -- including returning of events, etc.
- * DLVL(60) -- Socket data send/receive
- * DLVL(50) -- Event tracing, including receiving/sending completion events.
- * DLVL(20) -- Socket creation/destruction.
- */
-#define TRACE_LEVEL 90
-#define CORRECTNESS_LEVEL 70
-#define IOEVENT_LEVEL 60
-#define EVENT_LEVEL 50
-#define CREATION_LEVEL 20
-
-#define TRACE DLVL(TRACE_LEVEL)
-#define CORRECTNESS DLVL(CORRECTNESS_LEVEL)
-#define IOEVENT DLVL(IOEVENT_LEVEL)
-#define EVENT DLVL(EVENT_LEVEL)
-#define CREATION DLVL(CREATION_LEVEL)
-
-typedef isc_event_t intev_t;
-
-/*
- * Socket State
- */
-enum {
- SOCK_INITIALIZED, /* Socket Initialized */
- SOCK_OPEN, /* Socket opened but nothing yet to do */
- SOCK_DATA, /* Socket sending or receiving data */
- SOCK_LISTEN, /* TCP Socket listening for connects */
- SOCK_ACCEPT, /* TCP socket is waiting to accept */
- SOCK_CONNECT, /* TCP Socket connecting */
- SOCK_CLOSED, /* Socket has been closed */
-};
-
-#define SOCKET_MAGIC ISC_MAGIC('I', 'O', 'i', 'o')
-#define VALID_SOCKET(t) ISC_MAGIC_VALID(t, SOCKET_MAGIC)
-
-/*
- * IPv6 control information. If the socket is an IPv6 socket we want
- * to collect the destination address and interface so the client can
- * set them on outgoing packets.
- */
-#ifdef ISC_PLATFORM_HAVEIPV6
-#ifndef USE_CMSG
-#define USE_CMSG 1
-#endif
-#endif
-
-/*
- * We really don't want to try and use these control messages. Win32
- * doesn't have this mechanism before XP.
- */
-#undef USE_CMSG
-
-/*
- * Message header for recvmsg and sendmsg calls.
- * Used value-result for recvmsg, value only for sendmsg.
- */
-struct msghdr {
- SOCKADDR_STORAGE to_addr; /* UDP send/recv address */
- int to_addr_len; /* length of the address */
- WSABUF *msg_iov; /* scatter/gather array */
- u_int msg_iovlen; /* # elements in msg_iov */
- void *msg_control; /* ancillary data, see below */
- u_int msg_controllen; /* ancillary data buffer len */
- int msg_totallen; /* total length of this message */
-} msghdr;
-
-/*
- * The size to raise the receive buffer to.
- */
-#define RCVBUFSIZE (32*1024)
-
-/*
- * The number of times a send operation is repeated if the result
- * is WSAEINTR.
- */
-#define NRETRIES 10
-
-struct isc_socket {
- /* Not locked. */
- unsigned int magic;
- isc_socketmgr_t *manager;
- isc_mutex_t lock;
- isc_sockettype_t type;
-
- /* Pointers to scatter/gather buffers */
- WSABUF iov[ISC_SOCKET_MAXSCATTERGATHER];
-
- /* Locked by socket lock. */
- ISC_LINK(isc_socket_t) link;
- unsigned int references; /* EXTERNAL references */
- SOCKET fd; /* file handle */
- int pf; /* protocol family */
- char name[16];
- void * tag;
-
- /*
- * Each recv() call uses this buffer. It is a per-socket receive
- * buffer that allows us to decouple the system recv() from the
- * recv_list done events. This means the items on the recv_list
- * can be removed without having to cancel pending system recv()
- * calls. It also allows us to read-ahead in some cases.
- */
- struct {
- SOCKADDR_STORAGE from_addr; // UDP send/recv address
- int from_addr_len; // length of the address
- char *base; // the base of the buffer
- char *consume_position; // where to start copying data from next
- unsigned int len; // the actual size of this buffer
- unsigned int remaining; // the number of bytes remaining
- } recvbuf;
-
- ISC_LIST(isc_socketevent_t) send_list;
- ISC_LIST(isc_socketevent_t) recv_list;
- ISC_LIST(isc_socket_newconnev_t) accept_list;
- isc_socket_connev_t *connect_ev;
-
- isc_sockaddr_t address; /* remote address */
-
- unsigned int listener : 1, /* listener socket */
- connected : 1,
- pending_connect : 1, /* connect pending */
- bound : 1, /* bound to local addr */
- dupped : 1; /* created by isc_socket_dup() */
- unsigned int pending_iocp; /* Should equal the counters below. Debug. */
- unsigned int pending_recv; /* Number of outstanding recv() calls. */
- unsigned int pending_send; /* Number of outstanding send() calls. */
- unsigned int pending_accept; /* Number of outstanding accept() calls. */
- unsigned int state; /* Socket state. Debugging and consistency checking. */
- int state_lineno; /* line which last touched state */
-};
-
-#define _set_state(sock, _state) do { (sock)->state = (_state); (sock)->state_lineno = __LINE__; } while (0)
-
-/*
- * Buffer structure
- */
-typedef struct buflist buflist_t;
-
-struct buflist {
- void *buf;
- unsigned int buflen;
- ISC_LINK(buflist_t) link;
-};
-
-/*
- * I/O Completion ports Info structures
- */
-
-static HANDLE hHeapHandle = NULL;
-typedef struct IoCompletionInfo {
- OVERLAPPED overlapped;
- isc_socketevent_t *dev; /* send()/recv() done event */
- isc_socket_connev_t *cdev; /* connect() done event */
- isc_socket_newconnev_t *adev; /* accept() done event */
- void *acceptbuffer;
- DWORD received_bytes;
- int request_type;
- struct msghdr messagehdr;
- ISC_LIST(buflist_t) bufferlist; /*%< list of buffers */
-} IoCompletionInfo;
-
-/*
- * Define a maximum number of I/O Completion Port worker threads
- * to handle the load on the Completion Port. The actual number
- * used is the number of CPU's + 1.
- */
-#define MAX_IOCPTHREADS 20
-
-#define SOCKET_MANAGER_MAGIC ISC_MAGIC('I', 'O', 'm', 'g')
-#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, SOCKET_MANAGER_MAGIC)
-
-struct isc_socketmgr {
- /* Not locked. */
- unsigned int magic;
- isc_mem_t *mctx;
- isc_mutex_t lock;
- isc_stats_t *stats;
-
- /* Locked by manager lock. */
- ISC_LIST(isc_socket_t) socklist;
- isc_boolean_t bShutdown;
- isc_condition_t shutdown_ok;
- HANDLE hIoCompletionPort;
- int maxIOCPThreads;
- HANDLE hIOCPThreads[MAX_IOCPTHREADS];
- DWORD dwIOCPThreadIds[MAX_IOCPTHREADS];
-
- /*
- * Debugging.
- * Modified by InterlockedIncrement() and InterlockedDecrement()
- */
- LONG totalSockets;
- LONG iocp_total;
-};
-
-enum {
- SOCKET_RECV,
- SOCKET_SEND,
- SOCKET_ACCEPT,
- SOCKET_CONNECT
-};
-
-/*
- * send() and recv() iovec counts
- */
-#define MAXSCATTERGATHER_SEND (ISC_SOCKET_MAXSCATTERGATHER)
-#define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER)
-
-static isc_result_t socket_create(isc_socketmgr_t *manager0, int pf,
- isc_sockettype_t type,
- isc_socket_t **socketp,
- isc_socket_t *dup_socket);
-static isc_threadresult_t WINAPI SocketIoThread(LPVOID ThreadContext);
-static void maybe_free_socket(isc_socket_t **, int);
-static void free_socket(isc_socket_t **, int);
-static isc_boolean_t senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev);
-static isc_boolean_t acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev);
-static isc_boolean_t connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev);
-static void send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev);
-static void send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev);
-static void send_acceptdone_event(isc_socket_t *sock, isc_socket_newconnev_t **adev);
-static void send_connectdone_event(isc_socket_t *sock, isc_socket_connev_t **cdev);
-static void send_recvdone_abort(isc_socket_t *sock, isc_result_t result);
-static void queue_receive_event(isc_socket_t *sock, isc_task_t *task, isc_socketevent_t *dev);
-static void queue_receive_request(isc_socket_t *sock);
-
-/*
- * This is used to dump the contents of the sock structure
- * You should make sure that the sock is locked before
- * dumping it. Since the code uses simple printf() statements
- * it should only be used interactively.
- */
-void
-sock_dump(isc_socket_t *sock) {
- isc_socketevent_t *ldev;
- isc_socket_newconnev_t *ndev;
-
-#if 0
- isc_sockaddr_t addr;
- char socktext[256];
-
- isc_socket_getpeername(sock, &addr);
- isc_sockaddr_format(&addr, socktext, sizeof(socktext));
- printf("Remote Socket: %s\n", socktext);
- isc_socket_getsockname(sock, &addr);
- isc_sockaddr_format(&addr, socktext, sizeof(socktext));
- printf("This Socket: %s\n", socktext);
-#endif
-
- printf("\n\t\tSock Dump\n");
- printf("\t\tfd: %u\n", sock->fd);
- printf("\t\treferences: %d\n", sock->references);
- printf("\t\tpending_accept: %d\n", sock->pending_accept);
- printf("\t\tconnecting: %d\n", sock->pending_connect);
- printf("\t\tconnected: %d\n", sock->connected);
- printf("\t\tbound: %d\n", sock->bound);
- printf("\t\tpending_iocp: %d\n", sock->pending_iocp);
- printf("\t\tsocket type: %d\n", sock->type);
-
- printf("\n\t\tSock Recv List\n");
- ldev = ISC_LIST_HEAD(sock->recv_list);
- while (ldev != NULL) {
- printf("\t\tdev: %p\n", ldev);
- ldev = ISC_LIST_NEXT(ldev, ev_link);
- }
-
- printf("\n\t\tSock Send List\n");
- ldev = ISC_LIST_HEAD(sock->send_list);
- while (ldev != NULL) {
- printf("\t\tdev: %p\n", ldev);
- ldev = ISC_LIST_NEXT(ldev, ev_link);
- }
-
- printf("\n\t\tSock Accept List\n");
- ndev = ISC_LIST_HEAD(sock->accept_list);
- while (ndev != NULL) {
- printf("\t\tdev: %p\n", ldev);
- ndev = ISC_LIST_NEXT(ndev, ev_link);
- }
-}
-
-static void
-socket_log(int lineno, isc_socket_t *sock, isc_sockaddr_t *address,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *fmt, ...) ISC_FORMAT_PRINTF(9, 10);
-
-/* This function will add an entry to the I/O completion port
- * that will signal the I/O thread to exit (gracefully)
- */
-static void
-signal_iocompletionport_exit(isc_socketmgr_t *manager) {
- int i;
- int errval;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_MANAGER(manager));
- for (i = 0; i < manager->maxIOCPThreads; i++) {
- if (!PostQueuedCompletionStatus(manager->hIoCompletionPort,
- 0, 0, 0)) {
- errval = GetLastError();
- isc__strerror(errval, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "Can't request service thread to exit: %s"),
- strbuf);
- }
- }
-}
-
-/*
- * Create the worker threads for the I/O Completion Port
- */
-void
-iocompletionport_createthreads(int total_threads, isc_socketmgr_t *manager) {
- int errval;
- char strbuf[ISC_STRERRORSIZE];
- int i;
-
- INSIST(total_threads > 0);
- REQUIRE(VALID_MANAGER(manager));
- /*
- * We need at least one
- */
- for (i = 0; i < total_threads; i++) {
- manager->hIOCPThreads[i] = CreateThread(NULL, 0, SocketIoThread,
- manager, 0,
- &manager->dwIOCPThreadIds[i]);
- if (manager->hIOCPThreads[i] == NULL) {
- errval = GetLastError();
- isc__strerror(errval, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "Can't create IOCP thread: %s"),
- strbuf);
- exit(1);
- }
- }
-}
-
-/*
- * Create/initialise the I/O completion port
- */
-void
-iocompletionport_init(isc_socketmgr_t *manager) {
- int errval;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_MANAGER(manager));
- /*
- * Create a private heap to handle the socket overlapped structure
- * The minimum number of structures is 10, there is no maximum
- */
- hHeapHandle = HeapCreate(0, 10 * sizeof(IoCompletionInfo), 0);
- if (hHeapHandle == NULL) {
- errval = GetLastError();
- isc__strerror(errval, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "HeapCreate() failed during "
- "initialization: %s"),
- strbuf);
- exit(1);
- }
-
- manager->maxIOCPThreads = min(isc_os_ncpus() + 1, MAX_IOCPTHREADS);
-
- /* Now Create the Completion Port */
- manager->hIoCompletionPort = CreateIoCompletionPort(
- INVALID_HANDLE_VALUE, NULL,
- 0, manager->maxIOCPThreads);
- if (manager->hIoCompletionPort == NULL) {
- errval = GetLastError();
- isc__strerror(errval, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "CreateIoCompletionPort() failed "
- "during initialization: %s"),
- strbuf);
- exit(1);
- }
-
- /*
- * Worker threads for servicing the I/O
- */
- iocompletionport_createthreads(manager->maxIOCPThreads, manager);
-}
-
-/*
- * Associate a socket with an IO Completion Port. This allows us to queue events for it
- * and have our worker pool of threads process them.
- */
-void
-iocompletionport_update(isc_socket_t *sock) {
- HANDLE hiocp;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_SOCKET(sock));
-
- hiocp = CreateIoCompletionPort((HANDLE)sock->fd,
- sock->manager->hIoCompletionPort, (ULONG_PTR)sock, 0);
-
- if (hiocp == NULL) {
- DWORD errval = GetLastError();
- isc__strerror(errval, strbuf, sizeof(strbuf));
- isc_log_iwrite(isc_lctx,
- ISC_LOGCATEGORY_GENERAL,
- ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_TOOMANYHANDLES,
- "iocompletionport_update: failed to open"
- " io completion port: %s",
- strbuf);
-
- /* XXXMLG temporary hack to make failures detected.
- * This function should return errors to the caller, not
- * exit here.
- */
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "CreateIoCompletionPort() failed "
- "during initialization: %s"),
- strbuf);
- exit(1);
- }
-
- InterlockedIncrement(&sock->manager->iocp_total);
-}
-
-/*
- * Routine to cleanup and then close the socket.
- * Only close the socket here if it is NOT associated
- * with an event, otherwise the WSAWaitForMultipleEvents
- * may fail due to the fact that the Wait should not
- * be running while closing an event or a socket.
- * The socket is locked before calling this function
- */
-void
-socket_close(isc_socket_t *sock) {
-
- REQUIRE(sock != NULL);
-
- if (sock->fd != INVALID_SOCKET) {
- closesocket(sock->fd);
- sock->fd = INVALID_SOCKET;
- _set_state(sock, SOCK_CLOSED);
- InterlockedDecrement(&sock->manager->totalSockets);
- }
-}
-
-static isc_once_t initialise_once = ISC_ONCE_INIT;
-static isc_boolean_t initialised = ISC_FALSE;
-
-static void
-initialise(void) {
- WORD wVersionRequested;
- WSADATA wsaData;
- int err;
- SOCKET sock;
- GUID GUIDConnectEx = WSAID_CONNECTEX;
- GUID GUIDAcceptEx = WSAID_ACCEPTEX;
- GUID GUIDGetAcceptExSockaddrs = WSAID_GETACCEPTEXSOCKADDRS;
- DWORD dwBytes;
-
- /* Need Winsock 2.2 or better */
- wVersionRequested = MAKEWORD(2, 2);
-
- err = WSAStartup(wVersionRequested, &wsaData);
- if (err != 0) {
- char strbuf[ISC_STRERRORSIZE];
- isc__strerror(err, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__, "WSAStartup() %s: %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"),
- strbuf);
- exit(1);
- }
- /*
- * The following APIs do not exist as functions in a library, but we must
- * ask winsock for them. They are "extensions" -- but why they cannot be
- * actual functions is beyond me. So, ask winsock for the pointers to the
- * functions we need.
- */
- sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- INSIST(sock != INVALID_SOCKET);
- err = WSAIoctl(sock, SIO_GET_EXTENSION_FUNCTION_POINTER,
- &GUIDConnectEx, sizeof(GUIDConnectEx),
- &ISCConnectEx, sizeof(ISCConnectEx),
- &dwBytes, NULL, NULL);
- INSIST(err == 0);
-
- err = WSAIoctl(sock, SIO_GET_EXTENSION_FUNCTION_POINTER,
- &GUIDAcceptEx, sizeof(GUIDAcceptEx),
- &ISCAcceptEx, sizeof(ISCAcceptEx),
- &dwBytes, NULL, NULL);
- INSIST(err == 0);
-
- err = WSAIoctl(sock, SIO_GET_EXTENSION_FUNCTION_POINTER,
- &GUIDGetAcceptExSockaddrs, sizeof(GUIDGetAcceptExSockaddrs),
- &ISCGetAcceptExSockaddrs, sizeof(ISCGetAcceptExSockaddrs),
- &dwBytes, NULL, NULL);
- INSIST(err == 0);
-
- closesocket(sock);
-
- initialised = ISC_TRUE;
-}
-
-/*
- * Initialize socket services
- */
-void
-InitSockets(void) {
- RUNTIME_CHECK(isc_once_do(&initialise_once,
- initialise) == ISC_R_SUCCESS);
- if (!initialised)
- exit(1);
-}
-
-int
-internal_sendmsg(isc_socket_t *sock, IoCompletionInfo *lpo,
- struct msghdr *messagehdr, int flags, int *Error)
-{
- int Result;
- DWORD BytesSent;
- DWORD Flags = flags;
- int total_sent;
-
- *Error = 0;
- Result = WSASendTo(sock->fd, messagehdr->msg_iov,
- messagehdr->msg_iovlen, &BytesSent,
- Flags, (SOCKADDR *)&messagehdr->to_addr,
- messagehdr->to_addr_len, (LPWSAOVERLAPPED)lpo,
- NULL);
-
- total_sent = (int)BytesSent;
-
- /* Check for errors.*/
- if (Result == SOCKET_ERROR) {
- *Error = WSAGetLastError();
-
- switch (*Error) {
- case WSA_IO_INCOMPLETE:
- case WSA_WAIT_IO_COMPLETION:
- case WSA_IO_PENDING:
- case NO_ERROR: /* Strange, but okay */
- sock->pending_iocp++;
- sock->pending_send++;
- break;
-
- default:
- return (-1);
- break;
- }
- } else {
- sock->pending_iocp++;
- sock->pending_send++;
- }
-
- if (lpo != NULL)
- return (0);
- else
- return (total_sent);
-}
-
-static void
-queue_receive_request(isc_socket_t *sock) {
- DWORD Flags = 0;
- DWORD NumBytes = 0;
- int total_bytes = 0;
- int Result;
- int Error;
- int need_retry;
- WSABUF iov[1];
- IoCompletionInfo *lpo = NULL;
- isc_result_t isc_result;
-
- retry:
- need_retry = ISC_FALSE;
-
- /*
- * If we already have a receive pending, do nothing.
- */
- if (sock->pending_recv > 0) {
- if (lpo != NULL)
- HeapFree(hHeapHandle, 0, lpo);
- return;
- }
-
- /*
- * If no one is waiting, do nothing.
- */
- if (ISC_LIST_EMPTY(sock->recv_list)) {
- if (lpo != NULL)
- HeapFree(hHeapHandle, 0, lpo);
- return;
- }
-
- INSIST(sock->recvbuf.remaining == 0);
- INSIST(sock->fd != INVALID_SOCKET);
-
- iov[0].len = sock->recvbuf.len;
- iov[0].buf = sock->recvbuf.base;
-
- if (lpo == NULL) {
- lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle,
- HEAP_ZERO_MEMORY,
- sizeof(IoCompletionInfo));
- RUNTIME_CHECK(lpo != NULL);
- } else
- ZeroMemory(lpo, sizeof(IoCompletionInfo));
- lpo->request_type = SOCKET_RECV;
-
- sock->recvbuf.from_addr_len = sizeof(sock->recvbuf.from_addr);
-
- Error = 0;
- Result = WSARecvFrom((SOCKET)sock->fd, iov, 1,
- &NumBytes, &Flags,
- (SOCKADDR *)&sock->recvbuf.from_addr,
- &sock->recvbuf.from_addr_len,
- (LPWSAOVERLAPPED)lpo, NULL);
-
- /* Check for errors. */
- if (Result == SOCKET_ERROR) {
- Error = WSAGetLastError();
-
- switch (Error) {
- case WSA_IO_PENDING:
- sock->pending_iocp++;
- sock->pending_recv++;
- break;
-
- /* direct error: no completion event */
- case ERROR_HOST_UNREACHABLE:
- case WSAENETRESET:
- case WSAECONNRESET:
- if (!sock->connected) {
- /* soft error */
- need_retry = ISC_TRUE;
- break;
- }
- /* FALLTHROUGH */
-
- default:
- isc_result = isc__errno2result(Error);
- if (isc_result == ISC_R_UNEXPECTED)
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "WSARecvFrom: Windows error code: %d, isc result %d",
- Error, isc_result);
- send_recvdone_abort(sock, isc_result);
- HeapFree(hHeapHandle, 0, lpo);
- lpo = NULL;
- break;
- }
- } else {
- /*
- * The recv() finished immediately, but we will still get
- * a completion event. Rather than duplicate code, let
- * that thread handle sending the data along its way.
- */
- sock->pending_iocp++;
- sock->pending_recv++;
- }
-
- socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DOIORECV,
- "queue_io_request: fd %d result %d error %d",
- sock->fd, Result, Error);
-
- CONSISTENT(sock);
-
- if (need_retry)
- goto retry;
-}
-
-static void
-manager_log(isc_socketmgr_t *sockmgr, isc_logcategory_t *category,
- isc_logmodule_t *module, int level, const char *fmt, ...)
-{
- char msgbuf[2048];
- va_list ap;
-
- if (!isc_log_wouldlog(isc_lctx, level))
- return;
-
- va_start(ap, fmt);
- vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
- va_end(ap);
-
- isc_log_write(isc_lctx, category, module, level,
- "sockmgr %p: %s", sockmgr, msgbuf);
-}
-
-static void
-socket_log(int lineno, isc_socket_t *sock, isc_sockaddr_t *address,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
- isc_msgcat_t *msgcat, int msgset, int message,
- const char *fmt, ...)
-{
- char msgbuf[2048];
- char peerbuf[256];
- va_list ap;
-
-
- if (!isc_log_wouldlog(isc_lctx, level))
- return;
-
- va_start(ap, fmt);
- vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
- va_end(ap);
-
- if (address == NULL) {
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p line %d: %s", sock, lineno, msgbuf);
- } else {
- isc_sockaddr_format(address, peerbuf, sizeof(peerbuf));
- isc_log_iwrite(isc_lctx, category, module, level,
- msgcat, msgset, message,
- "socket %p line %d peer %s: %s", sock, lineno,
- peerbuf, msgbuf);
- }
-
-}
-
-/*
- * Make an fd SOCKET non-blocking.
- */
-static isc_result_t
-make_nonblock(SOCKET fd) {
- int ret;
- unsigned long flags = 1;
- char strbuf[ISC_STRERRORSIZE];
-
- /* Set the socket to non-blocking */
- ret = ioctlsocket(fd, FIONBIO, &flags);
-
- if (ret == -1) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "ioctlsocket(%d, FIOBIO, %d): %s",
- fd, flags, strbuf);
-
- return (ISC_R_UNEXPECTED);
- }
-
- return (ISC_R_SUCCESS);
-}
-
-/*
- * Windows 2000 systems incorrectly cause UDP sockets using WSARecvFrom
- * to not work correctly, returning a WSACONNRESET error when a WSASendTo
- * fails with an "ICMP port unreachable" response and preventing the
- * socket from using the WSARecvFrom in subsequent operations.
- * The function below fixes this, but requires that Windows 2000
- * Service Pack 2 or later be installed on the system. NT 4.0
- * systems are not affected by this and work correctly.
- * See Microsoft Knowledge Base Article Q263823 for details of this.
- */
-isc_result_t
-connection_reset_fix(SOCKET fd) {
- DWORD dwBytesReturned = 0;
- BOOL bNewBehavior = FALSE;
- DWORD status;
-
- if (isc_win32os_majorversion() < 5)
- return (ISC_R_SUCCESS); /* NT 4.0 has no problem */
-
- /* disable bad behavior using IOCTL: SIO_UDP_CONNRESET */
- status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior,
- sizeof(bNewBehavior), NULL, 0,
- &dwBytesReturned, NULL, NULL);
- if (status != SOCKET_ERROR)
- return (ISC_R_SUCCESS);
- else {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "WSAIoctl(SIO_UDP_CONNRESET, oldBehaviour) %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- return (ISC_R_UNEXPECTED);
- }
-}
-
-/*
- * Construct an iov array and attach it to the msghdr passed in. This is
- * the SEND constructor, which will use the used region of the buffer
- * (if using a buffer list) or will use the internal region (if a single
- * buffer I/O is requested).
- *
- * Nothing can be NULL, and the done event must list at least one buffer
- * on the buffer linked list for this function to be meaningful.
- */
-static void
-build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
- struct msghdr *msg, char *cmsg, WSABUF *iov,
- IoCompletionInfo *lpo)
-{
- unsigned int iovcount;
- isc_buffer_t *buffer;
- buflist_t *cpbuffer;
- isc_region_t used;
- size_t write_count;
- size_t skip_count;
-
- memset(msg, 0, sizeof(*msg));
-
- memcpy(&msg->to_addr, &dev->address.type, dev->address.length);
- msg->to_addr_len = dev->address.length;
-
- buffer = ISC_LIST_HEAD(dev->bufferlist);
- write_count = 0;
- iovcount = 0;
-
- /*
- * Single buffer I/O? Skip what we've done so far in this region.
- */
- if (buffer == NULL) {
- write_count = dev->region.length - dev->n;
- cpbuffer = HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, sizeof(buflist_t));
- RUNTIME_CHECK(cpbuffer != NULL);
- cpbuffer->buf = HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, write_count);
- RUNTIME_CHECK(cpbuffer->buf != NULL);
-
- socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "alloc_buffer %p %d %p %d", cpbuffer, sizeof(buflist_t),
- cpbuffer->buf, write_count);
-
- memcpy(cpbuffer->buf,(dev->region.base + dev->n), write_count);
- cpbuffer->buflen = write_count;
- ISC_LIST_ENQUEUE(lpo->bufferlist, cpbuffer, link);
- iov[0].buf = cpbuffer->buf;
- iov[0].len = write_count;
- iovcount = 1;
-
- goto config;
- }
-
- /*
- * Multibuffer I/O.
- * Skip the data in the buffer list that we have already written.
- */
- skip_count = dev->n;
- while (buffer != NULL) {
- REQUIRE(ISC_BUFFER_VALID(buffer));
- if (skip_count < isc_buffer_usedlength(buffer))
- break;
- skip_count -= isc_buffer_usedlength(buffer);
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- while (buffer != NULL) {
- INSIST(iovcount < MAXSCATTERGATHER_SEND);
-
- isc_buffer_usedregion(buffer, &used);
-
- if (used.length > 0) {
- int uselen = used.length - skip_count;
- cpbuffer = HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, sizeof(buflist_t));
- RUNTIME_CHECK(cpbuffer != NULL);
- cpbuffer->buf = HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, uselen);
- RUNTIME_CHECK(cpbuffer->buf != NULL);
-
- socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "alloc_buffer %p %d %p %d", cpbuffer, sizeof(buflist_t),
- cpbuffer->buf, write_count);
-
- memcpy(cpbuffer->buf,(used.base + skip_count), uselen);
- cpbuffer->buflen = uselen;
- iov[iovcount].buf = cpbuffer->buf;
- iov[iovcount].len = used.length - skip_count;
- write_count += uselen;
- skip_count = 0;
- iovcount++;
- }
- buffer = ISC_LIST_NEXT(buffer, link);
- }
-
- INSIST(skip_count == 0);
-
- config:
- msg->msg_iov = iov;
- msg->msg_iovlen = iovcount;
- msg->msg_totallen = write_count;
-}
-
-static void
-set_dev_address(isc_sockaddr_t *address, isc_socket_t *sock,
- isc_socketevent_t *dev)
-{
- if (sock->type == isc_sockettype_udp) {
- if (address != NULL)
- dev->address = *address;
- else
- dev->address = sock->address;
- } else if (sock->type == isc_sockettype_tcp) {
- INSIST(address == NULL);
- dev->address = sock->address;
- }
-}
-
-static void
-destroy_socketevent(isc_event_t *event) {
- isc_socketevent_t *ev = (isc_socketevent_t *)event;
-
- INSIST(ISC_LIST_EMPTY(ev->bufferlist));
-
- (ev->destroy)(event);
-}
-
-static isc_socketevent_t *
-allocate_socketevent(isc_socket_t *sock, isc_eventtype_t eventtype,
- isc_taskaction_t action, const void *arg)
-{
- isc_socketevent_t *ev;
-
- ev = (isc_socketevent_t *)isc_event_allocate(sock->manager->mctx,
- sock, eventtype,
- action, arg,
- sizeof(*ev));
- if (ev == NULL)
- return (NULL);
-
- ev->result = ISC_R_IOERROR; // XXXMLG temporary change to detect failure to set
- ISC_LINK_INIT(ev, ev_link);
- ISC_LIST_INIT(ev->bufferlist);
- ev->region.base = NULL;
- ev->n = 0;
- ev->offset = 0;
- ev->attributes = 0;
- ev->destroy = ev->ev_destroy;
- ev->ev_destroy = destroy_socketevent;
-
- return (ev);
-}
-
-#if defined(ISC_SOCKET_DEBUG)
-static void
-dump_msg(struct msghdr *msg, isc_socket_t *sock) {
- unsigned int i;
-
- printf("MSGHDR %p, Socket #: %u\n", msg, sock->fd);
- printf("\tname %p, namelen %d\n", msg->msg_name, msg->msg_namelen);
- printf("\tiov %p, iovlen %d\n", msg->msg_iov, msg->msg_iovlen);
- for (i = 0; i < (unsigned int)msg->msg_iovlen; i++)
- printf("\t\t%d\tbase %p, len %d\n", i,
- msg->msg_iov[i].buf,
- msg->msg_iov[i].len);
-}
-#endif
-
-/*
- * map the error code
- */
-int
-map_socket_error(isc_socket_t *sock, int windows_errno, int *isc_errno,
- char *errorstring, size_t bufsize) {
-
- int doreturn;
- switch (windows_errno) {
- case WSAECONNREFUSED:
- *isc_errno = ISC_R_CONNREFUSED;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case WSAENETUNREACH:
- case ERROR_NETWORK_UNREACHABLE:
- *isc_errno = ISC_R_NETUNREACH;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case ERROR_PORT_UNREACHABLE:
- case ERROR_HOST_UNREACHABLE:
- case WSAEHOSTUNREACH:
- *isc_errno = ISC_R_HOSTUNREACH;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case WSAENETDOWN:
- *isc_errno = ISC_R_NETDOWN;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case WSAEHOSTDOWN:
- *isc_errno = ISC_R_HOSTDOWN;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case WSAEACCES:
- *isc_errno = ISC_R_NOPERM;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case WSAECONNRESET:
- case WSAENETRESET:
- case WSAECONNABORTED:
- case WSAEDISCON:
- *isc_errno = ISC_R_CONNECTIONRESET;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case WSAENOTCONN:
- *isc_errno = ISC_R_NOTCONNECTED;
- if (sock->connected)
- doreturn = DOIO_HARD;
- else
- doreturn = DOIO_SOFT;
- break;
- case ERROR_OPERATION_ABORTED:
- case ERROR_CONNECTION_ABORTED:
- case ERROR_REQUEST_ABORTED:
- *isc_errno = ISC_R_CONNECTIONRESET;
- doreturn = DOIO_HARD;
- break;
- case WSAENOBUFS:
- *isc_errno = ISC_R_NORESOURCES;
- doreturn = DOIO_HARD;
- break;
- case WSAEAFNOSUPPORT:
- *isc_errno = ISC_R_FAMILYNOSUPPORT;
- doreturn = DOIO_HARD;
- break;
- case WSAEADDRNOTAVAIL:
- *isc_errno = ISC_R_ADDRNOTAVAIL;
- doreturn = DOIO_HARD;
- break;
- case WSAEDESTADDRREQ:
- *isc_errno = ISC_R_BADADDRESSFORM;
- doreturn = DOIO_HARD;
- break;
- case ERROR_NETNAME_DELETED:
- *isc_errno = ISC_R_NETDOWN;
- doreturn = DOIO_HARD;
- break;
- default:
- *isc_errno = ISC_R_IOERROR;
- doreturn = DOIO_HARD;
- break;
- }
- if (doreturn == DOIO_HARD) {
- isc__strerror(windows_errno, errorstring, bufsize);
- }
- return (doreturn);
-}
-
-static void
-fill_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
- isc_region_t r;
- int copylen;
- isc_buffer_t *buffer;
-
- INSIST(dev->n < dev->minimum);
- INSIST(sock->recvbuf.remaining > 0);
- INSIST(sock->pending_recv == 0);
-
- if (sock->type == isc_sockettype_udp) {
- dev->address.length = sock->recvbuf.from_addr_len;
- memcpy(&dev->address.type, &sock->recvbuf.from_addr,
- sock->recvbuf.from_addr_len);
- if (isc_sockaddr_getport(&dev->address) == 0) {
- if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
- socket_log(__LINE__, sock, &dev->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_ZEROPORT,
- "dropping source port zero packet");
- }
- sock->recvbuf.remaining = 0;
- return;
- }
- } else if (sock->type == isc_sockettype_tcp) {
- dev->address = sock->address;
- }
-
- /*
- * Run through the list of buffers we were given, and find the
- * first one with space. Once it is found, loop through, filling
- * the buffers as much as possible.
- */
- buffer = ISC_LIST_HEAD(dev->bufferlist);
- if (buffer != NULL) { // Multi-buffer receive
- while (buffer != NULL && sock->recvbuf.remaining > 0) {
- REQUIRE(ISC_BUFFER_VALID(buffer));
- if (isc_buffer_availablelength(buffer) > 0) {
- isc_buffer_availableregion(buffer, &r);
- copylen = min(r.length, sock->recvbuf.remaining);
- memcpy(r.base, sock->recvbuf.consume_position, copylen);
- sock->recvbuf.consume_position += copylen;
- sock->recvbuf.remaining -= copylen;
- isc_buffer_add(buffer, copylen);
- dev->n += copylen;
- }
- buffer = ISC_LIST_NEXT(buffer, link);
- }
- } else { // Single-buffer receive
- copylen = min(dev->region.length - dev->n, sock->recvbuf.remaining);
- memcpy(dev->region.base + dev->n, sock->recvbuf.consume_position, copylen);
- sock->recvbuf.consume_position += copylen;
- sock->recvbuf.remaining -= copylen;
- dev->n += copylen;
- }
-
- /*
- * UDP receives are all-consuming. That is, if we have 4k worth of
- * data in our receive buffer, and the caller only gave us
- * 1k of space, we will toss the remaining 3k of data. TCP
- * will keep the extra data around and use it for later requests.
- */
- if (sock->type == isc_sockettype_udp)
- sock->recvbuf.remaining = 0;
-}
-
-/*
- * Copy out as much data from the internal buffer to done events.
- * As each done event is filled, send it along its way.
- */
-static void
-completeio_recv(isc_socket_t *sock)
-{
- isc_socketevent_t *dev;
-
- /*
- * If we are in the process of filling our buffer, we cannot
- * touch it yet, so don't.
- */
- if (sock->pending_recv > 0)
- return;
-
- while (sock->recvbuf.remaining > 0 && !ISC_LIST_EMPTY(sock->recv_list)) {
- dev = ISC_LIST_HEAD(sock->recv_list);
-
- /*
- * See if we have sufficient data in our receive buffer
- * to handle this. If we do, copy out the data.
- */
- fill_recv(sock, dev);
-
- /*
- * Did we satisfy it?
- */
- if (dev->n >= dev->minimum) {
- dev->result = ISC_R_SUCCESS;
- send_recvdone_event(sock, &dev);
- }
- }
-}
-
-/*
- * Returns:
- * DOIO_SUCCESS The operation succeeded. dev->result contains
- * ISC_R_SUCCESS.
- *
- * DOIO_HARD A hard or unexpected I/O error was encountered.
- * dev->result contains the appropriate error.
- *
- * DOIO_SOFT A soft I/O error was encountered. No senddone
- * event was sent. The operation should be retried.
- *
- * No other return values are possible.
- */
-static int
-completeio_send(isc_socket_t *sock, isc_socketevent_t *dev,
- struct msghdr *messagehdr, int cc, int send_errno)
-{
- char addrbuf[ISC_SOCKADDR_FORMATSIZE];
- char strbuf[ISC_STRERRORSIZE];
-
- if (send_errno != 0) {
- if (SOFT_ERROR(send_errno))
- return (DOIO_SOFT);
-
- return (map_socket_error(sock, send_errno, &dev->result,
- strbuf, sizeof(strbuf)));
-
- /*
- * The other error types depend on whether or not the
- * socket is UDP or TCP. If it is UDP, some errors
- * that we expect to be fatal under TCP are merely
- * annoying, and are really soft errors.
- *
- * However, these soft errors are still returned as
- * a status.
- */
- isc_sockaddr_format(&dev->address, addrbuf, sizeof(addrbuf));
- isc__strerror(send_errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "completeio_send: %s: %s",
- addrbuf, strbuf);
- dev->result = isc__errno2result(send_errno);
- return (DOIO_HARD);
- }
-
- /*
- * If we write less than we expected, update counters, poke.
- */
- dev->n += cc;
- if (cc != messagehdr->msg_totallen)
- return (DOIO_SOFT);
-
- /*
- * Exactly what we wanted to write. We're done with this
- * entry. Post its completion event.
- */
- dev->result = ISC_R_SUCCESS;
- return (DOIO_SUCCESS);
-}
-
-static int
-startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
- int *send_errno)
-{
- char *cmsg = NULL;
- char strbuf[ISC_STRERRORSIZE];
- IoCompletionInfo *lpo;
- int status;
- struct msghdr *msghdr;
-
- lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle,
- HEAP_ZERO_MEMORY,
- sizeof(IoCompletionInfo));
- RUNTIME_CHECK(lpo != NULL);
- lpo->request_type = SOCKET_SEND;
- lpo->dev = dev;
- msghdr = &lpo->messagehdr;
- memset(msghdr, 0, sizeof(struct msghdr));
- ISC_LIST_INIT(lpo->bufferlist);
-
- build_msghdr_send(sock, dev, msghdr, cmsg, sock->iov, lpo);
-
- *nbytes = internal_sendmsg(sock, lpo, msghdr, 0, send_errno);
-
- if (*nbytes < 0) {
- /*
- * I/O has been initiated
- * completion will be through the completion port
- */
- if (PENDING_ERROR(*send_errno)) {
- status = DOIO_PENDING;
- goto done;
- }
-
- if (SOFT_ERROR(*send_errno)) {
- status = DOIO_SOFT;
- goto done;
- }
-
- /*
- * If we got this far then something is wrong
- */
- if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
- isc__strerror(*send_errno, strbuf, sizeof(strbuf));
- socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_INTERNALSEND,
- "startio_send: internal_sendmsg(%d) %d "
- "bytes, err %d/%s",
- sock->fd, *nbytes, *send_errno, strbuf);
- }
- status = DOIO_HARD;
- goto done;
- }
- dev->result = ISC_R_SUCCESS;
- status = DOIO_SOFT;
- done:
- _set_state(sock, SOCK_DATA);
- return (status);
-}
-
-static isc_result_t
-allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
- isc_socket_t **socketp) {
- isc_socket_t *sock;
- isc_result_t result;
-
- sock = isc_mem_get(manager->mctx, sizeof(*sock));
-
- if (sock == NULL)
- return (ISC_R_NOMEMORY);
-
- sock->magic = 0;
- sock->references = 0;
-
- sock->manager = manager;
- sock->type = type;
- sock->fd = INVALID_SOCKET;
-
- ISC_LINK_INIT(sock, link);
-
- /*
- * set up list of readers and writers to be initially empty
- */
- ISC_LIST_INIT(sock->recv_list);
- ISC_LIST_INIT(sock->send_list);
- ISC_LIST_INIT(sock->accept_list);
- sock->connect_ev = NULL;
- sock->pending_accept = 0;
- sock->pending_recv = 0;
- sock->pending_send = 0;
- sock->pending_iocp = 0;
- sock->listener = 0;
- sock->connected = 0;
- sock->pending_connect = 0;
- sock->bound = 0;
- sock->dupped = 0;
- memset(sock->name, 0, sizeof(sock->name)); // zero the name field
- _set_state(sock, SOCK_INITIALIZED);
-
- sock->recvbuf.len = 65536;
- sock->recvbuf.consume_position = sock->recvbuf.base;
- sock->recvbuf.remaining = 0;
- sock->recvbuf.base = isc_mem_get(manager->mctx, sock->recvbuf.len); // max buffer size
- if (sock->recvbuf.base == NULL) {
- sock->magic = 0;
- goto error;
- }
-
- /*
- * initialize the lock
- */
- result = isc_mutex_init(&sock->lock);
- if (result != ISC_R_SUCCESS) {
- sock->magic = 0;
- isc_mem_put(manager->mctx, sock->recvbuf.base, sock->recvbuf.len);
- sock->recvbuf.base = NULL;
- goto error;
- }
-
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "allocated");
-
- sock->magic = SOCKET_MAGIC;
- *socketp = sock;
-
- return (ISC_R_SUCCESS);
-
- error:
- isc_mem_put(manager->mctx, sock, sizeof(*sock));
-
- return (result);
-}
-
-/*
- * Verify that the socket state is consistent.
- */
-static void
-consistent(isc_socket_t *sock) {
-
- isc_socketevent_t *dev;
- isc_socket_newconnev_t *nev;
- unsigned int count;
- char *crash_reason;
- isc_boolean_t crash = ISC_FALSE;
-
- REQUIRE(sock->pending_iocp == sock->pending_recv + sock->pending_send
- + sock->pending_accept + sock->pending_connect);
-
- dev = ISC_LIST_HEAD(sock->send_list);
- count = 0;
- while (dev != NULL) {
- count++;
- dev = ISC_LIST_NEXT(dev, ev_link);
- }
- if (count > sock->pending_send) {
- crash = ISC_TRUE;
- crash_reason = "send_list > sock->pending_send";
- }
-
- nev = ISC_LIST_HEAD(sock->accept_list);
- count = 0;
- while (nev != NULL) {
- count++;
- nev = ISC_LIST_NEXT(nev, ev_link);
- }
- if (count > sock->pending_accept) {
- crash = ISC_TRUE;
- crash_reason = "send_list > sock->pending_send";
- }
-
- if (crash) {
- socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DESTROYING, "SOCKET INCONSISTENT: %s",
- crash_reason);
- sock_dump(sock);
- INSIST(crash == ISC_FALSE);
- }
-}
-
-/*
- * Maybe free the socket.
- *
- * This function will verify tht the socket is no longer in use in any way,
- * either internally or externally. This is the only place where this
- * check is to be made; if some bit of code believes that IT is done with
- * the socket (e.g., some reference counter reaches zero), it should call
- * this function.
- *
- * When calling this function, the socket must be locked, and the manager
- * must be unlocked.
- *
- * When this function returns, *socketp will be NULL. No tricks to try
- * to hold on to this pointer are allowed.
- */
-static void
-maybe_free_socket(isc_socket_t **socketp, int lineno) {
- isc_socket_t *sock = *socketp;
- *socketp = NULL;
-
- INSIST(VALID_SOCKET(sock));
- CONSISTENT(sock);
-
- if (sock->pending_iocp > 0
- || sock->pending_recv > 0
- || sock->pending_send > 0
- || sock->pending_accept > 0
- || sock->references > 0
- || sock->pending_connect == 1
- || !ISC_LIST_EMPTY(sock->recv_list)
- || !ISC_LIST_EMPTY(sock->send_list)
- || !ISC_LIST_EMPTY(sock->accept_list)
- || sock->fd != INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return;
- }
- UNLOCK(&sock->lock);
-
- free_socket(&sock, lineno);
-}
-
-void
-free_socket(isc_socket_t **sockp, int lineno) {
- isc_socketmgr_t *manager;
- isc_socket_t *sock = *sockp;
- *sockp = NULL;
-
- manager = sock->manager;
-
- /*
- * Seems we can free the socket after all.
- */
- manager = sock->manager;
- socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DESTROYING, "freeing socket line %d fd %d lock %p semaphore %p",
- lineno, sock->fd, &sock->lock, sock->lock.LockSemaphore);
-
- sock->magic = 0;
- DESTROYLOCK(&sock->lock);
-
- if (sock->recvbuf.base != NULL)
- isc_mem_put(manager->mctx, sock->recvbuf.base, sock->recvbuf.len);
-
- LOCK(&manager->lock);
- if (ISC_LINK_LINKED(sock, link))
- ISC_LIST_UNLINK(manager->socklist, sock, link);
- isc_mem_put(manager->mctx, sock, sizeof(*sock));
-
- if (ISC_LIST_EMPTY(manager->socklist))
- SIGNAL(&manager->shutdown_ok);
- UNLOCK(&manager->lock);
-}
-
-/*
- * Create a new 'type' socket managed by 'manager'. Events
- * will be posted to 'task' and when dispatched 'action' will be
- * called with 'arg' as the arg value. The new socket is returned
- * in 'socketp'.
- */
-static isc_result_t
-socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
- isc_socket_t **socketp, isc_socket_t *dup_socket)
-{
- isc_socket_t *sock = NULL;
- isc_result_t result;
-#if defined(USE_CMSG)
- int on = 1;
-#endif
-#if defined(SO_RCVBUF)
- ISC_SOCKADDR_LEN_T optlen;
- int size;
-#endif
- int socket_errno;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(socketp != NULL && *socketp == NULL);
- REQUIRE(type != isc_sockettype_fdwatch);
-
- if (dup_socket != NULL)
- return (ISC_R_NOTIMPLEMENTED);
-
- result = allocate_socket(manager, type, &sock);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- sock->pf = pf;
-#if 0
- if (dup_socket == NULL) {
-#endif
- switch (type) {
- case isc_sockettype_udp:
- sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP);
- if (sock->fd != INVALID_SOCKET) {
- result = connection_reset_fix(sock->fd);
- if (result != ISC_R_SUCCESS) {
- socket_log(__LINE__, sock,
- NULL, EVENT, NULL, 0, 0,
- "closed %d %d %d "
- "con_reset_fix_failed",
- sock->pending_recv,
- sock->pending_send,
- sock->references);
- closesocket(sock->fd);
- _set_state(sock, SOCK_CLOSED);
- sock->fd = INVALID_SOCKET;
- free_socket(&sock, __LINE__);
- return (result);
- }
- }
- break;
- case isc_sockettype_tcp:
- sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP);
- break;
- }
-#if 0
- } else {
- /*
- * XXX: dup() is deprecated in windows, use _dup()
- * instead. In future we may want to investigate
- * WSADuplicateSocket().
- */
- sock->fd = _dup(dup_socket->fd);
- sock->dupped = 1;
- sock->bound = dup_socket->bound;
- }
-#endif
-
- if (sock->fd == INVALID_SOCKET) {
- socket_errno = WSAGetLastError();
- free_socket(&sock, __LINE__);
-
- switch (socket_errno) {
- case WSAEMFILE:
- case WSAENOBUFS:
- return (ISC_R_NORESOURCES);
-
- case WSAEPROTONOSUPPORT:
- case WSAEPFNOSUPPORT:
- case WSAEAFNOSUPPORT:
- return (ISC_R_FAMILYNOSUPPORT);
-
- default:
- isc__strerror(socket_errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() %s: %s",
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
- }
-
- result = make_nonblock(sock->fd);
- if (result != ISC_R_SUCCESS) {
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "closed %d %d %d make_nonblock_failed",
- sock->pending_recv, sock->pending_send,
- sock->references);
- closesocket(sock->fd);
- sock->fd = INVALID_SOCKET;
- free_socket(&sock, __LINE__);
- return (result);
- }
-
-
-#if defined(USE_CMSG) || defined(SO_RCVBUF)
- if (type == isc_sockettype_udp) {
-
-#if defined(USE_CMSG)
-#if defined(ISC_PLATFORM_HAVEIPV6)
-#ifdef IPV6_RECVPKTINFO
- /* 2292bis */
- if ((pf == AF_INET6)
- && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
- (char *)&on, sizeof(on)) < 0)) {
- isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_RECVPKTINFO) "
- "%s: %s", sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
-#else
- /* 2292 */
- if ((pf == AF_INET6)
- && (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO,
- (char *)&on, sizeof(on)) < 0)) {
- isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d, IPV6_PKTINFO) %s: %s",
- sock->fd,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED,
- "failed"),
- strbuf);
- }
-#endif /* IPV6_RECVPKTINFO */
-#ifdef IPV6_USE_MIN_MTU /*2292bis, not too common yet*/
- /* use minimum MTU */
- if (pf == AF_INET6) {
- (void)setsockopt(sock->fd, IPPROTO_IPV6,
- IPV6_USE_MIN_MTU,
- (char *)&on, sizeof(on));
- }
-#endif
-#endif /* ISC_PLATFORM_HAVEIPV6 */
-#endif /* defined(USE_CMSG) */
-
-#if defined(SO_RCVBUF)
- optlen = sizeof(size);
- if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
- (char *)&size, &optlen) >= 0 &&
- size < RCVBUFSIZE) {
- size = RCVBUFSIZE;
- (void)setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
- (char *)&size, sizeof(size));
- }
-#endif
-
- }
-#endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */
-
- _set_state(sock, SOCK_OPEN);
- sock->references = 1;
- *socketp = sock;
-
- iocompletionport_update(sock);
-
- /*
- * Note we don't have to lock the socket like we normally would because
- * there are no external references to it yet.
- */
- LOCK(&manager->lock);
- ISC_LIST_APPEND(manager->socklist, sock, link);
- InterlockedIncrement(&manager->totalSockets);
- UNLOCK(&manager->lock);
-
- socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat,
- ISC_MSGSET_SOCKET, ISC_MSG_CREATED,
- "created %u type %u", sock->fd, type);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
- isc_socket_t **socketp)
-{
- return (socket_create(manager, pf, type, socketp, NULL));
-}
-
-isc_result_t
-isc__socket_dup(isc_socket_t *sock, isc_socket_t **socketp) {
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(socketp != NULL && *socketp == NULL);
-
-#if 1
- return (ISC_R_NOTIMPLEMENTED);
-#else
- return (socket_create(sock->manager, sock->pf, sock->type,
- socketp, sock));
-#endif
-}
-
-isc_result_t
-isc_socket_open(isc_socket_t *sock) {
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(sock->type != isc_sockettype_fdwatch);
-
- return (ISC_R_NOTIMPLEMENTED);
-}
-
-/*
- * Attach to a socket. Caller must explicitly detach when it is done.
- */
-void
-isc__socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(socketp != NULL && *socketp == NULL);
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
- sock->references++;
- UNLOCK(&sock->lock);
-
- *socketp = sock;
-}
-
-/*
- * Dereference a socket. If this is the last reference to it, clean things
- * up by destroying the socket.
- */
-void
-isc__socket_detach(isc_socket_t **socketp) {
- isc_socket_t *sock;
- isc_boolean_t kill_socket = ISC_FALSE;
-
- REQUIRE(socketp != NULL);
- sock = *socketp;
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(sock->type != isc_sockettype_fdwatch);
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
- REQUIRE(sock->references > 0);
- sock->references--;
-
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "detach_socket %d %d %d",
- sock->pending_recv, sock->pending_send,
- sock->references);
-
- if (sock->references == 0 && sock->fd != INVALID_SOCKET) {
- closesocket(sock->fd);
- sock->fd = INVALID_SOCKET;
- _set_state(sock, SOCK_CLOSED);
- }
-
- maybe_free_socket(&sock, __LINE__);
-
- *socketp = NULL;
-}
-
-isc_result_t
-isc_socket_close(isc_socket_t *sock) {
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(sock->type != isc_sockettype_fdwatch);
-
- return (ISC_R_NOTIMPLEMENTED);
-}
-
-/*
- * Dequeue an item off the given socket's read queue, set the result code
- * in the done event to the one provided, and send it to the task it was
- * destined for.
- *
- * If the event to be sent is on a list, remove it before sending. If
- * asked to, send and detach from the task as well.
- *
- * Caller must have the socket locked if the event is attached to the socket.
- */
-static void
-send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
- isc_task_t *task;
-
- task = (*dev)->ev_sender;
- (*dev)->ev_sender = sock;
-
- if (ISC_LINK_LINKED(*dev, ev_link))
- ISC_LIST_DEQUEUE(sock->recv_list, *dev, ev_link);
-
- if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
- == ISC_SOCKEVENTATTR_ATTACHED)
- isc_task_sendanddetach(&task, (isc_event_t **)dev);
- else
- isc_task_send(task, (isc_event_t **)dev);
-
- CONSISTENT(sock);
-}
-
-/*
- * See comments for send_recvdone_event() above.
- */
-static void
-send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
- isc_task_t *task;
-
- INSIST(dev != NULL && *dev != NULL);
-
- task = (*dev)->ev_sender;
- (*dev)->ev_sender = sock;
-
- if (ISC_LINK_LINKED(*dev, ev_link))
- ISC_LIST_DEQUEUE(sock->send_list, *dev, ev_link);
-
- if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED)
- == ISC_SOCKEVENTATTR_ATTACHED)
- isc_task_sendanddetach(&task, (isc_event_t **)dev);
- else
- isc_task_send(task, (isc_event_t **)dev);
-
- CONSISTENT(sock);
-}
-
-/*
- * See comments for send_recvdone_event() above.
- */
-static void
-send_acceptdone_event(isc_socket_t *sock, isc_socket_newconnev_t **adev) {
- isc_task_t *task;
-
- INSIST(adev != NULL && *adev != NULL);
-
- task = (*adev)->ev_sender;
- (*adev)->ev_sender = sock;
-
- if (ISC_LINK_LINKED(*adev, ev_link))
- ISC_LIST_DEQUEUE(sock->accept_list, *adev, ev_link);
-
- isc_task_sendanddetach(&task, (isc_event_t **)adev);
-
- CONSISTENT(sock);
-}
-
-/*
- * See comments for send_recvdone_event() above.
- */
-static void
-send_connectdone_event(isc_socket_t *sock, isc_socket_connev_t **cdev) {
- isc_task_t *task;
-
- INSIST(cdev != NULL && *cdev != NULL);
-
- task = (*cdev)->ev_sender;
- (*cdev)->ev_sender = sock;
-
- sock->connect_ev = NULL;
-
- isc_task_sendanddetach(&task, (isc_event_t **)cdev);
-
- CONSISTENT(sock);
-}
-
-/*
- * On entry to this function, the event delivered is the internal
- * readable event, and the first item on the accept_list should be
- * the done event we want to send. If the list is empty, this is a no-op,
- * so just close the new connection, unlock, and return.
- *
- * Note the socket is locked before entering here
- */
-static void
-internal_accept(isc_socket_t *sock, IoCompletionInfo *lpo, int accept_errno) {
- isc_socket_newconnev_t *adev;
- isc_result_t result = ISC_R_SUCCESS;
- isc_socket_t *nsock;
- struct sockaddr *localaddr;
- int localaddr_len = sizeof(*localaddr);
- struct sockaddr *remoteaddr;
- int remoteaddr_len = sizeof(*remoteaddr);
-
- INSIST(VALID_SOCKET(sock));
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "internal_accept called");
-
- INSIST(sock->listener);
-
- INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
- INSIST(sock->pending_accept > 0);
- sock->pending_accept--;
-
- adev = lpo->adev;
-
- /*
- * If the event is no longer in the list we can just return.
- */
- if (!acceptdone_is_active(sock, adev))
- goto done;
-
- nsock = adev->newsocket;
-
- /*
- * Pull off the done event.
- */
- ISC_LIST_UNLINK(sock->accept_list, adev, ev_link);
-
- /*
- * Extract the addresses from the socket, copy them into the structure,
- * and return the new socket.
- */
- ISCGetAcceptExSockaddrs(lpo->acceptbuffer, 0,
- sizeof(SOCKADDR_STORAGE) + 16, sizeof(SOCKADDR_STORAGE) + 16,
- (LPSOCKADDR *)&localaddr, &localaddr_len,
- (LPSOCKADDR *)&remoteaddr, &remoteaddr_len);
- memcpy(&adev->address.type, remoteaddr, remoteaddr_len);
- adev->address.length = remoteaddr_len;
- nsock->address = adev->address;
- nsock->pf = adev->address.type.sa.sa_family;
-
- socket_log(__LINE__, nsock, &nsock->address, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "internal_accept parent %p", sock);
-
- result = make_nonblock(adev->newsocket->fd);
- INSIST(result == ISC_R_SUCCESS);
-
- INSIST(setsockopt(nsock->fd, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
- (char *)&sock->fd, sizeof(sock->fd)) == 0);
-
- /*
- * Hook it up into the manager.
- */
- nsock->bound = 1;
- nsock->connected = 1;
- _set_state(nsock, SOCK_OPEN);
-
- LOCK(&nsock->manager->lock);
- ISC_LIST_APPEND(nsock->manager->socklist, nsock, link);
- InterlockedIncrement(&nsock->manager->totalSockets);
- UNLOCK(&nsock->manager->lock);
-
- socket_log(__LINE__, sock, &nsock->address, CREATION,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
- "accepted_connection new_socket %p fd %d",
- nsock, nsock->fd);
-
- adev->result = result;
- send_acceptdone_event(sock, &adev);
-
-done:
- CONSISTENT(sock);
- UNLOCK(&sock->lock);
-
- HeapFree(hHeapHandle, 0, lpo->acceptbuffer);
- lpo->acceptbuffer = NULL;
-}
-
-/*
- * Called when a socket with a pending connect() finishes.
- * Note that the socket is locked before entering.
- */
-static void
-internal_connect(isc_socket_t *sock, IoCompletionInfo *lpo, int connect_errno) {
- isc_socket_connev_t *cdev;
- char strbuf[ISC_STRERRORSIZE];
-
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
-
- INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
- INSIST(sock->pending_connect == 1);
- sock->pending_connect = 0;
-
- /*
- * Has this event been canceled?
- */
- cdev = lpo->cdev;
- if (!connectdone_is_active(sock, cdev)) {
- sock->pending_connect = 0;
- if (sock->fd != INVALID_SOCKET) {
- closesocket(sock->fd);
- sock->fd = INVALID_SOCKET;
- _set_state(sock, SOCK_CLOSED);
- }
- CONSISTENT(sock);
- UNLOCK(&sock->lock);
- return;
- }
-
- /*
- * Check possible Windows network event error status here.
- */
- if (connect_errno != 0) {
- /*
- * If the error is SOFT, just try again on this
- * fd and pretend nothing strange happened.
- */
- if (SOFT_ERROR(connect_errno) ||
- connect_errno == WSAEINPROGRESS) {
- sock->pending_connect = 1;
- CONSISTENT(sock);
- UNLOCK(&sock->lock);
- return;
- }
-
- /*
- * Translate other errors into ISC_R_* flavors.
- */
- switch (connect_errno) {
-#define ERROR_MATCH(a, b) case a: cdev->result = b; break;
- ERROR_MATCH(WSAEACCES, ISC_R_NOPERM);
- ERROR_MATCH(WSAEADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL);
- ERROR_MATCH(WSAEAFNOSUPPORT, ISC_R_ADDRNOTAVAIL);
- ERROR_MATCH(WSAECONNREFUSED, ISC_R_CONNREFUSED);
- ERROR_MATCH(WSAEHOSTUNREACH, ISC_R_HOSTUNREACH);
- ERROR_MATCH(WSAEHOSTDOWN, ISC_R_HOSTDOWN);
- ERROR_MATCH(WSAENETUNREACH, ISC_R_NETUNREACH);
- ERROR_MATCH(WSAENETDOWN, ISC_R_NETDOWN);
- ERROR_MATCH(WSAENOBUFS, ISC_R_NORESOURCES);
- ERROR_MATCH(WSAECONNRESET, ISC_R_CONNECTIONRESET);
- ERROR_MATCH(WSAECONNABORTED, ISC_R_CONNECTIONRESET);
- ERROR_MATCH(WSAETIMEDOUT, ISC_R_TIMEDOUT);
-#undef ERROR_MATCH
- default:
- cdev->result = ISC_R_UNEXPECTED;
- isc__strerror(connect_errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "internal_connect: connect() %s",
- strbuf);
- }
- } else {
- INSIST(setsockopt(sock->fd, SOL_SOCKET,
- SO_UPDATE_CONNECT_CONTEXT, NULL, 0) == 0);
- cdev->result = ISC_R_SUCCESS;
- sock->connected = 1;
- socket_log(__LINE__, sock, &sock->address, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
- "internal_connect: success");
- }
-
- send_connectdone_event(sock, &cdev);
-
- UNLOCK(&sock->lock);
-}
-
-/*
- * Loop through the socket, returning ISC_R_EOF for each done event pending.
- */
-static void
-send_recvdone_abort(isc_socket_t *sock, isc_result_t result) {
- isc_socketevent_t *dev;
-
- while (!ISC_LIST_EMPTY(sock->recv_list)) {
- dev = ISC_LIST_HEAD(sock->recv_list);
- dev->result = result;
- send_recvdone_event(sock, &dev);
- }
-}
-
-/*
- * Take the data we received in our private buffer, and if any recv() calls on
- * our list are satisfied, send the corresponding done event.
- *
- * If we need more data (there are still items on the recv_list after we consume all
- * our data) then arrange for another system recv() call to fill our buffers.
- */
-static void
-internal_recv(isc_socket_t *sock, int nbytes)
-{
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
- "internal_recv: %d bytes received", nbytes);
-
- /*
- * If we got here, the I/O operation succeeded. However, we might still have removed this
- * event from our notification list (or never placed it on it due to immediate completion.)
- * Handle the reference counting here, and handle the cancellation event just after.
- */
- INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
- INSIST(sock->pending_recv > 0);
- sock->pending_recv--;
-
- /*
- * The only way we could have gotten here is that our I/O has successfully completed.
- * Update our pointers, and move on. The only odd case here is that we might not
- * have received enough data on a TCP stream to satisfy the minimum requirements. If
- * this is the case, we will re-issue the recv() call for what we need.
- *
- * We do check for a recv() of 0 bytes on a TCP stream. This means the remote end
- * has closed.
- */
- if (nbytes == 0 && sock->type == isc_sockettype_tcp) {
- send_recvdone_abort(sock, ISC_R_EOF);
- maybe_free_socket(&sock, __LINE__);
- return;
- }
- sock->recvbuf.remaining = nbytes;
- sock->recvbuf.consume_position = sock->recvbuf.base;
- completeio_recv(sock);
-
- /*
- * If there are more receivers waiting for data, queue another receive
- * here.
- */
- queue_receive_request(sock);
-
- /*
- * Unlock and/or destroy if we are the last thing this socket has left to do.
- */
- maybe_free_socket(&sock, __LINE__);
-}
-
-static void
-internal_send(isc_socket_t *sock, isc_socketevent_t *dev,
- struct msghdr *messagehdr, int nbytes, int send_errno, IoCompletionInfo *lpo)
-{
- buflist_t *buffer;
-
- /*
- * Find out what socket this is and lock it.
- */
- INSIST(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- socket_log(__LINE__, sock, NULL, IOEVENT,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALSEND,
- "internal_send: task got socket event %p", dev);
-
- buffer = ISC_LIST_HEAD(lpo->bufferlist);
- while (buffer != NULL) {
- ISC_LIST_DEQUEUE(lpo->bufferlist, buffer, link);
-
- socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTLOCK,
- "free_buffer %p %p", buffer, buffer->buf);
-
- HeapFree(hHeapHandle, 0, buffer->buf);
- HeapFree(hHeapHandle, 0, buffer);
- buffer = ISC_LIST_HEAD(lpo->bufferlist);
- }
-
- INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
- INSIST(sock->pending_send > 0);
- sock->pending_send--;
-
- /* If the event is no longer in the list we can just return */
- if (!senddone_is_active(sock, dev))
- goto done;
-
- /*
- * Set the error code and send things on its way.
- */
- switch (completeio_send(sock, dev, messagehdr, nbytes, send_errno)) {
- case DOIO_SOFT:
- break;
- case DOIO_HARD:
- case DOIO_SUCCESS:
- send_senddone_event(sock, &dev);
- break;
- }
-
- done:
- maybe_free_socket(&sock, __LINE__);
-}
-
-/*
- * These return if the done event passed in is on the list (or for connect, is
- * the one we're waiting for. Using these ensures we will not double-send an
- * event.
- */
-static isc_boolean_t
-senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev)
-{
- isc_socketevent_t *ldev;
-
- ldev = ISC_LIST_HEAD(sock->send_list);
- while (ldev != NULL && ldev != dev)
- ldev = ISC_LIST_NEXT(ldev, ev_link);
-
- return (ldev == NULL ? ISC_FALSE : ISC_TRUE);
-}
-
-static isc_boolean_t
-acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev)
-{
- isc_socket_newconnev_t *ldev;
-
- ldev = ISC_LIST_HEAD(sock->accept_list);
- while (ldev != NULL && ldev != dev)
- ldev = ISC_LIST_NEXT(ldev, ev_link);
-
- return (ldev == NULL ? ISC_FALSE : ISC_TRUE);
-}
-
-static isc_boolean_t
-connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev)
-{
- return (sock->connect_ev == dev ? ISC_TRUE : ISC_FALSE);
-}
-
-//
-// The Windows network stack seems to have two very distinct paths depending
-// on what is installed. Specifically, if something is looking at network
-// connections (like an anti-virus or anti-malware application, such as
-// McAfee products) Windows may return additional error conditions which
-// were not previously returned.
-//
-// One specific one is when a TCP SYN scan is used. In this situation,
-// Windows responds with the SYN-ACK, but the scanner never responds with
-// the 3rd packet, the ACK. Windows consiers this a partially open connection.
-// Most Unix networking stacks, and Windows without McAfee installed, will
-// not return this to the caller. However, with this product installed,
-// Windows returns this as a failed status on the Accept() call. Here, we
-// will just re-issue the ISCAcceptEx() call as if nothing had happened.
-//
-// This code should only be called when the listening socket has received
-// such an error. Additionally, the "parent" socket must be locked.
-// Additionally, the lpo argument is re-used here, and must not be freed
-// by the caller.
-//
-static isc_result_t
-restart_accept(isc_socket_t *parent, IoCompletionInfo *lpo)
-{
- isc_socket_t *nsock = lpo->adev->newsocket;
- SOCKET new_fd;
-
- /*
- * AcceptEx() requires we pass in a socket. Note that we carefully
- * do not close the previous socket in case of an error message returned by
- * our new socket() call. If we return an error here, our caller will
- * clean up.
- */
- new_fd = socket(parent->pf, SOCK_STREAM, IPPROTO_TCP);
- if (nsock->fd == INVALID_SOCKET) {
- return (ISC_R_FAILURE); // parent will ask windows for error message
- }
- closesocket(nsock->fd);
- nsock->fd = new_fd;
-
- memset(&lpo->overlapped, 0, sizeof(lpo->overlapped));
-
- ISCAcceptEx(parent->fd,
- nsock->fd, /* Accepted Socket */
- lpo->acceptbuffer, /* Buffer for initial Recv */
- 0, /* Length of Buffer */
- sizeof(SOCKADDR_STORAGE) + 16, /* Local address length + 16 */
- sizeof(SOCKADDR_STORAGE) + 16, /* Remote address lengh + 16 */
- (LPDWORD)&lpo->received_bytes, /* Bytes Recved */
- (LPOVERLAPPED)lpo /* Overlapped structure */
- );
-
- InterlockedDecrement(&nsock->manager->iocp_total);
- iocompletionport_update(nsock);
-
- return (ISC_R_SUCCESS);
-}
-
-/*
- * This is the I/O Completion Port Worker Function. It loops forever
- * waiting for I/O to complete and then forwards them for further
- * processing. There are a number of these in separate threads.
- */
-static isc_threadresult_t WINAPI
-SocketIoThread(LPVOID ThreadContext) {
- isc_socketmgr_t *manager = ThreadContext;
- BOOL bSuccess = FALSE;
- DWORD nbytes;
- IoCompletionInfo *lpo = NULL;
- isc_socket_t *sock = NULL;
- int request;
- struct msghdr *messagehdr = NULL;
- int errval;
- char strbuf[ISC_STRERRORSIZE];
- int errstatus;
-
- REQUIRE(VALID_MANAGER(manager));
-
- /*
- * Set the thread priority high enough so I/O will
- * preempt normal recv packet processing, but not
- * higher than the timer sync thread.
- */
- if (!SetThreadPriority(GetCurrentThread(),
- THREAD_PRIORITY_ABOVE_NORMAL)) {
- errval = GetLastError();
- isc__strerror(errval, strbuf, sizeof(strbuf));
- FATAL_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_FAILED,
- "Can't set thread priority: %s"),
- strbuf);
- }
-
- /*
- * Loop forever waiting on I/O Completions and then processing them
- */
- while (TRUE) {
- wait_again:
- bSuccess = GetQueuedCompletionStatus(manager->hIoCompletionPort,
- &nbytes, (LPDWORD)&sock,
- (LPWSAOVERLAPPED *)&lpo,
- INFINITE);
- if (lpo == NULL) /* Received request to exit */
- break;
-
- REQUIRE(VALID_SOCKET(sock));
-
- request = lpo->request_type;
-
- errstatus = 0;
- if (!bSuccess) {
- isc_result_t isc_result;
-
- /*
- * Did the I/O operation complete?
- */
- errstatus = GetLastError();
- isc_result = isc__errno2resultx(errstatus, __FILE__, __LINE__);
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
- switch (request) {
- case SOCKET_RECV:
- INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
- INSIST(sock->pending_recv > 0);
- sock->pending_recv--;
- if (!sock->connected &&
- ((errstatus == ERROR_HOST_UNREACHABLE) ||
- (errstatus == WSAENETRESET) ||
- (errstatus == WSAECONNRESET))) {
- /* ignore soft errors */
- queue_receive_request(sock);
- break;
- }
- send_recvdone_abort(sock, isc_result);
- if (isc_result == ISC_R_UNEXPECTED) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "SOCKET_RECV: Windows error code: %d, returning ISC error %d",
- errstatus, isc_result);
- }
- break;
-
- case SOCKET_SEND:
- INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
- INSIST(sock->pending_send > 0);
- sock->pending_send--;
- if (senddone_is_active(sock, lpo->dev)) {
- lpo->dev->result = isc_result;
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "canceled_send");
- send_senddone_event(sock, &lpo->dev);
- }
- break;
-
- case SOCKET_ACCEPT:
- INSIST(sock->pending_iocp > 0);
- INSIST(sock->pending_accept > 0);
-
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "Accept: errstatus=%d isc_result=%d", errstatus, isc_result);
-
- if (acceptdone_is_active(sock, lpo->adev)) {
- if (restart_accept(sock, lpo) == ISC_R_SUCCESS) {
- UNLOCK(&sock->lock);
- goto wait_again;
- } else {
- errstatus = GetLastError();
- isc_result = isc__errno2resultx(errstatus, __FILE__, __LINE__);
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "restart_accept() failed: errstatus=%d isc_result=%d",
- errstatus, isc_result);
- }
- }
-
- sock->pending_iocp--;
- sock->pending_accept--;
- if (acceptdone_is_active(sock, lpo->adev)) {
- closesocket(lpo->adev->newsocket->fd);
- lpo->adev->newsocket->fd = INVALID_SOCKET;
- lpo->adev->newsocket->references--;
- free_socket(&lpo->adev->newsocket, __LINE__);
- lpo->adev->result = isc_result;
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "canceled_accept");
- send_acceptdone_event(sock, &lpo->adev);
- }
- break;
-
- case SOCKET_CONNECT:
- INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
- INSIST(sock->pending_connect == 1);
- sock->pending_connect = 0;
- if (connectdone_is_active(sock, lpo->cdev)) {
- lpo->cdev->result = isc_result;
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "canceled_connect");
- send_connectdone_event(sock, &lpo->cdev);
- }
- break;
- }
- maybe_free_socket(&sock, __LINE__);
-
- if (lpo != NULL)
- HeapFree(hHeapHandle, 0, lpo);
- continue;
- }
-
- messagehdr = &lpo->messagehdr;
-
- switch (request) {
- case SOCKET_RECV:
- internal_recv(sock, nbytes);
- break;
- case SOCKET_SEND:
- internal_send(sock, lpo->dev, messagehdr, nbytes, errstatus, lpo);
- break;
- case SOCKET_ACCEPT:
- internal_accept(sock, lpo, errstatus);
- break;
- case SOCKET_CONNECT:
- internal_connect(sock, lpo, errstatus);
- break;
- }
-
- if (lpo != NULL)
- HeapFree(hHeapHandle, 0, lpo);
- }
-
- /*
- * Exit Completion Port Thread
- */
- manager_log(manager, TRACE,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_EXITING, "SocketIoThread exiting"));
- return ((isc_threadresult_t)0);
-}
-
-/*
- * Create a new socket manager.
- */
-isc_result_t
-isc__socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
- return (isc_socketmgr_create2(mctx, managerp, 0));
-}
-
-isc_result_t
-isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
- unsigned int maxsocks)
-{
- isc_socketmgr_t *manager;
- isc_result_t result;
-
- REQUIRE(managerp != NULL && *managerp == NULL);
-
- if (maxsocks != 0)
- return (ISC_R_NOTIMPLEMENTED);
-
- manager = isc_mem_get(mctx, sizeof(*manager));
- if (manager == NULL)
- return (ISC_R_NOMEMORY);
-
- InitSockets();
-
- manager->magic = SOCKET_MANAGER_MAGIC;
- manager->mctx = NULL;
- manager->stats = NULL;
- ISC_LIST_INIT(manager->socklist);
- result = isc_mutex_init(&manager->lock);
- if (result != ISC_R_SUCCESS) {
- isc_mem_put(mctx, manager, sizeof(*manager));
- return (result);
- }
- if (isc_condition_init(&manager->shutdown_ok) != ISC_R_SUCCESS) {
- DESTROYLOCK(&manager->lock);
- isc_mem_put(mctx, manager, sizeof(*manager));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_condition_init() %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- return (ISC_R_UNEXPECTED);
- }
-
- isc_mem_attach(mctx, &manager->mctx);
-
- iocompletionport_init(manager); /* Create the Completion Ports */
-
- manager->bShutdown = ISC_FALSE;
- manager->totalSockets = 0;
- manager->iocp_total = 0;
-
- *managerp = manager;
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__socketmgr_getmaxsockets(isc_socketmgr_t *manager, unsigned int *nsockp) {
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(nsockp != NULL);
-
- return (ISC_R_NOTIMPLEMENTED);
-}
-
-void
-isc__socketmgr_setstats(isc_socketmgr_t *manager, isc_stats_t *stats) {
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(ISC_LIST_EMPTY(manager->socklist));
- REQUIRE(manager->stats == NULL);
- REQUIRE(isc_stats_ncounters(stats) == isc_sockstatscounter_max);
-
- isc_stats_attach(stats, &manager->stats);
-}
-
-void
-isc__socketmgr_destroy(isc_socketmgr_t **managerp) {
- isc_socketmgr_t *manager;
- int i;
- isc_mem_t *mctx;
-
- /*
- * Destroy a socket manager.
- */
-
- REQUIRE(managerp != NULL);
- manager = *managerp;
- REQUIRE(VALID_MANAGER(manager));
-
- LOCK(&manager->lock);
-
- /*
- * Wait for all sockets to be destroyed.
- */
- while (!ISC_LIST_EMPTY(manager->socklist)) {
- manager_log(manager, CREATION,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_SOCKETSREMAIN,
- "sockets exist"));
- WAIT(&manager->shutdown_ok, &manager->lock);
- }
-
- UNLOCK(&manager->lock);
-
- /*
- * Here, we need to had some wait code for the completion port
- * thread.
- */
- signal_iocompletionport_exit(manager);
- manager->bShutdown = ISC_TRUE;
-
- /*
- * Wait for threads to exit.
- */
- for (i = 0; i < manager->maxIOCPThreads; i++) {
- if (isc_thread_join((isc_thread_t) manager->hIOCPThreads[i],
- NULL) != ISC_R_SUCCESS)
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_thread_join() for Completion Port %s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- }
- /*
- * Clean up.
- */
-
- CloseHandle(manager->hIoCompletionPort);
-
- (void)isc_condition_destroy(&manager->shutdown_ok);
-
- DESTROYLOCK(&manager->lock);
- if (manager->stats != NULL)
- isc_stats_detach(&manager->stats);
- manager->magic = 0;
- mctx= manager->mctx;
- isc_mem_put(mctx, manager, sizeof(*manager));
-
- isc_mem_detach(&mctx);
-
- *managerp = NULL;
-}
-
-static void
-queue_receive_event(isc_socket_t *sock, isc_task_t *task, isc_socketevent_t *dev)
-{
- isc_task_t *ntask = NULL;
-
- isc_task_attach(task, &ntask);
- dev->attributes |= ISC_SOCKEVENTATTR_ATTACHED;
-
- /*
- * Enqueue the request.
- */
- INSIST(!ISC_LINK_LINKED(dev, ev_link));
- ISC_LIST_ENQUEUE(sock->recv_list, dev, ev_link);
-
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "queue_receive_event: event %p -> task %p",
- dev, ntask);
-}
-
-/*
- * Check the pending receive queue, and if we have data pending, give it to this
- * caller. If we have none, queue an I/O request. If this caller is not the first
- * on the list, then we will just queue this event and return.
- *
- * Caller must have the socket locked.
- */
-static isc_result_t
-socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
- unsigned int flags)
-{
- int cc = 0;
- isc_task_t *ntask = NULL;
- isc_result_t result = ISC_R_SUCCESS;
- int recv_errno = 0;
-
- dev->ev_sender = task;
-
- if (sock->fd == INVALID_SOCKET)
- return (ISC_R_EOF);
-
- /*
- * Queue our event on the list of things to do. Call our function to
- * attempt to fill buffers as much as possible, and return done events.
- * We are going to lie about our handling of the ISC_SOCKFLAG_IMMEDIATE
- * here and tell our caller that we could not satisfy it immediately.
- */
- queue_receive_event(sock, task, dev);
- if ((flags & ISC_SOCKFLAG_IMMEDIATE) != 0)
- result = ISC_R_INPROGRESS;
-
- completeio_recv(sock);
-
- /*
- * If there are more receivers waiting for data, queue another receive
- * here. If the
- */
- queue_receive_request(sock);
-
- return (result);
-}
-
-isc_result_t
-isc__socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- unsigned int minimum, isc_task_t *task,
- isc_taskaction_t action, const void *arg)
-{
- isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
- unsigned int iocount;
- isc_buffer_t *buffer;
- isc_result_t ret;
-
- REQUIRE(VALID_SOCKET(sock));
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * Make sure that the socket is not closed. XXXMLG change error here?
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- REQUIRE(buflist != NULL);
- REQUIRE(!ISC_LIST_EMPTY(*buflist));
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- iocount = isc_bufferlist_availablecount(buflist);
- REQUIRE(iocount > 0);
-
- INSIST(sock->bound);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_RECVDONE, action, arg);
- if (dev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
-
- /*
- * UDP sockets are always partial read
- */
- if (sock->type == isc_sockettype_udp)
- dev->minimum = 1;
- else {
- if (minimum == 0)
- dev->minimum = iocount;
- else
- dev->minimum = minimum;
- }
-
- /*
- * Move each buffer from the passed in list to our internal one.
- */
- buffer = ISC_LIST_HEAD(*buflist);
- while (buffer != NULL) {
- ISC_LIST_DEQUEUE(*buflist, buffer, link);
- ISC_LIST_ENQUEUE(dev->bufferlist, buffer, link);
- buffer = ISC_LIST_HEAD(*buflist);
- }
-
- ret = socket_recv(sock, dev, task, 0);
-
- UNLOCK(&sock->lock);
- return (ret);
-}
-
-isc_result_t
-isc__socket_recv(isc_socket_t *sock, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_taskaction_t action, const void *arg)
-{
- isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
- isc_result_t ret;
-
- REQUIRE(VALID_SOCKET(sock));
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- INSIST(sock->bound);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_RECVDONE, action, arg);
- if (dev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
-
- ret = isc_socket_recv2(sock, region, minimum, task, dev, 0);
- UNLOCK(&sock->lock);
- return (ret);
-}
-
-isc_result_t
-isc__socket_recv2(isc_socket_t *sock, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_socketevent_t *event, unsigned int flags)
-{
- isc_result_t ret;
-
- REQUIRE(VALID_SOCKET(sock));
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- event->result = ISC_R_UNEXPECTED;
- event->ev_sender = sock;
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- ISC_LIST_INIT(event->bufferlist);
- event->region = *region;
- event->n = 0;
- event->offset = 0;
- event->attributes = 0;
-
- /*
- * UDP sockets are always partial read.
- */
- if (sock->type == isc_sockettype_udp)
- event->minimum = 1;
- else {
- if (minimum == 0)
- event->minimum = region->length;
- else
- event->minimum = minimum;
- }
-
- ret = socket_recv(sock, event, task, flags);
- UNLOCK(&sock->lock);
- return (ret);
-}
-
-/*
- * Caller must have the socket locked.
- */
-static isc_result_t
-socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
- unsigned int flags)
-{
- int io_state;
- int send_errno = 0;
- int cc = 0;
- isc_task_t *ntask = NULL;
- isc_result_t result = ISC_R_SUCCESS;
-
- dev->ev_sender = task;
-
- set_dev_address(address, sock, dev);
- if (pktinfo != NULL) {
- socket_log(__LINE__, sock, NULL, TRACE, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_PKTINFOPROVIDED,
- "pktinfo structure provided, ifindex %u (set to 0)",
- pktinfo->ipi6_ifindex);
-
- dev->attributes |= ISC_SOCKEVENTATTR_PKTINFO;
- dev->pktinfo = *pktinfo;
- /*
- * Set the pktinfo index to 0 here, to let the kernel decide
- * what interface it should send on.
- */
- dev->pktinfo.ipi6_ifindex = 0;
- }
-
- io_state = startio_send(sock, dev, &cc, &send_errno);
- switch (io_state) {
- case DOIO_PENDING: /* I/O started. Nothing more to do */
- case DOIO_SOFT:
- /*
- * We couldn't send all or part of the request right now, so
- * queue it unless ISC_SOCKFLAG_NORETRY is set.
- */
- if ((flags & ISC_SOCKFLAG_NORETRY) == 0) {
- isc_task_attach(task, &ntask);
- dev->attributes |= ISC_SOCKEVENTATTR_ATTACHED;
-
- /*
- * Enqueue the request.
- */
- INSIST(!ISC_LINK_LINKED(dev, ev_link));
- ISC_LIST_ENQUEUE(sock->send_list, dev, ev_link);
-
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "socket_send: event %p -> task %p",
- dev, ntask);
-
- if ((flags & ISC_SOCKFLAG_IMMEDIATE) != 0)
- result = ISC_R_INPROGRESS;
- break;
- }
-
- case DOIO_SUCCESS:
- break;
- }
-
- return (result);
-}
-
-isc_result_t
-isc__socket_send(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- /*
- * REQUIRE() checking is performed in isc_socket_sendto().
- */
- return (isc_socket_sendto(sock, region, task, action, arg, NULL,
- NULL));
-}
-
-isc_result_t
-isc__socket_sendto(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
-{
- isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
- isc_result_t ret;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(sock->type != isc_sockettype_fdwatch);
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
- REQUIRE(region != NULL);
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- INSIST(sock->bound);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_SENDDONE, action, arg);
- if (dev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
- dev->region = *region;
-
- ret = socket_send(sock, dev, task, address, pktinfo, 0);
- UNLOCK(&sock->lock);
- return (ret);
-}
-
-isc_result_t
-isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- return (isc_socket_sendtov(sock, buflist, task, action, arg, NULL,
- NULL));
-}
-
-isc_result_t
-isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
-{
- isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
- unsigned int iocount;
- isc_buffer_t *buffer;
- isc_result_t ret;
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
- REQUIRE(buflist != NULL);
- REQUIRE(!ISC_LIST_EMPTY(*buflist));
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- iocount = isc_bufferlist_usedcount(buflist);
- REQUIRE(iocount > 0);
-
- dev = allocate_socketevent(sock, ISC_SOCKEVENT_SENDDONE, action, arg);
- if (dev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
-
- /*
- * Move each buffer from the passed in list to our internal one.
- */
- buffer = ISC_LIST_HEAD(*buflist);
- while (buffer != NULL) {
- ISC_LIST_DEQUEUE(*buflist, buffer, link);
- ISC_LIST_ENQUEUE(dev->bufferlist, buffer, link);
- buffer = ISC_LIST_HEAD(*buflist);
- }
-
- ret = socket_send(sock, dev, task, address, pktinfo, 0);
- UNLOCK(&sock->lock);
- return (ret);
-}
-
-isc_result_t
-isc__socket_sendto2(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
- isc_socketevent_t *event, unsigned int flags)
-{
- isc_result_t ret;
-
- REQUIRE(VALID_SOCKET(sock));
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- REQUIRE((flags & ~(ISC_SOCKFLAG_IMMEDIATE|ISC_SOCKFLAG_NORETRY)) == 0);
- if ((flags & ISC_SOCKFLAG_NORETRY) != 0)
- REQUIRE(sock->type == isc_sockettype_udp);
- event->ev_sender = sock;
- event->result = ISC_R_UNEXPECTED;
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
- ISC_LIST_INIT(event->bufferlist);
- event->region = *region;
- event->n = 0;
- event->offset = 0;
- event->attributes = 0;
-
- ret = socket_send(sock, event, task, address, pktinfo, flags);
- UNLOCK(&sock->lock);
- return (ret);
-}
-
-isc_result_t
-isc__socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
- unsigned int options) {
- int bind_errno;
- char strbuf[ISC_STRERRORSIZE];
- int on = 1;
-
- REQUIRE(VALID_SOCKET(sock));
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- INSIST(!sock->bound);
- INSIST(!sock->dupped);
-
- if (sock->pf != sockaddr->type.sa.sa_family) {
- UNLOCK(&sock->lock);
- return (ISC_R_FAMILYMISMATCH);
- }
- /*
- * Only set SO_REUSEADDR when we want a specific port.
- */
- if ((options & ISC_SOCKET_REUSEADDRESS) != 0 &&
- isc_sockaddr_getport(sockaddr) != (in_port_t)0 &&
- setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
- sizeof(on)) < 0) {
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "setsockopt(%d) %s", sock->fd,
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
- /* Press on... */
- }
- if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) {
- bind_errno = WSAGetLastError();
- UNLOCK(&sock->lock);
- switch (bind_errno) {
- case WSAEACCES:
- return (ISC_R_NOPERM);
- case WSAEADDRNOTAVAIL:
- return (ISC_R_ADDRNOTAVAIL);
- case WSAEADDRINUSE:
- return (ISC_R_ADDRINUSE);
- case WSAEINVAL:
- return (ISC_R_BOUND);
- default:
- isc__strerror(bind_errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "bind: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
- }
-
- socket_log(__LINE__, sock, sockaddr, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "bound");
- sock->bound = 1;
-
- UNLOCK(&sock->lock);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__socket_filter(isc_socket_t *sock, const char *filter) {
- UNUSED(sock);
- UNUSED(filter);
-
- REQUIRE(VALID_SOCKET(sock));
- return (ISC_R_NOTIMPLEMENTED);
-}
-
-/*
- * Set up to listen on a given socket. We do this by creating an internal
- * event that will be dispatched when the socket has read activity. The
- * watcher will send the internal event to the task when there is a new
- * connection.
- *
- * Unlike in read, we don't preallocate a done event here. Every time there
- * is a new connection we'll have to allocate a new one anyway, so we might
- * as well keep things simple rather than having to track them.
- */
-isc_result_t
-isc__socket_listen(isc_socket_t *sock, unsigned int backlog) {
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- REQUIRE(!sock->listener);
- REQUIRE(sock->bound);
- REQUIRE(sock->type == isc_sockettype_tcp);
-
- if (backlog == 0)
- backlog = SOMAXCONN;
-
- if (listen(sock->fd, (int)backlog) < 0) {
- UNLOCK(&sock->lock);
- isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
-
- UNEXPECTED_ERROR(__FILE__, __LINE__, "listen: %s", strbuf);
-
- return (ISC_R_UNEXPECTED);
- }
-
- socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND, "listening");
- sock->listener = 1;
- _set_state(sock, SOCK_LISTEN);
-
- UNLOCK(&sock->lock);
- return (ISC_R_SUCCESS);
-}
-
-/*
- * This should try to do aggressive accept() XXXMLG
- */
-isc_result_t
-isc__socket_accept(isc_socket_t *sock,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- isc_socket_newconnev_t *adev;
- isc_socketmgr_t *manager;
- isc_task_t *ntask = NULL;
- isc_socket_t *nsock;
- isc_result_t result;
- IoCompletionInfo *lpo;
-
- REQUIRE(VALID_SOCKET(sock));
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- REQUIRE(sock->listener);
-
- /*
- * Sender field is overloaded here with the task we will be sending
- * this event to. Just before the actual event is delivered the
- * actual ev_sender will be touched up to be the socket.
- */
- adev = (isc_socket_newconnev_t *)
- isc_event_allocate(manager->mctx, task, ISC_SOCKEVENT_NEWCONN,
- action, arg, sizeof(*adev));
- if (adev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
- ISC_LINK_INIT(adev, ev_link);
-
- result = allocate_socket(manager, sock->type, &nsock);
- if (result != ISC_R_SUCCESS) {
- isc_event_free((isc_event_t **)&adev);
- UNLOCK(&sock->lock);
- return (result);
- }
-
- /*
- * AcceptEx() requires we pass in a socket.
- */
- nsock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP);
- if (nsock->fd == INVALID_SOCKET) {
- free_socket(&nsock, __LINE__);
- isc_event_free((isc_event_t **)&adev);
- UNLOCK(&sock->lock);
- return (ISC_R_FAILURE); // XXXMLG need real error message
- }
-
- /*
- * Attach to socket and to task.
- */
- isc_task_attach(task, &ntask);
- if (isc_task_exiting(ntask)) {
- free_socket(&nsock, __LINE__);
- isc_task_detach(&ntask);
- isc_event_free(ISC_EVENT_PTR(&adev));
- UNLOCK(&sock->lock);
- return (ISC_R_SHUTTINGDOWN);
- }
- nsock->references++;
-
- adev->ev_sender = ntask;
- adev->newsocket = nsock;
- _set_state(nsock, SOCK_ACCEPT);
-
- /*
- * Queue io completion for an accept().
- */
- lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle,
- HEAP_ZERO_MEMORY,
- sizeof(IoCompletionInfo));
- RUNTIME_CHECK(lpo != NULL);
- lpo->acceptbuffer = (void *)HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY,
- (sizeof(SOCKADDR_STORAGE) + 16) * 2);
- RUNTIME_CHECK(lpo->acceptbuffer != NULL);
-
- lpo->adev = adev;
- lpo->request_type = SOCKET_ACCEPT;
-
- ISCAcceptEx(sock->fd,
- nsock->fd, /* Accepted Socket */
- lpo->acceptbuffer, /* Buffer for initial Recv */
- 0, /* Length of Buffer */
- sizeof(SOCKADDR_STORAGE) + 16, /* Local address length + 16 */
- sizeof(SOCKADDR_STORAGE) + 16, /* Remote address lengh + 16 */
- (LPDWORD)&lpo->received_bytes, /* Bytes Recved */
- (LPOVERLAPPED)lpo /* Overlapped structure */
- );
- iocompletionport_update(nsock);
-
- socket_log(__LINE__, sock, NULL, TRACE,
- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_BOUND,
- "accepting for nsock %p fd %d", nsock, nsock->fd);
-
- /*
- * Enqueue the event
- */
- ISC_LIST_ENQUEUE(sock->accept_list, adev, ev_link);
- sock->pending_accept++;
- sock->pending_iocp++;
-
- UNLOCK(&sock->lock);
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
-{
- char strbuf[ISC_STRERRORSIZE];
- isc_socket_connev_t *cdev;
- isc_task_t *ntask = NULL;
- isc_socketmgr_t *manager;
- IoCompletionInfo *lpo;
- int bind_errno;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(addr != NULL);
- REQUIRE(task != NULL);
- REQUIRE(action != NULL);
-
- manager = sock->manager;
- REQUIRE(VALID_MANAGER(manager));
- REQUIRE(addr != NULL);
-
- if (isc_sockaddr_ismulticast(addr))
- return (ISC_R_MULTICAST);
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- /*
- * Windows sockets won't connect unless the socket is bound.
- */
- if (!sock->bound) {
- isc_sockaddr_t any;
-
- isc_sockaddr_anyofpf(&any, isc_sockaddr_pf(addr));
- if (bind(sock->fd, &any.type.sa, any.length) < 0) {
- bind_errno = WSAGetLastError();
- UNLOCK(&sock->lock);
- switch (bind_errno) {
- case WSAEACCES:
- return (ISC_R_NOPERM);
- case WSAEADDRNOTAVAIL:
- return (ISC_R_ADDRNOTAVAIL);
- case WSAEADDRINUSE:
- return (ISC_R_ADDRINUSE);
- case WSAEINVAL:
- return (ISC_R_BOUND);
- default:
- isc__strerror(bind_errno, strbuf,
- sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "bind: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
- }
- sock->bound = 1;
- }
-
- REQUIRE(!sock->pending_connect);
-
- cdev = (isc_socket_connev_t *)isc_event_allocate(manager->mctx, sock,
- ISC_SOCKEVENT_CONNECT,
- action, arg,
- sizeof(*cdev));
- if (cdev == NULL) {
- UNLOCK(&sock->lock);
- return (ISC_R_NOMEMORY);
- }
- ISC_LINK_INIT(cdev, ev_link);
-
- if (sock->type == isc_sockettype_tcp) {
- /*
- * Queue io completion for an accept().
- */
- lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle,
- HEAP_ZERO_MEMORY,
- sizeof(IoCompletionInfo));
- lpo->cdev = cdev;
- lpo->request_type = SOCKET_CONNECT;
-
- sock->address = *addr;
- ISCConnectEx(sock->fd, &addr->type.sa, addr->length,
- NULL, 0, NULL, (LPOVERLAPPED)lpo);
-
- /*
- * Attach to task.
- */
- isc_task_attach(task, &ntask);
- cdev->ev_sender = ntask;
-
- sock->pending_connect = 1;
- _set_state(sock, SOCK_CONNECT);
-
- /*
- * Enqueue the request.
- */
- sock->connect_ev = cdev;
- sock->pending_iocp++;
- } else {
- WSAConnect(sock->fd, &addr->type.sa, addr->length, NULL, NULL, NULL, NULL);
- cdev->result = ISC_R_SUCCESS;
- isc_task_send(task, (isc_event_t **)&cdev);
- }
- CONSISTENT(sock);
- UNLOCK(&sock->lock);
-
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc__socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) {
- isc_result_t result;
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(addressp != NULL);
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- if (sock->connected) {
- *addressp = sock->address;
- result = ISC_R_SUCCESS;
- } else {
- result = ISC_R_NOTCONNECTED;
- }
-
- UNLOCK(&sock->lock);
-
- return (result);
-}
-
-isc_result_t
-isc__socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
- ISC_SOCKADDR_LEN_T len;
- isc_result_t result;
- char strbuf[ISC_STRERRORSIZE];
-
- REQUIRE(VALID_SOCKET(sock));
- REQUIRE(addressp != NULL);
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- if (!sock->bound) {
- result = ISC_R_NOTBOUND;
- goto out;
- }
-
- result = ISC_R_SUCCESS;
-
- len = sizeof(addressp->type);
- if (getsockname(sock->fd, &addressp->type.sa, (void *)&len) < 0) {
- isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "getsockname: %s",
- strbuf);
- result = ISC_R_UNEXPECTED;
- goto out;
- }
- addressp->length = (unsigned int)len;
-
- out:
- UNLOCK(&sock->lock);
-
- return (result);
-}
-
-/*
- * Run through the list of events on this socket, and cancel the ones
- * queued for task "task" of type "how". "how" is a bitmask.
- */
-void
-isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
-
- REQUIRE(VALID_SOCKET(sock));
-
- /*
- * Quick exit if there is nothing to do. Don't even bother locking
- * in this case.
- */
- if (how == 0)
- return;
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return;
- }
-
- /*
- * All of these do the same thing, more or less.
- * Each will:
- * o If the internal event is marked as "posted" try to
- * remove it from the task's queue. If this fails, mark it
- * as canceled instead, and let the task clean it up later.
- * o For each I/O request for that task of that type, post
- * its done event with status of "ISC_R_CANCELED".
- * o Reset any state needed.
- */
-
- if ((how & ISC_SOCKCANCEL_RECV) == ISC_SOCKCANCEL_RECV) {
- isc_socketevent_t *dev;
- isc_socketevent_t *next;
- isc_task_t *current_task;
-
- dev = ISC_LIST_HEAD(sock->recv_list);
- while (dev != NULL) {
- current_task = dev->ev_sender;
- next = ISC_LIST_NEXT(dev, ev_link);
- if ((task == NULL) || (task == current_task)) {
- dev->result = ISC_R_CANCELED;
- send_recvdone_event(sock, &dev);
- }
- dev = next;
- }
- }
- how &= ~ISC_SOCKCANCEL_RECV;
-
- if ((how & ISC_SOCKCANCEL_SEND) == ISC_SOCKCANCEL_SEND) {
- isc_socketevent_t *dev;
- isc_socketevent_t *next;
- isc_task_t *current_task;
-
- dev = ISC_LIST_HEAD(sock->send_list);
-
- while (dev != NULL) {
- current_task = dev->ev_sender;
- next = ISC_LIST_NEXT(dev, ev_link);
- if ((task == NULL) || (task == current_task)) {
- dev->result = ISC_R_CANCELED;
- send_senddone_event(sock, &dev);
- }
- dev = next;
- }
- }
- how &= ~ISC_SOCKCANCEL_SEND;
-
- if (((how & ISC_SOCKCANCEL_ACCEPT) == ISC_SOCKCANCEL_ACCEPT)
- && !ISC_LIST_EMPTY(sock->accept_list)) {
- isc_socket_newconnev_t *dev;
- isc_socket_newconnev_t *next;
- isc_task_t *current_task;
-
- dev = ISC_LIST_HEAD(sock->accept_list);
- while (dev != NULL) {
- current_task = dev->ev_sender;
- next = ISC_LIST_NEXT(dev, ev_link);
-
- if ((task == NULL) || (task == current_task)) {
-
- dev->newsocket->references--;
- closesocket(dev->newsocket->fd);
- dev->newsocket->fd = INVALID_SOCKET;
- free_socket(&dev->newsocket, __LINE__);
-
- dev->result = ISC_R_CANCELED;
- send_acceptdone_event(sock, &dev);
- }
-
- dev = next;
- }
- }
- how &= ~ISC_SOCKCANCEL_ACCEPT;
-
- /*
- * Connecting is not a list.
- */
- if (((how & ISC_SOCKCANCEL_CONNECT) == ISC_SOCKCANCEL_CONNECT)
- && sock->connect_ev != NULL) {
- isc_socket_connev_t *dev;
- isc_task_t *current_task;
-
- INSIST(sock->pending_connect);
-
- dev = sock->connect_ev;
- current_task = dev->ev_sender;
-
- if ((task == NULL) || (task == current_task)) {
- closesocket(sock->fd);
- sock->fd = INVALID_SOCKET;
- _set_state(sock, SOCK_CLOSED);
-
- sock->connect_ev = NULL;
- dev->result = ISC_R_CANCELED;
- send_connectdone_event(sock, &dev);
- }
- }
- how &= ~ISC_SOCKCANCEL_CONNECT;
-
- maybe_free_socket(&sock, __LINE__);
-}
-
-isc_sockettype_t
-isc__socket_gettype(isc_socket_t *sock) {
- isc_sockettype_t type;
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_R_CONNREFUSED);
- }
-
- type = sock->type;
- UNLOCK(&sock->lock);
- return (type);
-}
-
-isc_boolean_t
-isc__socket_isbound(isc_socket_t *sock) {
- isc_boolean_t val;
-
- REQUIRE(VALID_SOCKET(sock));
-
- LOCK(&sock->lock);
- CONSISTENT(sock);
-
- /*
- * make sure that the socket's not closed
- */
- if (sock->fd == INVALID_SOCKET) {
- UNLOCK(&sock->lock);
- return (ISC_FALSE);
- }
-
- val = ((sock->bound) ? ISC_TRUE : ISC_FALSE);
- UNLOCK(&sock->lock);
-
- return (val);
-}
-
-void
-isc__socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
-#if defined(IPV6_V6ONLY)
- int onoff = yes ? 1 : 0;
-#else
- UNUSED(yes);
-#endif
-
- REQUIRE(VALID_SOCKET(sock));
-
-#ifdef IPV6_V6ONLY
- if (sock->pf == AF_INET6) {
- (void)setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
- (char *)&onoff, sizeof(onoff));
- }
-#endif
-}
-
-void
-isc__socket_cleanunix(isc_sockaddr_t *addr, isc_boolean_t active) {
- UNUSED(addr);
- UNUSED(active);
-}
-
-isc_result_t
-isc__socket_permunix(isc_sockaddr_t *addr, isc_uint32_t perm,
- isc_uint32_t owner, isc_uint32_t group)
-{
- UNUSED(addr);
- UNUSED(perm);
- UNUSED(owner);
- UNUSED(group);
- return (ISC_R_NOTIMPLEMENTED);
-}
-
-void
-isc__socket_setname(isc_socket_t *socket, const char *name, void *tag) {
-
- /*
- * Name 'socket'.
- */
-
- REQUIRE(VALID_SOCKET(socket));
-
- LOCK(&socket->lock);
- memset(socket->name, 0, sizeof(socket->name));
- strncpy(socket->name, name, sizeof(socket->name) - 1);
- socket->tag = tag;
- UNLOCK(&socket->lock);
-}
-
-const char *
-isc__socket_getname(isc_socket_t *socket) {
- return (socket->name);
-}
-
-void *
-isc__socket_gettag(isc_socket_t *socket) {
- return (socket->tag);
-}
-
-int
-isc__socket_getfd(isc_socket_t *socket) {
- return ((short) socket->fd);
-}
-
-void
-isc__socketmgr_setreserved(isc_socketmgr_t *manager, isc_uint32_t reserved) {
- UNUSED(manager);
- UNUSED(reserved);
-}
-
-void
-isc___socketmgr_maxudp(isc_socketmgr_t *manager, int maxudp) {
-
- UNUSED(manager);
- UNUSED(maxudp);
-}
-
-#ifdef HAVE_LIBXML2
-
-static const char *
-_socktype(isc_sockettype_t type)
-{
- if (type == isc_sockettype_udp)
- return ("udp");
- else if (type == isc_sockettype_tcp)
- return ("tcp");
- else if (type == isc_sockettype_unix)
- return ("unix");
- else if (type == isc_sockettype_fdwatch)
- return ("fdwatch");
- else
- return ("not-initialized");
-}
-
-void
-isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer)
-{
- isc_socket_t *sock;
- char peerbuf[ISC_SOCKADDR_FORMATSIZE];
- isc_sockaddr_t addr;
- ISC_SOCKADDR_LEN_T len;
-
- LOCK(&mgr->lock);
-
-#ifndef ISC_PLATFORM_USETHREADS
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
- xmlTextWriterWriteFormatString(writer, "%d", mgr->refs);
- xmlTextWriterEndElement(writer);
-#endif
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "sockets");
- sock = ISC_LIST_HEAD(mgr->socklist);
- while (sock != NULL) {
- LOCK(&sock->lock);
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "socket");
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "id");
- xmlTextWriterWriteFormatString(writer, "%p", sock);
- xmlTextWriterEndElement(writer);
-
- if (sock->name[0] != 0) {
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "name");
- xmlTextWriterWriteFormatString(writer, "%s",
- sock->name);
- xmlTextWriterEndElement(writer); /* name */
- }
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
- xmlTextWriterWriteFormatString(writer, "%d", sock->references);
- xmlTextWriterEndElement(writer);
-
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "type",
- ISC_XMLCHAR _socktype(sock->type));
-
- if (sock->connected) {
- isc_sockaddr_format(&sock->address, peerbuf,
- sizeof(peerbuf));
- xmlTextWriterWriteElement(writer,
- ISC_XMLCHAR "peer-address",
- ISC_XMLCHAR peerbuf);
- }
-
- len = sizeof(addr);
- if (getsockname(sock->fd, &addr.type.sa, (void *)&len) == 0) {
- isc_sockaddr_format(&addr, peerbuf, sizeof(peerbuf));
- xmlTextWriterWriteElement(writer,
- ISC_XMLCHAR "local-address",
- ISC_XMLCHAR peerbuf);
- }
-
- xmlTextWriterStartElement(writer, ISC_XMLCHAR "states");
- if (sock->pending_recv)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "pending-receive");
- if (sock->pending_send)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "pending-send");
- if (sock->pending_accept)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "pending_accept");
- if (sock->listener)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "listener");
- if (sock->connected)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "connected");
- if (sock->pending_connect)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "connecting");
- if (sock->bound)
- xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
- ISC_XMLCHAR "bound");
-
- xmlTextWriterEndElement(writer); /* states */
-
- xmlTextWriterEndElement(writer); /* socket */
-
- UNLOCK(&sock->lock);
- sock = ISC_LIST_NEXT(sock, link);
- }
- xmlTextWriterEndElement(writer); /* sockets */
-
- UNLOCK(&mgr->lock);
-}
-#endif /* HAVE_LIBXML2 */
diff --git a/contrib/ntp/lib/isc/win32/stdio.c b/contrib/ntp/lib/isc/win32/stdio.c
deleted file mode 100644
index 427a8e1e1872..000000000000
--- a/contrib/ntp/lib/isc/win32/stdio.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: stdio.c,v 1.6 2007/06/19 23:47:19 tbox Exp $ */
-
-#include <config.h>
-
-#include <io.h>
-#include <errno.h>
-
-#include <isc/stdio.h>
-
-#include "errno2result.h"
-
-isc_result_t
-isc_stdio_open(const char *filename, const char *mode, FILE **fp) {
- FILE *f;
-
- f = fopen(filename, mode);
- if (f == NULL)
- return (isc__errno2result(errno));
- *fp = f;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-isc_stdio_close(FILE *f) {
- int r;
-
- r = fclose(f);
- if (r == 0)
- return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
-}
-
-isc_result_t
-isc_stdio_seek(FILE *f, long offset, int whence) {
- int r;
-
- r = fseek(f, offset, whence);
- if (r == 0)
- return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
-}
-
-isc_result_t
-isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret) {
- isc_result_t result = ISC_R_SUCCESS;
- size_t r;
-
- clearerr(f);
- r = fread(ptr, size, nmemb, f);
- if (r != nmemb) {
- if (feof(f))
- result = ISC_R_EOF;
- else
- result = isc__errno2result(errno);
- }
- if (nret != NULL)
- *nret = r;
- return (result);
-}
-
-isc_result_t
-isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f,
- size_t *nret)
-{
- isc_result_t result = ISC_R_SUCCESS;
- size_t r;
-
- clearerr(f);
- r = fwrite(ptr, size, nmemb, f);
- if (r != nmemb)
- result = isc__errno2result(errno);
- if (nret != NULL)
- *nret = r;
- return (result);
-}
-
-isc_result_t
-isc_stdio_flush(FILE *f) {
- int r;
-
- r = fflush(f);
- if (r == 0)
- return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
-}
-
-isc_result_t
-isc_stdio_sync(FILE *f) {
- int r;
-
- r = _commit(_fileno(f));
- if (r == 0)
- return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
-}
-
diff --git a/contrib/ntp/lib/isc/win32/syslog.c b/contrib/ntp/lib/isc/win32/syslog.c
deleted file mode 100644
index 375784f47798..000000000000
--- a/contrib/ntp/lib/isc/win32/syslog.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: syslog.c,v 1.10 2007/06/19 23:47:19 tbox Exp $ */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <windows.h>
-#include <string.h>
-#include <stdlib.h>
-#include <syslog.h>
-
-#include <isc/bindevt.h>
-#include <isc/result.h>
-#include <isc/syslog.h>
-#include <isc/util.h>
-
-static HANDLE hAppLog = NULL;
-static FILE *log_stream;
-static int debug_level = 0;
-
-static struct dsn_c_pvt_sfnt {
- int val;
- const char *strval;
-} facilities[] = {
- { LOG_KERN, "kern" },
- { LOG_USER, "user" },
- { LOG_MAIL, "mail" },
- { LOG_DAEMON, "daemon" },
- { LOG_AUTH, "auth" },
- { LOG_SYSLOG, "syslog" },
- { LOG_LPR, "lpr" },
-#ifdef LOG_NEWS
- { LOG_NEWS, "news" },
-#endif
-#ifdef LOG_UUCP
- { LOG_UUCP, "uucp" },
-#endif
-#ifdef LOG_CRON
- { LOG_CRON, "cron" },
-#endif
-#ifdef LOG_AUTHPRIV
- { LOG_AUTHPRIV, "authpriv" },
-#endif
-#ifdef LOG_FTP
- { LOG_FTP, "ftp" },
-#endif
- { LOG_LOCAL0, "local0"},
- { LOG_LOCAL1, "local1"},
- { LOG_LOCAL2, "local2"},
- { LOG_LOCAL3, "local3"},
- { LOG_LOCAL4, "local4"},
- { LOG_LOCAL5, "local5"},
- { LOG_LOCAL6, "local6"},
- { LOG_LOCAL7, "local7"},
- { 0, NULL }
-};
-
-isc_result_t
-isc_syslog_facilityfromstring(const char *str, int *facilityp) {
- int i;
-
- REQUIRE(str != NULL);
- REQUIRE(facilityp != NULL);
-
- for (i = 0; facilities[i].strval != NULL; i++) {
- if (strcasecmp(facilities[i].strval, str) == 0) {
- *facilityp = facilities[i].val;
- return (ISC_R_SUCCESS);
- }
- }
- return (ISC_R_NOTFOUND);
-}
-
-/*
- * Log to the NT Event Log
- */
-void
-syslog(int level, const char *fmt, ...) {
- va_list ap;
- char buf[1024];
- char *str[1];
-
- str[0] = buf;
-
- va_start(ap, fmt);
- vsprintf(buf, fmt, ap);
- va_end(ap);
-
- /* Make sure that the channel is open to write the event */
- if (hAppLog != NULL) {
- switch (level) {
- case LOG_INFO:
- case LOG_NOTICE:
- case LOG_DEBUG:
- ReportEvent(hAppLog, EVENTLOG_INFORMATION_TYPE, 0,
- BIND_INFO_MSG, NULL, 1, 0, str, NULL);
- break;
- case LOG_WARNING:
- ReportEvent(hAppLog, EVENTLOG_WARNING_TYPE, 0,
- BIND_WARN_MSG, NULL, 1, 0, str, NULL);
- break;
- default:
- ReportEvent(hAppLog, EVENTLOG_ERROR_TYPE, 0,
- BIND_ERR_MSG, NULL, 1, 0, str, NULL);
- break;
- }
- }
-}
-
-/*
- * Initialize event logging
- */
-void
-openlog(const char *name, int flags, ...) {
- /* Get a handle to the Application event log */
- hAppLog = RegisterEventSource(NULL, name);
-}
-
-/*
- * Close the Handle to the application Event Log
- * We don't care whether or not we succeeded so ignore return values
- * In fact if we failed then we would have nowhere to put the message
- */
-void
-closelog() {
- DeregisterEventSource(hAppLog);
-}
-
-/*
- * Keep event logging synced with the current debug level
- */
-void
-ModifyLogLevel(int level) {
- debug_level = level;
-}
-
-/*
- * Initialize logging for the port section of libbind.
- * Piggyback onto stream given.
- */
-void
-InitNTLogging(FILE *stream, int debug) {
- log_stream = stream;
- ModifyLogLevel(debug);
-}
-/*
- * This function is for reporting errors to the application
- * event log in case the regular syslog is not available
- * mainly during startup. It should not be used under normal
- * circumstances.
- */
-void
-NTReportError(const char *name, const char *str) {
- HANDLE hNTAppLog = NULL;
- const char *buf[1];
-
- buf[0] = str;
-
- hNTAppLog = RegisterEventSource(NULL, name);
-
- ReportEvent(hNTAppLog, EVENTLOG_ERROR_TYPE, 0,
- BIND_ERR_MSG, NULL, 1, 0, buf, NULL);
-
- DeregisterEventSource(hNTAppLog);
-}
diff --git a/contrib/ntp/lib/isc/win32/syslog.h b/contrib/ntp/lib/isc/win32/syslog.h
deleted file mode 100644
index fd4b3a6bf233..000000000000
--- a/contrib/ntp/lib/isc/win32/syslog.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001, 2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: syslog.h,v 1.7 2007/06/19 23:47:19 tbox Exp $ */
-
-#ifndef _SYSLOG_H
-#define _SYSLOG_H
-
-#include <stdio.h>
-
-/* Constant definitions for openlog() */
-#define LOG_PID 1
-#define LOG_CONS 2
-/* NT event log does not support facility level */
-#define LOG_KERN 0
-#define LOG_USER 0
-#define LOG_MAIL 0
-#define LOG_DAEMON 0
-#define LOG_AUTH 0
-#define LOG_SYSLOG 0
-#define LOG_LPR 0
-#define LOG_LOCAL0 0
-#define LOG_LOCAL1 0
-#define LOG_LOCAL2 0
-#define LOG_LOCAL3 0
-#define LOG_LOCAL4 0
-#define LOG_LOCAL5 0
-#define LOG_LOCAL6 0
-#define LOG_LOCAL7 0
-
-#define LOG_EMERG 0 /* system is unusable */
-#define LOG_ALERT 1 /* action must be taken immediately */
-#define LOG_CRIT 2 /* critical conditions */
-#define LOG_ERR 3 /* error conditions */
-#define LOG_WARNING 4 /* warning conditions */
-#define LOG_NOTICE 5 /* normal but signification condition */
-#define LOG_INFO 6 /* informational */
-#define LOG_DEBUG 7 /* debug-level messages */
-
-void
-syslog(int level, const char *fmt, ...);
-
-void
-openlog(const char *, int, ...);
-
-void
-closelog(void);
-
-void
-ModifyLogLevel(int level);
-
-void
-InitNTLogging(FILE *, int);
-
-void
-NTReportError(const char *, const char *);
-/*
- * Include the event codes required for logging.
- */
-#include <isc/bindevt.h>
-
-#endif
diff --git a/contrib/ntp/lib/isc/win32/unistd.h b/contrib/ntp/lib/isc/win32/unistd.h
deleted file mode 100644
index bcb3b256da27..000000000000
--- a/contrib/ntp/lib/isc/win32/unistd.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: unistd.h,v 1.10 2009/07/17 23:47:41 tbox Exp $ */
-
-/* None of these are defined in NT, so define them for our use */
-#define O_NONBLOCK 1
-#define PORT_NONBLOCK O_NONBLOCK
-
-/*
- * fcntl() commands
- */
-#define F_SETFL 0
-#define F_GETFL 1
-#define F_SETFD 2
-#define F_GETFD 3
-/*
- * Enough problems not having full fcntl() without worrying about this!
- */
-#undef F_DUPFD
-
-int fcntl(int, int, ...);
-
-/*
- * access() related definitions for winXP
- */
-#include <io.h>
-#ifndef F_OK
-#define F_OK 0
-#endif
-
-#ifndef X_OK
-#define X_OK 1
-#endif
-
-#ifndef W_OK
-#define W_OK 2
-#endif
-
-#ifndef R_OK
-#define R_OK 4
-#endif
-
-#define access _access
-
-#include <process.h>
diff --git a/contrib/ntp/lib/isc/win32/version.c b/contrib/ntp/lib/isc/win32/version.c
deleted file mode 100644
index 6d5c1fd92375..000000000000
--- a/contrib/ntp/lib/isc/win32/version.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: version.c,v 1.7 2007/06/19 23:47:19 tbox Exp $ */
-
-#include <versions.h>
-
-#include <isc/version.h>
-
-LIBISC_EXTERNAL_DATA const char isc_version[] = VERSION;
-
-LIBISC_EXTERNAL_DATA const unsigned int isc_libinterface = LIBINTERFACE;
-LIBISC_EXTERNAL_DATA const unsigned int isc_librevision = LIBREVISION;
-LIBISC_EXTERNAL_DATA const unsigned int isc_libage = LIBAGE;
diff --git a/contrib/ntp/lib/isc/x86_32/include/isc/atomic.h b/contrib/ntp/lib/isc/x86_32/include/isc/atomic.h
deleted file mode 100644
index bf2148cb33f5..000000000000
--- a/contrib/ntp/lib/isc/x86_32/include/isc/atomic.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (C) 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: atomic.h,v 1.10 2008/01/24 23:47:00 tbox Exp $ */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-#include <isc/platform.h>
-#include <isc/types.h>
-
-#ifdef ISC_PLATFORM_USEGCCASM
-/*
- * This routine atomically increments the value stored in 'p' by 'val', and
- * returns the previous value.
- */
-static __inline__ isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- isc_int32_t prev = val;
-
- __asm__ volatile(
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "xadd %0, %1"
- :"=q"(prev)
- :"m"(*p), "0"(prev)
- :"memory", "cc");
-
- return (prev);
-}
-
-#ifdef ISC_PLATFORM_HAVEXADDQ
-static __inline__ isc_int64_t
-isc_atomic_xaddq(isc_int64_t *p, isc_int64_t val) {
- isc_int64_t prev = val;
-
- __asm__ volatile(
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "xaddq %0, %1"
- :"=q"(prev)
- :"m"(*p), "0"(prev)
- :"memory", "cc");
-
- return (prev);
-}
-#endif /* ISC_PLATFORM_HAVEXADDQ */
-
-/*
- * This routine atomically stores the value 'val' in 'p'.
- */
-static __inline__ void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
- __asm__ volatile(
-#ifdef ISC_PLATFORM_USETHREADS
- /*
- * xchg should automatically lock memory, but we add it
- * explicitly just in case (it at least doesn't harm)
- */
- "lock;"
-#endif
-
- "xchgl %1, %0"
- :
- : "r"(val), "m"(*p)
- : "memory");
-}
-
-/*
- * This routine atomically replaces the value in 'p' with 'val', if the
- * original value is equal to 'cmpval'. The original value is returned in any
- * case.
- */
-static __inline__ isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
- __asm__ volatile(
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "cmpxchgl %1, %2"
- : "=a"(cmpval)
- : "r"(val), "m"(*p), "a"(cmpval)
- : "memory");
-
- return (cmpval);
-}
-
-#elif defined(ISC_PLATFORM_USESTDASM)
-/*
- * The followings are "generic" assembly code which implements the same
- * functionality in case the gcc extension cannot be used. It should be
- * better to avoid inlining below, since we directly refer to specific
- * positions of the stack frame, which would not actually point to the
- * intended address in the embedded mnemonic.
- */
-#include <isc/util.h> /* for 'UNUSED' macro */
-
-static isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- UNUSED(p);
- UNUSED(val);
-
- __asm (
- "movl 8(%ebp), %ecx\n"
- "movl 12(%ebp), %edx\n"
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "xadd %edx, (%ecx)\n"
-
- /*
- * set the return value directly in the register so that we
- * can avoid guessing the correct position in the stack for a
- * local variable.
- */
- "movl %edx, %eax"
- );
-}
-
-static void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
- UNUSED(p);
- UNUSED(val);
-
- __asm (
- "movl 8(%ebp), %ecx\n"
- "movl 12(%ebp), %edx\n"
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "xchgl (%ecx), %edx\n"
- );
-}
-
-static isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
- UNUSED(p);
- UNUSED(cmpval);
- UNUSED(val);
-
- __asm (
- "movl 8(%ebp), %ecx\n"
- "movl 12(%ebp), %eax\n" /* must be %eax for cmpxchgl */
- "movl 16(%ebp), %edx\n"
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
-
- /*
- * If (%ecx) == %eax then (%ecx) := %edx.
- % %eax is set to old (%ecx), which will be the return value.
- */
- "cmpxchgl %edx, (%ecx)"
- );
-}
-#else /* !ISC_PLATFORM_USEGCCASM && !ISC_PLATFORM_USESTDASM */
-
-#error "unsupported compiler. disable atomic ops by --disable-atomic"
-
-#endif
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/lib/isc/x86_64/include/isc/atomic.h b/contrib/ntp/lib/isc/x86_64/include/isc/atomic.h
deleted file mode 100644
index f57bd2a78672..000000000000
--- a/contrib/ntp/lib/isc/x86_64/include/isc/atomic.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: atomic.h,v 1.6 2008/01/24 23:47:00 tbox Exp $ */
-
-#ifndef ISC_ATOMIC_H
-#define ISC_ATOMIC_H 1
-
-#include <isc/platform.h>
-#include <isc/types.h>
-
-#ifdef ISC_PLATFORM_USEGCCASM
-
-/* We share the gcc-version with x86_32 */
-#error "impossible case. check build configuration"
-
-#elif defined(ISC_PLATFORM_USESTDASM)
-/*
- * The followings are "generic" assembly code which implements the same
- * functionality in case the gcc extension cannot be used. It should be
- * better to avoid inlining below, since we directly refer to specific
- * registers for arguments, which would not actually correspond to the
- * intended address or value in the embedded mnemonic.
- */
-#include <isc/util.h> /* for 'UNUSED' macro */
-
-static isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
- UNUSED(p);
- UNUSED(val);
-
- __asm (
- "movq %rdi, %rdx\n"
- "movl %esi, %eax\n"
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "xadd %eax, (%rdx)\n"
- /*
- * XXX: assume %eax will be used as the return value.
- */
- );
-}
-
-#ifdef ISC_PLATFORM_HAVEXADDQ
-static isc_int64_t
-isc_atomic_xaddq(isc_int64_t *p, isc_int64_t val) {
- UNUSED(p);
- UNUSED(val);
-
- __asm (
- "movq %rdi, %rdx\n"
- "movq %rsi, %rax\n"
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "xaddq %rax, (%rdx)\n"
- /*
- * XXX: assume %rax will be used as the return value.
- */
- );
-}
-#endif
-
-static void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
- UNUSED(p);
- UNUSED(val);
-
- __asm (
- "movq %rdi, %rax\n"
- "movl %esi, %edx\n"
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- "xchgl (%rax), %edx\n"
- /*
- * XXX: assume %rax will be used as the return value.
- */
- );
-}
-
-static isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
- UNUSED(p);
- UNUSED(cmpval);
- UNUSED(val);
-
- __asm (
- "movl %edx, %ecx\n"
- "movl %esi, %eax\n"
- "movq %rdi, %rdx\n"
-
-#ifdef ISC_PLATFORM_USETHREADS
- "lock;"
-#endif
- /*
- * If (%rdi) == %eax then (%rdi) := %edx.
- * %eax is set to old (%ecx), which will be the return value.
- */
- "cmpxchgl %ecx, (%rdx)"
- );
-}
-
-#else /* !ISC_PLATFORM_USEGCCASM && !ISC_PLATFORM_USESTDASM */
-
-#error "unsupported compiler. disable atomic ops by --disable-atomic"
-
-#endif
-#endif /* ISC_ATOMIC_H */
diff --git a/contrib/ntp/libntp/Makefile.am b/contrib/ntp/libntp/Makefile.am
index ddd1e01dd7ef..99ce273d4cd1 100644
--- a/contrib/ntp/libntp/Makefile.am
+++ b/contrib/ntp/libntp/Makefile.am
@@ -1,46 +1,147 @@
NULL=
BUILT_SOURCES =
CLEANFILES =
+DISTCLEANFILES =
noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
EXTRA_LIBRARIES = libntpsim.a
-libisc_SRCS = \
- $(srcdir)/../lib/isc/assertions.c \
- $(srcdir)/../lib/isc/buffer.c \
- $(srcdir)/../lib/isc/backtrace-emptytbl.c \
- $(srcdir)/../lib/isc/backtrace.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
- $(srcdir)/../lib/isc/unix/dir.c \
- $(srcdir)/../lib/isc/error.c \
- $(srcdir)/../lib/isc/unix/errno2result.c \
- $(srcdir)/../lib/isc/event.c \
- $(srcdir)/../lib/isc/unix/file.c \
- $(srcdir)/../lib/isc/inet_ntop.c \
- $(srcdir)/../lib/isc/inet_pton.c \
- $(srcdir)/../lib/isc/unix/interfaceiter.c \
- $(srcdir)/../lib/isc/lib.c \
- $(srcdir)/../lib/isc/log.c \
- $(srcdir)/../lib/isc/md5.c \
- $(srcdir)/../lib/isc/nls/msgcat.c \
- $(srcdir)/../lib/isc/unix/net.c \
- $(srcdir)/../lib/isc/netaddr.c \
- $(srcdir)/../lib/isc/netscope.c \
- $(srcdir)/../lib/isc/ondestroy.c \
- $(srcdir)/../lib/isc/random.c \
- $(srcdir)/../lib/isc/result.c \
- $(srcdir)/../lib/isc/unix/stdio.c \
- $(srcdir)/../lib/isc/unix/stdtime.c \
- $(srcdir)/../lib/isc/unix/strerror.c \
- $(srcdir)/../lib/isc/task.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
- $(srcdir)/../lib/isc/unix/time.c \
- $(srcdir)/../lib/isc/sha1.c \
- $(srcdir)/../lib/isc/sockaddr.c \
- $(srcdir)/../lib/isc/tsmemcmp.c \
+noinst_HEADERS = \
+ lib/isc/task_p.h \
+ lib/isc/include/isc/app.h \
+ lib/isc/include/isc/assertions.h \
+ lib/isc/include/isc/backtrace.h \
+ lib/isc/include/isc/bind9.h \
+ lib/isc/include/isc/buffer.h \
+ lib/isc/include/isc/boolean.h \
+ lib/isc/include/isc/error.h \
+ lib/isc/include/isc/event.h \
+ lib/isc/include/isc/eventclass.h \
+ lib/isc/include/isc/file.h \
+ lib/isc/include/isc/formatcheck.h \
+ lib/isc/include/isc/hash.h \
+ lib/isc/include/isc/interfaceiter.h \
+ lib/isc/include/isc/lang.h \
+ lib/isc/include/isc/lib.h \
+ lib/isc/include/isc/list.h \
+ lib/isc/include/isc/log.h \
+ lib/isc/include/isc/magic.h \
+ lib/isc/include/isc/md5.h \
+ lib/isc/include/isc/msgs.h \
+ lib/isc/include/isc/msgcat.h \
+ lib/isc/include/isc/namespace.h \
+ lib/isc/include/isc/netscope.h \
+ lib/isc/include/isc/netaddr.h \
+ lib/isc/include/isc/ondestroy.h \
+ lib/isc/include/isc/platform.h \
+ lib/isc/include/isc/print.h \
+ lib/isc/include/isc/random.h \
+ lib/isc/include/isc/region.h \
+ lib/isc/include/isc/result.h \
+ lib/isc/include/isc/resultclass.h \
+ lib/isc/include/isc/sha1.h \
+ lib/isc/include/isc/sockaddr.h \
+ lib/isc/include/isc/socket.h \
+ lib/isc/include/isc/stdio.h \
+ lib/isc/include/isc/string.h \
+ lib/isc/include/isc/task.h \
+ lib/isc/include/isc/timer.h \
+ lib/isc/include/isc/types.h \
+ lib/isc/include/isc/util.h \
+ lib/isc/include/isc/xml.h \
+ lib/isc/unix/errno2result.h \
+ lib/isc/unix/include/isc/dir.h \
+ lib/isc/unix/include/isc/int.h \
+ lib/isc/unix/include/isc/net.h \
+ lib/isc/unix/include/isc/offset.h \
+ lib/isc/unix/include/isc/stat.h \
+ lib/isc/unix/include/isc/stdtime.h \
+ lib/isc/unix/include/isc/strerror.h \
+ lib/isc/unix/include/isc/time.h \
+ lib/isc/win32/include/isc/condition.h \
+ lib/isc/win32/include/isc/dir.h \
+ lib/isc/win32/include/isc/int.h \
+ lib/isc/win32/include/isc/ipv6.h \
+ lib/isc/win32/include/isc/mutex.h \
+ lib/isc/win32/include/isc/net.h \
+ lib/isc/win32/include/isc/offset.h \
+ lib/isc/win32/include/isc/once.h \
+ lib/isc/win32/include/isc/platform.h \
+ lib/isc/win32/include/isc/stat.h \
+ lib/isc/win32/include/isc/stdtime.h \
+ lib/isc/win32/include/isc/strerror.h \
+ lib/isc/win32/include/isc/thread.h \
+ lib/isc/win32/include/isc/time.h \
+ lib/isc/win32/include/isc/win32os.h \
+ $(NULL)
+
+
+# ntp_crypto_rnd.c includes libevent headers for use when
+# neither OpenSSL nor arc4random_buf are available. Those
+# include event2/event-config.h which is built, so if we
+# are building our libevent tearoff, build it before this.
+
+if BUILD_LIBEVENT
+BUILT_SOURCES += libevent_first
+CLEANFILES += libevent_first
+
+libevent_first:
+ cd $(top_builddir)/sntp/libevent && $(MAKE) $(AM_MAKEFLAGS)
+ echo stamp > $@
+endif
+
+
+libisc_SRCS = \
+ lib/isc/assertions.c \
+ lib/isc/buffer.c \
+ lib/isc/backtrace-emptytbl.c \
+ lib/isc/backtrace.c \
+ lib/isc/unix/dir.c \
+ lib/isc/error.c \
+ lib/isc/unix/errno2result.c \
+ lib/isc/event.c \
+ lib/isc/unix/file.c \
+ lib/isc/inet_ntop.c \
+ lib/isc/inet_pton.c \
+ lib/isc/unix/interfaceiter.c \
+ lib/isc/lib.c \
+ lib/isc/log.c \
+ lib/isc/md5.c \
+ lib/isc/nls/msgcat.c \
+ lib/isc/unix/net.c \
+ lib/isc/netaddr.c \
+ lib/isc/netscope.c \
+ lib/isc/ondestroy.c \
+ lib/isc/random.c \
+ lib/isc/result.c \
+ lib/isc/unix/stdio.c \
+ lib/isc/unix/stdtime.c \
+ lib/isc/unix/strerror.c \
+ lib/isc/task.c \
+ lib/isc/unix/time.c \
+ lib/isc/sha1.c \
+ lib/isc/sockaddr.c \
+ lib/isc/tsmemcmp.c \
+ $(NULL)
+
+libisc_XTRA = \
+ lib/isc/pthreads/condition.c \
+ lib/isc/pthreads/mutex.c \
+ lib/isc/pthreads/thread.c \
+ lib/isc/nothreads/condition.c \
+ lib/isc/nothreads/thread.c \
$(NULL)
if PTHREADS
-libisc_SRCS += $(srcdir)/../lib/isc/pthreads/mutex.c
+libisc_SRCS += \
+ lib/isc/pthreads/condition.c \
+ lib/isc/pthreads/mutex.c \
+ lib/isc/pthreads/thread.c \
+ $(NULL)
+else
+libisc_SRCS += \
+ lib/isc/nothreads/condition.c \
+ lib/isc/nothreads/thread.c \
+ $(NULL)
endif
libntp_a_SRCS = \
@@ -87,6 +188,7 @@ libntp_a_SRCS = \
ntp_libopts.c \
ntp_lineedit.c \
ntp_random.c \
+ ntp_realpath.c \
ntp_rfc2553.c \
ntp_worker.c \
numtoa.c \
@@ -120,19 +222,40 @@ libntp_a_SRCS = \
libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
-EXTRA_libntp_a_SOURCES = adjtimex.c
+
+EXTRA_libntp_a_SOURCES = \
+ adjtimex.c \
+ $(libisc_XTRA) \
+ $(NULL)
AM_CFLAGS = $(CFLAGS_NTP)
AM_CFLAGS += $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_LIBEVENT)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
-EXTRA_DIST = README
+EXTRA_DIST = \
+ README \
+ lib/isc/nothreads/include \
+ lib/isc/pthreads/include \
+ lib/isc/unix/ifiter_getifaddrs.c \
+ lib/isc/unix/ifiter_ioctl.c \
+ lib/isc/unix/ifiter_sysctl.c \
+ lib/isc/win32/condition.c \
+ lib/isc/win32/interfaceiter.c \
+ lib/isc/win32/net.c \
+ lib/isc/win32/once.c \
+ lib/isc/win32/stdtime.c \
+ lib/isc/win32/strerror.c \
+ lib/isc/win32/thread.c \
+ lib/isc/win32/time.c \
+ lib/isc/win32/win32os.c \
+ $(NULL)
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/libntp/Makefile.in b/contrib/ntp/libntp/Makefile.in
index beea4982abb8..75d6b2abf8bc 100644
--- a/contrib/ntp/libntp/Makefile.in
+++ b/contrib/ntp/libntp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -88,7 +89,24 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@PTHREADS_TRUE@am__append_1 = $(srcdir)/../lib/isc/pthreads/mutex.c
+
+# ntp_crypto_rnd.c includes libevent headers for use when
+# neither OpenSSL nor arc4random_buf are available. Those
+# include event2/event-config.h which is built, so if we
+# are building our libevent tearoff, build it before this.
+@BUILD_LIBEVENT_TRUE@am__append_1 = libevent_first
+@BUILD_LIBEVENT_TRUE@am__append_2 = libevent_first
+@PTHREADS_TRUE@am__append_3 = \
+@PTHREADS_TRUE@ lib/isc/pthreads/condition.c \
+@PTHREADS_TRUE@ lib/isc/pthreads/mutex.c \
+@PTHREADS_TRUE@ lib/isc/pthreads/thread.c \
+@PTHREADS_TRUE@ $(NULL)
+
+@PTHREADS_FALSE@am__append_4 = \
+@PTHREADS_FALSE@ lib/isc/nothreads/condition.c \
+@PTHREADS_FALSE@ lib/isc/nothreads/thread.c \
+@PTHREADS_FALSE@ $(NULL)
+
subdir = libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -109,7 +127,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,11 +146,13 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -155,53 +174,53 @@ am__libntp_a_SOURCES_DIST = systime.c a_md5encrypt.c adjtime.c \
is_ip_address.c lib_strbuf.c libssl_compat.c machines.c \
mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \
ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
- ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_worker.c \
- numtoa.c numtohost.c octtoint.c prettydate.c refidsmear.c \
- recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
- socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
- syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \
- uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \
- ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
- $(srcdir)/../lib/isc/buffer.c \
- $(srcdir)/../lib/isc/backtrace-emptytbl.c \
- $(srcdir)/../lib/isc/backtrace.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
- $(srcdir)/../lib/isc/unix/dir.c $(srcdir)/../lib/isc/error.c \
- $(srcdir)/../lib/isc/unix/errno2result.c \
- $(srcdir)/../lib/isc/event.c $(srcdir)/../lib/isc/unix/file.c \
- $(srcdir)/../lib/isc/inet_ntop.c \
- $(srcdir)/../lib/isc/inet_pton.c \
- $(srcdir)/../lib/isc/unix/interfaceiter.c \
- $(srcdir)/../lib/isc/lib.c $(srcdir)/../lib/isc/log.c \
- $(srcdir)/../lib/isc/md5.c $(srcdir)/../lib/isc/nls/msgcat.c \
- $(srcdir)/../lib/isc/unix/net.c $(srcdir)/../lib/isc/netaddr.c \
- $(srcdir)/../lib/isc/netscope.c \
- $(srcdir)/../lib/isc/ondestroy.c $(srcdir)/../lib/isc/random.c \
- $(srcdir)/../lib/isc/result.c \
- $(srcdir)/../lib/isc/unix/stdio.c \
- $(srcdir)/../lib/isc/unix/stdtime.c \
- $(srcdir)/../lib/isc/unix/strerror.c \
- $(srcdir)/../lib/isc/task.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
- $(srcdir)/../lib/isc/unix/time.c $(srcdir)/../lib/isc/sha1.c \
- $(srcdir)/../lib/isc/sockaddr.c \
- $(srcdir)/../lib/isc/tsmemcmp.c \
- $(srcdir)/../lib/isc/pthreads/mutex.c
+ ntp_lineedit.c ntp_random.c ntp_realpath.c ntp_rfc2553.c \
+ ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ refidsmear.c recvbuff.c refnumtoa.c snprintf.c socket.c \
+ socktoa.c socktohost.c ssl_init.c statestr.c strdup.c \
+ strl_obsd.c syssignal.c timespecops.c timetoa.c timevalops.c \
+ timexsup.c uglydate.c vint64ops.c work_fork.c work_thread.c \
+ xsbprintf.c ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \
+ lib/isc/backtrace-emptytbl.c lib/isc/backtrace.c \
+ lib/isc/unix/dir.c lib/isc/error.c lib/isc/unix/errno2result.c \
+ lib/isc/event.c lib/isc/unix/file.c lib/isc/inet_ntop.c \
+ lib/isc/inet_pton.c lib/isc/unix/interfaceiter.c lib/isc/lib.c \
+ lib/isc/log.c lib/isc/md5.c lib/isc/nls/msgcat.c \
+ lib/isc/unix/net.c lib/isc/netaddr.c lib/isc/netscope.c \
+ lib/isc/ondestroy.c lib/isc/random.c lib/isc/result.c \
+ lib/isc/unix/stdio.c lib/isc/unix/stdtime.c \
+ lib/isc/unix/strerror.c lib/isc/task.c lib/isc/unix/time.c \
+ lib/isc/sha1.c lib/isc/sockaddr.c lib/isc/tsmemcmp.c \
+ lib/isc/pthreads/condition.c lib/isc/pthreads/mutex.c \
+ lib/isc/pthreads/thread.c lib/isc/nothreads/condition.c \
+ lib/isc/nothreads/thread.c
+am__dirstamp = $(am__leading_dot)dirstamp
am__objects_1 =
-@PTHREADS_TRUE@am__objects_2 = mutex.$(OBJEXT)
-am__objects_3 = assertions.$(OBJEXT) buffer.$(OBJEXT) \
- backtrace-emptytbl.$(OBJEXT) backtrace.$(OBJEXT) \
- condition.$(OBJEXT) dir.$(OBJEXT) error.$(OBJEXT) \
- errno2result.$(OBJEXT) event.$(OBJEXT) file.$(OBJEXT) \
- inet_ntop.$(OBJEXT) inet_pton.$(OBJEXT) \
- interfaceiter.$(OBJEXT) lib.$(OBJEXT) log.$(OBJEXT) \
- md5.$(OBJEXT) msgcat.$(OBJEXT) net.$(OBJEXT) netaddr.$(OBJEXT) \
- netscope.$(OBJEXT) ondestroy.$(OBJEXT) random.$(OBJEXT) \
- result.$(OBJEXT) stdio.$(OBJEXT) stdtime.$(OBJEXT) \
- strerror.$(OBJEXT) task.$(OBJEXT) thread.$(OBJEXT) \
- time.$(OBJEXT) sha1.$(OBJEXT) sockaddr.$(OBJEXT) \
- tsmemcmp.$(OBJEXT) $(am__objects_1) $(am__objects_2)
-am__objects_4 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
+@PTHREADS_TRUE@am__objects_2 = lib/isc/pthreads/condition.$(OBJEXT) \
+@PTHREADS_TRUE@ lib/isc/pthreads/mutex.$(OBJEXT) \
+@PTHREADS_TRUE@ lib/isc/pthreads/thread.$(OBJEXT) \
+@PTHREADS_TRUE@ $(am__objects_1)
+@PTHREADS_FALSE@am__objects_3 = lib/isc/nothreads/condition.$(OBJEXT) \
+@PTHREADS_FALSE@ lib/isc/nothreads/thread.$(OBJEXT) \
+@PTHREADS_FALSE@ $(am__objects_1)
+am__objects_4 = lib/isc/assertions.$(OBJEXT) lib/isc/buffer.$(OBJEXT) \
+ lib/isc/backtrace-emptytbl.$(OBJEXT) \
+ lib/isc/backtrace.$(OBJEXT) lib/isc/unix/dir.$(OBJEXT) \
+ lib/isc/error.$(OBJEXT) lib/isc/unix/errno2result.$(OBJEXT) \
+ lib/isc/event.$(OBJEXT) lib/isc/unix/file.$(OBJEXT) \
+ lib/isc/inet_ntop.$(OBJEXT) lib/isc/inet_pton.$(OBJEXT) \
+ lib/isc/unix/interfaceiter.$(OBJEXT) lib/isc/lib.$(OBJEXT) \
+ lib/isc/log.$(OBJEXT) lib/isc/md5.$(OBJEXT) \
+ lib/isc/nls/msgcat.$(OBJEXT) lib/isc/unix/net.$(OBJEXT) \
+ lib/isc/netaddr.$(OBJEXT) lib/isc/netscope.$(OBJEXT) \
+ lib/isc/ondestroy.$(OBJEXT) lib/isc/random.$(OBJEXT) \
+ lib/isc/result.$(OBJEXT) lib/isc/unix/stdio.$(OBJEXT) \
+ lib/isc/unix/stdtime.$(OBJEXT) lib/isc/unix/strerror.$(OBJEXT) \
+ lib/isc/task.$(OBJEXT) lib/isc/unix/time.$(OBJEXT) \
+ lib/isc/sha1.$(OBJEXT) lib/isc/sockaddr.$(OBJEXT) \
+ lib/isc/tsmemcmp.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3)
+am__objects_5 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
atoint.$(OBJEXT) atolfp.$(OBJEXT) atouint.$(OBJEXT) \
audio.$(OBJEXT) authkeys.$(OBJEXT) authreadkeys.$(OBJEXT) \
authusekey.$(OBJEXT) bsd_strerror.$(OBJEXT) \
@@ -217,18 +236,18 @@ am__objects_4 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
netof.$(OBJEXT) ntp_calendar.$(OBJEXT) ntp_calgps.$(OBJEXT) \
ntp_crypto_rnd.$(OBJEXT) ntp_intres.$(OBJEXT) \
ntp_libopts.$(OBJEXT) ntp_lineedit.$(OBJEXT) \
- ntp_random.$(OBJEXT) ntp_rfc2553.$(OBJEXT) \
- ntp_worker.$(OBJEXT) numtoa.$(OBJEXT) numtohost.$(OBJEXT) \
- octtoint.$(OBJEXT) prettydate.$(OBJEXT) refidsmear.$(OBJEXT) \
- recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) snprintf.$(OBJEXT) \
- socket.$(OBJEXT) socktoa.$(OBJEXT) socktohost.$(OBJEXT) \
- ssl_init.$(OBJEXT) statestr.$(OBJEXT) strdup.$(OBJEXT) \
- strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timespecops.$(OBJEXT) \
- timetoa.$(OBJEXT) timevalops.$(OBJEXT) timexsup.$(OBJEXT) \
- uglydate.$(OBJEXT) vint64ops.$(OBJEXT) work_fork.$(OBJEXT) \
- work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) ymd2yd.$(OBJEXT) \
- $(am__objects_3) $(am__objects_1)
-am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_4)
+ ntp_random.$(OBJEXT) ntp_realpath.$(OBJEXT) \
+ ntp_rfc2553.$(OBJEXT) ntp_worker.$(OBJEXT) numtoa.$(OBJEXT) \
+ numtohost.$(OBJEXT) octtoint.$(OBJEXT) prettydate.$(OBJEXT) \
+ refidsmear.$(OBJEXT) recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) \
+ snprintf.$(OBJEXT) socket.$(OBJEXT) socktoa.$(OBJEXT) \
+ socktohost.$(OBJEXT) ssl_init.$(OBJEXT) statestr.$(OBJEXT) \
+ strdup.$(OBJEXT) strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) \
+ timespecops.$(OBJEXT) timetoa.$(OBJEXT) timevalops.$(OBJEXT) \
+ timexsup.$(OBJEXT) uglydate.$(OBJEXT) vint64ops.$(OBJEXT) \
+ work_fork.$(OBJEXT) work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) \
+ ymd2yd.$(OBJEXT) $(am__objects_4) $(am__objects_1)
+am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_5)
libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
libntpsim_a_AR = $(AR) $(ARFLAGS)
libntpsim_a_LIBADD =
@@ -241,39 +260,27 @@ am__libntpsim_a_SOURCES_DIST = systime_s.c a_md5encrypt.c adjtime.c \
is_ip_address.c lib_strbuf.c libssl_compat.c machines.c \
mktime.c modetoa.c mstolfp.c msyslog.c netof.c ntp_calendar.c \
ntp_calgps.c ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
- ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_worker.c \
- numtoa.c numtohost.c octtoint.c prettydate.c refidsmear.c \
- recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
- socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
- syssignal.c timespecops.c timetoa.c timevalops.c timexsup.c \
- uglydate.c vint64ops.c work_fork.c work_thread.c xsbprintf.c \
- ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
- $(srcdir)/../lib/isc/buffer.c \
- $(srcdir)/../lib/isc/backtrace-emptytbl.c \
- $(srcdir)/../lib/isc/backtrace.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
- $(srcdir)/../lib/isc/unix/dir.c $(srcdir)/../lib/isc/error.c \
- $(srcdir)/../lib/isc/unix/errno2result.c \
- $(srcdir)/../lib/isc/event.c $(srcdir)/../lib/isc/unix/file.c \
- $(srcdir)/../lib/isc/inet_ntop.c \
- $(srcdir)/../lib/isc/inet_pton.c \
- $(srcdir)/../lib/isc/unix/interfaceiter.c \
- $(srcdir)/../lib/isc/lib.c $(srcdir)/../lib/isc/log.c \
- $(srcdir)/../lib/isc/md5.c $(srcdir)/../lib/isc/nls/msgcat.c \
- $(srcdir)/../lib/isc/unix/net.c $(srcdir)/../lib/isc/netaddr.c \
- $(srcdir)/../lib/isc/netscope.c \
- $(srcdir)/../lib/isc/ondestroy.c $(srcdir)/../lib/isc/random.c \
- $(srcdir)/../lib/isc/result.c \
- $(srcdir)/../lib/isc/unix/stdio.c \
- $(srcdir)/../lib/isc/unix/stdtime.c \
- $(srcdir)/../lib/isc/unix/strerror.c \
- $(srcdir)/../lib/isc/task.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
- $(srcdir)/../lib/isc/unix/time.c $(srcdir)/../lib/isc/sha1.c \
- $(srcdir)/../lib/isc/sockaddr.c \
- $(srcdir)/../lib/isc/tsmemcmp.c \
- $(srcdir)/../lib/isc/pthreads/mutex.c
-am_libntpsim_a_OBJECTS = systime_s.$(OBJEXT) $(am__objects_4)
+ ntp_lineedit.c ntp_random.c ntp_realpath.c ntp_rfc2553.c \
+ ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ refidsmear.c recvbuff.c refnumtoa.c snprintf.c socket.c \
+ socktoa.c socktohost.c ssl_init.c statestr.c strdup.c \
+ strl_obsd.c syssignal.c timespecops.c timetoa.c timevalops.c \
+ timexsup.c uglydate.c vint64ops.c work_fork.c work_thread.c \
+ xsbprintf.c ymd2yd.c lib/isc/assertions.c lib/isc/buffer.c \
+ lib/isc/backtrace-emptytbl.c lib/isc/backtrace.c \
+ lib/isc/unix/dir.c lib/isc/error.c lib/isc/unix/errno2result.c \
+ lib/isc/event.c lib/isc/unix/file.c lib/isc/inet_ntop.c \
+ lib/isc/inet_pton.c lib/isc/unix/interfaceiter.c lib/isc/lib.c \
+ lib/isc/log.c lib/isc/md5.c lib/isc/nls/msgcat.c \
+ lib/isc/unix/net.c lib/isc/netaddr.c lib/isc/netscope.c \
+ lib/isc/ondestroy.c lib/isc/random.c lib/isc/result.c \
+ lib/isc/unix/stdio.c lib/isc/unix/stdtime.c \
+ lib/isc/unix/strerror.c lib/isc/task.c lib/isc/unix/time.c \
+ lib/isc/sha1.c lib/isc/sockaddr.c lib/isc/tsmemcmp.c \
+ lib/isc/pthreads/condition.c lib/isc/pthreads/mutex.c \
+ lib/isc/pthreads/thread.c lib/isc/nothreads/condition.c \
+ lib/isc/nothreads/thread.c
+am_libntpsim_a_OBJECTS = systime_s.$(OBJEXT) $(am__objects_5)
libntpsim_a_OBJECTS = $(am_libntpsim_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -289,14 +296,77 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/a_md5encrypt.Po \
+ ./$(DEPDIR)/adjtime.Po ./$(DEPDIR)/adjtimex.Po \
+ ./$(DEPDIR)/atoint.Po ./$(DEPDIR)/atolfp.Po \
+ ./$(DEPDIR)/atouint.Po ./$(DEPDIR)/audio.Po \
+ ./$(DEPDIR)/authkeys.Po ./$(DEPDIR)/authreadkeys.Po \
+ ./$(DEPDIR)/authusekey.Po ./$(DEPDIR)/bsd_strerror.Po \
+ ./$(DEPDIR)/buftvtots.Po ./$(DEPDIR)/caljulian.Po \
+ ./$(DEPDIR)/caltontp.Po ./$(DEPDIR)/calyearstart.Po \
+ ./$(DEPDIR)/clocktime.Po ./$(DEPDIR)/clocktypes.Po \
+ ./$(DEPDIR)/decodenetnum.Po ./$(DEPDIR)/dofptoa.Po \
+ ./$(DEPDIR)/dolfptoa.Po ./$(DEPDIR)/emalloc.Po \
+ ./$(DEPDIR)/findconfig.Po ./$(DEPDIR)/getopt.Po \
+ ./$(DEPDIR)/hextoint.Po ./$(DEPDIR)/hextolfp.Po \
+ ./$(DEPDIR)/humandate.Po ./$(DEPDIR)/icom.Po \
+ ./$(DEPDIR)/iosignal.Po ./$(DEPDIR)/is_ip_address.Po \
+ ./$(DEPDIR)/lib_strbuf.Po ./$(DEPDIR)/libssl_compat.Po \
+ ./$(DEPDIR)/machines.Po ./$(DEPDIR)/mktime.Po \
+ ./$(DEPDIR)/modetoa.Po ./$(DEPDIR)/mstolfp.Po \
+ ./$(DEPDIR)/msyslog.Po ./$(DEPDIR)/netof.Po \
+ ./$(DEPDIR)/ntp_calendar.Po ./$(DEPDIR)/ntp_calgps.Po \
+ ./$(DEPDIR)/ntp_crypto_rnd.Po ./$(DEPDIR)/ntp_intres.Po \
+ ./$(DEPDIR)/ntp_libopts.Po ./$(DEPDIR)/ntp_lineedit.Po \
+ ./$(DEPDIR)/ntp_random.Po ./$(DEPDIR)/ntp_realpath.Po \
+ ./$(DEPDIR)/ntp_rfc2553.Po ./$(DEPDIR)/ntp_worker.Po \
+ ./$(DEPDIR)/numtoa.Po ./$(DEPDIR)/numtohost.Po \
+ ./$(DEPDIR)/octtoint.Po ./$(DEPDIR)/prettydate.Po \
+ ./$(DEPDIR)/recvbuff.Po ./$(DEPDIR)/refidsmear.Po \
+ ./$(DEPDIR)/refnumtoa.Po ./$(DEPDIR)/snprintf.Po \
+ ./$(DEPDIR)/socket.Po ./$(DEPDIR)/socktoa.Po \
+ ./$(DEPDIR)/socktohost.Po ./$(DEPDIR)/ssl_init.Po \
+ ./$(DEPDIR)/statestr.Po ./$(DEPDIR)/strdup.Po \
+ ./$(DEPDIR)/strl_obsd.Po ./$(DEPDIR)/syssignal.Po \
+ ./$(DEPDIR)/systime.Po ./$(DEPDIR)/systime_s.Po \
+ ./$(DEPDIR)/timespecops.Po ./$(DEPDIR)/timetoa.Po \
+ ./$(DEPDIR)/timevalops.Po ./$(DEPDIR)/timexsup.Po \
+ ./$(DEPDIR)/uglydate.Po ./$(DEPDIR)/vint64ops.Po \
+ ./$(DEPDIR)/work_fork.Po ./$(DEPDIR)/work_thread.Po \
+ ./$(DEPDIR)/xsbprintf.Po ./$(DEPDIR)/ymd2yd.Po \
+ lib/isc/$(DEPDIR)/assertions.Po \
+ lib/isc/$(DEPDIR)/backtrace-emptytbl.Po \
+ lib/isc/$(DEPDIR)/backtrace.Po lib/isc/$(DEPDIR)/buffer.Po \
+ lib/isc/$(DEPDIR)/error.Po lib/isc/$(DEPDIR)/event.Po \
+ lib/isc/$(DEPDIR)/inet_ntop.Po lib/isc/$(DEPDIR)/inet_pton.Po \
+ lib/isc/$(DEPDIR)/lib.Po lib/isc/$(DEPDIR)/log.Po \
+ lib/isc/$(DEPDIR)/md5.Po lib/isc/$(DEPDIR)/netaddr.Po \
+ lib/isc/$(DEPDIR)/netscope.Po lib/isc/$(DEPDIR)/ondestroy.Po \
+ lib/isc/$(DEPDIR)/random.Po lib/isc/$(DEPDIR)/result.Po \
+ lib/isc/$(DEPDIR)/sha1.Po lib/isc/$(DEPDIR)/sockaddr.Po \
+ lib/isc/$(DEPDIR)/task.Po lib/isc/$(DEPDIR)/tsmemcmp.Po \
+ lib/isc/nls/$(DEPDIR)/msgcat.Po \
+ lib/isc/nothreads/$(DEPDIR)/condition.Po \
+ lib/isc/nothreads/$(DEPDIR)/thread.Po \
+ lib/isc/pthreads/$(DEPDIR)/condition.Po \
+ lib/isc/pthreads/$(DEPDIR)/mutex.Po \
+ lib/isc/pthreads/$(DEPDIR)/thread.Po \
+ lib/isc/unix/$(DEPDIR)/dir.Po \
+ lib/isc/unix/$(DEPDIR)/errno2result.Po \
+ lib/isc/unix/$(DEPDIR)/file.Po \
+ lib/isc/unix/$(DEPDIR)/interfaceiter.Po \
+ lib/isc/unix/$(DEPDIR)/net.Po lib/isc/unix/$(DEPDIR)/stdio.Po \
+ lib/isc/unix/$(DEPDIR)/stdtime.Po \
+ lib/isc/unix/$(DEPDIR)/strerror.Po \
+ lib/isc/unix/$(DEPDIR)/time.Po
am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
@@ -322,6 +392,7 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -339,8 +410,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
$(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
@@ -362,6 +431,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -371,6 +441,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -383,14 +455,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -601,6 +669,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -611,35 +680,100 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-BUILT_SOURCES = .deps-ver
-CLEANFILES = .deps-ver
+BUILT_SOURCES = $(am__append_1) .deps-ver
+CLEANFILES = $(am__append_2) .deps-ver
+DISTCLEANFILES = $(DEPDIR)/deps-ver
noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
EXTRA_LIBRARIES = libntpsim.a
-libisc_SRCS = $(srcdir)/../lib/isc/assertions.c \
- $(srcdir)/../lib/isc/buffer.c \
- $(srcdir)/../lib/isc/backtrace-emptytbl.c \
- $(srcdir)/../lib/isc/backtrace.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
- $(srcdir)/../lib/isc/unix/dir.c $(srcdir)/../lib/isc/error.c \
- $(srcdir)/../lib/isc/unix/errno2result.c \
- $(srcdir)/../lib/isc/event.c $(srcdir)/../lib/isc/unix/file.c \
- $(srcdir)/../lib/isc/inet_ntop.c \
- $(srcdir)/../lib/isc/inet_pton.c \
- $(srcdir)/../lib/isc/unix/interfaceiter.c \
- $(srcdir)/../lib/isc/lib.c $(srcdir)/../lib/isc/log.c \
- $(srcdir)/../lib/isc/md5.c $(srcdir)/../lib/isc/nls/msgcat.c \
- $(srcdir)/../lib/isc/unix/net.c $(srcdir)/../lib/isc/netaddr.c \
- $(srcdir)/../lib/isc/netscope.c \
- $(srcdir)/../lib/isc/ondestroy.c $(srcdir)/../lib/isc/random.c \
- $(srcdir)/../lib/isc/result.c \
- $(srcdir)/../lib/isc/unix/stdio.c \
- $(srcdir)/../lib/isc/unix/stdtime.c \
- $(srcdir)/../lib/isc/unix/strerror.c \
- $(srcdir)/../lib/isc/task.c \
- $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
- $(srcdir)/../lib/isc/unix/time.c $(srcdir)/../lib/isc/sha1.c \
- $(srcdir)/../lib/isc/sockaddr.c \
- $(srcdir)/../lib/isc/tsmemcmp.c $(NULL) $(am__append_1)
+noinst_HEADERS = \
+ lib/isc/task_p.h \
+ lib/isc/include/isc/app.h \
+ lib/isc/include/isc/assertions.h \
+ lib/isc/include/isc/backtrace.h \
+ lib/isc/include/isc/bind9.h \
+ lib/isc/include/isc/buffer.h \
+ lib/isc/include/isc/boolean.h \
+ lib/isc/include/isc/error.h \
+ lib/isc/include/isc/event.h \
+ lib/isc/include/isc/eventclass.h \
+ lib/isc/include/isc/file.h \
+ lib/isc/include/isc/formatcheck.h \
+ lib/isc/include/isc/hash.h \
+ lib/isc/include/isc/interfaceiter.h \
+ lib/isc/include/isc/lang.h \
+ lib/isc/include/isc/lib.h \
+ lib/isc/include/isc/list.h \
+ lib/isc/include/isc/log.h \
+ lib/isc/include/isc/magic.h \
+ lib/isc/include/isc/md5.h \
+ lib/isc/include/isc/msgs.h \
+ lib/isc/include/isc/msgcat.h \
+ lib/isc/include/isc/namespace.h \
+ lib/isc/include/isc/netscope.h \
+ lib/isc/include/isc/netaddr.h \
+ lib/isc/include/isc/ondestroy.h \
+ lib/isc/include/isc/platform.h \
+ lib/isc/include/isc/print.h \
+ lib/isc/include/isc/random.h \
+ lib/isc/include/isc/region.h \
+ lib/isc/include/isc/result.h \
+ lib/isc/include/isc/resultclass.h \
+ lib/isc/include/isc/sha1.h \
+ lib/isc/include/isc/sockaddr.h \
+ lib/isc/include/isc/socket.h \
+ lib/isc/include/isc/stdio.h \
+ lib/isc/include/isc/string.h \
+ lib/isc/include/isc/task.h \
+ lib/isc/include/isc/timer.h \
+ lib/isc/include/isc/types.h \
+ lib/isc/include/isc/util.h \
+ lib/isc/include/isc/xml.h \
+ lib/isc/unix/errno2result.h \
+ lib/isc/unix/include/isc/dir.h \
+ lib/isc/unix/include/isc/int.h \
+ lib/isc/unix/include/isc/net.h \
+ lib/isc/unix/include/isc/offset.h \
+ lib/isc/unix/include/isc/stat.h \
+ lib/isc/unix/include/isc/stdtime.h \
+ lib/isc/unix/include/isc/strerror.h \
+ lib/isc/unix/include/isc/time.h \
+ lib/isc/win32/include/isc/condition.h \
+ lib/isc/win32/include/isc/dir.h \
+ lib/isc/win32/include/isc/int.h \
+ lib/isc/win32/include/isc/ipv6.h \
+ lib/isc/win32/include/isc/mutex.h \
+ lib/isc/win32/include/isc/net.h \
+ lib/isc/win32/include/isc/offset.h \
+ lib/isc/win32/include/isc/once.h \
+ lib/isc/win32/include/isc/platform.h \
+ lib/isc/win32/include/isc/stat.h \
+ lib/isc/win32/include/isc/stdtime.h \
+ lib/isc/win32/include/isc/strerror.h \
+ lib/isc/win32/include/isc/thread.h \
+ lib/isc/win32/include/isc/time.h \
+ lib/isc/win32/include/isc/win32os.h \
+ $(NULL)
+
+libisc_SRCS = lib/isc/assertions.c lib/isc/buffer.c \
+ lib/isc/backtrace-emptytbl.c lib/isc/backtrace.c \
+ lib/isc/unix/dir.c lib/isc/error.c lib/isc/unix/errno2result.c \
+ lib/isc/event.c lib/isc/unix/file.c lib/isc/inet_ntop.c \
+ lib/isc/inet_pton.c lib/isc/unix/interfaceiter.c lib/isc/lib.c \
+ lib/isc/log.c lib/isc/md5.c lib/isc/nls/msgcat.c \
+ lib/isc/unix/net.c lib/isc/netaddr.c lib/isc/netscope.c \
+ lib/isc/ondestroy.c lib/isc/random.c lib/isc/result.c \
+ lib/isc/unix/stdio.c lib/isc/unix/stdtime.c \
+ lib/isc/unix/strerror.c lib/isc/task.c lib/isc/unix/time.c \
+ lib/isc/sha1.c lib/isc/sockaddr.c lib/isc/tsmemcmp.c $(NULL) \
+ $(am__append_3) $(am__append_4)
+libisc_XTRA = \
+ lib/isc/pthreads/condition.c \
+ lib/isc/pthreads/mutex.c \
+ lib/isc/pthreads/thread.c \
+ lib/isc/nothreads/condition.c \
+ lib/isc/nothreads/thread.c \
+ $(NULL)
+
libntp_a_SRCS = \
a_md5encrypt.c \
adjtime.c \
@@ -684,6 +818,7 @@ libntp_a_SRCS = \
ntp_libopts.c \
ntp_lineedit.c \
ntp_random.c \
+ ntp_realpath.c \
ntp_rfc2553.c \
ntp_worker.c \
numtoa.c \
@@ -717,15 +852,37 @@ libntp_a_SRCS = \
libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
-EXTRA_libntp_a_SOURCES = adjtimex.c
+EXTRA_libntp_a_SOURCES = \
+ adjtimex.c \
+ $(libisc_XTRA) \
+ $(NULL)
+
AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
-AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP) \
- $(NTP_HARD_CPPFLAGS)
+AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_LIBEVENT) \
+ $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
-EXTRA_DIST = README
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+EXTRA_DIST = \
+ README \
+ lib/isc/nothreads/include \
+ lib/isc/pthreads/include \
+ lib/isc/unix/ifiter_getifaddrs.c \
+ lib/isc/unix/ifiter_ioctl.c \
+ lib/isc/unix/ifiter_sysctl.c \
+ lib/isc/win32/condition.c \
+ lib/isc/win32/interfaceiter.c \
+ lib/isc/win32/net.c \
+ lib/isc/win32/once.c \
+ lib/isc/win32/stdtime.c \
+ lib/isc/win32/strerror.c \
+ lib/isc/win32/thread.c \
+ lib/isc/win32/time.c \
+ lib/isc/win32/win32os.c \
+ $(NULL)
+
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -748,8 +905,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
@@ -764,6 +921,108 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/isc/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc
+ @: > lib/isc/$(am__dirstamp)
+lib/isc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/$(DEPDIR)
+ @: > lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/assertions.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/buffer.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/backtrace-emptytbl.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/backtrace.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/unix
+ @: > lib/isc/unix/$(am__dirstamp)
+lib/isc/unix/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/unix/$(DEPDIR)
+ @: > lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/dir.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/error.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/errno2result.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/event.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/file.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/inet_ntop.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/inet_pton.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/interfaceiter.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/lib.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/log.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/md5.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/nls/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/nls
+ @: > lib/isc/nls/$(am__dirstamp)
+lib/isc/nls/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/nls/$(DEPDIR)
+ @: > lib/isc/nls/$(DEPDIR)/$(am__dirstamp)
+lib/isc/nls/msgcat.$(OBJEXT): lib/isc/nls/$(am__dirstamp) \
+ lib/isc/nls/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/net.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/netaddr.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/netscope.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/ondestroy.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/random.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/result.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/stdio.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/stdtime.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/strerror.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/task.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/unix/time.$(OBJEXT): lib/isc/unix/$(am__dirstamp) \
+ lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+lib/isc/sha1.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/sockaddr.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/tsmemcmp.$(OBJEXT): lib/isc/$(am__dirstamp) \
+ lib/isc/$(DEPDIR)/$(am__dirstamp)
+lib/isc/pthreads/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/pthreads
+ @: > lib/isc/pthreads/$(am__dirstamp)
+lib/isc/pthreads/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/pthreads/$(DEPDIR)
+ @: > lib/isc/pthreads/$(DEPDIR)/$(am__dirstamp)
+lib/isc/pthreads/condition.$(OBJEXT): \
+ lib/isc/pthreads/$(am__dirstamp) \
+ lib/isc/pthreads/$(DEPDIR)/$(am__dirstamp)
+lib/isc/pthreads/mutex.$(OBJEXT): lib/isc/pthreads/$(am__dirstamp) \
+ lib/isc/pthreads/$(DEPDIR)/$(am__dirstamp)
+lib/isc/pthreads/thread.$(OBJEXT): lib/isc/pthreads/$(am__dirstamp) \
+ lib/isc/pthreads/$(DEPDIR)/$(am__dirstamp)
+lib/isc/nothreads/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/nothreads
+ @: > lib/isc/nothreads/$(am__dirstamp)
+lib/isc/nothreads/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/isc/nothreads/$(DEPDIR)
+ @: > lib/isc/nothreads/$(DEPDIR)/$(am__dirstamp)
+lib/isc/nothreads/condition.$(OBJEXT): \
+ lib/isc/nothreads/$(am__dirstamp) \
+ lib/isc/nothreads/$(DEPDIR)/$(am__dirstamp)
+lib/isc/nothreads/thread.$(OBJEXT): lib/isc/nothreads/$(am__dirstamp) \
+ lib/isc/nothreads/$(DEPDIR)/$(am__dirstamp)
libntp.a: $(libntp_a_OBJECTS) $(libntp_a_DEPENDENCIES) $(EXTRA_libntp_a_DEPENDENCIES)
$(AM_V_at)-rm -f libntp.a
@@ -777,601 +1036,156 @@ libntpsim.a: $(libntpsim_a_OBJECTS) $(libntpsim_a_DEPENDENCIES) $(EXTRA_libntpsi
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f lib/isc/*.$(OBJEXT)
+ -rm -f lib/isc/nls/*.$(OBJEXT)
+ -rm -f lib/isc/nothreads/*.$(OBJEXT)
+ -rm -f lib/isc/pthreads/*.$(OBJEXT)
+ -rm -f lib/isc/unix/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/a_md5encrypt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assertions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atouint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkeys.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authreadkeys.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authusekey.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace-emptytbl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_strerror.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buftvtots.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caljulian.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caltontp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calyearstart.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktypes.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/condition.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decodenetnum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dofptoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dolfptoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emalloc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errno2result.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findconfig.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/humandate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icom.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interfaceiter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iosignal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/is_ip_address.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_strbuf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libssl_compat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machines.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modetoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgcat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mstolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msyslog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netaddr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netscope.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calendar.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calgps.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto_rnd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_intres.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_libopts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_lineedit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_random.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_rfc2553.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_worker.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ondestroy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prettydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refidsmear.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refnumtoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/result.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockaddr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktohost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl_init.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statestr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdtime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strl_obsd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syssignal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime_s.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespecops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevalops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timexsup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsmemcmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uglydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vint64ops.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_fork.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_thread.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsbprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/a_md5encrypt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atoint.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atolfp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atouint.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkeys.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authreadkeys.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authusekey.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_strerror.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buftvtots.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caljulian.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caltontp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calyearstart.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktypes.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decodenetnum.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dofptoa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dolfptoa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emalloc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findconfig.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextoint.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextolfp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/humandate.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icom.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iosignal.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/is_ip_address.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_strbuf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libssl_compat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machines.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modetoa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mstolfp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msyslog.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calendar.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calgps.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto_rnd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_intres.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_libopts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_lineedit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_random.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_realpath.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_rfc2553.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_worker.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prettydate.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refidsmear.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refnumtoa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktoa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktohost.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl_init.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statestr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strl_obsd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syssignal.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime_s.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespecops.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetoa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevalops.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timexsup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uglydate.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vint64ops.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_fork.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsbprintf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/assertions.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/backtrace-emptytbl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/backtrace.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/buffer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/event.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/inet_ntop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/inet_pton.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/lib.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/log.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/md5.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/netaddr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/netscope.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/ondestroy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/random.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/result.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/sha1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/sockaddr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/task.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/$(DEPDIR)/tsmemcmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/nls/$(DEPDIR)/msgcat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/nothreads/$(DEPDIR)/condition.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/nothreads/$(DEPDIR)/thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/pthreads/$(DEPDIR)/condition.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/pthreads/$(DEPDIR)/mutex.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/pthreads/$(DEPDIR)/thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/dir.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/errno2result.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/interfaceiter.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/net.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/stdio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/stdtime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/strerror.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/isc/unix/$(DEPDIR)/time.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-assertions.o: $(srcdir)/../lib/isc/assertions.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.o -MD -MP -MF $(DEPDIR)/assertions.Tpo -c -o assertions.o `test -f '$(srcdir)/../lib/isc/assertions.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/assertions.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assertions.Tpo $(DEPDIR)/assertions.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/assertions.c' object='assertions.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assertions.o `test -f '$(srcdir)/../lib/isc/assertions.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/assertions.c
-
-assertions.obj: $(srcdir)/../lib/isc/assertions.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.obj -MD -MP -MF $(DEPDIR)/assertions.Tpo -c -o assertions.obj `if test -f '$(srcdir)/../lib/isc/assertions.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/assertions.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/assertions.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assertions.Tpo $(DEPDIR)/assertions.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/assertions.c' object='assertions.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assertions.obj `if test -f '$(srcdir)/../lib/isc/assertions.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/assertions.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/assertions.c'; fi`
-
-buffer.o: $(srcdir)/../lib/isc/buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buffer.o -MD -MP -MF $(DEPDIR)/buffer.Tpo -c -o buffer.o `test -f '$(srcdir)/../lib/isc/buffer.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/buffer.Tpo $(DEPDIR)/buffer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/buffer.c' object='buffer.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o buffer.o `test -f '$(srcdir)/../lib/isc/buffer.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/buffer.c
-
-buffer.obj: $(srcdir)/../lib/isc/buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buffer.obj -MD -MP -MF $(DEPDIR)/buffer.Tpo -c -o buffer.obj `if test -f '$(srcdir)/../lib/isc/buffer.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/buffer.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/buffer.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/buffer.Tpo $(DEPDIR)/buffer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/buffer.c' object='buffer.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o buffer.obj `if test -f '$(srcdir)/../lib/isc/buffer.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/buffer.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/buffer.c'; fi`
-
-backtrace-emptytbl.o: $(srcdir)/../lib/isc/backtrace-emptytbl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace-emptytbl.o -MD -MP -MF $(DEPDIR)/backtrace-emptytbl.Tpo -c -o backtrace-emptytbl.o `test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace-emptytbl.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace-emptytbl.Tpo $(DEPDIR)/backtrace-emptytbl.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/backtrace-emptytbl.c' object='backtrace-emptytbl.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace-emptytbl.o `test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace-emptytbl.c
-
-backtrace-emptytbl.obj: $(srcdir)/../lib/isc/backtrace-emptytbl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace-emptytbl.obj -MD -MP -MF $(DEPDIR)/backtrace-emptytbl.Tpo -c -o backtrace-emptytbl.obj `if test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace-emptytbl.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace-emptytbl.Tpo $(DEPDIR)/backtrace-emptytbl.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/backtrace-emptytbl.c' object='backtrace-emptytbl.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace-emptytbl.obj `if test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace-emptytbl.c'; fi`
-
-backtrace.o: $(srcdir)/../lib/isc/backtrace.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace.o -MD -MP -MF $(DEPDIR)/backtrace.Tpo -c -o backtrace.o `test -f '$(srcdir)/../lib/isc/backtrace.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace.Tpo $(DEPDIR)/backtrace.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/backtrace.c' object='backtrace.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace.o `test -f '$(srcdir)/../lib/isc/backtrace.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace.c
-
-backtrace.obj: $(srcdir)/../lib/isc/backtrace.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace.obj -MD -MP -MF $(DEPDIR)/backtrace.Tpo -c -o backtrace.obj `if test -f '$(srcdir)/../lib/isc/backtrace.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace.Tpo $(DEPDIR)/backtrace.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/backtrace.c' object='backtrace.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace.obj `if test -f '$(srcdir)/../lib/isc/backtrace.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace.c'; fi`
-
-condition.o: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT condition.o -MD -MP -MF $(DEPDIR)/condition.Tpo -c -o condition.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/condition.Tpo $(DEPDIR)/condition.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' object='condition.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o condition.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
-
-condition.obj: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT condition.obj -MD -MP -MF $(DEPDIR)/condition.Tpo -c -o condition.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/condition.Tpo $(DEPDIR)/condition.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' object='condition.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o condition.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; fi`
-
-dir.o: $(srcdir)/../lib/isc/unix/dir.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dir.o -MD -MP -MF $(DEPDIR)/dir.Tpo -c -o dir.o `test -f '$(srcdir)/../lib/isc/unix/dir.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/dir.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dir.Tpo $(DEPDIR)/dir.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/dir.c' object='dir.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dir.o `test -f '$(srcdir)/../lib/isc/unix/dir.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/dir.c
-
-dir.obj: $(srcdir)/../lib/isc/unix/dir.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dir.obj -MD -MP -MF $(DEPDIR)/dir.Tpo -c -o dir.obj `if test -f '$(srcdir)/../lib/isc/unix/dir.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/dir.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/dir.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dir.Tpo $(DEPDIR)/dir.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/dir.c' object='dir.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dir.obj `if test -f '$(srcdir)/../lib/isc/unix/dir.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/dir.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/dir.c'; fi`
-
-error.o: $(srcdir)/../lib/isc/error.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.o -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.o `test -f '$(srcdir)/../lib/isc/error.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/error.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/error.c' object='error.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.o `test -f '$(srcdir)/../lib/isc/error.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/error.c
-
-error.obj: $(srcdir)/../lib/isc/error.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.obj -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.obj `if test -f '$(srcdir)/../lib/isc/error.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/error.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/error.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/error.c' object='error.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.obj `if test -f '$(srcdir)/../lib/isc/error.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/error.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/error.c'; fi`
-
-errno2result.o: $(srcdir)/../lib/isc/unix/errno2result.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT errno2result.o -MD -MP -MF $(DEPDIR)/errno2result.Tpo -c -o errno2result.o `test -f '$(srcdir)/../lib/isc/unix/errno2result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/errno2result.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/errno2result.Tpo $(DEPDIR)/errno2result.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/errno2result.c' object='errno2result.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o errno2result.o `test -f '$(srcdir)/../lib/isc/unix/errno2result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/errno2result.c
-
-errno2result.obj: $(srcdir)/../lib/isc/unix/errno2result.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT errno2result.obj -MD -MP -MF $(DEPDIR)/errno2result.Tpo -c -o errno2result.obj `if test -f '$(srcdir)/../lib/isc/unix/errno2result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/errno2result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/errno2result.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/errno2result.Tpo $(DEPDIR)/errno2result.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/errno2result.c' object='errno2result.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o errno2result.obj `if test -f '$(srcdir)/../lib/isc/unix/errno2result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/errno2result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/errno2result.c'; fi`
-
-event.o: $(srcdir)/../lib/isc/event.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT event.o -MD -MP -MF $(DEPDIR)/event.Tpo -c -o event.o `test -f '$(srcdir)/../lib/isc/event.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/event.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/event.Tpo $(DEPDIR)/event.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/event.c' object='event.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o event.o `test -f '$(srcdir)/../lib/isc/event.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/event.c
-
-event.obj: $(srcdir)/../lib/isc/event.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT event.obj -MD -MP -MF $(DEPDIR)/event.Tpo -c -o event.obj `if test -f '$(srcdir)/../lib/isc/event.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/event.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/event.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/event.Tpo $(DEPDIR)/event.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/event.c' object='event.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o event.obj `if test -f '$(srcdir)/../lib/isc/event.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/event.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/event.c'; fi`
-
-file.o: $(srcdir)/../lib/isc/unix/file.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT file.o -MD -MP -MF $(DEPDIR)/file.Tpo -c -o file.o `test -f '$(srcdir)/../lib/isc/unix/file.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/file.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/file.Tpo $(DEPDIR)/file.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/file.c' object='file.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o file.o `test -f '$(srcdir)/../lib/isc/unix/file.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/file.c
-
-file.obj: $(srcdir)/../lib/isc/unix/file.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT file.obj -MD -MP -MF $(DEPDIR)/file.Tpo -c -o file.obj `if test -f '$(srcdir)/../lib/isc/unix/file.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/file.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/file.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/file.Tpo $(DEPDIR)/file.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/file.c' object='file.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o file.obj `if test -f '$(srcdir)/../lib/isc/unix/file.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/file.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/file.c'; fi`
-
-inet_ntop.o: $(srcdir)/../lib/isc/inet_ntop.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.o -MD -MP -MF $(DEPDIR)/inet_ntop.Tpo -c -o inet_ntop.o `test -f '$(srcdir)/../lib/isc/inet_ntop.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_ntop.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_ntop.Tpo $(DEPDIR)/inet_ntop.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/inet_ntop.c' object='inet_ntop.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_ntop.o `test -f '$(srcdir)/../lib/isc/inet_ntop.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_ntop.c
-
-inet_ntop.obj: $(srcdir)/../lib/isc/inet_ntop.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.obj -MD -MP -MF $(DEPDIR)/inet_ntop.Tpo -c -o inet_ntop.obj `if test -f '$(srcdir)/../lib/isc/inet_ntop.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_ntop.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_ntop.Tpo $(DEPDIR)/inet_ntop.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/inet_ntop.c' object='inet_ntop.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_ntop.obj `if test -f '$(srcdir)/../lib/isc/inet_ntop.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_ntop.c'; fi`
-
-inet_pton.o: $(srcdir)/../lib/isc/inet_pton.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_pton.o -MD -MP -MF $(DEPDIR)/inet_pton.Tpo -c -o inet_pton.o `test -f '$(srcdir)/../lib/isc/inet_pton.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_pton.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_pton.Tpo $(DEPDIR)/inet_pton.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/inet_pton.c' object='inet_pton.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_pton.o `test -f '$(srcdir)/../lib/isc/inet_pton.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_pton.c
-
-inet_pton.obj: $(srcdir)/../lib/isc/inet_pton.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_pton.obj -MD -MP -MF $(DEPDIR)/inet_pton.Tpo -c -o inet_pton.obj `if test -f '$(srcdir)/../lib/isc/inet_pton.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_pton.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_pton.Tpo $(DEPDIR)/inet_pton.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/inet_pton.c' object='inet_pton.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_pton.obj `if test -f '$(srcdir)/../lib/isc/inet_pton.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_pton.c'; fi`
-
-interfaceiter.o: $(srcdir)/../lib/isc/unix/interfaceiter.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.o -MD -MP -MF $(DEPDIR)/interfaceiter.Tpo -c -o interfaceiter.o `test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/interfaceiter.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/interfaceiter.Tpo $(DEPDIR)/interfaceiter.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/interfaceiter.c' object='interfaceiter.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interfaceiter.o `test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/interfaceiter.c
-
-interfaceiter.obj: $(srcdir)/../lib/isc/unix/interfaceiter.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.obj -MD -MP -MF $(DEPDIR)/interfaceiter.Tpo -c -o interfaceiter.obj `if test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/interfaceiter.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/interfaceiter.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/interfaceiter.Tpo $(DEPDIR)/interfaceiter.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/interfaceiter.c' object='interfaceiter.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interfaceiter.obj `if test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/interfaceiter.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/interfaceiter.c'; fi`
-
-lib.o: $(srcdir)/../lib/isc/lib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.o -MD -MP -MF $(DEPDIR)/lib.Tpo -c -o lib.o `test -f '$(srcdir)/../lib/isc/lib.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/lib.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib.Tpo $(DEPDIR)/lib.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/lib.c' object='lib.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib.o `test -f '$(srcdir)/../lib/isc/lib.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/lib.c
-
-lib.obj: $(srcdir)/../lib/isc/lib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.obj -MD -MP -MF $(DEPDIR)/lib.Tpo -c -o lib.obj `if test -f '$(srcdir)/../lib/isc/lib.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/lib.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/lib.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib.Tpo $(DEPDIR)/lib.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/lib.c' object='lib.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib.obj `if test -f '$(srcdir)/../lib/isc/lib.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/lib.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/lib.c'; fi`
-
-log.o: $(srcdir)/../lib/isc/log.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.o -MD -MP -MF $(DEPDIR)/log.Tpo -c -o log.o `test -f '$(srcdir)/../lib/isc/log.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/log.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/log.Tpo $(DEPDIR)/log.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/log.c' object='log.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.o `test -f '$(srcdir)/../lib/isc/log.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/log.c
-
-log.obj: $(srcdir)/../lib/isc/log.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.obj -MD -MP -MF $(DEPDIR)/log.Tpo -c -o log.obj `if test -f '$(srcdir)/../lib/isc/log.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/log.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/log.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/log.Tpo $(DEPDIR)/log.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/log.c' object='log.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.obj `if test -f '$(srcdir)/../lib/isc/log.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/log.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/log.c'; fi`
-
-md5.o: $(srcdir)/../lib/isc/md5.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.o -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.o `test -f '$(srcdir)/../lib/isc/md5.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/md5.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/md5.c' object='md5.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.o `test -f '$(srcdir)/../lib/isc/md5.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/md5.c
-
-md5.obj: $(srcdir)/../lib/isc/md5.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.obj -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.obj `if test -f '$(srcdir)/../lib/isc/md5.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/md5.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/md5.c' object='md5.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.obj `if test -f '$(srcdir)/../lib/isc/md5.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/md5.c'; fi`
-
-msgcat.o: $(srcdir)/../lib/isc/nls/msgcat.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.o -MD -MP -MF $(DEPDIR)/msgcat.Tpo -c -o msgcat.o `test -f '$(srcdir)/../lib/isc/nls/msgcat.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nls/msgcat.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/msgcat.Tpo $(DEPDIR)/msgcat.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/nls/msgcat.c' object='msgcat.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msgcat.o `test -f '$(srcdir)/../lib/isc/nls/msgcat.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nls/msgcat.c
-
-msgcat.obj: $(srcdir)/../lib/isc/nls/msgcat.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.obj -MD -MP -MF $(DEPDIR)/msgcat.Tpo -c -o msgcat.obj `if test -f '$(srcdir)/../lib/isc/nls/msgcat.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nls/msgcat.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nls/msgcat.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/msgcat.Tpo $(DEPDIR)/msgcat.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/nls/msgcat.c' object='msgcat.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msgcat.obj `if test -f '$(srcdir)/../lib/isc/nls/msgcat.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nls/msgcat.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nls/msgcat.c'; fi`
-
-net.o: $(srcdir)/../lib/isc/unix/net.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.o -MD -MP -MF $(DEPDIR)/net.Tpo -c -o net.o `test -f '$(srcdir)/../lib/isc/unix/net.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/net.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/net.Tpo $(DEPDIR)/net.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/net.c' object='net.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o net.o `test -f '$(srcdir)/../lib/isc/unix/net.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/net.c
-
-net.obj: $(srcdir)/../lib/isc/unix/net.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.obj -MD -MP -MF $(DEPDIR)/net.Tpo -c -o net.obj `if test -f '$(srcdir)/../lib/isc/unix/net.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/net.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/net.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/net.Tpo $(DEPDIR)/net.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/net.c' object='net.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o net.obj `if test -f '$(srcdir)/../lib/isc/unix/net.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/net.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/net.c'; fi`
-
-netaddr.o: $(srcdir)/../lib/isc/netaddr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netaddr.o -MD -MP -MF $(DEPDIR)/netaddr.Tpo -c -o netaddr.o `test -f '$(srcdir)/../lib/isc/netaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netaddr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netaddr.Tpo $(DEPDIR)/netaddr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/netaddr.c' object='netaddr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netaddr.o `test -f '$(srcdir)/../lib/isc/netaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netaddr.c
-
-netaddr.obj: $(srcdir)/../lib/isc/netaddr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netaddr.obj -MD -MP -MF $(DEPDIR)/netaddr.Tpo -c -o netaddr.obj `if test -f '$(srcdir)/../lib/isc/netaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netaddr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netaddr.Tpo $(DEPDIR)/netaddr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/netaddr.c' object='netaddr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netaddr.obj `if test -f '$(srcdir)/../lib/isc/netaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netaddr.c'; fi`
-
-netscope.o: $(srcdir)/../lib/isc/netscope.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netscope.o -MD -MP -MF $(DEPDIR)/netscope.Tpo -c -o netscope.o `test -f '$(srcdir)/../lib/isc/netscope.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netscope.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netscope.Tpo $(DEPDIR)/netscope.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/netscope.c' object='netscope.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netscope.o `test -f '$(srcdir)/../lib/isc/netscope.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netscope.c
-
-netscope.obj: $(srcdir)/../lib/isc/netscope.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netscope.obj -MD -MP -MF $(DEPDIR)/netscope.Tpo -c -o netscope.obj `if test -f '$(srcdir)/../lib/isc/netscope.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netscope.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netscope.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netscope.Tpo $(DEPDIR)/netscope.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/netscope.c' object='netscope.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netscope.obj `if test -f '$(srcdir)/../lib/isc/netscope.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netscope.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netscope.c'; fi`
-
-ondestroy.o: $(srcdir)/../lib/isc/ondestroy.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ondestroy.o -MD -MP -MF $(DEPDIR)/ondestroy.Tpo -c -o ondestroy.o `test -f '$(srcdir)/../lib/isc/ondestroy.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/ondestroy.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ondestroy.Tpo $(DEPDIR)/ondestroy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/ondestroy.c' object='ondestroy.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ondestroy.o `test -f '$(srcdir)/../lib/isc/ondestroy.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/ondestroy.c
-
-ondestroy.obj: $(srcdir)/../lib/isc/ondestroy.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ondestroy.obj -MD -MP -MF $(DEPDIR)/ondestroy.Tpo -c -o ondestroy.obj `if test -f '$(srcdir)/../lib/isc/ondestroy.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/ondestroy.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/ondestroy.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ondestroy.Tpo $(DEPDIR)/ondestroy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/ondestroy.c' object='ondestroy.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ondestroy.obj `if test -f '$(srcdir)/../lib/isc/ondestroy.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/ondestroy.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/ondestroy.c'; fi`
-
-random.o: $(srcdir)/../lib/isc/random.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random.o -MD -MP -MF $(DEPDIR)/random.Tpo -c -o random.o `test -f '$(srcdir)/../lib/isc/random.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/random.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/random.Tpo $(DEPDIR)/random.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/random.c' object='random.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o random.o `test -f '$(srcdir)/../lib/isc/random.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/random.c
-
-random.obj: $(srcdir)/../lib/isc/random.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random.obj -MD -MP -MF $(DEPDIR)/random.Tpo -c -o random.obj `if test -f '$(srcdir)/../lib/isc/random.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/random.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/random.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/random.Tpo $(DEPDIR)/random.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/random.c' object='random.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o random.obj `if test -f '$(srcdir)/../lib/isc/random.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/random.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/random.c'; fi`
-
-result.o: $(srcdir)/../lib/isc/result.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT result.o -MD -MP -MF $(DEPDIR)/result.Tpo -c -o result.o `test -f '$(srcdir)/../lib/isc/result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/result.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/result.Tpo $(DEPDIR)/result.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/result.c' object='result.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o result.o `test -f '$(srcdir)/../lib/isc/result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/result.c
-
-result.obj: $(srcdir)/../lib/isc/result.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT result.obj -MD -MP -MF $(DEPDIR)/result.Tpo -c -o result.obj `if test -f '$(srcdir)/../lib/isc/result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/result.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/result.Tpo $(DEPDIR)/result.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/result.c' object='result.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o result.obj `if test -f '$(srcdir)/../lib/isc/result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/result.c'; fi`
-
-stdio.o: $(srcdir)/../lib/isc/unix/stdio.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio.o -MD -MP -MF $(DEPDIR)/stdio.Tpo -c -o stdio.o `test -f '$(srcdir)/../lib/isc/unix/stdio.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdio.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdio.Tpo $(DEPDIR)/stdio.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/stdio.c' object='stdio.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio.o `test -f '$(srcdir)/../lib/isc/unix/stdio.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdio.c
-
-stdio.obj: $(srcdir)/../lib/isc/unix/stdio.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio.obj -MD -MP -MF $(DEPDIR)/stdio.Tpo -c -o stdio.obj `if test -f '$(srcdir)/../lib/isc/unix/stdio.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdio.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdio.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdio.Tpo $(DEPDIR)/stdio.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/stdio.c' object='stdio.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio.obj `if test -f '$(srcdir)/../lib/isc/unix/stdio.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdio.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdio.c'; fi`
-
-stdtime.o: $(srcdir)/../lib/isc/unix/stdtime.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdtime.o -MD -MP -MF $(DEPDIR)/stdtime.Tpo -c -o stdtime.o `test -f '$(srcdir)/../lib/isc/unix/stdtime.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdtime.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdtime.Tpo $(DEPDIR)/stdtime.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/stdtime.c' object='stdtime.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdtime.o `test -f '$(srcdir)/../lib/isc/unix/stdtime.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdtime.c
-
-stdtime.obj: $(srcdir)/../lib/isc/unix/stdtime.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdtime.obj -MD -MP -MF $(DEPDIR)/stdtime.Tpo -c -o stdtime.obj `if test -f '$(srcdir)/../lib/isc/unix/stdtime.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdtime.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdtime.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdtime.Tpo $(DEPDIR)/stdtime.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/stdtime.c' object='stdtime.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdtime.obj `if test -f '$(srcdir)/../lib/isc/unix/stdtime.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdtime.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdtime.c'; fi`
-
-strerror.o: $(srcdir)/../lib/isc/unix/strerror.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strerror.o -MD -MP -MF $(DEPDIR)/strerror.Tpo -c -o strerror.o `test -f '$(srcdir)/../lib/isc/unix/strerror.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/strerror.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strerror.Tpo $(DEPDIR)/strerror.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/strerror.c' object='strerror.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strerror.o `test -f '$(srcdir)/../lib/isc/unix/strerror.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/strerror.c
-
-strerror.obj: $(srcdir)/../lib/isc/unix/strerror.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strerror.obj -MD -MP -MF $(DEPDIR)/strerror.Tpo -c -o strerror.obj `if test -f '$(srcdir)/../lib/isc/unix/strerror.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/strerror.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/strerror.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strerror.Tpo $(DEPDIR)/strerror.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/strerror.c' object='strerror.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strerror.obj `if test -f '$(srcdir)/../lib/isc/unix/strerror.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/strerror.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/strerror.c'; fi`
-
-task.o: $(srcdir)/../lib/isc/task.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task.o -MD -MP -MF $(DEPDIR)/task.Tpo -c -o task.o `test -f '$(srcdir)/../lib/isc/task.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/task.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/task.Tpo $(DEPDIR)/task.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/task.c' object='task.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o task.o `test -f '$(srcdir)/../lib/isc/task.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/task.c
-
-task.obj: $(srcdir)/../lib/isc/task.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task.obj -MD -MP -MF $(DEPDIR)/task.Tpo -c -o task.obj `if test -f '$(srcdir)/../lib/isc/task.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/task.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/task.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/task.Tpo $(DEPDIR)/task.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/task.c' object='task.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o task.obj `if test -f '$(srcdir)/../lib/isc/task.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/task.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/task.c'; fi`
-
-thread.o: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread.o -MD -MP -MF $(DEPDIR)/thread.Tpo -c -o thread.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/thread.Tpo $(DEPDIR)/thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' object='thread.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
-
-thread.obj: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread.obj -MD -MP -MF $(DEPDIR)/thread.Tpo -c -o thread.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/thread.Tpo $(DEPDIR)/thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' object='thread.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; fi`
-
-time.o: $(srcdir)/../lib/isc/unix/time.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT time.o -MD -MP -MF $(DEPDIR)/time.Tpo -c -o time.o `test -f '$(srcdir)/../lib/isc/unix/time.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/time.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/time.Tpo $(DEPDIR)/time.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/time.c' object='time.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o time.o `test -f '$(srcdir)/../lib/isc/unix/time.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/time.c
-
-time.obj: $(srcdir)/../lib/isc/unix/time.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT time.obj -MD -MP -MF $(DEPDIR)/time.Tpo -c -o time.obj `if test -f '$(srcdir)/../lib/isc/unix/time.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/time.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/time.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/time.Tpo $(DEPDIR)/time.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/unix/time.c' object='time.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o time.obj `if test -f '$(srcdir)/../lib/isc/unix/time.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/time.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/time.c'; fi`
-
-sha1.o: $(srcdir)/../lib/isc/sha1.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1.o -MD -MP -MF $(DEPDIR)/sha1.Tpo -c -o sha1.o `test -f '$(srcdir)/../lib/isc/sha1.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sha1.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha1.Tpo $(DEPDIR)/sha1.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/sha1.c' object='sha1.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1.o `test -f '$(srcdir)/../lib/isc/sha1.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sha1.c
-
-sha1.obj: $(srcdir)/../lib/isc/sha1.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1.obj -MD -MP -MF $(DEPDIR)/sha1.Tpo -c -o sha1.obj `if test -f '$(srcdir)/../lib/isc/sha1.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sha1.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sha1.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha1.Tpo $(DEPDIR)/sha1.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/sha1.c' object='sha1.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1.obj `if test -f '$(srcdir)/../lib/isc/sha1.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sha1.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sha1.c'; fi`
-
-sockaddr.o: $(srcdir)/../lib/isc/sockaddr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sockaddr.o -MD -MP -MF $(DEPDIR)/sockaddr.Tpo -c -o sockaddr.o `test -f '$(srcdir)/../lib/isc/sockaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sockaddr.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sockaddr.Tpo $(DEPDIR)/sockaddr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/sockaddr.c' object='sockaddr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sockaddr.o `test -f '$(srcdir)/../lib/isc/sockaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sockaddr.c
-
-sockaddr.obj: $(srcdir)/../lib/isc/sockaddr.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sockaddr.obj -MD -MP -MF $(DEPDIR)/sockaddr.Tpo -c -o sockaddr.obj `if test -f '$(srcdir)/../lib/isc/sockaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sockaddr.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sockaddr.Tpo $(DEPDIR)/sockaddr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/sockaddr.c' object='sockaddr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sockaddr.obj `if test -f '$(srcdir)/../lib/isc/sockaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sockaddr.c'; fi`
-
-tsmemcmp.o: $(srcdir)/../lib/isc/tsmemcmp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tsmemcmp.o -MD -MP -MF $(DEPDIR)/tsmemcmp.Tpo -c -o tsmemcmp.o `test -f '$(srcdir)/../lib/isc/tsmemcmp.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/tsmemcmp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tsmemcmp.Tpo $(DEPDIR)/tsmemcmp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/tsmemcmp.c' object='tsmemcmp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tsmemcmp.o `test -f '$(srcdir)/../lib/isc/tsmemcmp.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/tsmemcmp.c
-
-tsmemcmp.obj: $(srcdir)/../lib/isc/tsmemcmp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tsmemcmp.obj -MD -MP -MF $(DEPDIR)/tsmemcmp.Tpo -c -o tsmemcmp.obj `if test -f '$(srcdir)/../lib/isc/tsmemcmp.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/tsmemcmp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/tsmemcmp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tsmemcmp.Tpo $(DEPDIR)/tsmemcmp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/tsmemcmp.c' object='tsmemcmp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tsmemcmp.obj `if test -f '$(srcdir)/../lib/isc/tsmemcmp.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/tsmemcmp.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/tsmemcmp.c'; fi`
-
-mutex.o: $(srcdir)/../lib/isc/pthreads/mutex.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mutex.o -MD -MP -MF $(DEPDIR)/mutex.Tpo -c -o mutex.o `test -f '$(srcdir)/../lib/isc/pthreads/mutex.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/pthreads/mutex.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mutex.Tpo $(DEPDIR)/mutex.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/pthreads/mutex.c' object='mutex.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mutex.o `test -f '$(srcdir)/../lib/isc/pthreads/mutex.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/pthreads/mutex.c
-
-mutex.obj: $(srcdir)/../lib/isc/pthreads/mutex.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mutex.obj -MD -MP -MF $(DEPDIR)/mutex.Tpo -c -o mutex.obj `if test -f '$(srcdir)/../lib/isc/pthreads/mutex.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/pthreads/mutex.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/pthreads/mutex.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mutex.Tpo $(DEPDIR)/mutex.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../lib/isc/pthreads/mutex.c' object='mutex.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mutex.obj `if test -f '$(srcdir)/../lib/isc/pthreads/mutex.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/pthreads/mutex.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/pthreads/mutex.c'; fi`
-
mostlyclean-libtool:
-rm -f *.lo
@@ -1429,8 +1243,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1463,11 +1279,12 @@ distdir: $(DISTFILES)
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES)
+all-am: Makefile $(LIBRARIES) $(HEADERS)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1493,6 +1310,17 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f lib/isc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/isc/$(am__dirstamp)
+ -rm -f lib/isc/nls/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/isc/nls/$(am__dirstamp)
+ -rm -f lib/isc/nothreads/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/isc/nothreads/$(am__dirstamp)
+ -rm -f lib/isc/pthreads/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/isc/pthreads/$(am__dirstamp)
+ -rm -f lib/isc/unix/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/isc/unix/$(am__dirstamp)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1504,7 +1332,116 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/a_md5encrypt.Po
+ -rm -f ./$(DEPDIR)/adjtime.Po
+ -rm -f ./$(DEPDIR)/adjtimex.Po
+ -rm -f ./$(DEPDIR)/atoint.Po
+ -rm -f ./$(DEPDIR)/atolfp.Po
+ -rm -f ./$(DEPDIR)/atouint.Po
+ -rm -f ./$(DEPDIR)/audio.Po
+ -rm -f ./$(DEPDIR)/authkeys.Po
+ -rm -f ./$(DEPDIR)/authreadkeys.Po
+ -rm -f ./$(DEPDIR)/authusekey.Po
+ -rm -f ./$(DEPDIR)/bsd_strerror.Po
+ -rm -f ./$(DEPDIR)/buftvtots.Po
+ -rm -f ./$(DEPDIR)/caljulian.Po
+ -rm -f ./$(DEPDIR)/caltontp.Po
+ -rm -f ./$(DEPDIR)/calyearstart.Po
+ -rm -f ./$(DEPDIR)/clocktime.Po
+ -rm -f ./$(DEPDIR)/clocktypes.Po
+ -rm -f ./$(DEPDIR)/decodenetnum.Po
+ -rm -f ./$(DEPDIR)/dofptoa.Po
+ -rm -f ./$(DEPDIR)/dolfptoa.Po
+ -rm -f ./$(DEPDIR)/emalloc.Po
+ -rm -f ./$(DEPDIR)/findconfig.Po
+ -rm -f ./$(DEPDIR)/getopt.Po
+ -rm -f ./$(DEPDIR)/hextoint.Po
+ -rm -f ./$(DEPDIR)/hextolfp.Po
+ -rm -f ./$(DEPDIR)/humandate.Po
+ -rm -f ./$(DEPDIR)/icom.Po
+ -rm -f ./$(DEPDIR)/iosignal.Po
+ -rm -f ./$(DEPDIR)/is_ip_address.Po
+ -rm -f ./$(DEPDIR)/lib_strbuf.Po
+ -rm -f ./$(DEPDIR)/libssl_compat.Po
+ -rm -f ./$(DEPDIR)/machines.Po
+ -rm -f ./$(DEPDIR)/mktime.Po
+ -rm -f ./$(DEPDIR)/modetoa.Po
+ -rm -f ./$(DEPDIR)/mstolfp.Po
+ -rm -f ./$(DEPDIR)/msyslog.Po
+ -rm -f ./$(DEPDIR)/netof.Po
+ -rm -f ./$(DEPDIR)/ntp_calendar.Po
+ -rm -f ./$(DEPDIR)/ntp_calgps.Po
+ -rm -f ./$(DEPDIR)/ntp_crypto_rnd.Po
+ -rm -f ./$(DEPDIR)/ntp_intres.Po
+ -rm -f ./$(DEPDIR)/ntp_libopts.Po
+ -rm -f ./$(DEPDIR)/ntp_lineedit.Po
+ -rm -f ./$(DEPDIR)/ntp_random.Po
+ -rm -f ./$(DEPDIR)/ntp_realpath.Po
+ -rm -f ./$(DEPDIR)/ntp_rfc2553.Po
+ -rm -f ./$(DEPDIR)/ntp_worker.Po
+ -rm -f ./$(DEPDIR)/numtoa.Po
+ -rm -f ./$(DEPDIR)/numtohost.Po
+ -rm -f ./$(DEPDIR)/octtoint.Po
+ -rm -f ./$(DEPDIR)/prettydate.Po
+ -rm -f ./$(DEPDIR)/recvbuff.Po
+ -rm -f ./$(DEPDIR)/refidsmear.Po
+ -rm -f ./$(DEPDIR)/refnumtoa.Po
+ -rm -f ./$(DEPDIR)/snprintf.Po
+ -rm -f ./$(DEPDIR)/socket.Po
+ -rm -f ./$(DEPDIR)/socktoa.Po
+ -rm -f ./$(DEPDIR)/socktohost.Po
+ -rm -f ./$(DEPDIR)/ssl_init.Po
+ -rm -f ./$(DEPDIR)/statestr.Po
+ -rm -f ./$(DEPDIR)/strdup.Po
+ -rm -f ./$(DEPDIR)/strl_obsd.Po
+ -rm -f ./$(DEPDIR)/syssignal.Po
+ -rm -f ./$(DEPDIR)/systime.Po
+ -rm -f ./$(DEPDIR)/systime_s.Po
+ -rm -f ./$(DEPDIR)/timespecops.Po
+ -rm -f ./$(DEPDIR)/timetoa.Po
+ -rm -f ./$(DEPDIR)/timevalops.Po
+ -rm -f ./$(DEPDIR)/timexsup.Po
+ -rm -f ./$(DEPDIR)/uglydate.Po
+ -rm -f ./$(DEPDIR)/vint64ops.Po
+ -rm -f ./$(DEPDIR)/work_fork.Po
+ -rm -f ./$(DEPDIR)/work_thread.Po
+ -rm -f ./$(DEPDIR)/xsbprintf.Po
+ -rm -f ./$(DEPDIR)/ymd2yd.Po
+ -rm -f lib/isc/$(DEPDIR)/assertions.Po
+ -rm -f lib/isc/$(DEPDIR)/backtrace-emptytbl.Po
+ -rm -f lib/isc/$(DEPDIR)/backtrace.Po
+ -rm -f lib/isc/$(DEPDIR)/buffer.Po
+ -rm -f lib/isc/$(DEPDIR)/error.Po
+ -rm -f lib/isc/$(DEPDIR)/event.Po
+ -rm -f lib/isc/$(DEPDIR)/inet_ntop.Po
+ -rm -f lib/isc/$(DEPDIR)/inet_pton.Po
+ -rm -f lib/isc/$(DEPDIR)/lib.Po
+ -rm -f lib/isc/$(DEPDIR)/log.Po
+ -rm -f lib/isc/$(DEPDIR)/md5.Po
+ -rm -f lib/isc/$(DEPDIR)/netaddr.Po
+ -rm -f lib/isc/$(DEPDIR)/netscope.Po
+ -rm -f lib/isc/$(DEPDIR)/ondestroy.Po
+ -rm -f lib/isc/$(DEPDIR)/random.Po
+ -rm -f lib/isc/$(DEPDIR)/result.Po
+ -rm -f lib/isc/$(DEPDIR)/sha1.Po
+ -rm -f lib/isc/$(DEPDIR)/sockaddr.Po
+ -rm -f lib/isc/$(DEPDIR)/task.Po
+ -rm -f lib/isc/$(DEPDIR)/tsmemcmp.Po
+ -rm -f lib/isc/nls/$(DEPDIR)/msgcat.Po
+ -rm -f lib/isc/nothreads/$(DEPDIR)/condition.Po
+ -rm -f lib/isc/nothreads/$(DEPDIR)/thread.Po
+ -rm -f lib/isc/pthreads/$(DEPDIR)/condition.Po
+ -rm -f lib/isc/pthreads/$(DEPDIR)/mutex.Po
+ -rm -f lib/isc/pthreads/$(DEPDIR)/thread.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/dir.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/errno2result.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/file.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/interfaceiter.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/net.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/stdio.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/stdtime.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/strerror.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/time.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1550,7 +1487,116 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/a_md5encrypt.Po
+ -rm -f ./$(DEPDIR)/adjtime.Po
+ -rm -f ./$(DEPDIR)/adjtimex.Po
+ -rm -f ./$(DEPDIR)/atoint.Po
+ -rm -f ./$(DEPDIR)/atolfp.Po
+ -rm -f ./$(DEPDIR)/atouint.Po
+ -rm -f ./$(DEPDIR)/audio.Po
+ -rm -f ./$(DEPDIR)/authkeys.Po
+ -rm -f ./$(DEPDIR)/authreadkeys.Po
+ -rm -f ./$(DEPDIR)/authusekey.Po
+ -rm -f ./$(DEPDIR)/bsd_strerror.Po
+ -rm -f ./$(DEPDIR)/buftvtots.Po
+ -rm -f ./$(DEPDIR)/caljulian.Po
+ -rm -f ./$(DEPDIR)/caltontp.Po
+ -rm -f ./$(DEPDIR)/calyearstart.Po
+ -rm -f ./$(DEPDIR)/clocktime.Po
+ -rm -f ./$(DEPDIR)/clocktypes.Po
+ -rm -f ./$(DEPDIR)/decodenetnum.Po
+ -rm -f ./$(DEPDIR)/dofptoa.Po
+ -rm -f ./$(DEPDIR)/dolfptoa.Po
+ -rm -f ./$(DEPDIR)/emalloc.Po
+ -rm -f ./$(DEPDIR)/findconfig.Po
+ -rm -f ./$(DEPDIR)/getopt.Po
+ -rm -f ./$(DEPDIR)/hextoint.Po
+ -rm -f ./$(DEPDIR)/hextolfp.Po
+ -rm -f ./$(DEPDIR)/humandate.Po
+ -rm -f ./$(DEPDIR)/icom.Po
+ -rm -f ./$(DEPDIR)/iosignal.Po
+ -rm -f ./$(DEPDIR)/is_ip_address.Po
+ -rm -f ./$(DEPDIR)/lib_strbuf.Po
+ -rm -f ./$(DEPDIR)/libssl_compat.Po
+ -rm -f ./$(DEPDIR)/machines.Po
+ -rm -f ./$(DEPDIR)/mktime.Po
+ -rm -f ./$(DEPDIR)/modetoa.Po
+ -rm -f ./$(DEPDIR)/mstolfp.Po
+ -rm -f ./$(DEPDIR)/msyslog.Po
+ -rm -f ./$(DEPDIR)/netof.Po
+ -rm -f ./$(DEPDIR)/ntp_calendar.Po
+ -rm -f ./$(DEPDIR)/ntp_calgps.Po
+ -rm -f ./$(DEPDIR)/ntp_crypto_rnd.Po
+ -rm -f ./$(DEPDIR)/ntp_intres.Po
+ -rm -f ./$(DEPDIR)/ntp_libopts.Po
+ -rm -f ./$(DEPDIR)/ntp_lineedit.Po
+ -rm -f ./$(DEPDIR)/ntp_random.Po
+ -rm -f ./$(DEPDIR)/ntp_realpath.Po
+ -rm -f ./$(DEPDIR)/ntp_rfc2553.Po
+ -rm -f ./$(DEPDIR)/ntp_worker.Po
+ -rm -f ./$(DEPDIR)/numtoa.Po
+ -rm -f ./$(DEPDIR)/numtohost.Po
+ -rm -f ./$(DEPDIR)/octtoint.Po
+ -rm -f ./$(DEPDIR)/prettydate.Po
+ -rm -f ./$(DEPDIR)/recvbuff.Po
+ -rm -f ./$(DEPDIR)/refidsmear.Po
+ -rm -f ./$(DEPDIR)/refnumtoa.Po
+ -rm -f ./$(DEPDIR)/snprintf.Po
+ -rm -f ./$(DEPDIR)/socket.Po
+ -rm -f ./$(DEPDIR)/socktoa.Po
+ -rm -f ./$(DEPDIR)/socktohost.Po
+ -rm -f ./$(DEPDIR)/ssl_init.Po
+ -rm -f ./$(DEPDIR)/statestr.Po
+ -rm -f ./$(DEPDIR)/strdup.Po
+ -rm -f ./$(DEPDIR)/strl_obsd.Po
+ -rm -f ./$(DEPDIR)/syssignal.Po
+ -rm -f ./$(DEPDIR)/systime.Po
+ -rm -f ./$(DEPDIR)/systime_s.Po
+ -rm -f ./$(DEPDIR)/timespecops.Po
+ -rm -f ./$(DEPDIR)/timetoa.Po
+ -rm -f ./$(DEPDIR)/timevalops.Po
+ -rm -f ./$(DEPDIR)/timexsup.Po
+ -rm -f ./$(DEPDIR)/uglydate.Po
+ -rm -f ./$(DEPDIR)/vint64ops.Po
+ -rm -f ./$(DEPDIR)/work_fork.Po
+ -rm -f ./$(DEPDIR)/work_thread.Po
+ -rm -f ./$(DEPDIR)/xsbprintf.Po
+ -rm -f ./$(DEPDIR)/ymd2yd.Po
+ -rm -f lib/isc/$(DEPDIR)/assertions.Po
+ -rm -f lib/isc/$(DEPDIR)/backtrace-emptytbl.Po
+ -rm -f lib/isc/$(DEPDIR)/backtrace.Po
+ -rm -f lib/isc/$(DEPDIR)/buffer.Po
+ -rm -f lib/isc/$(DEPDIR)/error.Po
+ -rm -f lib/isc/$(DEPDIR)/event.Po
+ -rm -f lib/isc/$(DEPDIR)/inet_ntop.Po
+ -rm -f lib/isc/$(DEPDIR)/inet_pton.Po
+ -rm -f lib/isc/$(DEPDIR)/lib.Po
+ -rm -f lib/isc/$(DEPDIR)/log.Po
+ -rm -f lib/isc/$(DEPDIR)/md5.Po
+ -rm -f lib/isc/$(DEPDIR)/netaddr.Po
+ -rm -f lib/isc/$(DEPDIR)/netscope.Po
+ -rm -f lib/isc/$(DEPDIR)/ondestroy.Po
+ -rm -f lib/isc/$(DEPDIR)/random.Po
+ -rm -f lib/isc/$(DEPDIR)/result.Po
+ -rm -f lib/isc/$(DEPDIR)/sha1.Po
+ -rm -f lib/isc/$(DEPDIR)/sockaddr.Po
+ -rm -f lib/isc/$(DEPDIR)/task.Po
+ -rm -f lib/isc/$(DEPDIR)/tsmemcmp.Po
+ -rm -f lib/isc/nls/$(DEPDIR)/msgcat.Po
+ -rm -f lib/isc/nothreads/$(DEPDIR)/condition.Po
+ -rm -f lib/isc/nothreads/$(DEPDIR)/thread.Po
+ -rm -f lib/isc/pthreads/$(DEPDIR)/condition.Po
+ -rm -f lib/isc/pthreads/$(DEPDIR)/mutex.Po
+ -rm -f lib/isc/pthreads/$(DEPDIR)/thread.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/dir.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/errno2result.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/file.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/interfaceiter.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/net.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/stdio.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/stdtime.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/strerror.Po
+ -rm -f lib/isc/unix/$(DEPDIR)/time.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1569,31 +1615,35 @@ ps-am:
uninstall-am:
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \
- ctags-am distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.MAKE: all check install install-am install-exec install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libtool clean-noinstLIBRARIES \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
+
+@BUILD_LIBEVENT_TRUE@libevent_first:
+@BUILD_LIBEVENT_TRUE@ cd $(top_builddir)/sntp/libevent && $(MAKE) $(AM_MAKEFLAGS)
+@BUILD_LIBEVENT_TRUE@ echo stamp > $@
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1611,7 +1661,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1641,7 +1691,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/libntp/a_md5encrypt.c b/contrib/ntp/libntp/a_md5encrypt.c
index 57100de3a86e..6011af52af6d 100644
--- a/contrib/ntp/libntp/a_md5encrypt.c
+++ b/contrib/ntp/libntp/a_md5encrypt.c
@@ -51,9 +51,9 @@ make_mac(
* was created.
*/
size_t retlen = 0;
-
+
#ifdef OPENSSL
-
+
INIT_SSL();
/* Check if CMAC key type specific code required */
@@ -70,7 +70,7 @@ make_mac(
(AES_128_KEY_SIZE - key->len));
keyptr = keybuf;
}
-
+
if (NULL == (ctx = CMAC_CTX_new())) {
msyslog(LOG_ERR, "MAC encrypt: CMAC %s CTX new failed.", CMAC);
goto cmac_fail;
@@ -100,13 +100,13 @@ make_mac(
{ /* generic MAC handling */
EVP_MD_CTX * ctx = EVP_MD_CTX_new();
u_int uilen = 0;
-
+
if ( ! ctx) {
msyslog(LOG_ERR, "MAC encrypt: MAC %s Digest CTX new failed.",
OBJ_nid2sn(ktype));
goto mac_fail;
}
-
+
#ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW
/* make sure MD5 is allowd */
EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
@@ -140,13 +140,13 @@ make_mac(
}
mac_fail:
retlen = (size_t)uilen;
-
+
if (ctx)
EVP_MD_CTX_free(ctx);
}
#else /* !OPENSSL follows */
-
+
if (ktype == NID_md5)
{
EVP_MD_CTX * ctx = EVP_MD_CTX_new();
@@ -158,8 +158,10 @@ make_mac(
else if ( ! ctx) {
msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 Digest CTX new failed.");
}
+ else if (!EVP_DigestInit(ctx, EVP_get_digestbynid(ktype))) {
+ msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 Digest INIT failed.");
+ }
else {
- EVP_DigestInit(ctx, EVP_get_digestbynid(ktype));
EVP_DigestUpdate(ctx, key->buf, key->len);
EVP_DigestUpdate(ctx, msg->buf, msg->len);
EVP_DigestFinal(ctx, digest->buf, &uilen);
@@ -172,7 +174,7 @@ make_mac(
{
msyslog(LOG_ERR, "MAC encrypt: invalid key type %d" , ktype);
}
-
+
#endif /* !OPENSSL */
return retlen;
@@ -196,7 +198,7 @@ MD5authencrypt(
u_char digest[EVP_MAX_MD_SIZE];
rwbuffT digb = { digest, sizeof(digest) };
robuffT keyb = { key, klen };
- robuffT msgb = { pkt, length };
+ robuffT msgb = { pkt, length };
size_t dlen = 0;
dlen = make_mac(&digb, type, &keyb, &msgb);
@@ -220,23 +222,25 @@ MD5authdecrypt(
size_t klen, /* key length */
u_int32 * pkt, /* packet pointer */
size_t length, /* packet length */
- size_t size /* MAC size */
+ size_t size, /* MAC size */
+ keyid_t keyno /* key id (for err log) */
)
{
u_char digest[EVP_MAX_MD_SIZE];
rwbuffT digb = { digest, sizeof(digest) };
robuffT keyb = { key, klen };
- robuffT msgb = { pkt, length };
+ robuffT msgb = { pkt, length };
size_t dlen = 0;
dlen = make_mac(&digb, type, &keyb, &msgb);
-
+
/* If the MAC is longer than the MAX then truncate it. */
if (dlen > MAX_MDG_LEN)
dlen = MAX_MDG_LEN;
if (size != (size_t)dlen + KEY_MAC_LEN) {
msyslog(LOG_ERR,
- "MAC decrypt: MAC length error");
+ "MAC decrypt: MAC length error: len=%zu key=%d",
+ size, keyno);
return (0);
}
return !isc_tsmemcmp(digest,
diff --git a/contrib/ntp/libntp/authkeys.c b/contrib/ntp/libntp/authkeys.c
index 7c1cbb0655ae..4448dadd2b6a 100644
--- a/contrib/ntp/libntp/authkeys.c
+++ b/contrib/ntp/libntp/authkeys.c
@@ -119,7 +119,7 @@ keyacc_new_push(
)
{
KeyAccT * node = emalloc(sizeof(KeyAccT));
-
+
memcpy(&node->addr, addr, sizeof(sockaddr_u));
node->subnetbits = subnetbits;
node->next = head;
@@ -219,7 +219,7 @@ keyacc_amatch(
* other checks if we find object identity. But that use case is
* too rare to care for it.
*/
-
+
/* 2nd check: Address families must be the same. */
if (AF(a1) != AF(a2))
return FALSE;
@@ -317,7 +317,7 @@ free_auth_mem(void)
cache_keyacclist = NULL;
for (alloc = authallocs; alloc != NULL; alloc = next_alloc) {
next_alloc = alloc->link;
- free(alloc->mem);
+ free(alloc->mem);
}
authfreekeys = NULL;
authnumfreekeys = 0;
@@ -525,7 +525,7 @@ freesymkey(
authcache_flush_id(sk->keyid);
keyacc_all_free(sk->keyacclist);
-
+
bucket = &key_hash[KEYHASH(sk->keyid)];
if (sk->secret != NULL) {
memset(sk->secret, '\0', sk->secretsize);
@@ -649,7 +649,7 @@ authtrust(
* There are two conditions remaining. Either it does not
* exist and is to be trusted or it does exist and is or is
* not to be trusted.
- */
+ */
if (sk != NULL) {
/*
* Key exists. If it is to be trusted, say so and update
@@ -727,9 +727,9 @@ authistrusted(
return (KEY_TRUSTED & sk->flags) &&
keyacc_contains(sk->keyacclist, sau, TRUE);
}
-
+
authkeynotfound++;
- return FALSE;
+ return FALSE;
}
/* Note: There are two locations below where 'strncpy()' is used. While
@@ -754,7 +754,7 @@ MD5auth_setkey(
{
symkey * sk;
u_char * secret;
-
+
DEBUG_ENSURE(keytype <= USHRT_MAX);
DEBUG_ENSURE(secretsize < 4 * 1024);
/*
@@ -809,7 +809,7 @@ MD5auth_setkey(
printf("%02x", secret[j]);
}
printf("\n");
- }
+ }
#endif
}
@@ -925,5 +925,97 @@ authdecrypt(
return MD5authdecrypt(cache_type,
cache_secret, cache_secretsize,
- pkt, length, size);
+ pkt, length, size, keyno);
+}
+
+/* password decoding helpers */
+static size_t
+pwdecode_plain(
+ u_char * dst,
+ size_t dstlen,
+ const char * src
+ )
+{
+ size_t srclen = strlen(src);
+ if (srclen > dstlen) {
+ errno = ENOMEM;
+ return (size_t)-1;
+ }
+ memcpy(dst, src, srclen);
+ return srclen;
+}
+
+static size_t
+pwdecode_hex(
+ u_char * dst,
+ size_t dstlen,
+ const char * src
+ )
+{
+ static const char hex[] = "00112233445566778899AaBbCcDdEeFf";
+
+ size_t srclen = strlen(src);
+ size_t reslen = (srclen >> 1) + (srclen & 1);
+ u_char tmp;
+ char *ptr;
+ size_t j;
+
+ if (reslen > dstlen) {
+ errno = ENOMEM;
+ reslen = (size_t)-1;
+ } else {
+ for (j = 0; j < srclen; ++j) {
+ tmp = *(const unsigned char*)(src + j);
+ ptr = strchr(hex, tmp);
+ if (ptr == NULL) {
+ errno = EINVAL;
+ reslen = (size_t)-1;
+ break;
+ }
+ tmp = (u_char)((ptr - hex) > 1);
+ if (j & 1)
+ dst[j >> 1] |= tmp;
+ else
+ dst[j >> 1] = tmp << 4;
+ }
+ }
+ return reslen;
+}
+/*
+ * authdecodepw - decode plaintext or hex-encoded password to binary
+ * secret. Returns size of secret in bytes or -1 on error.
+ */
+size_t
+authdecodepw(
+ u_char * dst,
+ size_t dstlen,
+ const char * src,
+ enum AuthPwdEnc enc
+ )
+{
+ size_t reslen;
+
+ if ( !(dst && dstlen && src)) {
+ errno = EINVAL;
+ reslen = (size_t)-1;
+ } else {
+ switch (enc) {
+ case AUTHPWD_UNSPEC:
+ if (strlen(src) <= 20)
+ reslen = pwdecode_plain(dst, dstlen, src);
+ else
+ reslen = pwdecode_hex(dst, dstlen, src);
+ break;
+ case AUTHPWD_PLAIN:
+ reslen = pwdecode_plain(dst, dstlen, src);
+ break;
+ case AUTHPWD_HEX:
+ reslen = pwdecode_hex(dst, dstlen, src);
+ break;
+ default:
+ errno = EINVAL;
+ reslen = (size_t)-1;
+ }
+ }
+ return reslen;
}
diff --git a/contrib/ntp/libntp/authreadkeys.c b/contrib/ntp/libntp/authreadkeys.c
index 48c5c4d5ec6e..da91bd0d3443 100644
--- a/contrib/ntp/libntp/authreadkeys.c
+++ b/contrib/ntp/libntp/authreadkeys.c
@@ -38,7 +38,7 @@ nexttok(
*/
while (*cp == ' ' || *cp == '\t')
cp++;
-
+
/*
* Save this and space to end of token
*/
@@ -46,19 +46,19 @@ nexttok(
while (*cp != '\0' && *cp != '\n' && *cp != ' '
&& *cp != '\t' && *cp != '#')
cp++;
-
+
/*
* If token length is zero return an error, else set end of
* token to zero and return start.
*/
if (starttok == cp)
return NULL;
-
+
if (*cp == ' ' || *cp == '\t')
*cp++ = '\0';
else
*cp = '\0';
-
+
*str = cp;
return starttok;
}
@@ -114,7 +114,7 @@ free_keydata(
)
{
KeyAccT *kap;
-
+
if (node) {
while (node->keyacclist) {
kap = node->keyacclist;
@@ -142,9 +142,8 @@ authreadkeys(
keyid_t keyno;
int keytype;
char buf[512]; /* lots of room for line */
- u_char keystr[32]; /* Bug 2537 */
+ u_char keystr[AUTHPWD_MAXSECLEN];
size_t len;
- size_t j;
u_int nerr;
KeyDataT *list = NULL;
KeyDataT *next = NULL;
@@ -172,7 +171,7 @@ authreadkeys(
token = nexttok(&line);
if (token == NULL)
continue;
-
+
/*
* First is key number. See if it is okay.
*/
@@ -208,10 +207,10 @@ authreadkeys(
* have to process the line completely and have to
* finally throw away the result... This is a bit more
* work, but it also results in better error detection.
- */
+ */
#ifdef OPENSSL
/*
- * The key type is the NID used by the message digest
+ * The key type is the NID used by the message digest
* algorithm. There are a number of inconsistencies in
* the OpenSSL database. We attempt to discover them
* here and prevent use of inconsistent data later.
@@ -258,45 +257,33 @@ authreadkeys(
continue;
}
next = NULL;
- len = strlen(token);
- if (len <= 20) { /* Bug 2537 */
- next = emalloc(sizeof(KeyDataT) + len);
- next->keyacclist = NULL;
- next->keyid = keyno;
- next->keytype = keytype;
- next->seclen = len;
- memcpy(next->secbuf, token, len);
- } else {
- static const char hex[] = "0123456789abcdef";
- u_char temp;
- char *ptr;
- size_t jlim;
-
- jlim = min(len, 2 * sizeof(keystr));
- for (j = 0; j < jlim; j++) {
- ptr = strchr(hex, tolower((unsigned char)token[j]));
- if (ptr == NULL)
- break; /* abort decoding */
- temp = (u_char)(ptr - hex);
- if (j & 1)
- keystr[j / 2] |= temp;
- else
- keystr[j / 2] = temp << 4;
- }
- if (j < jlim) {
+ len = authdecodepw(keystr, sizeof(keystr), token, AUTHPWD_UNSPEC);
+ if (len > sizeof(keystr)) {
+ switch (errno) {
+ case ENOMEM:
+ log_maybe(&nerr,
+ "authreadkeys: passwd too long for key %d",
+ keyno);
+ break;
+ case EINVAL:
log_maybe(&nerr,
- "authreadkeys: invalid hex digit for key %d",
+ "authreadkeys: passwd has bad char for key %d",
keyno);
- continue;
+ break;
+ default:
+ log_maybe(&nerr,
+ "authreadkeys: unknown errno %d for key %d",
+ errno, keyno);
+ break;
}
- len = jlim/2; /* hmmmm.... what about odd length?!? */
- next = emalloc(sizeof(KeyDataT) + len);
- next->keyacclist = NULL;
- next->keyid = keyno;
- next->keytype = keytype;
- next->seclen = len;
- memcpy(next->secbuf, keystr, len);
+ continue;
}
+ next = emalloc(sizeof(KeyDataT) + len);
+ next->keyacclist = NULL;
+ next->keyid = keyno;
+ next->keytype = keytype;
+ next->seclen = len;
+ memcpy(next->secbuf, keystr, len);
token = nexttok(&line);
if (token != NULL) { /* A comma-separated IP access list */
@@ -369,7 +356,7 @@ authreadkeys(
next = NULL;
continue;
}
-
+
INSIST(NULL != next);
next->next = list;
list = next;
diff --git a/contrib/ntp/libntp/authusekey.c b/contrib/ntp/libntp/authusekey.c
index ff449d3df6fc..3c8da1d3c7c7 100644
--- a/contrib/ntp/libntp/authusekey.c
+++ b/contrib/ntp/libntp/authusekey.c
@@ -10,11 +10,8 @@
#include "ntp_stdlib.h"
/*
- * Types of ascii representations for keys. "Standard" means a 64 bit
- * hex number in NBS format, i.e. with the low order bit of each byte
- * a parity bit. "NTP" means a 64 bit key in NTP format, with the
- * high order bit of each byte a parity bit. "Ascii" means a 1-to-8
- * character string whose ascii representation is used as the key.
+ * Only used by ntp{q,dc} to set the key/algo/secret triple to use.
+ * Uses the same decoding scheme ntpd uses for keys in the key file.
*/
int
authusekey(
@@ -24,11 +21,14 @@ authusekey(
)
{
size_t len;
+ u_char buf[AUTHPWD_MAXSECLEN];
- len = strlen((const char *)str);
- if (0 == len)
+ len = authdecodepw(buf, sizeof(buf), (const char*)str,
+ AUTHPWD_UNSPEC);
+ if (len < 1 || len > sizeof(buf))
return 0;
- MD5auth_setkey(keyno, keytype, str, len, NULL);
+ MD5auth_setkey(keyno, keytype, buf, len, NULL);
+ memset(buf, 0, sizeof(buf));
return 1;
}
diff --git a/contrib/ntp/libntp/caltontp.c b/contrib/ntp/libntp/caltontp.c
index 808c94c64afd..b0de04b180f4 100644
--- a/contrib/ntp/libntp/caltontp.c
+++ b/contrib/ntp/libntp/caltontp.c
@@ -12,18 +12,18 @@
/*
* Juergen Perlinger, 2008-11-12
- * Add support for full calendar calculatios. If the day-of-year is provided
+ * Add support for full calendar calculations. If the day-of-year is provided
* (that is, not zero) it will be used instead of month and day-of-month;
* otherwise a full turn through the calendar calculations will be taken.
*
* I know that Harlan Stenn likes to see assertions in production code, and I
- * agree there, but it would be a tricky thing here. The algorithm is quite
- * capable of producing sensible answers even to seemingly weird inputs: the
- * date <any year here>-03-00, the 0.th March of the year, will be automtically
- * treated as the last day of February, no matter whether the year is a leap
- * year or not. So adding constraints is merely for the benefit of the callers,
- * because the only thing we can check for consistency is our input, produced
- * by somebody else.
+ * agree in general. But here we set 'errno' and try to do our best instead.
+ * Also note that the bounds check is a bit sloppy: It permits off-by-one
+ * on the input quantities. That permits some simple/naive adjustments to
+ * be made before calling this function.
+ *
+ * Apart from that the calendar is perfectly capable of dealing with
+ * off-scale input values!
*
* BTW: A total roundtrip using 'caljulian' would be a quite shaky thing:
* Because of the truncation of the NTP time stamp to 32 bits and the epoch
@@ -40,14 +40,18 @@ caltontp(
int32_t eraday; /* CE Rata Die number */
vint64 ntptime;/* resulting NTP time */
- REQUIRE(jt != NULL);
+ if (NULL == jt) {
+ errno = EINVAL;
+ return 0;
+ }
- REQUIRE(jt->month <= 13); /* permit month 0..13! */
- REQUIRE(jt->monthday <= 32);
- REQUIRE(jt->yearday <= 366);
- REQUIRE(jt->hour <= 24);
- REQUIRE(jt->minute <= MINSPERHR);
- REQUIRE(jt->second <= SECSPERMIN);
+ if ( (jt->month > 13) /* permit month 0..13! */
+ || (jt->monthday > 32)
+ || (jt->yearday > 366)
+ || (jt->hour > 24)
+ || (jt->minute > MINSPERHR)
+ || (jt->second > SECSPERMIN))
+ errno = ERANGE;
/*
* First convert the date to he corresponding RataDie
diff --git a/contrib/ntp/lib/isc/assertions.c b/contrib/ntp/libntp/lib/isc/assertions.c
index 31c4fe7c9f27..31c4fe7c9f27 100644
--- a/contrib/ntp/lib/isc/assertions.c
+++ b/contrib/ntp/libntp/lib/isc/assertions.c
diff --git a/contrib/ntp/lib/isc/backtrace-emptytbl.c b/contrib/ntp/libntp/lib/isc/backtrace-emptytbl.c
index bd534d60c8e2..bd534d60c8e2 100644
--- a/contrib/ntp/lib/isc/backtrace-emptytbl.c
+++ b/contrib/ntp/libntp/lib/isc/backtrace-emptytbl.c
diff --git a/contrib/ntp/lib/isc/backtrace.c b/contrib/ntp/libntp/lib/isc/backtrace.c
index e0425e14f41c..e0425e14f41c 100644
--- a/contrib/ntp/lib/isc/backtrace.c
+++ b/contrib/ntp/libntp/lib/isc/backtrace.c
diff --git a/contrib/ntp/lib/isc/buffer.c b/contrib/ntp/libntp/lib/isc/buffer.c
index 6a50985c74ab..6a50985c74ab 100644
--- a/contrib/ntp/lib/isc/buffer.c
+++ b/contrib/ntp/libntp/lib/isc/buffer.c
diff --git a/contrib/ntp/lib/isc/error.c b/contrib/ntp/libntp/lib/isc/error.c
index 095100a7c943..095100a7c943 100644
--- a/contrib/ntp/lib/isc/error.c
+++ b/contrib/ntp/libntp/lib/isc/error.c
diff --git a/contrib/ntp/lib/isc/event.c b/contrib/ntp/libntp/lib/isc/event.c
index e97961682656..e97961682656 100644
--- a/contrib/ntp/lib/isc/event.c
+++ b/contrib/ntp/libntp/lib/isc/event.c
diff --git a/contrib/ntp/lib/isc/include/isc/app.h b/contrib/ntp/libntp/lib/isc/include/isc/app.h
index e0be79063709..e0be79063709 100644
--- a/contrib/ntp/lib/isc/include/isc/app.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/app.h
diff --git a/contrib/ntp/lib/isc/include/isc/assertions.h b/contrib/ntp/libntp/lib/isc/include/isc/assertions.h
index 2c81b1ae9880..2c81b1ae9880 100644
--- a/contrib/ntp/lib/isc/include/isc/assertions.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/assertions.h
diff --git a/contrib/ntp/lib/isc/include/isc/backtrace.h b/contrib/ntp/libntp/lib/isc/include/isc/backtrace.h
index 7d7fc3217212..7d7fc3217212 100644
--- a/contrib/ntp/lib/isc/include/isc/backtrace.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/backtrace.h
diff --git a/contrib/ntp/lib/isc/include/isc/bind9.h b/contrib/ntp/libntp/lib/isc/include/isc/bind9.h
index 00bcb24c4a9b..00bcb24c4a9b 100644
--- a/contrib/ntp/lib/isc/include/isc/bind9.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/bind9.h
diff --git a/contrib/ntp/lib/isc/include/isc/boolean.h b/contrib/ntp/libntp/lib/isc/include/isc/boolean.h
index 348b096912aa..348b096912aa 100644
--- a/contrib/ntp/lib/isc/include/isc/boolean.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/boolean.h
diff --git a/contrib/ntp/lib/isc/include/isc/buffer.h b/contrib/ntp/libntp/lib/isc/include/isc/buffer.h
index ae7e4c3dfc34..ae7e4c3dfc34 100644
--- a/contrib/ntp/lib/isc/include/isc/buffer.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/buffer.h
diff --git a/contrib/ntp/lib/isc/include/isc/error.h b/contrib/ntp/libntp/lib/isc/include/isc/error.h
index e0cdfa83e7cb..e0cdfa83e7cb 100644
--- a/contrib/ntp/lib/isc/include/isc/error.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/error.h
diff --git a/contrib/ntp/lib/isc/include/isc/event.h b/contrib/ntp/libntp/lib/isc/include/isc/event.h
index 68fabb2fcc3c..68fabb2fcc3c 100644
--- a/contrib/ntp/lib/isc/include/isc/event.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/event.h
diff --git a/contrib/ntp/lib/isc/include/isc/eventclass.h b/contrib/ntp/libntp/lib/isc/include/isc/eventclass.h
index 9e6c145ac732..9e6c145ac732 100644
--- a/contrib/ntp/lib/isc/include/isc/eventclass.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/eventclass.h
diff --git a/contrib/ntp/lib/isc/include/isc/file.h b/contrib/ntp/libntp/lib/isc/include/isc/file.h
index 5db506a389a4..5db506a389a4 100644
--- a/contrib/ntp/lib/isc/include/isc/file.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/file.h
diff --git a/contrib/ntp/lib/isc/include/isc/formatcheck.h b/contrib/ntp/libntp/lib/isc/include/isc/formatcheck.h
index 51ce3cac25df..51ce3cac25df 100644
--- a/contrib/ntp/lib/isc/include/isc/formatcheck.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/formatcheck.h
diff --git a/contrib/ntp/lib/isc/include/isc/hash.h b/contrib/ntp/libntp/lib/isc/include/isc/hash.h
index ca04b4e43c75..ca04b4e43c75 100644
--- a/contrib/ntp/lib/isc/include/isc/hash.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/hash.h
diff --git a/contrib/ntp/lib/isc/include/isc/interfaceiter.h b/contrib/ntp/libntp/lib/isc/include/isc/interfaceiter.h
index 544f54b12ad4..544f54b12ad4 100644
--- a/contrib/ntp/lib/isc/include/isc/interfaceiter.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/interfaceiter.h
diff --git a/contrib/ntp/lib/isc/include/isc/lang.h b/contrib/ntp/libntp/lib/isc/include/isc/lang.h
index 8c608669b224..8c608669b224 100644
--- a/contrib/ntp/lib/isc/include/isc/lang.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/lang.h
diff --git a/contrib/ntp/lib/isc/include/isc/lib.h b/contrib/ntp/libntp/lib/isc/include/isc/lib.h
index f24fef850169..f24fef850169 100644
--- a/contrib/ntp/lib/isc/include/isc/lib.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/lib.h
diff --git a/contrib/ntp/lib/isc/include/isc/list.h b/contrib/ntp/libntp/lib/isc/include/isc/list.h
index c9bdfc7ad6bc..c9bdfc7ad6bc 100644
--- a/contrib/ntp/lib/isc/include/isc/list.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/list.h
diff --git a/contrib/ntp/lib/isc/include/isc/log.h b/contrib/ntp/libntp/lib/isc/include/isc/log.h
index 741c5324290c..741c5324290c 100644
--- a/contrib/ntp/lib/isc/include/isc/log.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/log.h
diff --git a/contrib/ntp/lib/isc/include/isc/magic.h b/contrib/ntp/libntp/lib/isc/include/isc/magic.h
index 073de90dcc92..073de90dcc92 100644
--- a/contrib/ntp/lib/isc/include/isc/magic.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/magic.h
diff --git a/contrib/ntp/lib/isc/include/isc/md5.h b/contrib/ntp/libntp/lib/isc/include/isc/md5.h
index dfa586d0a3b0..dfa586d0a3b0 100644
--- a/contrib/ntp/lib/isc/include/isc/md5.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/md5.h
diff --git a/contrib/ntp/lib/isc/include/isc/msgcat.h b/contrib/ntp/libntp/lib/isc/include/isc/msgcat.h
index fe3d336825f0..fe3d336825f0 100644
--- a/contrib/ntp/lib/isc/include/isc/msgcat.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/msgcat.h
diff --git a/contrib/ntp/lib/isc/include/isc/msgs.h b/contrib/ntp/libntp/lib/isc/include/isc/msgs.h
index 60c5c7caf882..60c5c7caf882 100644
--- a/contrib/ntp/lib/isc/include/isc/msgs.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/msgs.h
diff --git a/contrib/ntp/lib/isc/include/isc/namespace.h b/contrib/ntp/libntp/lib/isc/include/isc/namespace.h
index cd4ec9ad1689..cd4ec9ad1689 100644
--- a/contrib/ntp/lib/isc/include/isc/namespace.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/namespace.h
diff --git a/contrib/ntp/lib/isc/include/isc/netaddr.h b/contrib/ntp/libntp/lib/isc/include/isc/netaddr.h
index 954d77019b69..954d77019b69 100644
--- a/contrib/ntp/lib/isc/include/isc/netaddr.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/netaddr.h
diff --git a/contrib/ntp/lib/isc/include/isc/netscope.h b/contrib/ntp/libntp/lib/isc/include/isc/netscope.h
index 163a08ca2ea7..163a08ca2ea7 100644
--- a/contrib/ntp/lib/isc/include/isc/netscope.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/netscope.h
diff --git a/contrib/ntp/lib/isc/include/isc/ondestroy.h b/contrib/ntp/libntp/lib/isc/include/isc/ondestroy.h
index 64bd64333707..64bd64333707 100644
--- a/contrib/ntp/lib/isc/include/isc/ondestroy.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/ondestroy.h
diff --git a/contrib/ntp/lib/isc/include/isc/platform.h b/contrib/ntp/libntp/lib/isc/include/isc/platform.h
index bd11a25503a5..bd11a25503a5 100644
--- a/contrib/ntp/lib/isc/include/isc/platform.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/platform.h
diff --git a/contrib/ntp/lib/isc/include/isc/print.h b/contrib/ntp/libntp/lib/isc/include/isc/print.h
index cd1e38eaf6fb..cd1e38eaf6fb 100644
--- a/contrib/ntp/lib/isc/include/isc/print.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/print.h
diff --git a/contrib/ntp/lib/isc/include/isc/random.h b/contrib/ntp/libntp/lib/isc/include/isc/random.h
index 1f9572d30ebf..1f9572d30ebf 100644
--- a/contrib/ntp/lib/isc/include/isc/random.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/random.h
diff --git a/contrib/ntp/lib/isc/include/isc/region.h b/contrib/ntp/libntp/lib/isc/include/isc/region.h
index 43d8f8f2d3e9..43d8f8f2d3e9 100644
--- a/contrib/ntp/lib/isc/include/isc/region.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/region.h
diff --git a/contrib/ntp/lib/isc/include/isc/result.h b/contrib/ntp/libntp/lib/isc/include/isc/result.h
index dcd457b3d1b0..dcd457b3d1b0 100644
--- a/contrib/ntp/lib/isc/include/isc/result.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/result.h
diff --git a/contrib/ntp/lib/isc/include/isc/resultclass.h b/contrib/ntp/libntp/lib/isc/include/isc/resultclass.h
index d91e800e063c..d91e800e063c 100644
--- a/contrib/ntp/lib/isc/include/isc/resultclass.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/resultclass.h
diff --git a/contrib/ntp/lib/isc/include/isc/sha1.h b/contrib/ntp/libntp/lib/isc/include/isc/sha1.h
index 313ff96391b2..313ff96391b2 100644
--- a/contrib/ntp/lib/isc/include/isc/sha1.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/sha1.h
diff --git a/contrib/ntp/lib/isc/include/isc/sockaddr.h b/contrib/ntp/libntp/lib/isc/include/isc/sockaddr.h
index 1e6914222c1b..1e6914222c1b 100644
--- a/contrib/ntp/lib/isc/include/isc/sockaddr.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/sockaddr.h
diff --git a/contrib/ntp/lib/isc/include/isc/socket.h b/contrib/ntp/libntp/lib/isc/include/isc/socket.h
index 46e05a077492..46e05a077492 100644
--- a/contrib/ntp/lib/isc/include/isc/socket.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/socket.h
diff --git a/contrib/ntp/lib/isc/include/isc/stdio.h b/contrib/ntp/libntp/lib/isc/include/isc/stdio.h
index 1a7ae642d5eb..1a7ae642d5eb 100644
--- a/contrib/ntp/lib/isc/include/isc/stdio.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/stdio.h
diff --git a/contrib/ntp/lib/isc/include/isc/string.h b/contrib/ntp/libntp/lib/isc/include/isc/string.h
index 395b550218fc..395b550218fc 100644
--- a/contrib/ntp/lib/isc/include/isc/string.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/string.h
diff --git a/contrib/ntp/lib/isc/include/isc/task.h b/contrib/ntp/libntp/lib/isc/include/isc/task.h
index 594d80f34510..594d80f34510 100644
--- a/contrib/ntp/lib/isc/include/isc/task.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/task.h
diff --git a/contrib/ntp/lib/isc/include/isc/timer.h b/contrib/ntp/libntp/lib/isc/include/isc/timer.h
index fa9abb16aa9d..fa9abb16aa9d 100644
--- a/contrib/ntp/lib/isc/include/isc/timer.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/timer.h
diff --git a/contrib/ntp/lib/isc/include/isc/types.h b/contrib/ntp/libntp/lib/isc/include/isc/types.h
index 8dbf67ed109e..8dbf67ed109e 100644
--- a/contrib/ntp/lib/isc/include/isc/types.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/types.h
diff --git a/contrib/ntp/lib/isc/include/isc/util.h b/contrib/ntp/libntp/lib/isc/include/isc/util.h
index 670b28bc4c01..670b28bc4c01 100644
--- a/contrib/ntp/lib/isc/include/isc/util.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/util.h
diff --git a/contrib/ntp/lib/isc/include/isc/xml.h b/contrib/ntp/libntp/lib/isc/include/isc/xml.h
index d31a31a7f0d5..d31a31a7f0d5 100644
--- a/contrib/ntp/lib/isc/include/isc/xml.h
+++ b/contrib/ntp/libntp/lib/isc/include/isc/xml.h
diff --git a/contrib/ntp/lib/isc/inet_ntop.c b/contrib/ntp/libntp/lib/isc/inet_ntop.c
index 773018031b9d..773018031b9d 100644
--- a/contrib/ntp/lib/isc/inet_ntop.c
+++ b/contrib/ntp/libntp/lib/isc/inet_ntop.c
diff --git a/contrib/ntp/lib/isc/inet_pton.c b/contrib/ntp/libntp/lib/isc/inet_pton.c
index 7e0766726664..7e0766726664 100644
--- a/contrib/ntp/lib/isc/inet_pton.c
+++ b/contrib/ntp/libntp/lib/isc/inet_pton.c
diff --git a/contrib/ntp/lib/isc/lib.c b/contrib/ntp/libntp/lib/isc/lib.c
index a50542551df3..a50542551df3 100644
--- a/contrib/ntp/lib/isc/lib.c
+++ b/contrib/ntp/libntp/lib/isc/lib.c
diff --git a/contrib/ntp/lib/isc/log.c b/contrib/ntp/libntp/lib/isc/log.c
index dfe4fdfd497a..dfe4fdfd497a 100644
--- a/contrib/ntp/lib/isc/log.c
+++ b/contrib/ntp/libntp/lib/isc/log.c
diff --git a/contrib/ntp/lib/isc/md5.c b/contrib/ntp/libntp/lib/isc/md5.c
index 7c6419b2a9c7..7c6419b2a9c7 100644
--- a/contrib/ntp/lib/isc/md5.c
+++ b/contrib/ntp/libntp/lib/isc/md5.c
diff --git a/contrib/ntp/lib/isc/netaddr.c b/contrib/ntp/libntp/lib/isc/netaddr.c
index 01f908043495..01f908043495 100644
--- a/contrib/ntp/lib/isc/netaddr.c
+++ b/contrib/ntp/libntp/lib/isc/netaddr.c
diff --git a/contrib/ntp/lib/isc/netscope.c b/contrib/ntp/libntp/lib/isc/netscope.c
index 9aa11db9a8ce..9aa11db9a8ce 100644
--- a/contrib/ntp/lib/isc/netscope.c
+++ b/contrib/ntp/libntp/lib/isc/netscope.c
diff --git a/contrib/ntp/lib/isc/nls/msgcat.c b/contrib/ntp/libntp/lib/isc/nls/msgcat.c
index 3d6b6764d582..3d6b6764d582 100644
--- a/contrib/ntp/lib/isc/nls/msgcat.c
+++ b/contrib/ntp/libntp/lib/isc/nls/msgcat.c
diff --git a/contrib/ntp/lib/isc/nothreads/condition.c b/contrib/ntp/libntp/lib/isc/nothreads/condition.c
index 9be8f835f46f..9be8f835f46f 100644
--- a/contrib/ntp/lib/isc/nothreads/condition.c
+++ b/contrib/ntp/libntp/lib/isc/nothreads/condition.c
diff --git a/contrib/ntp/lib/isc/nothreads/include/isc/condition.h b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/condition.h
index b269f82fc0ba..b269f82fc0ba 100644
--- a/contrib/ntp/lib/isc/nothreads/include/isc/condition.h
+++ b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/condition.h
diff --git a/contrib/ntp/lib/isc/nothreads/include/isc/mutex.h b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/mutex.h
index 1f2187b8b53f..1f2187b8b53f 100644
--- a/contrib/ntp/lib/isc/nothreads/include/isc/mutex.h
+++ b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/mutex.h
diff --git a/contrib/ntp/lib/isc/nothreads/include/isc/once.h b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/once.h
index ab705a4a4792..ab705a4a4792 100644
--- a/contrib/ntp/lib/isc/nothreads/include/isc/once.h
+++ b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/once.h
diff --git a/contrib/ntp/lib/isc/nothreads/include/isc/thread.h b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/thread.h
index 313bc5f9590a..313bc5f9590a 100644
--- a/contrib/ntp/lib/isc/nothreads/include/isc/thread.h
+++ b/contrib/ntp/libntp/lib/isc/nothreads/include/isc/thread.h
diff --git a/contrib/ntp/lib/isc/nothreads/thread.c b/contrib/ntp/libntp/lib/isc/nothreads/thread.c
index 9075e25513df..9075e25513df 100644
--- a/contrib/ntp/lib/isc/nothreads/thread.c
+++ b/contrib/ntp/libntp/lib/isc/nothreads/thread.c
diff --git a/contrib/ntp/lib/isc/ondestroy.c b/contrib/ntp/libntp/lib/isc/ondestroy.c
index 32a75e1f9488..32a75e1f9488 100644
--- a/contrib/ntp/lib/isc/ondestroy.c
+++ b/contrib/ntp/libntp/lib/isc/ondestroy.c
diff --git a/contrib/ntp/lib/isc/pthreads/condition.c b/contrib/ntp/libntp/lib/isc/pthreads/condition.c
index 50281a2b87cb..50281a2b87cb 100644
--- a/contrib/ntp/lib/isc/pthreads/condition.c
+++ b/contrib/ntp/libntp/lib/isc/pthreads/condition.c
diff --git a/contrib/ntp/lib/isc/pthreads/include/isc/condition.h b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/condition.h
index 04a61185d17e..04a61185d17e 100644
--- a/contrib/ntp/lib/isc/pthreads/include/isc/condition.h
+++ b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/condition.h
diff --git a/contrib/ntp/lib/isc/pthreads/include/isc/mutex.h b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/mutex.h
index dd7d32687229..dd7d32687229 100644
--- a/contrib/ntp/lib/isc/pthreads/include/isc/mutex.h
+++ b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/mutex.h
diff --git a/contrib/ntp/lib/isc/pthreads/include/isc/once.h b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/once.h
index 31d76fb6f2b7..31d76fb6f2b7 100644
--- a/contrib/ntp/lib/isc/pthreads/include/isc/once.h
+++ b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/once.h
diff --git a/contrib/ntp/lib/isc/pthreads/include/isc/thread.h b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/thread.h
index 7dcc9527cf7b..7dcc9527cf7b 100644
--- a/contrib/ntp/lib/isc/pthreads/include/isc/thread.h
+++ b/contrib/ntp/libntp/lib/isc/pthreads/include/isc/thread.h
diff --git a/contrib/ntp/lib/isc/pthreads/mutex.c b/contrib/ntp/libntp/lib/isc/pthreads/mutex.c
index 62ad540a7e17..62ad540a7e17 100644
--- a/contrib/ntp/lib/isc/pthreads/mutex.c
+++ b/contrib/ntp/libntp/lib/isc/pthreads/mutex.c
diff --git a/contrib/ntp/lib/isc/pthreads/thread.c b/contrib/ntp/libntp/lib/isc/pthreads/thread.c
index 4b5b4919b2b0..4b5b4919b2b0 100644
--- a/contrib/ntp/lib/isc/pthreads/thread.c
+++ b/contrib/ntp/libntp/lib/isc/pthreads/thread.c
diff --git a/contrib/ntp/lib/isc/random.c b/contrib/ntp/libntp/lib/isc/random.c
index c433f478a837..c433f478a837 100644
--- a/contrib/ntp/lib/isc/random.c
+++ b/contrib/ntp/libntp/lib/isc/random.c
diff --git a/contrib/ntp/lib/isc/result.c b/contrib/ntp/libntp/lib/isc/result.c
index da57272dfc27..da57272dfc27 100644
--- a/contrib/ntp/lib/isc/result.c
+++ b/contrib/ntp/libntp/lib/isc/result.c
diff --git a/contrib/ntp/lib/isc/sha1.c b/contrib/ntp/libntp/lib/isc/sha1.c
index cce96036045f..cce96036045f 100644
--- a/contrib/ntp/lib/isc/sha1.c
+++ b/contrib/ntp/libntp/lib/isc/sha1.c
diff --git a/contrib/ntp/lib/isc/sockaddr.c b/contrib/ntp/libntp/lib/isc/sockaddr.c
index c6932d48f2bb..c6932d48f2bb 100644
--- a/contrib/ntp/lib/isc/sockaddr.c
+++ b/contrib/ntp/libntp/lib/isc/sockaddr.c
diff --git a/contrib/ntp/lib/isc/task.c b/contrib/ntp/libntp/lib/isc/task.c
index 5b899b350423..5b899b350423 100644
--- a/contrib/ntp/lib/isc/task.c
+++ b/contrib/ntp/libntp/lib/isc/task.c
diff --git a/contrib/ntp/lib/isc/task_p.h b/contrib/ntp/libntp/lib/isc/task_p.h
index 8c1e4c52fa4c..8c1e4c52fa4c 100644
--- a/contrib/ntp/lib/isc/task_p.h
+++ b/contrib/ntp/libntp/lib/isc/task_p.h
diff --git a/contrib/ntp/lib/isc/tsmemcmp.c b/contrib/ntp/libntp/lib/isc/tsmemcmp.c
index e6af42eafc0f..e6af42eafc0f 100644
--- a/contrib/ntp/lib/isc/tsmemcmp.c
+++ b/contrib/ntp/libntp/lib/isc/tsmemcmp.c
diff --git a/contrib/ntp/lib/isc/unix/dir.c b/contrib/ntp/libntp/lib/isc/unix/dir.c
index 613ee5630d65..613ee5630d65 100644
--- a/contrib/ntp/lib/isc/unix/dir.c
+++ b/contrib/ntp/libntp/lib/isc/unix/dir.c
diff --git a/contrib/ntp/lib/isc/unix/errno2result.c b/contrib/ntp/libntp/lib/isc/unix/errno2result.c
index f20aa295ca9c..f20aa295ca9c 100644
--- a/contrib/ntp/lib/isc/unix/errno2result.c
+++ b/contrib/ntp/libntp/lib/isc/unix/errno2result.c
diff --git a/contrib/ntp/lib/isc/unix/errno2result.h b/contrib/ntp/libntp/lib/isc/unix/errno2result.h
index 1e49ed1d6c89..1e49ed1d6c89 100644
--- a/contrib/ntp/lib/isc/unix/errno2result.h
+++ b/contrib/ntp/libntp/lib/isc/unix/errno2result.h
diff --git a/contrib/ntp/lib/isc/unix/file.c b/contrib/ntp/libntp/lib/isc/unix/file.c
index 9eda4a33bc80..9eda4a33bc80 100644
--- a/contrib/ntp/lib/isc/unix/file.c
+++ b/contrib/ntp/libntp/lib/isc/unix/file.c
diff --git a/contrib/ntp/lib/isc/unix/ifiter_getifaddrs.c b/contrib/ntp/libntp/lib/isc/unix/ifiter_getifaddrs.c
index ad7c5f85c8ec..ad7c5f85c8ec 100644
--- a/contrib/ntp/lib/isc/unix/ifiter_getifaddrs.c
+++ b/contrib/ntp/libntp/lib/isc/unix/ifiter_getifaddrs.c
diff --git a/contrib/ntp/lib/isc/unix/ifiter_ioctl.c b/contrib/ntp/libntp/lib/isc/unix/ifiter_ioctl.c
index c8e4970e6b33..c8e4970e6b33 100644
--- a/contrib/ntp/lib/isc/unix/ifiter_ioctl.c
+++ b/contrib/ntp/libntp/lib/isc/unix/ifiter_ioctl.c
diff --git a/contrib/ntp/lib/isc/unix/ifiter_sysctl.c b/contrib/ntp/libntp/lib/isc/unix/ifiter_sysctl.c
index 0fbb3778e73a..0fbb3778e73a 100644
--- a/contrib/ntp/lib/isc/unix/ifiter_sysctl.c
+++ b/contrib/ntp/libntp/lib/isc/unix/ifiter_sysctl.c
diff --git a/contrib/ntp/lib/isc/unix/include/isc/dir.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/dir.h
index e4a2ad0fb70d..e4a2ad0fb70d 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/dir.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/dir.h
diff --git a/contrib/ntp/lib/isc/unix/include/isc/int.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/int.h
index 73feb3b65b3a..73feb3b65b3a 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/int.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/int.h
diff --git a/contrib/ntp/lib/isc/unix/include/isc/net.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/net.h
index 37a0f3b81fe8..37a0f3b81fe8 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/net.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/net.h
diff --git a/contrib/ntp/lib/isc/unix/include/isc/offset.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/offset.h
index 8bf3779997cd..8bf3779997cd 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/offset.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/offset.h
diff --git a/contrib/ntp/lib/isc/unix/include/isc/stat.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/stat.h
index b7a798649225..b7a798649225 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/stat.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/stat.h
diff --git a/contrib/ntp/lib/isc/unix/include/isc/stdtime.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/stdtime.h
index c4931bfe6362..c4931bfe6362 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/stdtime.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/stdtime.h
diff --git a/contrib/ntp/lib/isc/unix/include/isc/strerror.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/strerror.h
index 899043bbffdd..899043bbffdd 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/strerror.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/strerror.h
diff --git a/contrib/ntp/lib/isc/unix/include/isc/time.h b/contrib/ntp/libntp/lib/isc/unix/include/isc/time.h
index dc1cef9ad3f2..dc1cef9ad3f2 100644
--- a/contrib/ntp/lib/isc/unix/include/isc/time.h
+++ b/contrib/ntp/libntp/lib/isc/unix/include/isc/time.h
diff --git a/contrib/ntp/lib/isc/unix/interfaceiter.c b/contrib/ntp/libntp/lib/isc/unix/interfaceiter.c
index c42fa685c920..c42fa685c920 100644
--- a/contrib/ntp/lib/isc/unix/interfaceiter.c
+++ b/contrib/ntp/libntp/lib/isc/unix/interfaceiter.c
diff --git a/contrib/ntp/lib/isc/unix/net.c b/contrib/ntp/libntp/lib/isc/unix/net.c
index 7056668ca0cd..7056668ca0cd 100644
--- a/contrib/ntp/lib/isc/unix/net.c
+++ b/contrib/ntp/libntp/lib/isc/unix/net.c
diff --git a/contrib/ntp/lib/isc/unix/stdio.c b/contrib/ntp/libntp/lib/isc/unix/stdio.c
index 360c8c644afc..360c8c644afc 100644
--- a/contrib/ntp/lib/isc/unix/stdio.c
+++ b/contrib/ntp/libntp/lib/isc/unix/stdio.c
diff --git a/contrib/ntp/lib/isc/unix/stdtime.c b/contrib/ntp/libntp/lib/isc/unix/stdtime.c
index c5d0c47df1fc..c5d0c47df1fc 100644
--- a/contrib/ntp/lib/isc/unix/stdtime.c
+++ b/contrib/ntp/libntp/lib/isc/unix/stdtime.c
diff --git a/contrib/ntp/lib/isc/unix/strerror.c b/contrib/ntp/libntp/lib/isc/unix/strerror.c
index 22780095b546..22780095b546 100644
--- a/contrib/ntp/lib/isc/unix/strerror.c
+++ b/contrib/ntp/libntp/lib/isc/unix/strerror.c
diff --git a/contrib/ntp/lib/isc/unix/time.c b/contrib/ntp/libntp/lib/isc/unix/time.c
index ac23ae092804..ac23ae092804 100644
--- a/contrib/ntp/lib/isc/unix/time.c
+++ b/contrib/ntp/libntp/lib/isc/unix/time.c
diff --git a/contrib/ntp/lib/isc/win32/condition.c b/contrib/ntp/libntp/lib/isc/win32/condition.c
index 27d4e7607037..27d4e7607037 100644
--- a/contrib/ntp/lib/isc/win32/condition.c
+++ b/contrib/ntp/libntp/lib/isc/win32/condition.c
diff --git a/contrib/ntp/lib/isc/win32/include/isc/condition.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/condition.h
index 34015bc26562..34015bc26562 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/condition.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/condition.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/dir.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/dir.h
index 653427a9720e..653427a9720e 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/dir.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/dir.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/int.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/int.h
index edcf59dd3ad7..edcf59dd3ad7 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/int.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/int.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/ipv6.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/ipv6.h
index 27384a3557f7..27384a3557f7 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/ipv6.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/ipv6.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/mutex.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/mutex.h
index 5cf1bae1ba60..5cf1bae1ba60 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/mutex.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/mutex.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/net.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/net.h
index 10be85b44408..10be85b44408 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/net.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/net.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/offset.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/offset.h
index f22fdce0a171..f22fdce0a171 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/offset.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/offset.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/once.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/once.h
index 0dc1686e4484..0dc1686e4484 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/once.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/once.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/platform.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/platform.h
index 94b8ba508141..94b8ba508141 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/platform.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/platform.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/stat.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/stat.h
index f95e3b0dd99c..f95e3b0dd99c 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/stat.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/stat.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/stdtime.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/stdtime.h
index abbbc16c1d69..abbbc16c1d69 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/stdtime.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/stdtime.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/strerror.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/strerror.h
index 38d2ef2b45e9..38d2ef2b45e9 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/strerror.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/strerror.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/thread.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/thread.h
index 2eb923b2e61b..2eb923b2e61b 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/thread.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/thread.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/time.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/time.h
index 8ffb24b11428..8ffb24b11428 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/time.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/time.h
diff --git a/contrib/ntp/lib/isc/win32/include/isc/win32os.h b/contrib/ntp/libntp/lib/isc/win32/include/isc/win32os.h
index bd4039361913..bd4039361913 100644
--- a/contrib/ntp/lib/isc/win32/include/isc/win32os.h
+++ b/contrib/ntp/libntp/lib/isc/win32/include/isc/win32os.h
diff --git a/contrib/ntp/lib/isc/win32/interfaceiter.c b/contrib/ntp/libntp/lib/isc/win32/interfaceiter.c
index af52788f231c..af52788f231c 100644
--- a/contrib/ntp/lib/isc/win32/interfaceiter.c
+++ b/contrib/ntp/libntp/lib/isc/win32/interfaceiter.c
diff --git a/contrib/ntp/lib/isc/win32/net.c b/contrib/ntp/libntp/lib/isc/win32/net.c
index 53e143556721..53e143556721 100644
--- a/contrib/ntp/lib/isc/win32/net.c
+++ b/contrib/ntp/libntp/lib/isc/win32/net.c
diff --git a/contrib/ntp/lib/isc/win32/once.c b/contrib/ntp/libntp/lib/isc/win32/once.c
index b5047762ad77..b5047762ad77 100644
--- a/contrib/ntp/lib/isc/win32/once.c
+++ b/contrib/ntp/libntp/lib/isc/win32/once.c
diff --git a/contrib/ntp/lib/isc/win32/stdtime.c b/contrib/ntp/libntp/lib/isc/win32/stdtime.c
index ca462513c213..ca462513c213 100644
--- a/contrib/ntp/lib/isc/win32/stdtime.c
+++ b/contrib/ntp/libntp/lib/isc/win32/stdtime.c
diff --git a/contrib/ntp/lib/isc/win32/strerror.c b/contrib/ntp/libntp/lib/isc/win32/strerror.c
index 41743328a430..40c5da002f8c 100644
--- a/contrib/ntp/lib/isc/win32/strerror.c
+++ b/contrib/ntp/libntp/lib/isc/win32/strerror.c
@@ -119,7 +119,7 @@ NTstrerror(int err, BOOL *bfreebuf) {
*bfreebuf = FALSE;
/* Get the Winsock2 error messages */
- if (errval >= WSABASEERR && errval <= (WSABASEERR + 1015)) {
+ if (errval >= WSABASEERR && errval <= (WSABASEERR + 1999)) {
retmsg = GetWSAErrorMessage(errval);
if (retmsg != NULL)
return (retmsg);
diff --git a/contrib/ntp/lib/isc/win32/thread.c b/contrib/ntp/libntp/lib/isc/win32/thread.c
index 85ffef1e7a6b..85ffef1e7a6b 100644
--- a/contrib/ntp/lib/isc/win32/thread.c
+++ b/contrib/ntp/libntp/lib/isc/win32/thread.c
diff --git a/contrib/ntp/lib/isc/win32/time.c b/contrib/ntp/libntp/lib/isc/win32/time.c
index aafd70b124de..aafd70b124de 100644
--- a/contrib/ntp/lib/isc/win32/time.c
+++ b/contrib/ntp/libntp/lib/isc/win32/time.c
diff --git a/contrib/ntp/lib/isc/win32/win32os.c b/contrib/ntp/libntp/lib/isc/win32/win32os.c
index 56498d0ade10..56498d0ade10 100644
--- a/contrib/ntp/lib/isc/win32/win32os.c
+++ b/contrib/ntp/libntp/lib/isc/win32/win32os.c
diff --git a/contrib/ntp/libntp/mktime.c b/contrib/ntp/libntp/mktime.c
index 50d2a0810408..74ae85431d2f 100644
--- a/contrib/ntp/libntp/mktime.c
+++ b/contrib/ntp/libntp/mktime.c
@@ -60,7 +60,7 @@
*/
#include <config.h>
-#include "ntp_machine.h"
+#include "ntp_types.h"
#if !defined(HAVE_MKTIME) || ( !defined(HAVE_TIMEGM) && defined(WANT_TIMEGM) )
@@ -259,7 +259,7 @@ time2(
return t;
}
#else
-int mktime_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* !HAVE_MKTIME || !HAVE_TIMEGM */
#ifndef HAVE_MKTIME
diff --git a/contrib/ntp/libntp/mstolfp.c b/contrib/ntp/libntp/mstolfp.c
index 3dfc4efd42e8..428f71bdbae9 100644
--- a/contrib/ntp/libntp/mstolfp.c
+++ b/contrib/ntp/libntp/mstolfp.c
@@ -14,86 +14,58 @@ mstolfp(
l_fp *lfp
)
{
- register const char *cp;
- register char *bp;
- register const char *cpdec;
- char buf[100];
+ int ch, neg = 0;
+ u_int32 q, r;
/*
* We understand numbers of the form:
*
* [spaces][-|+][digits][.][digits][spaces|\n|\0]
*
- * This is one enormous hack. Since I didn't feel like
- * rewriting the decoding routine for milliseconds, what
- * is essentially done here is to make a copy of the string
- * with the decimal moved over three places so the seconds
- * decoding routine can be used.
+ * This is kinda hack. We use 'atolfp' to do the basic parsing
+ * (after some initial checks) and then divide the result by
+ * 1000. The original implementation avoided that by
+ * hacking up the input string to move the decimal point, but
+ * that needed string manipulations prone to buffer overruns.
+ * To avoid that trouble we do the conversion first and adjust
+ * the result.
*/
- bp = buf;
- cp = str;
- while (isspace((unsigned char)*cp))
- cp++;
- if (*cp == '-' || *cp == '+') {
- *bp++ = *cp++;
- }
-
- if (*cp != '.' && !isdigit((unsigned char)*cp))
- return 0;
-
-
- /*
- * Search forward for the decimal point or the end of the string.
- */
- cpdec = cp;
- while (isdigit((unsigned char)*cpdec))
- cpdec++;
-
- /*
- * Found something. If we have more than three digits copy the
- * excess over, else insert a leading 0.
- */
- if ((cpdec - cp) > 3) {
- do {
- *bp++ = (char)*cp++;
- } while ((cpdec - cp) > 3);
- } else {
- *bp++ = '0';
+ while (isspace(ch = *(const unsigned char*)str))
+ ++str;
+
+ switch (ch) {
+ case '-': neg = TRUE;
+ case '+': ++str;
+ default : break;
}
+
+ if (!isdigit(ch = *(const unsigned char*)str) && (ch != '.'))
+ return 0;
+ if (!atolfp(str, lfp))
+ return 0;
- /*
- * Stick the decimal in. If we've got less than three digits in
- * front of the millisecond decimal we insert the appropriate number
- * of zeros.
+ /* now do a chained/overlapping division by 1000 to get from
+ * seconds to msec. 1000 is small enough to go with temporary
+ * 32bit accus for Q and R.
*/
- *bp++ = '.';
- if ((cpdec - cp) < 3) {
- size_t i = 3 - (cpdec - cp);
- do {
- *bp++ = '0';
- } while (--i > 0);
- }
+ q = lfp->l_ui / 1000u;
+ r = lfp->l_ui - (q * 1000u);
+ lfp->l_ui = q;
- /*
- * Copy the remainder up to the millisecond decimal. If cpdec
- * is pointing at a decimal point, copy in the trailing number too.
- */
- while (cp < cpdec)
- *bp++ = (char)*cp++;
-
- if (*cp == '.') {
- cp++;
- while (isdigit((unsigned char)*cp))
- *bp++ = (char)*cp++;
- }
- *bp = '\0';
+ r = (r << 16) | (lfp->l_uf >> 16);
+ q = r / 1000u;
+ r = ((r - q * 1000) << 16) | (lfp->l_uf & 0x0FFFFu);
+ lfp->l_uf = q << 16;
+ q = r / 1000;
+ lfp->l_uf |= q;
+ r -= q * 1000u;
- /*
- * Check to make sure the string is properly terminated. If
- * so, give the buffer to the decoding routine.
- */
- if (*cp != '\0' && !isspace((unsigned char)*cp))
- return 0;
- return atolfp(buf, lfp);
+ /* fix sign */
+ if (neg)
+ L_NEG(lfp);
+ /* round */
+ if (r >= 500)
+ L_ADDF(lfp, (neg ? -1 : 1));
+ return 1;
}
diff --git a/contrib/ntp/libntp/msyslog.c b/contrib/ntp/libntp/msyslog.c
index 9a18c4d0d7b0..ae950171f468 100644
--- a/contrib/ntp/libntp/msyslog.c
+++ b/contrib/ntp/libntp/msyslog.c
@@ -92,7 +92,7 @@ format_errmsg(
* errno_to_str() - a thread-safe strerror() replacement.
* Hides the varied signatures of strerror_r().
* For Windows, we have:
- * #define errno_to_str isc_strerror
+ * #define errno_to_str isc__strerror
*/
#ifndef errno_to_str
void
diff --git a/contrib/ntp/libntp/ntp_crypto_rnd.c b/contrib/ntp/libntp/ntp_crypto_rnd.c
index 2a4f91affad5..5fe7382efb79 100644
--- a/contrib/ntp/libntp/ntp_crypto_rnd.c
+++ b/contrib/ntp/libntp/ntp_crypto_rnd.c
@@ -14,7 +14,7 @@
#endif
#include <stdio.h>
-#include <l_stdlib.h>
+#include <ntp_stdlib.h>
#include <ntp_random.h>
#include "safecast.h"
@@ -23,65 +23,66 @@
#include <openssl/rand.h>
int crypto_rand_init = 0;
-#else
-
-# ifndef HAVE_ARC4RANDOM_BUF
-static void
-arc4random_buf(void *buf, size_t nbytes);
-
-void
-evutil_secure_rng_get_bytes(void *buf, size_t nbytes);
-
-static void
-arc4random_buf(void *buf, size_t nbytes)
-{
- evutil_secure_rng_get_bytes(buf, nbytes);
- return;
-}
-# endif
+#elif !defined(HAVE_ARC4RANDOM_BUF)
+#include <event2/util.h>
#endif
+int crypto_rand_ok = 0;
+
/*
* As of late 2014, here's how we plan to provide cryptographic-quality
* random numbers:
- *
+ *
* - If we are building with OpenSSL, use RAND_poll() and RAND_bytes().
* - Otherwise, use arc4random().
- *
- * Use of arc4random() can be forced using configure --disable-openssl-random
+ *
+ * Use of arc4random() can be forced using configure options
+ * --disable-openssl-random or --without-crypto.
*
* We can count on arc4random existing, thru the OS or thru libevent.
* The quality of arc4random depends on the implementor.
- *
+ *
* RAND_poll() doesn't show up until XXX. If it's not present, we
* need to either provide our own or use arc4random().
*/
-/*
- * ntp_crypto_srandom:
- *
- * Initialize the random number generator, if needed by the underlying
- * crypto random number generation mechanism.
- */
+ /*
+ * ntp_crypto_srandom:
+ *
+ * Initialize the random number generator, if needed by the underlying
+ * crypto random number generation mechanism.
+ */
void
ntp_crypto_srandom(
void
- )
+)
{
#ifdef USE_OPENSSL_CRYPTO_RAND
if (!crypto_rand_init) {
- RAND_poll();
+ if (RAND_poll())
+ crypto_rand_ok = 1;
crypto_rand_init = 1;
}
+#elif HAVE_ARC4RANDOM_BUF
+ /*
+ * arc4random_buf has no error return and needs no seeding nor reseeding.
+ */
+ crypto_rand_ok = 1;
#else
- /* No initialization needed for arc4random() */
+ /*
+ * Explicitly init libevent secure RNG to make sure it seeds.
+ * This is the only way we can tell if it can successfully get
+ * entropy from the system.
+ */
+ if (!evutil_secure_rng_init())
+ crypto_rand_ok = 1;
#endif
}
/*
- * ntp_crypto_random_buf:
+ * ntp_crypto_random_buf: Used by ntp-keygen
*
* Returns 0 on success, -1 on error.
*/
@@ -91,24 +92,24 @@ ntp_crypto_random_buf(
size_t nbytes
)
{
-#ifdef USE_OPENSSL_CRYPTO_RAND
- int rc;
+ if (!crypto_rand_ok)
+ return -1;
- rc = RAND_bytes(buf, size2int_chk(nbytes));
- if (1 != rc) {
+#if defined(USE_OPENSSL_CRYPTO_RAND)
+ if (1 != RAND_bytes(buf, size2int_chk(nbytes))) {
unsigned long err;
char *err_str;
err = ERR_get_error();
err_str = ERR_error_string(err, NULL);
- /* XXX: Log the error */
- (void)&err_str;
+ msyslog(LOG_ERR, "RAND_bytes failed: %s", err_str);
return -1;
}
- return 0;
-#else
+#elif defined(HAVE_ARC4RANDOM_BUF)
arc4random_buf(buf, nbytes);
- return 0;
+#else
+ evutil_secure_rng_get_bytes(buf, nbytes);
#endif
+ return 0;
}
diff --git a/contrib/ntp/libntp/ntp_random.c b/contrib/ntp/libntp/ntp_random.c
index 0ada44f256b0..83806c420425 100644
--- a/contrib/ntp/libntp/ntp_random.c
+++ b/contrib/ntp/libntp/ntp_random.c
@@ -497,3 +497,18 @@ ntp_random( void )
}
return(i);
}
+
+/*
+ * ntp_uurandom()
+ *
+ * Generate a Uniform-distributed Unity based random number. Replaces a
+ * few locations where the transformation was made in an ad-hoc style
+ * (and in one instance, wrong...)
+ *
+ * returns a number in [0.0 .. 1.0], both ends inclusive
+ */
+double
+ntp_uurandom( void )
+{
+ return (double)ntp_random() / 0x7FFFFFFFu;
+}
diff --git a/contrib/ntp/libntp/ntp_realpath.c b/contrib/ntp/libntp/ntp_realpath.c
new file mode 100644
index 000000000000..116542945153
--- /dev/null
+++ b/contrib/ntp/libntp/ntp_realpath.c
@@ -0,0 +1,279 @@
+/*
+ * ntp_realpath.c - get real path for a file
+ * Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * Feb 11, 2014 for the NTP project.
+ *
+ * This is a butchered version of FreeBSD's implementation of 'realpath()',
+ * and the following copyright applies:
+ *----------------------------------------------------------------------
+ */
+
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "ntp_stdlib.h"
+
+/* ================================================================== */
+#if defined(SYS_WINNT)
+/* ================================================================== */
+
+#include <stdlib.h>
+
+/* On Windows, we assume 2k for a file path is enough. */
+#define NTP_PATH_MAX 2048
+
+static char *
+realpath1(const char *path, char *resolved)
+{
+ /* Items in the device name space get passed back AS IS. Everything
+ * else is fed through '_fullpath()', which is probably the closest
+ * counterpart to what 'realpath()' is expected to do on Windows...
+ */
+ char * retval = NULL;
+
+ if (!strncmp(path, "\\\\.\\", 4)) {
+ if (strlcpy(resolved, path, NTP_PATH_MAX) >= NTP_PATH_MAX)
+ errno = ENAMETOOLONG;
+ else
+ retval = resolved;
+ } else if ((retval = _fullpath(resolved, path, NTP_PATH_MAX)) == NULL) {
+ errno = ENAMETOOLONG;
+ }
+ return retval;
+}
+
+/* ================================================================== */
+#elif !defined(HAVE_FUNC_POSIX_REALPATH)
+/* ================================================================== */
+
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+/* The following definitions are to avoid system settings with excessive
+ * values for maxmimum path length and symlink chains/loops. Adjust with
+ * care, if that's ever needed: some buffers are on the stack!
+ */
+#define NTP_PATH_MAX 1024
+#define NTP_MAXSYMLINKS 16
+
+/*
+ * Find the real name of path, by removing all ".", ".." and symlink
+ * components. Returns (resolved) on success, or (NULL) on failure,
+ * in which case the path which caused trouble is left in (resolved).
+ */
+static char *
+realpath1(const char *path, char *resolved)
+{
+ struct stat sb;
+ char *p, *q;
+ size_t left_len, resolved_len, next_token_len;
+ unsigned symlinks;
+ ssize_t slen;
+ char left[NTP_PATH_MAX], next_token[NTP_PATH_MAX], symlink[NTP_PATH_MAX];
+
+ symlinks = 0;
+ if (path[0] == '/') {
+ resolved[0] = '/';
+ resolved[1] = '\0';
+ if (path[1] == '\0')
+ return (resolved);
+ resolved_len = 1;
+ left_len = strlcpy(left, path + 1, sizeof(left));
+ } else {
+ if (getcwd(resolved, NTP_PATH_MAX) == NULL) {
+ resolved[0] = '.';
+ resolved[1] = '\0';
+ return (NULL);
+ }
+ resolved_len = strlen(resolved);
+ left_len = strlcpy(left, path, sizeof(left));
+ }
+ if (left_len >= sizeof(left) || resolved_len >= NTP_PATH_MAX) {
+ errno = ENAMETOOLONG;
+ return (NULL);
+ }
+
+ /*
+ * Iterate over path components in `left'.
+ */
+ while (left_len != 0) {
+ /*
+ * Extract the next path component and adjust `left'
+ * and its length.
+ */
+ p = strchr(left, '/');
+
+ next_token_len = p != NULL ? (size_t)(p - left) : left_len;
+ memcpy(next_token, left, next_token_len);
+ next_token[next_token_len] = '\0';
+
+ if (p != NULL) {
+ left_len -= next_token_len + 1;
+ memmove(left, p + 1, left_len + 1);
+ } else {
+ left[0] = '\0';
+ left_len = 0;
+ }
+
+ if (resolved[resolved_len - 1] != '/') {
+ if (resolved_len + 1 >= NTP_PATH_MAX) {
+ errno = ENAMETOOLONG;
+ return (NULL);
+ }
+ resolved[resolved_len++] = '/';
+ resolved[resolved_len] = '\0';
+ }
+ if (next_token[0] == '\0') {
+ /* Handle consequential slashes. */
+ continue;
+ } else if (strcmp(next_token, ".") == 0) {
+ continue;
+ } else if (strcmp(next_token, "..") == 0) {
+ /*
+ * Strip the last path component except when we have
+ * single "/"
+ */
+ if (resolved_len > 1) {
+ resolved[resolved_len - 1] = '\0';
+ q = strrchr(resolved, '/') + 1;
+ *q = '\0';
+ resolved_len = q - resolved;
+ }
+ continue;
+ }
+
+ /*
+ * Append the next path component and lstat() it.
+ */
+ resolved_len = strlcat(resolved, next_token, NTP_PATH_MAX);
+ if (resolved_len >= NTP_PATH_MAX) {
+ errno = ENAMETOOLONG;
+ return (NULL);
+ }
+ if (lstat(resolved, &sb) != 0)
+ return (NULL);
+ if (S_ISLNK(sb.st_mode)) {
+ if (symlinks++ > NTP_MAXSYMLINKS) {
+ errno = ELOOP;
+ return (NULL);
+ }
+ slen = readlink(resolved, symlink, sizeof(symlink));
+ if (slen <= 0 || slen >= (ssize_t)sizeof(symlink)) {
+ if (slen < 0)
+ ; /* keep errno from readlink(2) call */
+ else if (slen == 0)
+ errno = ENOENT;
+ else
+ errno = ENAMETOOLONG;
+ return (NULL);
+ }
+ symlink[slen] = '\0';
+ if (symlink[0] == '/') {
+ resolved[1] = 0;
+ resolved_len = 1;
+ } else {
+ /* Strip the last path component. */
+ q = strrchr(resolved, '/') + 1;
+ *q = '\0';
+ resolved_len = q - resolved;
+ }
+
+ /*
+ * If there are any path components left, then
+ * append them to symlink. The result is placed
+ * in `left'.
+ */
+ if (p != NULL) {
+ if (symlink[slen - 1] != '/') {
+ if (slen + 1 >= (ssize_t)sizeof(symlink)) {
+ errno = ENAMETOOLONG;
+ return (NULL);
+ }
+ symlink[slen] = '/';
+ symlink[slen + 1] = 0;
+ }
+ left_len = strlcat(symlink, left,
+ sizeof(symlink));
+ if (left_len >= sizeof(symlink)) {
+ errno = ENAMETOOLONG;
+ return (NULL);
+ }
+ }
+ left_len = strlcpy(left, symlink, sizeof(left));
+ } else if (!S_ISDIR(sb.st_mode) && p != NULL) {
+ errno = ENOTDIR;
+ return (NULL);
+ }
+ }
+
+ /*
+ * Remove trailing slash except when the resolved pathname
+ * is a single "/".
+ */
+ if (resolved_len > 1 && resolved[resolved_len - 1] == '/')
+ resolved[resolved_len - 1] = '\0';
+ return (resolved);
+}
+
+/* ================================================================== */
+#endif /* !defined(SYS_WINNT) && !defined(HAVE_POSIX_REALPATH) */
+/* ================================================================== */
+
+char *
+ntp_realpath(const char * path)
+{
+# if defined(HAVE_FUNC_POSIX_REALPATH)
+
+ return realpath(path, NULL);
+
+# else
+
+ char *res = NULL, *m = NULL;
+ if (path == NULL)
+ errno = EINVAL;
+ else if (path[0] == '\0')
+ errno = ENOENT;
+ else if ((m = malloc(NTP_PATH_MAX)) == NULL)
+ errno = ENOMEM; /* MSVCRT malloc does not set this... */
+ else if ((res = realpath1(path, m)) == NULL)
+ free(m);
+ else
+ res = realloc(res, strlen(res) + 1);
+ return (res);
+
+# endif
+}
diff --git a/contrib/ntp/libntp/numtoa.c b/contrib/ntp/libntp/numtoa.c
index 5efbe942e3b4..51645de01c30 100644
--- a/contrib/ntp/libntp/numtoa.c
+++ b/contrib/ntp/libntp/numtoa.c
@@ -9,6 +9,7 @@
#endif
#include <stdio.h>
+#include <ctype.h>
#include "ntp_fp.h"
#include "lib_strbuf.h"
@@ -42,18 +43,33 @@ refid_str(
{
char * text;
size_t tlen;
+ char * cp;
if (stratum > 1)
return numtoa(refid);
LIB_GETBUF(text);
text[0] = '.';
+ /* What if any non-NUL char is not printable? */
memcpy(&text[1], &refid, sizeof(refid));
text[1 + sizeof(refid)] = '\0';
tlen = strlen(text);
text[tlen] = '.';
text[tlen + 1] = '\0';
+ /*
+ * Now make sure the contents are 'graphic'.
+ *
+ * This refid is expected to be up to 4 ascii graphics.
+ * If any character is not a graphic, replace it with a space.
+ * This will at least alert the viewer of a problem.
+ */
+ for (cp = text + 1; *cp; ++cp) {
+ if (!isgraph((int)*cp)) {
+ *cp = ' ';
+ }
+ }
+
return text;
}
diff --git a/contrib/ntp/libntp/recvbuff.c b/contrib/ntp/libntp/recvbuff.c
index 5855ec2147ac..d84a87d68501 100644
--- a/contrib/ntp/libntp/recvbuff.c
+++ b/contrib/ntp/libntp/recvbuff.c
@@ -109,12 +109,13 @@ create_buffers(
u_int i;
size_t abuf;
- if (limit_recvbufs <= total_recvbufs)
- return;
-
+ /*[bug 3666]: followup -- reset shortfalls in all cases */
abuf = nbufs + buffer_shortfall;
buffer_shortfall = 0;
+ if (limit_recvbufs <= total_recvbufs)
+ return;
+
if (abuf < nbufs || abuf > RECV_BATCH)
abuf = RECV_BATCH; /* clamp on overflow */
else
@@ -234,7 +235,7 @@ get_free_recv_buffer(
recvbuf_t *buffer = NULL;
LOCK_F();
- if (free_recvbufs > (urgent ? emerg_recvbufs : 0)) {
+ if (free_recvbufs > (urgent ? 0 : emerg_recvbufs)) {
UNLINK_HEAD_SLIST(buffer, free_recv_list, link);
}
diff --git a/contrib/ntp/libntp/refnumtoa.c b/contrib/ntp/libntp/refnumtoa.c
index e6ca55aef868..cfebefe1ed18 100644
--- a/contrib/ntp/libntp/refnumtoa.c
+++ b/contrib/ntp/libntp/refnumtoa.c
@@ -10,7 +10,7 @@
const char *
refnumtoa(
- sockaddr_u *num
+ const sockaddr_u *num
)
{
u_int32 netnum;
diff --git a/contrib/ntp/libntp/socktoa.c b/contrib/ntp/libntp/socktoa.c
index 98abe7c42036..4071b0a45be0 100644
--- a/contrib/ntp/libntp/socktoa.c
+++ b/contrib/ntp/libntp/socktoa.c
@@ -119,7 +119,7 @@ sock_hash(
/*
* We can't just hash the whole thing because there are hidden
* fields in sockaddr_in6 that might be filled in by recvfrom(),
- * so just use the family, port and address.
+ * so just use the family and address.
*/
pch = (const void *)&AF(addr);
hashVal = 37 * hashVal + *pch;
diff --git a/contrib/ntp/libntp/systime.c b/contrib/ntp/libntp/systime.c
index a738c8d924dd..76fba7fe1608 100644
--- a/contrib/ntp/libntp/systime.c
+++ b/contrib/ntp/libntp/systime.c
@@ -235,7 +235,7 @@ get_systime(
* must scale up the result by 2.0 to cover the full fractional
* range.
*/
- dfuzz = ntp_random() * 2. / FRAC * sys_fuzz;
+ dfuzz = ntp_uurandom() * sys_fuzz;
DTOLFP(dfuzz, &lfpfuzz);
L_ADD(&result, &lfpfuzz);
@@ -591,6 +591,8 @@ step_systime(
return TRUE;
}
+
+#if SIZEOF_TIME_T > 4
static const char *
tv_fmt_libbuf(
const struct timeval * ptv
@@ -612,6 +614,7 @@ tv_fmt_libbuf(
(u_int)ptv->tv_usec);
return retv;
}
+#endif /* SIZEOF_TIME_T > 4 */
int /*BOOL*/
diff --git a/contrib/ntp/libntp/vint64ops.c b/contrib/ntp/libntp/vint64ops.c
index 5adbebbb51d4..1d5087d95438 100644
--- a/contrib/ntp/libntp/vint64ops.c
+++ b/contrib/ntp/libntp/vint64ops.c
@@ -17,32 +17,13 @@
#include "ntp_fp.h"
#include "vint64ops.h"
-/* ---------------------------------------------------------------------
- * GCC is rather sticky with its 'const' attribute. We have to do it more
- * explicit than with a cast if we want to get rid of a CONST qualifier.
- * Greetings from the PASCAL world, where casting was only possible via
- * untagged unions...
- */
-static inline void*
-noconst(
- const void* ptr
- )
-{
- union {
- const void * cp;
- void * vp;
- } tmp;
- tmp.cp = ptr;
- return tmp.vp;
-}
-
/* -------------------------------------------------------------------------*/
vint64
strtouv64(
- const char * begp,
- char ** endp,
- int base
+ char const * begp,
+ char const ** const endp,
+ int base
)
{
vint64 res;
@@ -116,7 +97,7 @@ strtouv64(
if (!num)
errno = EINVAL;
if (endp)
- *endp = (char*)noconst(src);
+ *endp = (const char *)src;
if (sig)
M_NEG(res.D_s.hi, res.D_s.lo);
return res;
diff --git a/contrib/ntp/libntp/work_thread.c b/contrib/ntp/libntp/work_thread.c
index 03a5647bea36..c1fe5c20c995 100644
--- a/contrib/ntp/libntp/work_thread.c
+++ b/contrib/ntp/libntp/work_thread.c
@@ -41,20 +41,10 @@
#ifndef THREAD_MINSTACKSIZE
# define THREAD_MINSTACKSIZE (64U * 1024)
#endif
-#ifndef __sun
-#if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
-# undef THREAD_MINSTACKSIZE
-# define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN
-#endif
-#endif
#ifndef THREAD_MAXSTACKSIZE
# define THREAD_MAXSTACKSIZE (256U * 1024)
#endif
-#if THREAD_MAXSTACKSIZE < THREAD_MINSTACKSIZE
-# undef THREAD_MAXSTACKSIZE
-# define THREAD_MAXSTACKSIZE THREAD_MINSTACKSIZE
-#endif
/* need a good integer to store a pointer... */
#ifndef UINTPTR_T
@@ -399,7 +389,7 @@ send_blocking_resp_internal(
#ifndef WORK_PIPE
/* --------------------------------------------------------------------
- * Check if a (Windows-)hanndle to a semaphore is actually the same we
+ * Check if a (Windows-)handle to a semaphore is actually the same we
* are using inside the sema wrapper.
*/
static BOOL
@@ -594,12 +584,25 @@ start_blocking_thread_internal(
"start_blocking_thread: pthread_attr_getstacksize() -> %s",
strerror(rc));
} else {
- if (ostacksize < THREAD_MINSTACKSIZE)
- nstacksize = THREAD_MINSTACKSIZE;
- else if (ostacksize > THREAD_MAXSTACKSIZE)
+ nstacksize = ostacksize;
+ /* order is important here: first clamp on upper limit,
+ * and the PTHREAD min stack size is ultimate override!
+ */
+ if (nstacksize > THREAD_MAXSTACKSIZE)
nstacksize = THREAD_MAXSTACKSIZE;
- else
- nstacksize = ostacksize;
+# ifdef PTHREAD_STACK_MAX
+ if (nstacksize > PTHREAD_STACK_MAX)
+ nstacksize = PTHREAD_STACK_MAX;
+# endif
+
+ /* now clamp on lower stack limit. */
+ if (nstacksize < THREAD_MINSTACKSIZE)
+ nstacksize = THREAD_MINSTACKSIZE;
+# ifdef PTHREAD_STACK_MIN
+ if (nstacksize < PTHREAD_STACK_MIN)
+ nstacksize = PTHREAD_STACK_MIN;
+# endif
+
if (nstacksize != ostacksize)
rc = pthread_attr_setstacksize(&thr_attr, nstacksize);
if (0 != rc)
diff --git a/contrib/ntp/libntp/xsbprintf.c b/contrib/ntp/libntp/xsbprintf.c
index 4586758bc88a..2f7aa5129845 100644
--- a/contrib/ntp/libntp/xsbprintf.c
+++ b/contrib/ntp/libntp/xsbprintf.c
@@ -42,9 +42,9 @@ xvsbprintf(
size_t blen = (size_t)(pend - pbuf);
rc = vsnprintf(pbuf, blen, pfmt, va);
if (rc > 0) {
- if ((size_t)rc >= blen)
- rc = 0;
- pbuf += rc;
+ if ((size_t)rc >= blen)
+ rc = 0;
+ pbuf += rc;
}
*pbuf = '\0'; /* fear of bad vsnprintf */
*ppbuf = pbuf;
diff --git a/contrib/ntp/libparse/Makefile.am b/contrib/ntp/libparse/Makefile.am
index 8fb089f7717f..a4a3ed264f2f 100644
--- a/contrib/ntp/libparse/Makefile.am
+++ b/contrib/ntp/libparse/Makefile.am
@@ -1,6 +1,7 @@
NULL=
BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER)
CLEANFILES =
+DISTCLEANFILES =
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
EXTRA_PROGRAMS = parsestreams parsesolaris
@@ -27,10 +28,10 @@ VPHACK_AFTER=
endif
vphack:
- test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
+ $(AM_V_at)test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
vphack_after:
- test -L info_trimble.c || ( \
+ $(AM_V_at)test -L info_trimble.c || ( \
mv info_trimble.c $(srcdir)/info_trimble.c && \
ln -s $(srcdir)/info_trimble.c . \
)
@@ -174,6 +175,6 @@ sys/systm.h:
check-libparse: $(noinst_LIBRARIES)
@: do-nothing action to avoid default SCCS get
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/libparse/Makefile.in b/contrib/ntp/libparse/Makefile.in
index 7142427b2a7f..70fb2d0a5fea 100644
--- a/contrib/ntp/libparse/Makefile.in
+++ b/contrib/ntp/libparse/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -130,6 +129,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -139,6 +139,7 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS ?= cru
AM_V_AR = $(am__v_AR_@AM_V@)
@@ -169,7 +170,6 @@ libparse_kernel_a_DEPENDENCIES = kparse.o kparse_conf.o \
$(am__DEPENDENCIES_1)
am_libparse_kernel_a_OBJECTS =
libparse_kernel_a_OBJECTS = $(am_libparse_kernel_a_OBJECTS)
-PROGRAMS = $(noinst_PROGRAMS)
parsesolaris_SOURCES = parsesolaris.c
parsesolaris_OBJECTS = parsesolaris.$(OBJEXT)
parsesolaris_LDADD = $(LDADD)
@@ -194,7 +194,19 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/binio.Po \
+ ./$(DEPDIR)/clk_computime.Po ./$(DEPDIR)/clk_dcf7000.Po \
+ ./$(DEPDIR)/clk_hopf6021.Po ./$(DEPDIR)/clk_meinberg.Po \
+ ./$(DEPDIR)/clk_rawdcf.Po ./$(DEPDIR)/clk_rcc8000.Po \
+ ./$(DEPDIR)/clk_schmid.Po ./$(DEPDIR)/clk_sel240x.Po \
+ ./$(DEPDIR)/clk_trimtaip.Po ./$(DEPDIR)/clk_trimtsip.Po \
+ ./$(DEPDIR)/clk_varitext.Po ./$(DEPDIR)/clk_wharton.Po \
+ ./$(DEPDIR)/data_mbg.Po ./$(DEPDIR)/gpstolfp.Po \
+ ./$(DEPDIR)/ieee754io.Po ./$(DEPDIR)/info_trimble.Po \
+ ./$(DEPDIR)/mfp_mul.Po ./$(DEPDIR)/parse.Po \
+ ./$(DEPDIR)/parse_conf.Po ./$(DEPDIR)/parsesolaris.Po \
+ ./$(DEPDIR)/parsestreams.Po ./$(DEPDIR)/trim_info.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -240,10 +252,8 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/check-libntp.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -263,6 +273,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -272,6 +283,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -284,14 +297,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -502,6 +511,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -515,6 +525,7 @@ NULL =
BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) check-libntp \
.deps-ver
CLEANFILES = check-libntp .deps-ver
+DISTCLEANFILES = $(DEPDIR)/deps-ver
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
noinst_PROGRAMS = @MAKE_PARSEKMODULE@
@@ -583,15 +594,16 @@ AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/kernel $(CPPFLAGS_NTP) \
$(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -608,10 +620,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -622,6 +634,15 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -635,15 +656,6 @@ libparse_kernel.a: $(libparse_kernel_a_OBJECTS) $(libparse_kernel_a_DEPENDENCIES
$(AM_V_AR)$(libparse_kernel_a_AR) libparse_kernel.a $(libparse_kernel_a_OBJECTS) $(libparse_kernel_a_LIBADD)
$(AM_V_at)$(RANLIB) libparse_kernel.a
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-
parsesolaris$(EXEEXT): $(parsesolaris_OBJECTS) $(parsesolaris_DEPENDENCIES) $(EXTRA_parsesolaris_DEPENDENCIES)
@rm -f parsesolaris$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(parsesolaris_OBJECTS) $(parsesolaris_LDADD) $(LIBS)
@@ -658,47 +670,56 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binio.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_computime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_dcf7000.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_hopf6021.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_meinberg.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rawdcf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rcc8000.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_schmid.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_sel240x.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtaip.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtsip.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_varitext.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_wharton.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_mbg.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpstolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee754io.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_trimble.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfp_mul.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_conf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsesolaris.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsestreams.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trim_info.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binio.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_computime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_dcf7000.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_hopf6021.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_meinberg.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rawdcf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rcc8000.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_schmid.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_sel240x.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtaip.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtsip.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_varitext.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_wharton.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_mbg.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpstolfp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee754io.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_trimble.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfp_mul.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_conf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsesolaris.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsestreams.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trim_info.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -760,8 +781,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -794,11 +817,12 @@ distdir: $(DISTFILES)
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(LIBRARIES)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -824,6 +848,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -835,7 +860,29 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/binio.Po
+ -rm -f ./$(DEPDIR)/clk_computime.Po
+ -rm -f ./$(DEPDIR)/clk_dcf7000.Po
+ -rm -f ./$(DEPDIR)/clk_hopf6021.Po
+ -rm -f ./$(DEPDIR)/clk_meinberg.Po
+ -rm -f ./$(DEPDIR)/clk_rawdcf.Po
+ -rm -f ./$(DEPDIR)/clk_rcc8000.Po
+ -rm -f ./$(DEPDIR)/clk_schmid.Po
+ -rm -f ./$(DEPDIR)/clk_sel240x.Po
+ -rm -f ./$(DEPDIR)/clk_trimtaip.Po
+ -rm -f ./$(DEPDIR)/clk_trimtsip.Po
+ -rm -f ./$(DEPDIR)/clk_varitext.Po
+ -rm -f ./$(DEPDIR)/clk_wharton.Po
+ -rm -f ./$(DEPDIR)/data_mbg.Po
+ -rm -f ./$(DEPDIR)/gpstolfp.Po
+ -rm -f ./$(DEPDIR)/ieee754io.Po
+ -rm -f ./$(DEPDIR)/info_trimble.Po
+ -rm -f ./$(DEPDIR)/mfp_mul.Po
+ -rm -f ./$(DEPDIR)/parse.Po
+ -rm -f ./$(DEPDIR)/parse_conf.Po
+ -rm -f ./$(DEPDIR)/parsesolaris.Po
+ -rm -f ./$(DEPDIR)/parsestreams.Po
+ -rm -f ./$(DEPDIR)/trim_info.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -881,7 +928,29 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/binio.Po
+ -rm -f ./$(DEPDIR)/clk_computime.Po
+ -rm -f ./$(DEPDIR)/clk_dcf7000.Po
+ -rm -f ./$(DEPDIR)/clk_hopf6021.Po
+ -rm -f ./$(DEPDIR)/clk_meinberg.Po
+ -rm -f ./$(DEPDIR)/clk_rawdcf.Po
+ -rm -f ./$(DEPDIR)/clk_rcc8000.Po
+ -rm -f ./$(DEPDIR)/clk_schmid.Po
+ -rm -f ./$(DEPDIR)/clk_sel240x.Po
+ -rm -f ./$(DEPDIR)/clk_trimtaip.Po
+ -rm -f ./$(DEPDIR)/clk_trimtsip.Po
+ -rm -f ./$(DEPDIR)/clk_varitext.Po
+ -rm -f ./$(DEPDIR)/clk_wharton.Po
+ -rm -f ./$(DEPDIR)/data_mbg.Po
+ -rm -f ./$(DEPDIR)/gpstolfp.Po
+ -rm -f ./$(DEPDIR)/ieee754io.Po
+ -rm -f ./$(DEPDIR)/info_trimble.Po
+ -rm -f ./$(DEPDIR)/mfp_mul.Po
+ -rm -f ./$(DEPDIR)/parse.Po
+ -rm -f ./$(DEPDIR)/parse_conf.Po
+ -rm -f ./$(DEPDIR)/parsesolaris.Po
+ -rm -f ./$(DEPDIR)/parsestreams.Po
+ -rm -f ./$(DEPDIR)/trim_info.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -900,30 +969,30 @@ ps-am:
uninstall-am:
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS \
- cscopelist-am ctags ctags-am distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags tags-am uninstall uninstall-am
+.MAKE: all check install install-am install-exec install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libtool clean-noinstLIBRARIES \
+ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
vphack:
- test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
+ $(AM_V_at)test -e info_trimble.c || ln -s $(srcdir)/info_trimble.c .
vphack_after:
- test -L info_trimble.c || ( \
+ $(AM_V_at)test -L info_trimble.c || ( \
mv info_trimble.c $(srcdir)/info_trimble.c && \
ln -s $(srcdir)/info_trimble.c . \
)
@@ -1009,17 +1078,18 @@ sys/systm.h:
check-libparse: $(noinst_LIBRARIES)
@: do-nothing action to avoid default SCCS get
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1037,7 +1107,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1067,7 +1137,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/libparse/clk_wharton.c b/contrib/ntp/libparse/clk_wharton.c
index e9e3d84644ac..371137dc6fe8 100644
--- a/contrib/ntp/libparse/clk_wharton.c
+++ b/contrib/ntp/libparse/clk_wharton.c
@@ -12,13 +12,6 @@
#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_WHARTON_400A)
/*
* Support for WHARTON 400A Series clock + 404.2 serial interface.
- *
- * Copyright (C) 1999, 2000 by Philippe De Muyter <phdm@macqel.be>
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.
- *
*/
#include "ntp_fp.h"
diff --git a/contrib/ntp/ntpd/Makefile.am b/contrib/ntp/ntpd/Makefile.am
index b977d5e21cb1..103303d3ec22 100644
--- a/contrib/ntp/ntpd/Makefile.am
+++ b/contrib/ntp/ntpd/Makefile.am
@@ -18,7 +18,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB.
-LDADD = version.o libntpd.a $(LIBPARSE)
+LDADD = libntpd.a $(LIBPARSE)
AM_YFLAGS = -d -t -r all
if SAVECONFIG_ENABLED
@@ -51,8 +51,8 @@ VPHACK_AFTER=
endif
vphack:
- test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
- test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
+ $(AM_V_at)test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
+ $(AM_V_at)test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
#
# ylwrap script which invokes Bison replaces ntp_parser.h
@@ -62,7 +62,7 @@ vphack:
#
vphack_after:
- test -L ntp_parser.h || ( \
+ $(AM_V_at)test -L ntp_parser.h || ( \
mv ntp_parser.h $(srcdir)/ntp_parser.h && \
ln -s $(srcdir)/ntp_parser.h . \
)
@@ -87,10 +87,6 @@ man5_MANS= ntp.conf.5 ntp.keys.5
man8_MANS=
man_MANS= ntpd.$(NTPD_MS)
-# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
-# simulator currently uses ntpd-opts.[ch]. This also means there is no
-# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
-
LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS)
LDADD_NTPD_COMMON += $(LIBM) $(LDADD_NTP) $(LSCF)
ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
@@ -102,8 +98,6 @@ keyword_gen_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
DISTCLEANFILES = \
keyword-gen \
- .version \
- version.c \
config.log \
$(man5_MANS) \
$(man_MANS) \
@@ -124,6 +118,10 @@ CLEANFILES = \
psl1save.conf+ \
psl2save.conf \
psl2save.conf+ \
+ .version \
+ version.c \
+ ntpd-version.c \
+ sim-version.c \
$(EXTRA_PROGRAMS) \
$(NULL)
@@ -192,6 +190,7 @@ noinst_DATA = \
noinst_HEADERS = \
declcond.h \
+ ntp_clockdev.h \
ntp_leapsec.h \
$(NULL)
@@ -199,6 +198,7 @@ install-data-local: install-html
run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
std_def_list = \
$(top_srcdir)/sntp/include/debug-opt.def \
$(top_srcdir)/sntp/include/autogen-version.def \
@@ -211,7 +211,9 @@ std_def_list = \
check-local: $(MAKE_CHECK_Y2K) $(CHECK_SAVECONFIG)
test -z "$(MAKE_CHECK_Y2K)" || ./$(MAKE_CHECK_Y2K)
-ntpd_SOURCES = \
+# ntpd_ntpdsim_SRCS use #ifdef SIM and are included in both
+
+ntpd_ntpdsim_SRCS = \
ntp_config.c \
ntp_keyword.h \
ntp_io.c \
@@ -223,17 +225,30 @@ ntpd_SOURCES = \
ntpd-opts.h \
$(NULL)
+ntpd_SOURCES = \
+ $(ntpd_ntpdsim_SRCS) \
+ $(NULL)
+
+nodist_ntpd_SOURCES = \
+ ntpd-version.c \
+ $(NULL)
+
ntpdsim_SOURCES = \
- $(ntpd_SOURCES) \
+ $(ntpd_ntpdsim_SRCS) \
ntp_prio_q.c \
ntpsim.c \
$(NULL)
+nodist_ntpdsim_SOURCES = \
+ sim-version.c \
+ $(NULL)
+
# libntpd_a_SOURCES do not use #ifdef SIM
libntpd_a_SOURCES = \
cmd_args.c \
jupiter.h \
+ ntp_clockdev.c \
ntp_control.c \
ntp_crypto.c \
ntp_filegen.c \
@@ -242,6 +257,7 @@ libntpd_a_SOURCES = \
ntp_monitor.c \
ntp_peer.c \
ntp_proto.c \
+ ntp_ppsdev.c \
ntp_refclock.c \
ntp_request.c \
ntp_restrict.c \
@@ -295,21 +311,21 @@ libntpd_a_SOURCES = \
$(NULL)
k-g-u-submake: keyword-gen
- ./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
- @grep -v diff_ignore_line < k-g.out > cmp1
- @grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
- @cmp cmp1 cmp2 > /dev/null || \
+ $(AM_V_at)./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
+ $(AM_V_at)grep -v diff_ignore_line < k-g.out > cmp1
+ $(AM_V_at)grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
+ $(AM_V_at)cmp cmp1 cmp2 > /dev/null || \
{ mv -f k-g.out $(srcdir)/ntp_keyword.h && \
echo 'Generated changed ntp_keyword.h.' ;}
- @[ ! -f k-g.out ] || \
+ $(AM_V_at)[ ! -f k-g.out ] || \
{ rm k-g.out && echo 'ntp_keyword.h is up to date.' ;}
@rm cmp1 cmp2
@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
$(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
- $(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
- grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
- mv -f k-g-u $@
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
+ $(AM_V_at)grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
+ $(AM_V_at)mv -f k-g-u $@
$(srcdir)/ntp_keyword.h: $(srcdir)/keyword-gen-utd
@: do-nothing action to avoid default SCCS get
@@ -319,12 +335,12 @@ $(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) ntpd-opts.def
###
$(srcdir)/ntpd.1ntpdman: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
$(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdman > $(srcdir)/ntpd.man.in+
@@ -333,7 +349,7 @@ $(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec
###
$(srcdir)/ntpd.1ntpdmdoc: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
$(srcdir)/ntpd.mdoc.in: $(srcdir)/ntpd.1ntpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdmdoc > $(srcdir)/ntpd.mdoc.in+
@@ -351,13 +367,13 @@ $(srcdir)/invoke-ntp.conf.menu: $(srcdir)/invoke-ntp.conf.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp.conf.texi: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
$(srcdir)/invoke-ntp.keys.menu: $(srcdir)/invoke-ntp.keys.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(srcdir)/invoke-ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
@@ -371,7 +387,7 @@ $(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(srcdir)/invoke-ntpd.texi $(top_srcdir
###
$(srcdir)/ntp.conf.5man: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
$(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5man > $(srcdir)/ntp.conf.man.in+
@@ -380,7 +396,7 @@ $(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/ma
###
$(srcdir)/ntp.conf.5mdoc: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
$(srcdir)/ntp.conf.mdoc.in: $(srcdir)/ntp.conf.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5mdoc > $(srcdir)/ntp.conf.mdoc.in+
@@ -395,7 +411,7 @@ ntp.conf.5: $(srcdir)/ntp.conf.$(MANTAGFMT).in $(top_builddir)/config.status
###
$(srcdir)/ntp.keys.5man: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
$(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5man > $(srcdir)/ntp.keys.man.in+
@@ -404,7 +420,7 @@ $(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/ma
###
$(srcdir)/ntp.keys.5mdoc: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
$(srcdir)/ntp.keys.mdoc.in: $(srcdir)/ntp.keys.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5mdoc > $(srcdir)/ntp.keys.mdoc.in+
@@ -422,11 +438,9 @@ $(srcdir)/invoke-ntpd.menu: $(srcdir)/invoke-ntpd.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpd.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(PROGRAMS): $(LDADD)
-
check-saveconfig: complete.conf compsave.conf
-diff -u complete.conf compsave.conf
cmp complete.conf compsave.conf && echo stamp > $@
@@ -439,27 +453,27 @@ check-pslsaveconfig: check-psl0 check-psl1 check-psl2
echo stamp > $@
check-psl0: psl0.conf psl0save.conf
- -diff -u $< psl0save.conf
- cmp $< psl0save.conf && echo stamp > $@
+ -diff -u $(srcdir)/psl0.conf psl0save.conf
+ cmp $(srcdir)/psl0.conf psl0save.conf && echo stamp > $@
psl0save.conf: psl0.conf ntpd
- ./ntpd --configfile $< --saveconfigquit $@+
+ ./ntpd --configfile $(srcdir)/psl0.conf --saveconfigquit $@+
grep -v '^#' $@+ > $@
check-psl1: psl1.conf psl1save.conf
- -diff -u $< psl1save.conf
- cmp $< psl1save.conf && echo stamp > $@
+ -diff -u $(srcdir)/psl1.conf psl1save.conf
+ cmp $(srcdir)/psl1.conf psl1save.conf && echo stamp > $@
psl1save.conf: psl1.conf ntpd
- ./ntpd --configfile $< --saveconfigquit $@+
+ ./ntpd --configfile $(srcdir)/psl1.conf --saveconfigquit $@+
grep -v '^#' $@+ > $@
check-psl2: psl2.conf psl2save.conf
- -diff -u $< psl2save.conf
- cmp $< psl2save.conf && echo stamp > $@
+ -diff -u $(srcdir)/psl2.conf psl2save.conf
+ cmp $(srcdir)/psl2.conf psl2save.conf && echo stamp > $@
psl2save.conf: psl2.conf ntpd
- ./ntpd --configfile $< --saveconfigquit $@+
+ ./ntpd --configfile $(srcdir)/psl2.conf --saveconfigquit $@+
grep -v '^#' $@+ > $@
../libntp/libntpsim.a:
@@ -468,20 +482,20 @@ psl2save.conf: psl2.conf ntpd
../libparse/libparse.a:
cd ../libparse && $(MAKE) $(AM_MAKEFLAGS) check-libparse
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
+ntpd-version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
+ $(AM_V_at)mv -f version.c $@
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+sim-version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdsim
+ $(AM_V_at)@mv -f version.c $@
$(srcdir)/Makefile.am:
@: do-nothing
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/ntpd/Makefile.in b/contrib/ntp/ntpd/Makefile.in
index c533b6d7138f..5b92df6c0906 100644
--- a/contrib/ntp/ntpd/Makefile.in
+++ b/contrib/ntp/ntpd/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -117,7 +117,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -137,6 +136,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -147,6 +147,11 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = complete.conf
CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" \
+ "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = @ARFLAGS@
AM_V_AR = $(am__v_AR_@AM_V@)
@@ -156,10 +161,11 @@ am__v_AR_1 =
libntpd_a_AR = $(AR) $(ARFLAGS)
libntpd_a_LIBADD =
am__objects_1 =
-am_libntpd_a_OBJECTS = cmd_args.$(OBJEXT) ntp_control.$(OBJEXT) \
- ntp_crypto.$(OBJEXT) ntp_filegen.$(OBJEXT) \
- ntp_leapsec.$(OBJEXT) ntp_loopfilter.$(OBJEXT) \
- ntp_monitor.$(OBJEXT) ntp_peer.$(OBJEXT) ntp_proto.$(OBJEXT) \
+am_libntpd_a_OBJECTS = cmd_args.$(OBJEXT) ntp_clockdev.$(OBJEXT) \
+ ntp_control.$(OBJEXT) ntp_crypto.$(OBJEXT) \
+ ntp_filegen.$(OBJEXT) ntp_leapsec.$(OBJEXT) \
+ ntp_loopfilter.$(OBJEXT) ntp_monitor.$(OBJEXT) \
+ ntp_peer.$(OBJEXT) ntp_proto.$(OBJEXT) ntp_ppsdev.$(OBJEXT) \
ntp_refclock.$(OBJEXT) ntp_request.$(OBJEXT) \
ntp_restrict.$(OBJEXT) ntp_signd.$(OBJEXT) ntp_timer.$(OBJEXT) \
ntp_util.$(OBJEXT) rc_cmdlength.$(OBJEXT) \
@@ -185,15 +191,10 @@ am_libntpd_a_OBJECTS = cmd_args.$(OBJEXT) ntp_control.$(OBJEXT) \
refclock_wwvb.$(OBJEXT) refclock_zyfer.$(OBJEXT) \
refclock_tsyncpci.$(OBJEXT) $(am__objects_1)
libntpd_a_OBJECTS = $(am_libntpd_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
- "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
- "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" \
- "$(DESTDIR)$(htmldir)"
-PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
check_y2k_SOURCES = check_y2k.c
check_y2k_OBJECTS = check_y2k.$(OBJEXT)
am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = version.o libntpd.a $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_2 = libntpd.a $(am__DEPENDENCIES_1)
check_y2k_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntp.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@@ -205,22 +206,26 @@ keyword_gen_SOURCES = keyword-gen.c
keyword_gen_OBJECTS = keyword-gen.$(OBJEXT)
keyword_gen_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_ntpd_OBJECTS = ntp_config.$(OBJEXT) ntp_io.$(OBJEXT) \
+am__objects_2 = ntp_config.$(OBJEXT) ntp_io.$(OBJEXT) \
ntp_parser.$(OBJEXT) ntp_scanner.$(OBJEXT) ntpd.$(OBJEXT) \
ntpd-opts.$(OBJEXT) $(am__objects_1)
-ntpd_OBJECTS = $(am_ntpd_OBJECTS)
+am_ntpd_OBJECTS = $(am__objects_2) $(am__objects_1)
+nodist_ntpd_OBJECTS = ntpd-version.$(OBJEXT) $(am__objects_1)
+ntpd_OBJECTS = $(am_ntpd_OBJECTS) $(nodist_ntpd_OBJECTS)
am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
ntpd_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntp.a \
$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
-am__objects_2 = ntpdsim-ntp_config.$(OBJEXT) ntpdsim-ntp_io.$(OBJEXT) \
+am__objects_3 = ntpdsim-ntp_config.$(OBJEXT) ntpdsim-ntp_io.$(OBJEXT) \
ntpdsim-ntp_parser.$(OBJEXT) ntpdsim-ntp_scanner.$(OBJEXT) \
ntpdsim-ntpd.$(OBJEXT) ntpdsim-ntpd-opts.$(OBJEXT) \
$(am__objects_1)
-am_ntpdsim_OBJECTS = $(am__objects_2) ntpdsim-ntp_prio_q.$(OBJEXT) \
+am_ntpdsim_OBJECTS = $(am__objects_3) ntpdsim-ntp_prio_q.$(OBJEXT) \
ntpdsim-ntpsim.$(OBJEXT) $(am__objects_1)
-ntpdsim_OBJECTS = $(am_ntpdsim_OBJECTS)
+nodist_ntpdsim_OBJECTS = ntpdsim-sim-version.$(OBJEXT) \
+ $(am__objects_1)
+ntpdsim_OBJECTS = $(am_ntpdsim_OBJECTS) $(nodist_ntpdsim_OBJECTS)
ntpdsim_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntpsim.a \
$(am__DEPENDENCIES_3)
AM_V_P = $(am__v_P_@AM_V@)
@@ -237,7 +242,50 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/check_y2k.Po ./$(DEPDIR)/cmd_args.Po \
+ ./$(DEPDIR)/keyword-gen.Po ./$(DEPDIR)/ntp_clockdev.Po \
+ ./$(DEPDIR)/ntp_config.Po ./$(DEPDIR)/ntp_control.Po \
+ ./$(DEPDIR)/ntp_crypto.Po ./$(DEPDIR)/ntp_filegen.Po \
+ ./$(DEPDIR)/ntp_io.Po ./$(DEPDIR)/ntp_leapsec.Po \
+ ./$(DEPDIR)/ntp_loopfilter.Po ./$(DEPDIR)/ntp_monitor.Po \
+ ./$(DEPDIR)/ntp_parser.Po ./$(DEPDIR)/ntp_peer.Po \
+ ./$(DEPDIR)/ntp_ppsdev.Po ./$(DEPDIR)/ntp_proto.Po \
+ ./$(DEPDIR)/ntp_refclock.Po ./$(DEPDIR)/ntp_request.Po \
+ ./$(DEPDIR)/ntp_restrict.Po ./$(DEPDIR)/ntp_scanner.Po \
+ ./$(DEPDIR)/ntp_signd.Po ./$(DEPDIR)/ntp_timer.Po \
+ ./$(DEPDIR)/ntp_util.Po ./$(DEPDIR)/ntpd-opts.Po \
+ ./$(DEPDIR)/ntpd-version.Po ./$(DEPDIR)/ntpd.Po \
+ ./$(DEPDIR)/ntpdsim-ntp_config.Po \
+ ./$(DEPDIR)/ntpdsim-ntp_io.Po \
+ ./$(DEPDIR)/ntpdsim-ntp_parser.Po \
+ ./$(DEPDIR)/ntpdsim-ntp_prio_q.Po \
+ ./$(DEPDIR)/ntpdsim-ntp_scanner.Po \
+ ./$(DEPDIR)/ntpdsim-ntpd-opts.Po ./$(DEPDIR)/ntpdsim-ntpd.Po \
+ ./$(DEPDIR)/ntpdsim-ntpsim.Po \
+ ./$(DEPDIR)/ntpdsim-sim-version.Po ./$(DEPDIR)/rc_cmdlength.Po \
+ ./$(DEPDIR)/refclock_acts.Po ./$(DEPDIR)/refclock_arbiter.Po \
+ ./$(DEPDIR)/refclock_arc.Po ./$(DEPDIR)/refclock_as2201.Po \
+ ./$(DEPDIR)/refclock_atom.Po ./$(DEPDIR)/refclock_bancomm.Po \
+ ./$(DEPDIR)/refclock_chronolog.Po ./$(DEPDIR)/refclock_chu.Po \
+ ./$(DEPDIR)/refclock_conf.Po ./$(DEPDIR)/refclock_datum.Po \
+ ./$(DEPDIR)/refclock_dumbclock.Po ./$(DEPDIR)/refclock_fg.Po \
+ ./$(DEPDIR)/refclock_gpsdjson.Po \
+ ./$(DEPDIR)/refclock_gpsvme.Po ./$(DEPDIR)/refclock_heath.Po \
+ ./$(DEPDIR)/refclock_hopfpci.Po \
+ ./$(DEPDIR)/refclock_hopfser.Po ./$(DEPDIR)/refclock_hpgps.Po \
+ ./$(DEPDIR)/refclock_irig.Po ./$(DEPDIR)/refclock_jjy.Po \
+ ./$(DEPDIR)/refclock_jupiter.Po ./$(DEPDIR)/refclock_leitch.Po \
+ ./$(DEPDIR)/refclock_local.Po ./$(DEPDIR)/refclock_mx4200.Po \
+ ./$(DEPDIR)/refclock_neoclock4x.Po \
+ ./$(DEPDIR)/refclock_nmea.Po ./$(DEPDIR)/refclock_oncore.Po \
+ ./$(DEPDIR)/refclock_palisade.Po ./$(DEPDIR)/refclock_parse.Po \
+ ./$(DEPDIR)/refclock_pcf.Po ./$(DEPDIR)/refclock_pst.Po \
+ ./$(DEPDIR)/refclock_ripencc.Po ./$(DEPDIR)/refclock_shm.Po \
+ ./$(DEPDIR)/refclock_tpro.Po ./$(DEPDIR)/refclock_true.Po \
+ ./$(DEPDIR)/refclock_tsyncpci.Po ./$(DEPDIR)/refclock_tt560.Po \
+ ./$(DEPDIR)/refclock_ulink.Po ./$(DEPDIR)/refclock_wwv.Po \
+ ./$(DEPDIR)/refclock_wwvb.Po ./$(DEPDIR)/refclock_zyfer.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -268,7 +316,8 @@ am__v_YACC_0 = @echo " YACC " $@;
am__v_YACC_1 =
YLWRAP = $(top_srcdir)/sntp/libevent/build-aux/ylwrap
SOURCES = $(libntpd_a_SOURCES) check_y2k.c keyword-gen.c \
- $(ntpd_SOURCES) $(ntpdsim_SOURCES)
+ $(ntpd_SOURCES) $(nodist_ntpd_SOURCES) $(ntpdsim_SOURCES) \
+ $(nodist_ntpdsim_SOURCES)
DIST_SOURCES = $(libntpd_a_SOURCES) check_y2k.c keyword-gen.c \
$(ntpd_SOURCES) $(ntpdsim_SOURCES)
am__can_run_installinfo = \
@@ -327,12 +376,10 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/complete.conf.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf \
+ $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-scm-rev.mf \
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
- $(top_srcdir)/sntp/check-libntp.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp \
$(top_srcdir)/sntp/libevent/build-aux/ylwrap ntp_parser.c \
ntp_parser.h
@@ -354,6 +401,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -363,6 +411,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -375,14 +425,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -593,6 +639,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -613,7 +660,7 @@ AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP) \
AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB.
-LDADD = version.o libntpd.a $(LIBPARSE)
+LDADD = libntpd.a $(LIBPARSE)
AM_YFLAGS = -d -t -r all
@NTP_CROSSCOMPILE_FALSE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG = check-saveconfig check-pslsaveconfig
@NTP_CROSSCOMPILE_TRUE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG =
@@ -647,10 +694,6 @@ man1_MANS =
man5_MANS = ntp.conf.5 ntp.keys.5
man8_MANS =
man_MANS = ntpd.$(NTPD_MS)
-
-# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
-# simulator currently uses ntpd-opts.[ch]. This also means there is no
-# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS) \
$(LIBM) $(LDADD_NTP) $(LSCF)
ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
@@ -658,20 +701,14 @@ ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
keyword_gen_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
-DISTCLEANFILES = \
- keyword-gen \
- .version \
- version.c \
- config.log \
- $(man5_MANS) \
- $(man_MANS) \
- $(NULL)
-
+DISTCLEANFILES = keyword-gen config.log $(man5_MANS) $(man_MANS) \
+ $(NULL) $(DEPDIR)/deps-ver
CLEANFILES = check-psl0 check-psl1 check-psl2 check-pslsaveconfig \
check-saveconfig compsave.conf compsave.conf+ k-g-u-submake \
psl0save.conf psl0save.conf+ psl1save.conf psl1save.conf+ \
- psl2save.conf psl2save.conf+ $(EXTRA_PROGRAMS) $(NULL) \
- check-libopts check-libntp .deps-ver
+ psl2save.conf psl2save.conf+ .version version.c ntpd-version.c \
+ sim-version.c $(EXTRA_PROGRAMS) $(NULL) check-libopts \
+ check-libntp .deps-ver
EXTRA_DIST = \
complete.conf.in \
invoke-ntp.conf.menu \
@@ -736,6 +773,7 @@ noinst_DATA = \
noinst_HEADERS = \
declcond.h \
+ ntp_clockdev.h \
ntp_leapsec.h \
$(NULL)
@@ -751,7 +789,9 @@ std_def_list = \
$(top_srcdir)/sntp/include/version.def \
$(NULL)
-ntpd_SOURCES = \
+
+# ntpd_ntpdsim_SRCS use #ifdef SIM and are included in both
+ntpd_ntpdsim_SRCS = \
ntp_config.c \
ntp_keyword.h \
ntp_io.c \
@@ -763,17 +803,30 @@ ntpd_SOURCES = \
ntpd-opts.h \
$(NULL)
+ntpd_SOURCES = \
+ $(ntpd_ntpdsim_SRCS) \
+ $(NULL)
+
+nodist_ntpd_SOURCES = \
+ ntpd-version.c \
+ $(NULL)
+
ntpdsim_SOURCES = \
- $(ntpd_SOURCES) \
+ $(ntpd_ntpdsim_SRCS) \
ntp_prio_q.c \
ntpsim.c \
$(NULL)
+nodist_ntpdsim_SOURCES = \
+ sim-version.c \
+ $(NULL)
+
# libntpd_a_SOURCES do not use #ifdef SIM
libntpd_a_SOURCES = \
cmd_args.c \
jupiter.h \
+ ntp_clockdev.c \
ntp_control.c \
ntp_crypto.c \
ntp_filegen.c \
@@ -782,6 +835,7 @@ libntpd_a_SOURCES = \
ntp_monitor.c \
ntp_peer.c \
ntp_proto.c \
+ ntp_ppsdev.c \
ntp_refclock.c \
ntp_request.c \
ntp_restrict.c \
@@ -834,15 +888,16 @@ libntpd_a_SOURCES = \
refclock_tsyncpci.c \
$(NULL)
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj .y
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -859,10 +914,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -874,14 +929,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
complete.conf: $(top_builddir)/config.status $(srcdir)/complete.conf.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-libntpd.a: $(libntpd_a_OBJECTS) $(libntpd_a_DEPENDENCIES) $(EXTRA_libntpd_a_DEPENDENCIES)
- $(AM_V_at)-rm -f libntpd.a
- $(AM_V_AR)$(libntpd_a_AR) libntpd.a $(libntpd_a_OBJECTS) $(libntpd_a_LIBADD)
- $(AM_V_at)$(RANLIB) libntpd.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -1039,6 +1086,14 @@ clean-sbinPROGRAMS:
echo " rm -f" $$list; \
rm -f $$list
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+libntpd.a: $(libntpd_a_OBJECTS) $(libntpd_a_DEPENDENCIES) $(EXTRA_libntpd_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libntpd.a
+ $(AM_V_AR)$(libntpd_a_AR) libntpd.a $(libntpd_a_OBJECTS) $(libntpd_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libntpd.a
+
check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES) $(EXTRA_check_y2k_DEPENDENCIES)
@rm -f check_y2k$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
@@ -1064,97 +1119,110 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_y2k.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd_args.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyword-gen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_config.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_control.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_filegen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_io.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_leapsec.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_loopfilter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_monitor.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_parser.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_peer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_proto.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_refclock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_request.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_restrict.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_scanner.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_signd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_timer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd-opts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_config.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_io.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_parser.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_prio_q.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_scanner.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpd-opts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpsim.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rc_cmdlength.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_acts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arbiter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_as2201.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_atom.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_bancomm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_chronolog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_chu.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_conf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_datum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_dumbclock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_fg.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_gpsdjson.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_gpsvme.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_heath.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hopfpci.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hopfser.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hpgps.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_irig.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_jjy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_jupiter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_leitch.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_local.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_mx4200.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_neoclock4x.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_nmea.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_oncore.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_palisade.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_parse.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_pcf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_pst.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ripencc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_shm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tpro.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_true.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tsyncpci.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tt560.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ulink.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_wwv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_wwvb.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_zyfer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_y2k.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd_args.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyword-gen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_clockdev.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_config.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_control.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_filegen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_io.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_leapsec.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_loopfilter.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_monitor.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_peer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_ppsdev.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_proto.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_refclock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_request.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_restrict.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_scanner.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_signd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_timer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_util.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd-opts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd-version.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_config.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_io.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_parser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_prio_q.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_scanner.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpd-opts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpsim.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-sim-version.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rc_cmdlength.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_acts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arbiter.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_arc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_as2201.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_atom.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_bancomm.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_chronolog.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_chu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_conf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_datum.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_dumbclock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_fg.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_gpsdjson.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_gpsvme.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_heath.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hopfpci.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hopfser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hpgps.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_irig.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_jjy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_jupiter.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_leitch.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_local.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_mx4200.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_neoclock4x.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_nmea.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_oncore.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_palisade.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_parse.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_pcf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_pst.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ripencc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_shm.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tpro.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_true.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tsyncpci.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tt560.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ulink.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_wwv.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_wwvb.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_zyfer.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -1271,6 +1339,20 @@ ntpdsim-ntpsim.obj: ntpsim.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim.obj `if test -f 'ntpsim.c'; then $(CYGPATH_W) 'ntpsim.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim.c'; fi`
+ntpdsim-sim-version.o: sim-version.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-sim-version.o -MD -MP -MF $(DEPDIR)/ntpdsim-sim-version.Tpo -c -o ntpdsim-sim-version.o `test -f 'sim-version.c' || echo '$(srcdir)/'`sim-version.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-sim-version.Tpo $(DEPDIR)/ntpdsim-sim-version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sim-version.c' object='ntpdsim-sim-version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-sim-version.o `test -f 'sim-version.c' || echo '$(srcdir)/'`sim-version.c
+
+ntpdsim-sim-version.obj: sim-version.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-sim-version.obj -MD -MP -MF $(DEPDIR)/ntpdsim-sim-version.Tpo -c -o ntpdsim-sim-version.obj `if test -f 'sim-version.c'; then $(CYGPATH_W) 'sim-version.c'; else $(CYGPATH_W) '$(srcdir)/sim-version.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-sim-version.Tpo $(DEPDIR)/ntpdsim-sim-version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sim-version.c' object='ntpdsim-sim-version.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-sim-version.obj `if test -f 'sim-version.c'; then $(CYGPATH_W) 'sim-version.c'; else $(CYGPATH_W) '$(srcdir)/sim-version.c'; fi`
+
.y.c:
$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
@@ -1481,8 +1563,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1517,14 +1601,15 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS)
+all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(MANS) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1565,7 +1650,83 @@ clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/check_y2k.Po
+ -rm -f ./$(DEPDIR)/cmd_args.Po
+ -rm -f ./$(DEPDIR)/keyword-gen.Po
+ -rm -f ./$(DEPDIR)/ntp_clockdev.Po
+ -rm -f ./$(DEPDIR)/ntp_config.Po
+ -rm -f ./$(DEPDIR)/ntp_control.Po
+ -rm -f ./$(DEPDIR)/ntp_crypto.Po
+ -rm -f ./$(DEPDIR)/ntp_filegen.Po
+ -rm -f ./$(DEPDIR)/ntp_io.Po
+ -rm -f ./$(DEPDIR)/ntp_leapsec.Po
+ -rm -f ./$(DEPDIR)/ntp_loopfilter.Po
+ -rm -f ./$(DEPDIR)/ntp_monitor.Po
+ -rm -f ./$(DEPDIR)/ntp_parser.Po
+ -rm -f ./$(DEPDIR)/ntp_peer.Po
+ -rm -f ./$(DEPDIR)/ntp_ppsdev.Po
+ -rm -f ./$(DEPDIR)/ntp_proto.Po
+ -rm -f ./$(DEPDIR)/ntp_refclock.Po
+ -rm -f ./$(DEPDIR)/ntp_request.Po
+ -rm -f ./$(DEPDIR)/ntp_restrict.Po
+ -rm -f ./$(DEPDIR)/ntp_scanner.Po
+ -rm -f ./$(DEPDIR)/ntp_signd.Po
+ -rm -f ./$(DEPDIR)/ntp_timer.Po
+ -rm -f ./$(DEPDIR)/ntp_util.Po
+ -rm -f ./$(DEPDIR)/ntpd-opts.Po
+ -rm -f ./$(DEPDIR)/ntpd-version.Po
+ -rm -f ./$(DEPDIR)/ntpd.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_config.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_io.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_parser.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_prio_q.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_scanner.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntpd-opts.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntpd.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntpsim.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-sim-version.Po
+ -rm -f ./$(DEPDIR)/rc_cmdlength.Po
+ -rm -f ./$(DEPDIR)/refclock_acts.Po
+ -rm -f ./$(DEPDIR)/refclock_arbiter.Po
+ -rm -f ./$(DEPDIR)/refclock_arc.Po
+ -rm -f ./$(DEPDIR)/refclock_as2201.Po
+ -rm -f ./$(DEPDIR)/refclock_atom.Po
+ -rm -f ./$(DEPDIR)/refclock_bancomm.Po
+ -rm -f ./$(DEPDIR)/refclock_chronolog.Po
+ -rm -f ./$(DEPDIR)/refclock_chu.Po
+ -rm -f ./$(DEPDIR)/refclock_conf.Po
+ -rm -f ./$(DEPDIR)/refclock_datum.Po
+ -rm -f ./$(DEPDIR)/refclock_dumbclock.Po
+ -rm -f ./$(DEPDIR)/refclock_fg.Po
+ -rm -f ./$(DEPDIR)/refclock_gpsdjson.Po
+ -rm -f ./$(DEPDIR)/refclock_gpsvme.Po
+ -rm -f ./$(DEPDIR)/refclock_heath.Po
+ -rm -f ./$(DEPDIR)/refclock_hopfpci.Po
+ -rm -f ./$(DEPDIR)/refclock_hopfser.Po
+ -rm -f ./$(DEPDIR)/refclock_hpgps.Po
+ -rm -f ./$(DEPDIR)/refclock_irig.Po
+ -rm -f ./$(DEPDIR)/refclock_jjy.Po
+ -rm -f ./$(DEPDIR)/refclock_jupiter.Po
+ -rm -f ./$(DEPDIR)/refclock_leitch.Po
+ -rm -f ./$(DEPDIR)/refclock_local.Po
+ -rm -f ./$(DEPDIR)/refclock_mx4200.Po
+ -rm -f ./$(DEPDIR)/refclock_neoclock4x.Po
+ -rm -f ./$(DEPDIR)/refclock_nmea.Po
+ -rm -f ./$(DEPDIR)/refclock_oncore.Po
+ -rm -f ./$(DEPDIR)/refclock_palisade.Po
+ -rm -f ./$(DEPDIR)/refclock_parse.Po
+ -rm -f ./$(DEPDIR)/refclock_pcf.Po
+ -rm -f ./$(DEPDIR)/refclock_pst.Po
+ -rm -f ./$(DEPDIR)/refclock_ripencc.Po
+ -rm -f ./$(DEPDIR)/refclock_shm.Po
+ -rm -f ./$(DEPDIR)/refclock_tpro.Po
+ -rm -f ./$(DEPDIR)/refclock_true.Po
+ -rm -f ./$(DEPDIR)/refclock_tsyncpci.Po
+ -rm -f ./$(DEPDIR)/refclock_tt560.Po
+ -rm -f ./$(DEPDIR)/refclock_ulink.Po
+ -rm -f ./$(DEPDIR)/refclock_wwv.Po
+ -rm -f ./$(DEPDIR)/refclock_wwvb.Po
+ -rm -f ./$(DEPDIR)/refclock_zyfer.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1613,7 +1774,83 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/check_y2k.Po
+ -rm -f ./$(DEPDIR)/cmd_args.Po
+ -rm -f ./$(DEPDIR)/keyword-gen.Po
+ -rm -f ./$(DEPDIR)/ntp_clockdev.Po
+ -rm -f ./$(DEPDIR)/ntp_config.Po
+ -rm -f ./$(DEPDIR)/ntp_control.Po
+ -rm -f ./$(DEPDIR)/ntp_crypto.Po
+ -rm -f ./$(DEPDIR)/ntp_filegen.Po
+ -rm -f ./$(DEPDIR)/ntp_io.Po
+ -rm -f ./$(DEPDIR)/ntp_leapsec.Po
+ -rm -f ./$(DEPDIR)/ntp_loopfilter.Po
+ -rm -f ./$(DEPDIR)/ntp_monitor.Po
+ -rm -f ./$(DEPDIR)/ntp_parser.Po
+ -rm -f ./$(DEPDIR)/ntp_peer.Po
+ -rm -f ./$(DEPDIR)/ntp_ppsdev.Po
+ -rm -f ./$(DEPDIR)/ntp_proto.Po
+ -rm -f ./$(DEPDIR)/ntp_refclock.Po
+ -rm -f ./$(DEPDIR)/ntp_request.Po
+ -rm -f ./$(DEPDIR)/ntp_restrict.Po
+ -rm -f ./$(DEPDIR)/ntp_scanner.Po
+ -rm -f ./$(DEPDIR)/ntp_signd.Po
+ -rm -f ./$(DEPDIR)/ntp_timer.Po
+ -rm -f ./$(DEPDIR)/ntp_util.Po
+ -rm -f ./$(DEPDIR)/ntpd-opts.Po
+ -rm -f ./$(DEPDIR)/ntpd-version.Po
+ -rm -f ./$(DEPDIR)/ntpd.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_config.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_io.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_parser.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_prio_q.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntp_scanner.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntpd-opts.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntpd.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-ntpsim.Po
+ -rm -f ./$(DEPDIR)/ntpdsim-sim-version.Po
+ -rm -f ./$(DEPDIR)/rc_cmdlength.Po
+ -rm -f ./$(DEPDIR)/refclock_acts.Po
+ -rm -f ./$(DEPDIR)/refclock_arbiter.Po
+ -rm -f ./$(DEPDIR)/refclock_arc.Po
+ -rm -f ./$(DEPDIR)/refclock_as2201.Po
+ -rm -f ./$(DEPDIR)/refclock_atom.Po
+ -rm -f ./$(DEPDIR)/refclock_bancomm.Po
+ -rm -f ./$(DEPDIR)/refclock_chronolog.Po
+ -rm -f ./$(DEPDIR)/refclock_chu.Po
+ -rm -f ./$(DEPDIR)/refclock_conf.Po
+ -rm -f ./$(DEPDIR)/refclock_datum.Po
+ -rm -f ./$(DEPDIR)/refclock_dumbclock.Po
+ -rm -f ./$(DEPDIR)/refclock_fg.Po
+ -rm -f ./$(DEPDIR)/refclock_gpsdjson.Po
+ -rm -f ./$(DEPDIR)/refclock_gpsvme.Po
+ -rm -f ./$(DEPDIR)/refclock_heath.Po
+ -rm -f ./$(DEPDIR)/refclock_hopfpci.Po
+ -rm -f ./$(DEPDIR)/refclock_hopfser.Po
+ -rm -f ./$(DEPDIR)/refclock_hpgps.Po
+ -rm -f ./$(DEPDIR)/refclock_irig.Po
+ -rm -f ./$(DEPDIR)/refclock_jjy.Po
+ -rm -f ./$(DEPDIR)/refclock_jupiter.Po
+ -rm -f ./$(DEPDIR)/refclock_leitch.Po
+ -rm -f ./$(DEPDIR)/refclock_local.Po
+ -rm -f ./$(DEPDIR)/refclock_mx4200.Po
+ -rm -f ./$(DEPDIR)/refclock_neoclock4x.Po
+ -rm -f ./$(DEPDIR)/refclock_nmea.Po
+ -rm -f ./$(DEPDIR)/refclock_oncore.Po
+ -rm -f ./$(DEPDIR)/refclock_palisade.Po
+ -rm -f ./$(DEPDIR)/refclock_parse.Po
+ -rm -f ./$(DEPDIR)/refclock_pcf.Po
+ -rm -f ./$(DEPDIR)/refclock_pst.Po
+ -rm -f ./$(DEPDIR)/refclock_ripencc.Po
+ -rm -f ./$(DEPDIR)/refclock_shm.Po
+ -rm -f ./$(DEPDIR)/refclock_tpro.Po
+ -rm -f ./$(DEPDIR)/refclock_true.Po
+ -rm -f ./$(DEPDIR)/refclock_tsyncpci.Po
+ -rm -f ./$(DEPDIR)/refclock_tt560.Po
+ -rm -f ./$(DEPDIR)/refclock_ulink.Po
+ -rm -f ./$(DEPDIR)/refclock_wwv.Po
+ -rm -f ./$(DEPDIR)/refclock_wwvb.Po
+ -rm -f ./$(DEPDIR)/refclock_zyfer.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1635,36 +1872,36 @@ uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
-.MAKE: all check check-am install install-am install-exec-am \
- install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
- clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libexecPROGRAMS clean-libtool clean-noinstLIBRARIES \
- clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-data-local install-dvi install-dvi-am \
- install-exec install-exec-am install-exec-hook install-html \
- install-html-am install-htmlDATA install-info install-info-am \
- install-libexecPROGRAMS install-man install-man1 install-man5 \
- install-man8 install-pdf install-pdf-am install-ps \
- install-ps-am install-sbinPROGRAMS install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
- uninstall-man1 uninstall-man5 uninstall-man8 \
- uninstall-sbinPROGRAMS
+.MAKE: all check check-am install install-am install-exec \
+ install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \
+ check-local clean clean-binPROGRAMS clean-checkPROGRAMS \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-noinstLIBRARIES clean-sbinPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-hook \
+ install-html install-html-am install-htmlDATA install-info \
+ install-info-am install-libexecPROGRAMS install-man \
+ install-man1 install-man5 install-man8 install-pdf \
+ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \
+ uninstall-man5 uninstall-man8 uninstall-sbinPROGRAMS
.PRECIOUS: Makefile
vphack:
- test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
- test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
+ $(AM_V_at)test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
+ $(AM_V_at)test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
#
# ylwrap script which invokes Bison replaces ntp_parser.h
@@ -1674,7 +1911,7 @@ vphack:
#
vphack_after:
- test -L ntp_parser.h || ( \
+ $(AM_V_at)test -L ntp_parser.h || ( \
mv ntp_parser.h $(srcdir)/ntp_parser.h && \
ln -s $(srcdir)/ntp_parser.h . \
)
@@ -1685,21 +1922,21 @@ check-local: $(MAKE_CHECK_Y2K) $(CHECK_SAVECONFIG)
test -z "$(MAKE_CHECK_Y2K)" || ./$(MAKE_CHECK_Y2K)
k-g-u-submake: keyword-gen
- ./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
- @grep -v diff_ignore_line < k-g.out > cmp1
- @grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
- @cmp cmp1 cmp2 > /dev/null || \
+ $(AM_V_at)./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
+ $(AM_V_at)grep -v diff_ignore_line < k-g.out > cmp1
+ $(AM_V_at)grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
+ $(AM_V_at)cmp cmp1 cmp2 > /dev/null || \
{ mv -f k-g.out $(srcdir)/ntp_keyword.h && \
echo 'Generated changed ntp_keyword.h.' ;}
- @[ ! -f k-g.out ] || \
+ $(AM_V_at)[ ! -f k-g.out ] || \
{ rm k-g.out && echo 'ntp_keyword.h is up to date.' ;}
@rm cmp1 cmp2
@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
$(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
- $(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
- grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
- mv -f k-g-u $@
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
+ $(AM_V_at)grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
+ $(AM_V_at)mv -f k-g-u $@
$(srcdir)/ntp_keyword.h: $(srcdir)/keyword-gen-utd
@: do-nothing action to avoid default SCCS get
@@ -1709,12 +1946,12 @@ $(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) ntpd-opts.def
###
$(srcdir)/ntpd.1ntpdman: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
$(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdman > $(srcdir)/ntpd.man.in+
@@ -1723,7 +1960,7 @@ $(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec
###
$(srcdir)/ntpd.1ntpdmdoc: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
$(srcdir)/ntpd.mdoc.in: $(srcdir)/ntpd.1ntpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdmdoc > $(srcdir)/ntpd.mdoc.in+
@@ -1741,13 +1978,13 @@ $(srcdir)/invoke-ntp.conf.menu: $(srcdir)/invoke-ntp.conf.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp.conf.texi: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
$(srcdir)/invoke-ntp.keys.menu: $(srcdir)/invoke-ntp.keys.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(srcdir)/invoke-ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
@@ -1761,7 +1998,7 @@ $(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(srcdir)/invoke-ntpd.texi $(top_srcdir
###
$(srcdir)/ntp.conf.5man: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
$(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5man > $(srcdir)/ntp.conf.man.in+
@@ -1770,7 +2007,7 @@ $(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/ma
###
$(srcdir)/ntp.conf.5mdoc: $(srcdir)/ntp.conf.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
$(srcdir)/ntp.conf.mdoc.in: $(srcdir)/ntp.conf.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5mdoc > $(srcdir)/ntp.conf.mdoc.in+
@@ -1785,7 +2022,7 @@ ntp.conf.5: $(srcdir)/ntp.conf.$(MANTAGFMT).in $(top_builddir)/config.status
###
$(srcdir)/ntp.keys.5man: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
$(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5man > $(srcdir)/ntp.keys.man.in+
@@ -1794,7 +2031,7 @@ $(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/ma
###
$(srcdir)/ntp.keys.5mdoc: $(srcdir)/ntp.keys.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
$(srcdir)/ntp.keys.mdoc.in: $(srcdir)/ntp.keys.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5mdoc > $(srcdir)/ntp.keys.mdoc.in+
@@ -1812,11 +2049,9 @@ $(srcdir)/invoke-ntpd.menu: $(srcdir)/invoke-ntpd.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpd.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(PROGRAMS): $(LDADD)
-
check-saveconfig: complete.conf compsave.conf
-diff -u complete.conf compsave.conf
cmp complete.conf compsave.conf && echo stamp > $@
@@ -1829,27 +2064,27 @@ check-pslsaveconfig: check-psl0 check-psl1 check-psl2
echo stamp > $@
check-psl0: psl0.conf psl0save.conf
- -diff -u $< psl0save.conf
- cmp $< psl0save.conf && echo stamp > $@
+ -diff -u $(srcdir)/psl0.conf psl0save.conf
+ cmp $(srcdir)/psl0.conf psl0save.conf && echo stamp > $@
psl0save.conf: psl0.conf ntpd
- ./ntpd --configfile $< --saveconfigquit $@+
+ ./ntpd --configfile $(srcdir)/psl0.conf --saveconfigquit $@+
grep -v '^#' $@+ > $@
check-psl1: psl1.conf psl1save.conf
- -diff -u $< psl1save.conf
- cmp $< psl1save.conf && echo stamp > $@
+ -diff -u $(srcdir)/psl1.conf psl1save.conf
+ cmp $(srcdir)/psl1.conf psl1save.conf && echo stamp > $@
psl1save.conf: psl1.conf ntpd
- ./ntpd --configfile $< --saveconfigquit $@+
+ ./ntpd --configfile $(srcdir)/psl1.conf --saveconfigquit $@+
grep -v '^#' $@+ > $@
check-psl2: psl2.conf psl2save.conf
- -diff -u $< psl2save.conf
- cmp $< psl2save.conf && echo stamp > $@
+ -diff -u $(srcdir)/psl2.conf psl2save.conf
+ cmp $(srcdir)/psl2.conf psl2save.conf && echo stamp > $@
psl2save.conf: psl2.conf ntpd
- ./ntpd --configfile $< --saveconfigquit $@+
+ ./ntpd --configfile $(srcdir)/psl2.conf --saveconfigquit $@+
grep -v '^#' $@+ > $@
../libntp/libntpsim.a:
@@ -1858,14 +2093,13 @@ psl2save.conf: psl2.conf ntpd
../libparse/libparse.a:
cd ../libparse && $(MAKE) $(AM_MAKEFLAGS) check-libparse
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
+ntpd-version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
+ $(AM_V_at)mv -f version.c $@
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+sim-version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdsim
+ $(AM_V_at)@mv -f version.c $@
$(srcdir)/Makefile.am:
@: do-nothing
@@ -1890,17 +2124,25 @@ check-libopts: ../sntp/libopts/libopts.la
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1918,7 +2160,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1948,7 +2190,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/ntpd/cmd_args.c b/contrib/ntp/ntpd/cmd_args.c
index adb4a606bb31..aa461cb4dbe6 100644
--- a/contrib/ntp/ntpd/cmd_args.c
+++ b/contrib/ntp/ntpd/cmd_args.c
@@ -71,7 +71,7 @@ getCmdOpts(
}
if (HAVE_OPT( DRIFTFILE ))
- stats_config(STATS_FREQ_FILE, OPT_ARG( DRIFTFILE ), 0);
+ stats_config(STATS_FREQ_FILE, OPT_ARG( DRIFTFILE ), 1);
if (HAVE_OPT( PANICGATE ))
allow_panic = TRUE;
@@ -90,7 +90,7 @@ getCmdOpts(
getauthkeys(OPT_ARG( KEYFILE ));
if (HAVE_OPT( PIDFILE ))
- stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE ), 0);
+ stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE ), 1);
if (HAVE_OPT( QUIT ))
mode_ntpdate = TRUE;
@@ -110,7 +110,7 @@ getCmdOpts(
} while (0);
if (HAVE_OPT( STATSDIR ))
- stats_config(STATS_STATSDIR, OPT_ARG( STATSDIR ), 0);
+ stats_config(STATS_STATSDIR, OPT_ARG( STATSDIR ), 1);
if (HAVE_OPT( TRUSTEDKEY )) {
int ct = STACKCT_OPT( TRUSTEDKEY );
diff --git a/contrib/ntp/ntpd/invoke-ntp.conf.texi b/contrib/ntp/ntpd/invoke-ntp.conf.texi
index b504ce0b047f..ff708155cd4e 100644
--- a/contrib/ntp/ntpd/invoke-ntp.conf.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:20:31 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 02:49:31 PM by AutoGen 5.18.16
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -1456,17 +1456,27 @@ client abuse.
The
@code{average}
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
@code{minimum}
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss-o'-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
@code{monitor}
-subcommand specifies the probability of discard
-for packets that overflow the rate-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+@code{monitor}
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]}
The
@kbd{address}
@@ -2775,7 +2785,7 @@ For the JJY driver (type 40 mode 100 - 180), the argument is
one telephone number used to dial the telephone JJY service.
The Hayes command ATDT is normally prepended to the number.
The number can contain other modem control codes as well.
-@item @code{pollskewlist} @code{[@kbd{poll} @kbd{value} | @kbd{value}]} @kbd{...} @code{[@code{default} @kbd{value} | @kbd{value}]}
+@item @code{pollskewlist} @code{[@kbd{poll} @kbd{early} @kbd{late}]} @kbd{...} @code{[@code{default} @kbd{early} @kbd{late}]}
Enable skewing of our poll requests to our servers.
@kbd{poll}
is a number between 3 and 17 inclusive, identifying a specific poll interval.
@@ -2786,9 +2796,11 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
+Ar early
+specifies how early the poll may start,
while
-the second number specifies how late the poll may be delayed.
+Ar late
+specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.
@item @code{reset} @code{[@code{allpeers}]} @code{[@code{auth}]} @code{[@code{ctl}]} @code{[@code{io}]} @code{[@code{mem}]} @code{[@code{sys}]} @code{[@code{timer}]}
Reset one or more groups of counters maintained by
diff --git a/contrib/ntp/ntpd/invoke-ntp.keys.texi b/contrib/ntp/ntpd/invoke-ntp.keys.texi
index fcaa19499102..52dee572b434 100644
--- a/contrib/ntp/ntpd/invoke-ntp.keys.texi
+++ b/contrib/ntp/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:20:33 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 02:49:34 PM by AutoGen 5.18.16
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/contrib/ntp/ntpd/invoke-ntpd.texi b/contrib/ntp/ntpd/invoke-ntpd.texi
index 3438285956e5..fbce35dd8d26 100644
--- a/contrib/ntp/ntpd/invoke-ntpd.texi
+++ b/contrib/ntp/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:20:35 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 02:49:36 PM by AutoGen 5.18.16
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -142,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.8p15
+ntpd - NTP daemon program - Ver. 4.2.8p16
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
@@ -210,7 +210,7 @@ hyphen and the flag character.
The following option preset mechanisms are supported:
- examining environment variables named NTPD_*
-Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+Please send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4
@@ -685,7 +685,7 @@ The command line options relating to configuration and/or usage help are:
Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
@table @samp
diff --git a/contrib/ntp/ntpd/keyword-gen-utd b/contrib/ntp/ntpd/keyword-gen-utd
index 6a74fdf21983..0eb94005b839 100644
--- a/contrib/ntp/ntpd/keyword-gen-utd
+++ b/contrib/ntp/ntpd/keyword-gen-utd
@@ -1 +1 @@
- * Generated 2020-02-13 08:56:28 UTC diff_ignore_line
+ * Generated 2022-03-27 14:17:11 UTC diff_ignore_line
diff --git a/contrib/ntp/ntpd/keyword-gen.c b/contrib/ntp/ntpd/keyword-gen.c
index fbc6423d33e3..104d95e8b3e1 100644
--- a/contrib/ntp/ntpd/keyword-gen.c
+++ b/contrib/ntp/ntpd/keyword-gen.c
@@ -45,6 +45,7 @@ struct key_tok ntp_keywords[] = {
{ "broadcastdelay", T_Broadcastdelay, FOLLBY_TOKEN },
{ "checkhash", T_Checkhash, FOLLBY_TOKEN },
{ "ctl", T_Ctl, FOLLBY_TOKEN },
+{ "device", T_Device, FOLLBY_STRING },
{ "disable", T_Disable, FOLLBY_TOKEN },
{ "driftfile", T_Driftfile, FOLLBY_STRING },
{ "dscp", T_Dscp, FOLLBY_TOKEN },
@@ -207,6 +208,9 @@ struct key_tok ntp_keywords[] = {
{ "time1", T_Time1, FOLLBY_TOKEN },
{ "time2", T_Time2, FOLLBY_TOKEN },
{ "minjitter", T_Minjitter, FOLLBY_TOKEN },
+/* device spec */
+{ "ppsdata", T_PpsData, FOLLBY_STRING },
+{ "timedata", T_TimeData, FOLLBY_STRING },
/* system_option */
{ "auth", T_Auth, FOLLBY_TOKEN },
{ "bclient", T_Bclient, FOLLBY_TOKEN },
diff --git a/contrib/ntp/ntpd/ntp.conf.5man b/contrib/ntp/ntpd/ntp.conf.5man
index a3649f052106..80b742f7d624 100644
--- a/contrib/ntp/ntpd/ntp.conf.5man
+++ b/contrib/ntp/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "23 Jun 2020" "4.2.8p15" "File Formats"
+.TH ntp.conf 5man "31 May 2023" "4.2.8p16" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:36 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:38 PM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1657,17 +1657,27 @@ client abuse.
The
\f\*[B-Font]average\f[]
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
\f\*[B-Font]minimum\f[]
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss-o'-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
\f\*[B-Font]monitor\f[]
-subcommand specifies the probability of discard
-for packets that overflow the rate-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+\f\*[B-Font]monitor\f[]
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
.TP 7
.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
@@ -3101,7 +3111,7 @@ one telephone number used to dial the telephone JJY service.
The Hayes command ATDT is normally prepended to the number.
The number can contain other modem control codes as well.
.TP 7
-.NOP \f\*[B-Font]pollskewlist\f[] [\f\*[I-Font]poll\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]] \f\*[I-Font]...\f[] [\f\*[B-Font]default\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]]
+.NOP \f\*[B-Font]pollskewlist\f[] [\f\*[I-Font]poll\f[] \f\*[I-Font]early\f[] \f\*[I-Font]late\f[]] \f\*[I-Font]...\f[] [\f\*[B-Font]default\f[] \f\*[I-Font]early\f[] \f\*[I-Font]late\f[]]
Enable skewing of our poll requests to our servers.
\f\*[I-Font]poll\f[]
is a number between 3 and 17 inclusive, identifying a specific poll interval.
@@ -3112,9 +3122,11 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
+Ar early
+specifies how early the poll may start,
while
-the second number specifies how late the poll may be delayed.
+Ar late
+specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.
.TP 7
.NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
@@ -3449,7 +3461,7 @@ RFC5905
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
@@ -3467,7 +3479,7 @@ services when they become universally available.
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
This document was derived from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/ntpd/ntp.conf.5mdoc b/contrib/ntp/ntpd/ntp.conf.5mdoc
index c833cf008bad..bc6f31c73c24 100644
--- a/contrib/ntp/ntpd/ntp.conf.5mdoc
+++ b/contrib/ntp/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:27 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:25 PM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1525,17 +1525,27 @@ client abuse.
The
.Cm average
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
.Cm minimum
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss\-o'\-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
.Ic monitor
-subcommand specifies the probability of discard
-for packets that overflow the rate\-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+.Ic monitor
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
.It Xo Ic restrict address
.Op Cm mask Ar mask
.Op Cm ippeerlimit Ar int
@@ -2932,12 +2942,12 @@ The number can contain other modem control codes as well.
.It Xo Cm pollskewlist
.Oo
.Ar poll
-.Ar value | value
+.Ar early late
.Oc
.Ar ...
.Oo
.Cm default
-.Ar value | value
+.Ar early late
.Oc
.Xc
Enable skewing of our poll requests to our servers.
@@ -2950,9 +2960,11 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one\-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
+Ar early
+specifies how early the poll may start,
while
-the second number specifies how late the poll may be delayed.
+Ar late
+specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.
.It Xo Ic reset
.Oo
@@ -3290,7 +3302,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
@@ -3304,7 +3316,7 @@ certificates.
These should be obtained via secure directory
services when they become universally available.
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
This document was derived from FreeBSD.
.Pp
diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def
index c1e472276fbe..03dd8b808099 100644
--- a/contrib/ntp/ntpd/ntp.conf.def
+++ b/contrib/ntp/ntpd/ntp.conf.def
@@ -1528,17 +1528,27 @@ client abuse.
The
.Cm average
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
.Cm minimum
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss-o'-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
.Ic monitor
-subcommand specifies the probability of discard
-for packets that overflow the rate-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+.Ic monitor
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
.It Xo Ic restrict address
.Op Cm mask Ar mask
.Op Cm ippeerlimit Ar int
@@ -2935,12 +2945,12 @@ The number can contain other modem control codes as well.
.It Xo Cm pollskewlist
.Oo
.Ar poll
-.Ar value | value
+.Ar early late
.Oc
.Ar ...
.Oo
.Cm default
-.Ar value | value
+.Ar early late
.Oc
.Xc
Enable skewing of our poll requests to our servers.
@@ -2953,9 +2963,11 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
+Ar early
+specifies how early the poll may start,
while
-the second number specifies how late the poll may be delayed.
+Ar late
+specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.
.It Xo Ic reset
.Oo
diff --git a/contrib/ntp/ntpd/ntp.conf.html b/contrib/ntp/ntpd/ntp.conf.html
index 686ec9981104..bda4b750d4f5 100644
--- a/contrib/ntp/ntpd/ntp.conf.html
+++ b/contrib/ntp/ntpd/ntp.conf.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>NTP Configuration File User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,63 +41,57 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#ntp_002econf-Description" accesskey="n" rel="next">ntp.conf Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="NTP_0027s-Configuration-File-User-Manual"></a>
-<h1 class="top">NTP&rsquo;s Configuration File User Manual</h1>
+<span id="NTP_0027s-Configuration-File-User-Manual"></span><h1 class="top">NTP&rsquo;s Configuration File User Manual</h1>
<p>This document describes the configuration file for the NTP Project&rsquo;s
<code>ntpd</code> program.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntp.conf</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntp.conf</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Description" accesskey="1">ntp.conf Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Description" accesskey="1">ntp.conf Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="2">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="2">ntp.conf Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntp_002econf-Description"></a>
-<div class="header">
+<span id="ntp_002econf-Description"></span><div class="header">
<p>
Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description"></span><h2 class="chapter">1 Description</h2>
<p>The behavior of <code>ntpd</code> can be changed by a configuration file,
by default <code>ntp.conf</code>.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="1">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="1">Notes about ntp.conf</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntp_002econf-Notes"></a>
-<div class="header">
+<span id="ntp_002econf-Notes"></span><div class="header">
<p>
Previous: <a href="#ntp_002econf-Bugs" accesskey="p" rel="prev">ntp.conf Bugs</a>, Up: <a href="#ntp_002econf-Description" accesskey="u" rel="up">ntp.conf Description</a> &nbsp; </p>
</div>
-<a name="Notes-about-ntp_002econf"></a>
-<h3 class="section">1.1 Notes about ntp.conf</h3>
-<a name="index-ntp_002econf"></a>
-<a name="index-Network-Time-Protocol-_0028NTP_0029-daemon-configuration-file-format"></a>
+<span id="Notes-about-ntp_002econf"></span><h3 class="section">1.1 Notes about ntp.conf</h3>
+<span id="index-ntp_002econf"></span>
+<span id="index-Network-Time-Protocol-_0028NTP_0029-daemon-configuration-file-format"></span>
@@ -173,38 +158,36 @@ or
<code>manycastclient</code>
commands.
</p><table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#Configuration-Support" accesskey="1">Configuration Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Configuration-Support" accesskey="1">Configuration Support</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Authentication-Support" accesskey="2">Authentication Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Authentication-Support" accesskey="2">Authentication Support</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Monitoring-Support" accesskey="3">Monitoring Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Monitoring-Support" accesskey="3">Monitoring Support</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Access-Control-Support" accesskey="4">Access Control Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Access-Control-Support" accesskey="4">Access Control Support</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Automatic-NTP-Configuration-Options" accesskey="5">Automatic NTP Configuration Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Automatic-NTP-Configuration-Options" accesskey="5">Automatic NTP Configuration Options</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Reference-Clock-Support" accesskey="6">Reference Clock Support</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Reference-Clock-Support" accesskey="6">Reference Clock Support</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Miscellaneous-Options" accesskey="7">Miscellaneous Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Miscellaneous-Options" accesskey="7">Miscellaneous Options</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="8">ntp.conf Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="8">ntp.conf Files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="9">ntp.conf See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="9">ntp.conf See Also</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs">ntp.conf Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs">ntp.conf Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; :</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; ntp.conf Notes</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="Configuration-Support"></a>
-<div class="header">
+<span id="Configuration-Support"></span><div class="header">
<p>
Next: <a href="#Authentication-Support" accesskey="n" rel="next">Authentication Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="Configuration-Support-1"></a>
-<h4 class="subsection">1.1.1 Configuration Support</h4>
+<span id="Configuration-Support-1"></span><h4 class="subsection">1.1.1 Configuration Support</h4>
<p>Following is a description of the configuration commands in
NTPv4.
These commands have the same basic functions as in NTPv3 and
@@ -214,8 +197,7 @@ classes of commands, configuration commands that configure a
persistent association with a remote server or peer or reference
clock, and auxiliary commands that specify environmental variables
that control various related operations.
-</p><a name="Configuration-Commands"></a>
-<h4 class="subsubsection">1.1.1.1 Configuration Commands</h4>
+</p><span id="Configuration-Commands"></span><h4 class="subsubsection">1.1.1.1 Configuration Commands</h4>
<p>The various modes are determined by the command keyword and the
type of the required IP address.
Addresses are classed by type as
@@ -496,8 +478,7 @@ modes, this flag puts a random number in the packet&rsquo;s transmit timestamp.
</p>
</dd>
</dl>
-<a name="Auxiliary-Commands"></a>
-<h4 class="subsubsection">1.1.1.2 Auxiliary Commands</h4>
+<span id="Auxiliary-Commands"></span><h4 class="subsubsection">1.1.1.2 Auxiliary Commands</h4>
<dl compact="compact">
<dt><code>broadcastclient</code></dt>
<dd><p>This command enables reception of broadcast server messages to
@@ -558,13 +539,11 @@ is 5.
</p></dd>
</dl>
<hr>
-<a name="Authentication-Support"></a>
-<div class="header">
+<span id="Authentication-Support"></span><div class="header">
<p>
Next: <a href="#Monitoring-Support" accesskey="n" rel="next">Monitoring Support</a>, Previous: <a href="#Configuration-Support" accesskey="p" rel="prev">Configuration Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="Authentication-Support-1"></a>
-<h4 class="subsection">1.1.2 Authentication Support</h4>
+<span id="Authentication-Support-1"></span><h4 class="subsection">1.1.2 Authentication Support</h4>
<p>Authentication support allows the NTP client to verify that the
server is in fact known and trusted and not an intruder intending
accidentally or on purpose to masquerade as that server.
@@ -698,8 +677,7 @@ cryptography are summarized below;
further details are in the briefings, papers
and reports at the NTP project page linked from
<code>http://www.ntp.org/</code>.
-</p><a name="Symmetric_002dKey-Cryptography"></a>
-<h4 class="subsubsection">1.1.2.1 Symmetric-Key Cryptography</h4>
+</p><span id="Symmetric_002dKey-Cryptography"></span><h4 class="subsubsection">1.1.2.1 Symmetric-Key Cryptography</h4>
<p>The original RFC-1305 specification allows any one of possibly
65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
@@ -747,8 +725,7 @@ utility, while the
command selects the key used as the password for the
<code>ntpq(1ntpqmdoc)</code>
utility.
-</p><a name="Public-Key-Cryptography"></a>
-<h4 class="subsubsection">1.1.2.2 Public Key Cryptography</h4>
+</p><span id="Public-Key-Cryptography"></span><h4 class="subsubsection">1.1.2.2 Public Key Cryptography</h4>
<p>NTPv4 supports the original NTPv3 symmetric key scheme
described in RFC-1305 and in addition the Autokey protocol,
which is based on public key cryptography.
@@ -809,8 +786,7 @@ This requires the configuration file in all hosts to be
engineered so that, even under anticipated failure conditions,
the NTP subnet will form such that every group host can find
a trail to at least one trusted host.
-</p><a name="Naming-and-Addressing"></a>
-<h4 class="subsubsection">1.1.2.3 Naming and Addressing</h4>
+</p><span id="Naming-and-Addressing"></span><h4 class="subsubsection">1.1.2.3 Naming and Addressing</h4>
<p>It is important to note that Autokey does not use DNS to
resolve addresses, since DNS can&rsquo;t be completely trusted
until the name servers have synchronized clocks.
@@ -842,8 +818,7 @@ For this reason operation
with network address translation schemes is not possible.
This reflects the intended robust security model where government
and corporate NTP servers are operated outside firewall perimeters.
-</p><a name="Operation"></a>
-<h4 class="subsubsection">1.1.2.4 Operation</h4>
+</p><span id="Operation"></span><h4 class="subsubsection">1.1.2.4 Operation</h4>
<p>A specific combination of authentication scheme (none,
symmetric key, public key) and identity scheme is called
a cryptotype, although not all combinations are compatible.
@@ -932,8 +907,7 @@ servers (or the same server, although that might not be useful).
But, wise security policy might preclude some cryptotype
combinations; for instance, running an identity scheme
with one server and no authentication with another might not be wise.
-</p><a name="Key-Management"></a>
-<h4 class="subsubsection">1.1.2.5 Key Management</h4>
+</p><span id="Key-Management"></span><h4 class="subsubsection">1.1.2.5 Key Management</h4>
<p>The cryptographic values used by the Autokey protocol are
incorporated as a set of files generated by the
<code>ntp-keygen(1ntpkeygenmdoc)</code>
@@ -968,8 +942,7 @@ however, an extended key usage field for a trusted host must
contain the value
<code>trustRoot</code>;.
Other extension fields are ignored.
-</p><a name="Authentication-Commands"></a>
-<h4 class="subsubsection">1.1.2.6 Authentication Commands</h4>
+</p><span id="Authentication-Commands"></span><h4 class="subsubsection">1.1.2.6 Authentication Commands</h4>
<dl compact="compact">
<dt><code>autokey</code> <code>[<kbd>logsec</kbd>]</code></dt>
<dd><p>Specifies the interval between regenerations of the session key
@@ -1129,8 +1102,7 @@ arguments are 32-bit unsigned
integers with values from 1 to 65,535.
</p></dd>
</dl>
-<a name="Error-Codes"></a>
-<h4 class="subsubsection">1.1.2.7 Error Codes</h4>
+<span id="Error-Codes"></span><h4 class="subsubsection">1.1.2.7 Error Codes</h4>
<p>The following error codes are reported via the NTP control
and monitoring protocol trap mechanism.
</p><dl compact="compact">
@@ -1197,13 +1169,11 @@ The identity key is missing, corrupt or bogus.
</p></dd>
</dl>
<hr>
-<a name="Monitoring-Support"></a>
-<div class="header">
+<span id="Monitoring-Support"></span><div class="header">
<p>
Next: <a href="#Access-Control-Support" accesskey="n" rel="next">Access Control Support</a>, Previous: <a href="#Authentication-Support" accesskey="p" rel="prev">Authentication Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="Monitoring-Support-1"></a>
-<h4 class="subsection">1.1.3 Monitoring Support</h4>
+<span id="Monitoring-Support-1"></span><h4 class="subsection">1.1.3 Monitoring Support</h4>
<p><code>ntpd(1ntpdmdoc)</code>
includes a comprehensive monitoring facility suitable
for continuous, long term recording of server and client
@@ -1223,8 +1193,7 @@ these facilities and
<code>cron(8)</code>
jobs, the data can be
automatically summarized and archived for retrospective analysis.
-</p><a name="Monitoring-Commands"></a>
-<h4 class="subsubsection">1.1.3.1 Monitoring Commands</h4>
+</p><span id="Monitoring-Commands"></span><h4 class="subsubsection">1.1.3.1 Monitoring Commands</h4>
<dl compact="compact">
<dt><code>statistics</code> <kbd>name</kbd> <kbd>...</kbd></dt>
<dd><p>Enables writing of statistics records.
@@ -1581,13 +1550,11 @@ allows the current file to be accessed by a constant name.
</dd>
</dl>
<hr>
-<a name="Access-Control-Support"></a>
-<div class="header">
+<span id="Access-Control-Support"></span><div class="header">
<p>
Next: <a href="#Automatic-NTP-Configuration-Options" accesskey="n" rel="next">Automatic NTP Configuration Options</a>, Previous: <a href="#Monitoring-Support" accesskey="p" rel="prev">Monitoring Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="Access-Control-Support-1"></a>
-<h4 class="subsection">1.1.4 Access Control Support</h4>
+<span id="Access-Control-Support-1"></span><h4 class="subsection">1.1.4 Access Control Support</h4>
<p>The
<code>ntpd(1ntpdmdoc)</code>
daemon implements a general purpose address/mask based restriction
@@ -1636,8 +1603,7 @@ an indefinite period.
When a client or network is denied access
for an indefinite period, the only way at present to remove
the restrictions is by restarting the server.
-</p><a name="The-Kiss_002dof_002dDeath-Packet"></a>
-<h4 class="subsubsection">1.1.4.1 The Kiss-of-Death Packet</h4>
+</p><span id="The-Kiss_002dof_002dDeath-Packet"></span><h4 class="subsubsection">1.1.4.1 The Kiss-of-Death Packet</h4>
<p>Ordinarily, packets denied service are simply dropped with no
further action except incrementing statistics counters.
Sometimes a
@@ -1672,8 +1638,7 @@ to restart the protocol at both the client and server.
This
happens automatically at the client when the association times out.
It will happen at the server only if the server operator cooperates.
-</p><a name="Access-Control-Commands"></a>
-<h4 class="subsubsection">1.1.4.2 Access Control Commands</h4>
+</p><span id="Access-Control-Commands"></span><h4 class="subsubsection">1.1.4.2 Access Control Commands</h4>
<dl compact="compact">
<dt><code>discard</code> <code>[<code>average</code> <kbd>avg</kbd>]</code> <code>[<code>minimum</code> <kbd>min</kbd>]</code> <code>[<code>monitor</code> <kbd>prob</kbd>]</code></dt>
<dd><p>Set the parameters of the
@@ -1683,17 +1648,27 @@ client abuse.
The
<code>average</code>
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
<code>minimum</code>
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss-o&rsquo;-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
<code>monitor</code>
-subcommand specifies the probability of discard
-for packets that overflow the rate-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+<code>monitor</code>
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
</p></dd>
<dt><code>restrict</code> <code>address</code> <code>[<code>mask</code> <kbd>mask</kbd>]</code> <code>[<code>ippeerlimit</code> <kbd>int</kbd>]</code> <code>[<kbd>flag</kbd> <kbd>...</kbd>]</code></dt>
<dd><p>The
@@ -1888,15 +1863,12 @@ NTP server is unrestricted).
</p></dd>
</dl>
<hr>
-<a name="Automatic-NTP-Configuration-Options"></a>
-<div class="header">
+<span id="Automatic-NTP-Configuration-Options"></span><div class="header">
<p>
Next: <a href="#Reference-Clock-Support" accesskey="n" rel="next">Reference Clock Support</a>, Previous: <a href="#Access-Control-Support" accesskey="p" rel="prev">Access Control Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="Automatic-NTP-Configuration-Options-1"></a>
-<h4 class="subsection">1.1.5 Automatic NTP Configuration Options</h4>
-<a name="Manycasting"></a>
-<h4 class="subsubsection">1.1.5.1 Manycasting</h4>
+<span id="Automatic-NTP-Configuration-Options-1"></span><h4 class="subsection">1.1.5 Automatic NTP Configuration Options</h4>
+<span id="Manycasting"></span><h4 class="subsubsection">1.1.5.1 Manycasting</h4>
<p>Manycasting is a automatic discovery and configuration paradigm
new to NTPv4.
It is intended as a means for a multicast client
@@ -2176,8 +2148,7 @@ the rascals, sets the clock and then departs.
Servers do not have to be configured in advance and
all clients throughout the network can have the same
configuration file.
-</p><a name="Manycast-Interactions-with-Autokey"></a>
-<h4 class="subsubsection">1.1.5.2 Manycast Interactions with Autokey</h4>
+</p><span id="Manycast-Interactions-with-Autokey"></span><h4 class="subsubsection">1.1.5.2 Manycast Interactions with Autokey</h4>
<p>Each time a manycast client sends a client mode packet
to a multicast group address, all manycast servers
in scope generate a reply including the host name
@@ -2207,8 +2178,7 @@ At the same time, the manycast
scheme starts all over from the beginning and
the expanding ring shrinks to the minimum and increments
from there while collecting all servers in scope.
-</p><a name="Broadcast-Options"></a>
-<h4 class="subsubsection">1.1.5.3 Broadcast Options</h4>
+</p><span id="Broadcast-Options"></span><h4 class="subsubsection">1.1.5.3 Broadcast Options</h4>
<dl compact="compact">
<dt><code>tos</code> <code>[<code>bcpollbstep</code> <kbd>gate</kbd>]</code></dt>
<dd><p>This command provides a way to delay,
@@ -2225,8 +2195,7 @@ This value defaults to 0, but can be changed
to any number of poll intervals between 0 and 4.
</p></dd>
</dl>
-<a name="Manycast-Options"></a>
-<h4 class="subsubsection">1.1.5.4 Manycast Options</h4>
+<span id="Manycast-Options"></span><h4 class="subsubsection">1.1.5.4 Manycast Options</h4>
<dl compact="compact">
<dt><code>tos</code> <code>[<code>ceiling</code> <kbd>ceiling</kbd> | <code>cohort</code> <code>{</code> <code>0</code> | <code>1</code> <code>}</code> | <code>floor</code> <kbd>floor</kbd> | <code>minclock</code> <kbd>minclock</kbd> | <code>minsane</code> <kbd>minsane</kbd>]</code></dt>
<dd><p>This command affects the clock selection and clustering
@@ -2299,13 +2268,11 @@ multiples of 32 starting at 31.
</p></dd>
</dl>
<hr>
-<a name="Reference-Clock-Support"></a>
-<div class="header">
+<span id="Reference-Clock-Support"></span><div class="header">
<p>
Next: <a href="#Miscellaneous-Options" accesskey="n" rel="next">Miscellaneous Options</a>, Previous: <a href="#Automatic-NTP-Configuration-Options" accesskey="p" rel="prev">Automatic NTP Configuration Options</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="Reference-Clock-Support-1"></a>
-<h4 class="subsection">1.1.6 Reference Clock Support</h4>
+<span id="Reference-Clock-Support-1"></span><h4 class="subsection">1.1.6 Reference Clock Support</h4>
<p>The NTP Version 4 daemon supports some three dozen different radio,
satellite and modem reference clocks plus a special pseudo-clock
used for backup or when no other clock source is available.
@@ -2460,8 +2427,7 @@ The
option is used for this purpose.
Except where noted,
these options apply to all clock drivers.
-</p><a name="Reference-Clock-Commands"></a>
-<h4 class="subsubsection">1.1.6.1 Reference Clock Commands</h4>
+</p><span id="Reference-Clock-Commands"></span><h4 class="subsubsection">1.1.6.1 Reference Clock Commands</h4>
<dl compact="compact">
<dt><code>server</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[<code>prefer</code>]</code> <code>[<code>mode</code> <kbd>int</kbd>]</code> <code>[<code>minpoll</code> <kbd>int</kbd>]</code> <code>[<code>maxpoll</code> <kbd>int</kbd>]</code></dt>
<dd><p>This command can be used to configure reference clocks in
@@ -2609,13 +2575,11 @@ command can be found in
</dd>
</dl>
<hr>
-<a name="Miscellaneous-Options"></a>
-<div class="header">
+<span id="Miscellaneous-Options"></span><div class="header">
<p>
Next: <a href="#ntp_002econf-Files" accesskey="n" rel="next">ntp.conf Files</a>, Previous: <a href="#Reference-Clock-Support" accesskey="p" rel="prev">Reference Clock Support</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="Miscellaneous-Options-1"></a>
-<h4 class="subsection">1.1.7 Miscellaneous Options</h4>
+<span id="Miscellaneous-Options-1"></span><h4 class="subsection">1.1.7 Miscellaneous Options</h4>
<dl compact="compact">
<dt><code>broadcastdelay</code> <kbd>seconds</kbd></dt>
<dd><p>The broadcast and multicast modes require a special calibration
@@ -3087,7 +3051,7 @@ one telephone number used to dial the telephone JJY service.
The Hayes command ATDT is normally prepended to the number.
The number can contain other modem control codes as well.
</p></dd>
-<dt><code>pollskewlist</code> <code>[<kbd>poll</kbd> <kbd>value</kbd> | <kbd>value</kbd>]</code> <kbd>...</kbd> <code>[<code>default</code> <kbd>value</kbd> | <kbd>value</kbd>]</code></dt>
+<dt><code>pollskewlist</code> <code>[<kbd>poll</kbd> <kbd>early</kbd> <kbd>late</kbd>]</code> <kbd>...</kbd> <code>[<code>default</code> <kbd>early</kbd> <kbd>late</kbd>]</code></dt>
<dd><p>Enable skewing of our poll requests to our servers.
<kbd>poll</kbd>
is a number between 3 and 17 inclusive, identifying a specific poll interval.
@@ -3098,9 +3062,11 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
+Ar early
+specifies how early the poll may start,
while
-the second number specifies how late the poll may be delayed.
+Ar late
+specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.
</p></dd>
<dt><code>reset</code> <code>[<code>allpeers</code>]</code> <code>[<code>auth</code>]</code> <code>[<code>ctl</code>]</code> <code>[<code>io</code>]</code> <code>[<code>mem</code>]</code> <code>[<code>sys</code>]</code> <code>[<code>timer</code>]</code></dt>
@@ -3357,24 +3323,22 @@ using the <code>agtexi-cmd</code> template and the option descriptions for the <
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="1">ntp.conf Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Files" accesskey="1">ntp.conf Files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="2">ntp.conf See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-See-Also" accesskey="2">ntp.conf See Also</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs" accesskey="3">ntp.conf Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Bugs" accesskey="3">ntp.conf Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="4">ntp.conf Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002econf-Notes" accesskey="4">ntp.conf Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
</td></tr>
</table>
<hr>
-<a name="ntp_002econf-Files"></a>
-<div class="header">
+<span id="ntp_002econf-Files"></span><div class="header">
<p>
Next: <a href="#ntp_002econf-See-Also" accesskey="n" rel="next">ntp.conf See Also</a>, Previous: <a href="#Miscellaneous-Options" accesskey="p" rel="prev">Miscellaneous Options</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="ntp_002econf-Files-1"></a>
-<h4 class="subsection">1.1.8 ntp.conf Files</h4>
+<span id="ntp_002econf-Files-1"></span><h4 class="subsection">1.1.8 ntp.conf Files</h4>
<dl compact="compact">
<dt><samp>/etc/ntp.conf</samp></dt>
<dd><p>the default name of the configuration file
@@ -3393,13 +3357,11 @@ Next: <a href="#ntp_002econf-See-Also" accesskey="n" rel="next">ntp.conf See Als
</p></dd>
</dl>
<hr>
-<a name="ntp_002econf-See-Also"></a>
-<div class="header">
+<span id="ntp_002econf-See-Also"></span><div class="header">
<p>
Next: <a href="#ntp_002econf-Bugs" accesskey="n" rel="next">ntp.conf Bugs</a>, Previous: <a href="#ntp_002econf-Files" accesskey="p" rel="prev">ntp.conf Files</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="ntp_002econf-See-Also-1"></a>
-<h4 class="subsection">1.1.9 ntp.conf See Also</h4>
+<span id="ntp_002econf-See-Also-1"></span><h4 class="subsection">1.1.9 ntp.conf See Also</h4>
<p><code>ntpd(1ntpdmdoc)</code>,
<code>ntpdc(1ntpdcmdoc)</code>,
<code>ntpq(1ntpqmdoc)</code>
@@ -3415,13 +3377,11 @@ A snapshot of this documentation is available in HTML format in
<br>
<p>David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
</p><hr>
-<a name="ntp_002econf-Bugs"></a>
-<div class="header">
+<span id="ntp_002econf-Bugs"></span><div class="header">
<p>
Previous: <a href="#ntp_002econf-See-Also" accesskey="p" rel="prev">ntp.conf See Also</a>, Up: <a href="#ntp_002econf-Notes" accesskey="u" rel="up">ntp.conf Notes</a> &nbsp; </p>
</div>
-<a name="ntp_002econf-Bugs-1"></a>
-<h4 class="subsection">1.1.10 ntp.conf Bugs</h4>
+<span id="ntp_002econf-Bugs-1"></span><h4 class="subsection">1.1.10 ntp.conf Bugs</h4>
<p>The syntax checking is not picky; some combinations of
ridiculous and even hilarious options and modes may not be
detected.
@@ -3437,8 +3397,7 @@ services when they become universally available.
<p>
&nbsp; </p>
</div>
-<a name="ntp_002econf-Notes-1"></a>
-<h4 class="subsection">1.1.11 ntp.conf Notes</h4>
+<span id="ntp_002econf-Notes-1"></span><h4 class="subsection">1.1.11 ntp.conf Notes</h4>
<p>This document was derived from FreeBSD.
</p><hr>
diff --git a/contrib/ntp/ntpd/ntp.conf.man.in b/contrib/ntp/ntpd/ntp.conf.man.in
index ba4cff523831..10544a131eaa 100644
--- a/contrib/ntp/ntpd/ntp.conf.man.in
+++ b/contrib/ntp/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "23 Jun 2020" "4.2.8p15" "File Formats"
+.TH ntp.conf 5 "31 May 2023" "4.2.8p16" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:36 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:38 PM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1657,17 +1657,27 @@ client abuse.
The
\f\*[B-Font]average\f[]
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
\f\*[B-Font]minimum\f[]
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss-o'-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
\f\*[B-Font]monitor\f[]
-subcommand specifies the probability of discard
-for packets that overflow the rate-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+\f\*[B-Font]monitor\f[]
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
.TP 7
.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
@@ -3101,7 +3111,7 @@ one telephone number used to dial the telephone JJY service.
The Hayes command ATDT is normally prepended to the number.
The number can contain other modem control codes as well.
.TP 7
-.NOP \f\*[B-Font]pollskewlist\f[] [\f\*[I-Font]poll\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]] \f\*[I-Font]...\f[] [\f\*[B-Font]default\f[] \f\*[I-Font]value\f[] | \f\*[I-Font]value\f[]]
+.NOP \f\*[B-Font]pollskewlist\f[] [\f\*[I-Font]poll\f[] \f\*[I-Font]early\f[] \f\*[I-Font]late\f[]] \f\*[I-Font]...\f[] [\f\*[B-Font]default\f[] \f\*[I-Font]early\f[] \f\*[I-Font]late\f[]]
Enable skewing of our poll requests to our servers.
\f\*[I-Font]poll\f[]
is a number between 3 and 17 inclusive, identifying a specific poll interval.
@@ -3112,9 +3122,11 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
+Ar early
+specifies how early the poll may start,
while
-the second number specifies how late the poll may be delayed.
+Ar late
+specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.
.TP 7
.NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
@@ -3449,7 +3461,7 @@ RFC5905
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
@@ -3467,7 +3479,7 @@ services when they become universally available.
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
This document was derived from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/ntpd/ntp.conf.mdoc.in b/contrib/ntp/ntpd/ntp.conf.mdoc.in
index 973e52823e30..338fb4b30977 100644
--- a/contrib/ntp/ntpd/ntp.conf.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:27 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:25 PM by AutoGen 5.18.16
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1525,17 +1525,27 @@ client abuse.
The
.Cm average
subcommand specifies the minimum average packet
-spacing, while the
+spacing in log2 seconds, defaulting to 3 (8s), while the
.Cm minimum
-subcommand specifies the minimum packet spacing.
+subcommand specifies the minimum packet spacing
+in seconds, defaulting to 2.
Packets that violate these minima are discarded
and a kiss\-o'\-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
The
.Ic monitor
-subcommand specifies the probability of discard
-for packets that overflow the rate\-control window.
+subcommand indirectly specifies the probability of
+replacing the oldest entry from the monitor (MRU)
+list of recent requests used to enforce rate controls,
+when that list is at its maximum size. The probability
+of replacing the oldest entry is the age of that entry
+in seconds divided by the
+.Ic monitor
+value, default 3000. For example, if the oldest entry
+in the MRU list represents a request 300 seconds ago,
+by default the probability of replacing it with an
+entry representing the client request being processed
+now is 10%. Conversely, if the oldest entry is more
+than 3000 seconds old, the probability is 100%.
.It Xo Ic restrict address
.Op Cm mask Ar mask
.Op Cm ippeerlimit Ar int
@@ -2932,12 +2942,12 @@ The number can contain other modem control codes as well.
.It Xo Cm pollskewlist
.Oo
.Ar poll
-.Ar value | value
+.Ar early late
.Oc
.Ar ...
.Oo
.Cm default
-.Ar value | value
+.Ar early late
.Oc
.Xc
Enable skewing of our poll requests to our servers.
@@ -2950,9 +2960,11 @@ a poll interval of 17 corresponds to
131,072 seconds, or about a day and a half.
The next two numbers must be between 0 and one\-half of the poll interval,
inclusive.
-The first number specifies how early the poll may start,
+Ar early
+specifies how early the poll may start,
while
-the second number specifies how late the poll may be delayed.
+Ar late
+specifies how late the poll may be delayed.
With no arguments, internally specified default values are chosen.
.It Xo Ic reset
.Oo
@@ -3290,7 +3302,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
@@ -3304,7 +3316,7 @@ certificates.
These should be obtained via secure directory
services when they become universally available.
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
This document was derived from FreeBSD.
.Pp
diff --git a/contrib/ntp/ntpd/ntp.keys.5man b/contrib/ntp/ntpd/ntp.keys.5man
index 1470ee73a25e..57086242537c 100644
--- a/contrib/ntp/ntpd/ntp.keys.5man
+++ b/contrib/ntp/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "23 Jun 2020" "4.2.8p15" "File Formats"
+.TH ntp.keys 5man "31 May 2023" "4.2.8p16" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:38 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:41 PM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -176,10 +176,10 @@ the default name of the configuration file
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
This document was derived from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/ntpd/ntp.keys.5mdoc b/contrib/ntp/ntpd/ntp.keys.5mdoc
index cec0a573aeb0..3d8fe0d54070 100644
--- a/contrib/ntp/ntpd/ntp.keys.5mdoc
+++ b/contrib/ntp/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_KEYS 5mdoc File Formats
-.Os FreeBSD 11.2-RELEASE_SI
+.Os FreeBSD 12.1-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:28 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:28 PM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -163,10 +163,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
This document was derived from FreeBSD.
.Pp
diff --git a/contrib/ntp/ntpd/ntp.keys.html b/contrib/ntp/ntpd/ntp.keys.html
index afe07283b87f..43e3c2565200 100644
--- a/contrib/ntp/ntpd/ntp.keys.html
+++ b/contrib/ntp/ntpd/ntp.keys.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>NTP Symmetric Key</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,63 +41,57 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#ntp_002ekeys-Description" accesskey="n" rel="next">ntp.keys Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="NTP_0027s-Symmetric-Key-File-User-Manual"></a>
-<h1 class="top">NTP&rsquo;s Symmetric Key File User Manual</h1>
+<span id="NTP_0027s-Symmetric-Key-File-User-Manual"></span><h1 class="top">NTP&rsquo;s Symmetric Key File User Manual</h1>
<p>This document describes the symmetric key file for the NTP Project&rsquo;s
<code>ntpd</code> program.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntp.keys</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntp.keys</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Description" accesskey="1">ntp.keys Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Description" accesskey="1">ntp.keys Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="2">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="2">ntp.keys Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntp_002ekeys-Description"></a>
-<div class="header">
+<span id="ntp_002ekeys-Description"></span><div class="header">
<p>
Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description"></span><h2 class="chapter">1 Description</h2>
<p>The name and location of the symmetric key file for <code>ntpd</code> can
be specified in a configuration file, by default <code>/etc/ntp.keys</code>.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="1">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="1">Notes about ntp.keys</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntp_002ekeys-Notes"></a>
-<div class="header">
+<span id="ntp_002ekeys-Notes"></span><div class="header">
<p>
Previous: <a href="#ntp_002ekeys-See-Also" accesskey="p" rel="prev">ntp.keys See Also</a>, Up: <a href="#ntp_002ekeys-Description" accesskey="u" rel="up">ntp.keys Description</a> &nbsp; </p>
</div>
-<a name="Notes-about-ntp_002ekeys"></a>
-<h3 class="section">1.1 Notes about ntp.keys</h3>
-<a name="index-ntp_002ekeys"></a>
-<a name="index-NTP-symmetric-key-file-format"></a>
+<span id="Notes-about-ntp_002ekeys"></span><h3 class="section">1.1 Notes about ntp.keys</h3>
+<span id="index-ntp_002ekeys"></span>
+<span id="index-NTP-symmetric-key-file-format"></span>
@@ -217,35 +202,31 @@ using the <code>agtexi-cmd</code> template and the option descriptions for the <
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Files" accesskey="1">ntp.keys Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Files" accesskey="1">ntp.keys Files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-See-Also" accesskey="2">ntp.keys See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-See-Also" accesskey="2">ntp.keys See Also</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="3">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="3">ntp.keys Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
</td></tr>
</table>
<hr>
-<a name="ntp_002ekeys-Files"></a>
-<div class="header">
+<span id="ntp_002ekeys-Files"></span><div class="header">
<p>
Next: <a href="#ntp_002ekeys-See-Also" accesskey="n" rel="next">ntp.keys See Also</a>, Up: <a href="#ntp_002ekeys-Notes" accesskey="u" rel="up">ntp.keys Notes</a> &nbsp; </p>
</div>
-<a name="ntp_002ekeys-Files-1"></a>
-<h4 class="subsection">1.1.1 ntp.keys Files</h4>
+<span id="ntp_002ekeys-Files-1"></span><h4 class="subsection">1.1.1 ntp.keys Files</h4>
<dl compact="compact">
<dt><samp>/etc/ntp.keys</samp></dt>
<dd><p>the default name of the configuration file
</p></dd>
</dl>
<hr>
-<a name="ntp_002ekeys-See-Also"></a>
-<div class="header">
+<span id="ntp_002ekeys-See-Also"></span><div class="header">
<p>
Previous: <a href="#ntp_002ekeys-Files" accesskey="p" rel="prev">ntp.keys Files</a>, Up: <a href="#ntp_002ekeys-Notes" accesskey="u" rel="up">ntp.keys Notes</a> &nbsp; </p>
</div>
-<a name="ntp_002ekeys-See-Also-1"></a>
-<h4 class="subsection">1.1.2 ntp.keys See Also</h4>
+<span id="ntp_002ekeys-See-Also-1"></span><h4 class="subsection">1.1.2 ntp.keys See Also</h4>
<p><code>ntp.conf(5)</code>,
<code>ntpd(1ntpdmdoc)</code>,
<code>ntpdate(1ntpdatemdoc)</code>,
@@ -256,8 +237,7 @@ Previous: <a href="#ntp_002ekeys-Files" accesskey="p" rel="prev">ntp.keys Files<
<p>
&nbsp; </p>
</div>
-<a name="ntp_002ekeys-Notes-1"></a>
-<h4 class="subsection">1.1.3 ntp.keys Notes</h4>
+<span id="ntp_002ekeys-Notes-1"></span><h4 class="subsection">1.1.3 ntp.keys Notes</h4>
<p>This document was derived from FreeBSD.
</p><hr>
diff --git a/contrib/ntp/ntpd/ntp.keys.man.in b/contrib/ntp/ntpd/ntp.keys.man.in
index 2437cd1cdab2..1655a4bacbcd 100644
--- a/contrib/ntp/ntpd/ntp.keys.man.in
+++ b/contrib/ntp/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "23 Jun 2020" "4.2.8p15" "File Formats"
+.TH ntp.keys 5 "31 May 2023" "4.2.8p16" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:38 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:41 PM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -176,10 +176,10 @@ the default name of the configuration file
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
This document was derived from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/ntpd/ntp.keys.mdoc.in b/contrib/ntp/ntpd/ntp.keys.mdoc.in
index f2a8bb98471c..0a85da0b020e 100644
--- a/contrib/ntp/ntpd/ntp.keys.mdoc.in
+++ b/contrib/ntp/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_KEYS 5 File Formats
-.Os FreeBSD 11.2-RELEASE_SI
+.Os FreeBSD 12.1-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:28 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:28 PM by AutoGen 5.18.16
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -163,10 +163,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
This document was derived from FreeBSD.
.Pp
diff --git a/contrib/ntp/ntpd/ntp_clockdev.c b/contrib/ntp/ntpd/ntp_clockdev.c
new file mode 100644
index 000000000000..312cebd5a666
--- /dev/null
+++ b/contrib/ntp/ntpd/ntp_clockdev.c
@@ -0,0 +1,187 @@
+/* ntp_clockdev.c - map clock instances to devices
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * ---------------------------------------------------------------------
+ * The runtime support for the 'device' configuration statement. Just a
+ * simple list to map refclock source addresses to the device(s) to use
+ * instead of the builtin names.
+ * ---------------------------------------------------------------------
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_NETINFO
+# include <netinfo/ni.h>
+#endif
+
+#include <stdio.h>
+#include <isc/net.h>
+
+#include "ntp.h"
+#include "ntpd.h"
+#include "ntp_clockdev.h"
+
+/* In the windows port 'refclock_open' is in 'libntp' (windows specific
+ * 'termios.c' source) and calling a function located in NTPD from the
+ * library is not something we should do. Therefore 'termios.c' now
+ * provides a hook to set a callback function used for the lookup, and
+ * we have to populate that when we have indeed device name
+ * redirections...
+ */
+#ifdef SYS_WINNT
+extern const char * (*termios_device_lookup_func)(const sockaddr_u*, int);
+#endif
+
+/* What we remember for a device redirection */
+typedef struct DeviceInfoS DeviceInfoT;
+struct DeviceInfoS {
+ DeviceInfoT *next; /* link to next record */
+ int ident; /* type (byte1) and unit (byte0)*/
+ char *ttyName; /* time data IO device */
+ char *ppsName; /* PPS device */
+};
+
+/* Our list of device redirections: */
+static DeviceInfoT * InfoList = NULL;
+
+/* Free a single record: */
+static void freeDeviceInfo(
+ DeviceInfoT *item
+ )
+{
+ if (NULL != item) {
+ free(item->ttyName);
+ free(item->ppsName);
+ free(item);
+ }
+}
+
+/* Get clock ID from pseudo network address. Returns -1 on error. */
+static int
+getClockIdent(
+ const sockaddr_u *srcadr
+ )
+{
+ int clkType, clkUnit;
+
+ /*
+ * Check for valid address and running peer
+ */
+ if (!ISREFCLOCKADR(srcadr))
+ return -1;
+
+ clkType = REFCLOCKTYPE(srcadr);
+ clkUnit = REFCLOCKUNIT(srcadr);
+ return (clkType << 8) + clkUnit;
+}
+
+/* Purge the complete redirection list. */
+void
+clockdev_clear(void)
+{
+ DeviceInfoT * item;
+ while (NULL != (item = InfoList)) {
+ InfoList = item->next;
+ freeDeviceInfo(item);
+ }
+}
+
+/* Remove record(s) for a clock.
+ * returns number of removed records (maybe zero) or -1 on error
+ */
+int
+clockdev_remove(
+ const sockaddr_u *addr_sock
+ )
+{
+ DeviceInfoT *item, **ppl;
+ int rcnt = 0;
+ const int ident = getClockIdent(addr_sock);
+
+ if (ident < 0)
+ return -1;
+
+ ppl = &InfoList;
+ while (NULL != (item = *ppl)) {
+ if (ident == item->ident) {
+ *ppl = item->next;
+ freeDeviceInfo(item);
+ ++rcnt;
+ } else {
+ ppl = &item->next;
+ }
+ }
+ return rcnt;
+}
+
+/* Update or create a redirection record for a clock instace */
+int /*error*/
+clockdev_update(
+ const sockaddr_u *addr_sock,
+ const char *ttyName,
+ const char *ppsName
+ )
+{
+ DeviceInfoT *item;
+ const int ident = getClockIdent(addr_sock);
+ if (ident < 0)
+ return EINVAL;
+
+ /* make sure Windows can use device redirections, too: */
+# ifdef SYS_WINNT
+ termios_device_lookup_func = clockdev_lookup;
+# endif
+
+ /* try to update an existing record */
+ for (item = InfoList; NULL != item; item = item->next)
+ if (ident == item->ident) {
+ msyslog(LOG_INFO, "Update IO devices for %s: timedata='%s' ppsdata='%s'",
+ refnumtoa(addr_sock),
+ ttyName ? ttyName : "(null)",
+ ppsName ? ppsName : "(null)");
+ free(item->ttyName);
+ free(item->ppsName);
+ item->ttyName = ttyName ? estrdup(ttyName) : NULL;
+ item->ppsName = ppsName ? estrdup(ppsName) : NULL;
+ return 0;
+ }
+
+ /* seems we have to create a new entry... */
+ msyslog(LOG_INFO, "Add IO devices for %s: timedata='%s' ppsdata='%s'",
+ refnumtoa(addr_sock),
+ ttyName ? ttyName : "(null)",
+ ppsName ? ppsName : "(null)");
+
+ item = emalloc(sizeof(*item));
+ item->next = InfoList;
+ item->ident = ident;
+ item->ttyName = ttyName ? estrdup(ttyName) : NULL;
+ item->ppsName = ppsName ? estrdup(ppsName) : NULL;
+ InfoList = item;
+ return 0;
+}
+
+/* Lookup a redirection for a clock instance. Returns either the name
+ * registered for the device or NULL if no redirection is found.
+ */
+const char*
+clockdev_lookup(
+ const sockaddr_u *addr_sock,
+ int getPPS
+ )
+{
+ const DeviceInfoT *item;
+ const int ident = getClockIdent(addr_sock);
+
+ if (ident < 0)
+ return NULL;
+
+ for (item = InfoList; NULL != item; item = item->next)
+ if (ident == item->ident)
+ return getPPS ? item->ppsName : item->ttyName;
+
+ return NULL;
+}
diff --git a/contrib/ntp/ntpd/ntp_clockdev.h b/contrib/ntp/ntpd/ntp_clockdev.h
new file mode 100644
index 000000000000..8769515f98f1
--- /dev/null
+++ b/contrib/ntp/ntpd/ntp_clockdev.h
@@ -0,0 +1,25 @@
+/* ntp_clockdev.h - map clock instances to devices
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * ---------------------------------------------------------------------
+ * The runtime support for the 'device' configuration statement. Just a
+ * simple list to map refclock source addresses to the device(s) to use
+ * instead of the builtin names.
+ * ---------------------------------------------------------------------
+ */
+#ifndef NTP_CLOCKDEV_H
+#define NTP_CLOCKDEV_H
+
+extern void clockdev_clear(void);
+
+extern int clockdev_remove(
+ const sockaddr_u *addr_sock);
+
+extern int clockdev_update(
+ const sockaddr_u *addr_sock, const char *ttyName, const char *ppsName);
+
+extern const char *clockdev_lookup(
+ const sockaddr_u * addr_sock, int getPps);
+
+#endif /*!defined(NTP_CLOCKDEV_H)*/
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
index cdc391c1b95b..f7219b8ee560 100644
--- a/contrib/ntp/ntpd/ntp_config.c
+++ b/contrib/ntp/ntpd/ntp_config.c
@@ -39,6 +39,7 @@
#include "ntp_io.h"
#include "ntp_unixtime.h"
#include "ntp_refclock.h"
+#include "ntp_clockdev.h"
#include "ntp_filegen.h"
#include "ntp_stdlib.h"
#include "lib_strbuf.h"
@@ -242,11 +243,11 @@ static void free_all_config_trees(void);
static void free_config_access(config_tree *);
static void free_config_auth(config_tree *);
static void free_config_fudge(config_tree *);
+static void free_config_device(config_tree *);
static void free_config_logconfig(config_tree *);
static void free_config_monitor(config_tree *);
static void free_config_nic_rules(config_tree *);
static void free_config_other_modes(config_tree *);
-static void free_config_peers(config_tree *);
static void free_config_phone(config_tree *);
static void free_config_reset_counters(config_tree *);
static void free_config_rlimit(config_tree *);
@@ -256,12 +257,15 @@ static void free_config_tinker(config_tree *);
static void free_config_tos(config_tree *);
static void free_config_trap(config_tree *);
static void free_config_ttl(config_tree *);
-static void free_config_unpeers(config_tree *);
static void free_config_vars(config_tree *);
#ifdef SIM
static void free_config_sim(config_tree *);
-#endif
+#else /* !SIM follows */
+static void free_config_peers(config_tree *);
+static void free_config_unpeers(config_tree *);
+static int is_sane_resolved_address(sockaddr_u *peeraddr, int hmode);
+#endif /* !SIM */
static void destroy_address_fifo(address_fifo *);
#define FREE_ADDRESS_FIFO(pf) \
do { \
@@ -273,7 +277,6 @@ static void free_config_tree(config_tree *ptree);
#endif /* FREE_CFG_T */
static void destroy_restrict_node(restrict_node *my_node);
-static int is_sane_resolved_address(sockaddr_u *peeraddr, int hmode);
static void save_and_apply_config_tree(int/*BOOL*/ from_file);
static void destroy_int_fifo(int_fifo *);
#define FREE_INT_FIFO(pf) \
@@ -323,7 +326,6 @@ static void config_monitor(config_tree *);
static void config_rlimit(config_tree *);
static void config_system_opts(config_tree *);
static void config_tinker(config_tree *);
-static int config_tos_clock(config_tree *);
static void config_tos(config_tree *);
static void config_vars(config_tree *);
@@ -340,16 +342,17 @@ static void config_access(config_tree *);
static void config_mdnstries(config_tree *);
static void config_phone(config_tree *);
static void config_setvar(config_tree *);
+static int config_tos_clock(config_tree *);
static void config_ttl(config_tree *);
static void config_trap(config_tree *);
static void config_fudge(config_tree *);
+static void config_device(config_tree *);
static void config_peers(config_tree *);
static void config_unpeers(config_tree *);
static void config_nic_rules(config_tree *, int/*BOOL*/ input_from_file);
static void config_reset_counters(config_tree *);
static u_char get_correct_host_mode(int token);
static int peerflag_bits(peer_node *);
-#endif /* !SIM */
#ifdef WORKER
static void peer_name_resolved(int, int, void *, const char *, const char *,
@@ -361,7 +364,8 @@ static void unpeer_name_resolved(int, int, void *, const char *, const char *,
static void trap_name_resolved(int, int, void *, const char *, const char *,
const struct addrinfo *,
const struct addrinfo *);
-#endif
+#endif /* WORKER */
+#endif /* !SIM */
enum gnn_type {
t_UNK, /* Unknown */
@@ -386,7 +390,7 @@ static int getnetnum(const char *num, sockaddr_u *addr, int complain,
#endif
#if defined(__GNUC__) /* this covers CLANG, too */
-static void __attribute__((noreturn,format(printf,1,2))) fatal_error(const char *fmt, ...)
+static void __attribute__((__noreturn__,format(printf,1,2))) fatal_error(const char *fmt, ...)
#elif defined(_MSC_VER)
static void __declspec(noreturn) fatal_error(const char *fmt, ...)
#else
@@ -483,14 +487,16 @@ free_config_tree(
free_config_ttl(ptree);
free_config_trap(ptree);
free_config_fudge(ptree);
+ free_config_device(ptree);
free_config_vars(ptree);
- free_config_peers(ptree);
- free_config_unpeers(ptree);
free_config_nic_rules(ptree);
free_config_reset_counters(ptree);
#ifdef SIM
free_config_sim(ptree);
-#endif
+#else /* !SIM follows */
+ free_config_peers(ptree);
+ free_config_unpeers(ptree);
+#endif /* !SIM */
free_auth_node(ptree);
free(ptree);
@@ -906,6 +912,42 @@ dump_config_tree(
}
fprintf(df, "\n");
}
+
+ addr_opts = HEAD_PFIFO(ptree->device);
+ for ( ; addr_opts != NULL; addr_opts = addr_opts->link) {
+ peer_addr = peern->addr;
+ fudge_addr = addr_opts->addr;
+
+ s1 = peer_addr->address;
+ s2 = fudge_addr->address;
+
+ if (strcmp(s1, s2))
+ continue;
+
+ fprintf(df, "device %s", s1);
+
+ for (atrv = HEAD_PFIFO(addr_opts->options);
+ atrv != NULL;
+ atrv = atrv->link) {
+
+ switch (atrv->type) {
+#ifdef DEBUG
+ default:
+ fprintf(df, "\n# dump error:\n"
+ "# unknown device atrv->type %d\n"
+ "device %s", atrv->type,
+ s1);
+ break;
+#endif
+ case T_String:
+ fprintf(df, " %s %s",
+ keyword(atrv->attr),
+ atrv->value.s);
+ break;
+ }
+ }
+ fprintf(df, "\n");
+ }
}
addr = HEAD_PFIFO(ptree->manycastserver);
@@ -2150,7 +2192,7 @@ free_config_auth(
}
#endif /* FREE_CFG_T */
-
+#ifndef SIM
/* Configure low-level clock-related parameters. Return TRUE if the
* clock might need adjustment like era-checking after the call, FALSE
* otherwise.
@@ -2183,12 +2225,15 @@ config_tos_clock(
return ret;
}
+#endif /* SIM */
static void
config_tos(
config_tree *ptree
)
{
+ char const improper_operation_msg[] =
+ " - daemon will not operate properly!";
attr_val * tos;
int item;
double val;
@@ -2202,9 +2247,11 @@ config_tos(
* just log an error but do not stop: This might be caused by
* remote config, and it might be fixed by remote config, too.
*/
- int l_maxclock = sys_maxclock;
- int l_minclock = sys_minclock;
- int l_minsane = sys_minsane;
+ int l_maxclock = sys_maxclock;
+ int l_minclock = sys_minclock;
+ int l_minsane = sys_minsane;
+ int l_floor = sys_floor;
+ int l_ceiling = sys_ceiling;
/* -*- phase one: inspect / sanitize the values */
tos = HEAD_PFIFO(ptree->orphan_cmds);
@@ -2221,30 +2268,49 @@ config_tos(
val = tos->value.d;
if (val > 4) {
msyslog(LOG_WARNING,
- "Using maximum bcpollbstep ceiling %d, %d requested",
+ "Using maximum tos bcpollbstep %d, %d requested",
4, (int)val);
tos->value.d = 4;
} else if (val < 0) {
msyslog(LOG_WARNING,
- "Using minimum bcpollbstep floor %d, %d requested",
+ "Using minimum tos bcpollbstep %d, %d requested",
0, (int)val);
tos->value.d = 0;
}
break;
+ case T_Floor:
+ l_floor = (int)tos->value.d;
+ if (l_floor > STRATUM_UNSPEC - 1) {
+ msyslog(LOG_WARNING,
+ "Using maximum tos floor %d, %d requested",
+ STRATUM_UNSPEC - 1, l_floor);
+ tos->value.d = STRATUM_UNSPEC - 1;
+ }
+ else if (l_floor < 0) {
+ msyslog(LOG_WARNING,
+ "Using minimum tos floor %d, %d requested",
+ 0, l_floor);
+ tos->value.d = 0;
+ }
+ l_floor = (int)tos->value.d;
+ break;
+
case T_Ceiling:
- val = tos->value.d;
- if (val > STRATUM_UNSPEC - 1) {
+ l_ceiling = (int)tos->value.d;
+ if (l_ceiling > STRATUM_UNSPEC - 1) {
msyslog(LOG_WARNING,
"Using maximum tos ceiling %d, %d requested",
- STRATUM_UNSPEC - 1, (int)val);
+ STRATUM_UNSPEC - 1, l_ceiling);
tos->value.d = STRATUM_UNSPEC - 1;
- } else if (val < 1) {
+ }
+ else if (l_ceiling < 0) {
msyslog(LOG_WARNING,
- "Using minimum tos floor %d, %d requested",
- 1, (int)val);
- tos->value.d = 1;
+ "Using minimum tos ceiling %d, %d requested",
+ 0, l_ceiling);
+ tos->value.d = 0;
}
+ l_ceiling = (int)tos->value.d;
break;
case T_Minclock:
@@ -2271,10 +2337,16 @@ config_tos(
}
if ( ! (l_minsane < l_minclock && l_minclock <= l_maxclock)) {
- msyslog(LOG_ERR,
- "tos error: must have minsane (%d) < minclock (%d) <= maxclock (%d)"
- " - daemon will not operate properly!",
- l_minsane, l_minclock, l_maxclock);
+ msyslog(LOG_ERR, "Must have tos "
+ "minsane (%d) < minclock (%d) <= maxclock (%d)%s",
+ l_minsane, l_minclock, l_maxclock,
+ improper_operation_msg);
+ }
+
+ if (l_floor > l_ceiling) {
+ msyslog(LOG_ERR, "Must have tos "
+ "floor (%d) <= ceiling (%d)%s",
+ l_floor, l_ceiling, improper_operation_msg);
}
/* -*- phase two: forward the values to the protocol machinery */
@@ -3039,7 +3111,9 @@ get_pollskew(
)
{
+#ifdef DISABLE_BUG3767_FIX
DEBUG_INSIST(3 <= p && 17 >= p);
+#endif
if (3 <= p && 17 >= p) {
*rv = psl[p - 3];
@@ -3545,7 +3619,6 @@ config_phone(
}
}
}
-#endif /* !SIM */
static void
config_mdnstries(
@@ -3557,6 +3630,7 @@ config_mdnstries(
mdnstries = ptree->mdnstries;
#endif /* HAVE_DNSREGISTRATION */
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
@@ -3845,6 +3919,7 @@ config_fudge(
sockaddr_u addr_sock;
address_node *addr_node;
struct refclockstat clock_stat;
+ char refid_str[5];
int err_flag;
curr_fudge = HEAD_PFIFO(ptree->fudge);
@@ -3900,8 +3975,10 @@ config_fudge(
case T_Refid:
clock_stat.haveflags |= CLK_HAVEVAL2;
/* strncpy() does exactly what we want here: */
- strncpy((char*)&clock_stat.fudgeval2,
- curr_opt->value.s, 4);
+ strncpy(refid_str, curr_opt->value.s,
+ sizeof refid_str - 1);
+ memcpy(&clock_stat.fudgeval2, refid_str,
+ sizeof clock_stat.fudgeval2);
break;
case T_Flag1:
@@ -3957,6 +4034,67 @@ config_fudge(
}
#endif /* !SIM */
+#ifndef SIM
+static void
+config_device(
+ config_tree *ptree
+ )
+{
+ addr_opts_node *curr_device;
+ attr_val *curr_opt;
+ sockaddr_u addr_sock;
+ address_node *addr_node;
+ char *ttyName, *ppsName;
+
+ curr_device = HEAD_PFIFO(ptree->device);
+ for (; curr_device != NULL; curr_device = curr_device->link) {
+ /* Get the reference clock address and
+ * ensure that it is sane
+ */
+ addr_node = curr_device->addr;
+ ZERO_SOCK(&addr_sock);
+ if (getnetnum(addr_node->address, &addr_sock, 1, t_REF)
+ != 1) {
+ msyslog(LOG_ERR,
+ "unrecognized device reference clock address %s, line ignored",
+ addr_node->address);
+ continue;
+ }
+ if (!ISREFCLOCKADR(&addr_sock)) {
+ msyslog(LOG_ERR,
+ "inappropriate address %s for the device command, line ignored",
+ stoa(&addr_sock));
+ continue;
+ }
+
+ ppsName = ttyName = NULL;
+ curr_opt = HEAD_PFIFO(curr_device->options);
+ for (; curr_opt != NULL; curr_opt = curr_opt->link) {
+ switch (curr_opt->attr) {
+
+ case T_TimeData:
+ ttyName = curr_opt->value.s;
+ break;
+
+ case T_PpsData:
+ ppsName = curr_opt->value.s;
+ break;
+
+ default:
+ msyslog(LOG_ERR,
+ "Unexpected device spec %s (%d) for %s",
+ token_name(curr_opt->attr),
+ curr_opt->attr, addr_node->address);
+ exit(curr_opt->attr ? curr_opt->attr : 1);
+ }
+ }
+# ifdef REFCLOCK
+ clockdev_update(&addr_sock, ttyName, ppsName);
+# endif
+ }
+}
+#endif /* !SIM */
+
#ifdef FREE_CFG_T
static void
@@ -3966,6 +4104,14 @@ free_config_fudge(
{
FREE_ADDR_OPTS_FIFO(ptree->fudge);
}
+
+static void
+free_config_device(
+ config_tree *ptree
+ )
+{
+ FREE_ADDR_OPTS_FIFO(ptree->device);
+}
#endif /* FREE_CFG_T */
@@ -3991,11 +4137,9 @@ config_vars(
break;
case T_Driftfile:
- if ('\0' == curr_var->value.s[0]) {
- stats_drift_file = 0;
+ if ('\0' == curr_var->value.s[0])
msyslog(LOG_INFO, "config: driftfile disabled");
- } else
- stats_config(STATS_FREQ_FILE, curr_var->value.s, 0);
+ stats_config(STATS_FREQ_FILE, curr_var->value.s, 0);
break;
case T_Dscp:
@@ -4088,6 +4232,7 @@ free_config_vars(
#endif /* FREE_CFG_T */
+#ifndef SIM
/* Define a function to check if a resolved address is sane.
* If yes, return 1, else return 0;
*/
@@ -4130,7 +4275,6 @@ is_sane_resolved_address(
}
-#ifndef SIM
static u_char
get_correct_host_mode(
int token
@@ -4375,7 +4519,7 @@ config_peers(
}
}
}
-#endif /* !SIM */
+
/*
* peer_name_resolved()
@@ -4475,7 +4619,6 @@ free_config_peers(
#endif /* FREE_CFG_T */
-#ifndef SIM
static void
config_unpeers(
config_tree *ptree
@@ -4551,7 +4694,6 @@ config_unpeers(
# endif
}
}
-#endif /* !SIM */
/*
@@ -4631,6 +4773,7 @@ free_config_unpeers(
}
}
#endif /* FREE_CFG_T */
+#endif /* !SIM */
#ifndef SIM
@@ -4848,6 +4991,7 @@ config_ntpd(
config_trap(ptree); /* [bug 2923] dep. on io_open_sockets() */
config_other_modes(ptree);
+ config_device(ptree);
config_peers(ptree);
config_unpeers(ptree);
config_fudge(ptree);
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index 9c408034a4d7..d1108c9d1456 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -821,10 +821,6 @@ static u_char res_async; /* sending async trap response? */
static char *reqpt;
static char *reqend;
-#ifndef MIN
-#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
-#endif
-
/*
* init_control - initialize request data
*/
@@ -3656,6 +3652,7 @@ static u_int32 derive_nonce(
} d;
EVP_MD_CTX *ctx;
u_int len;
+ int rc;
while (!salt[0] || current_time - last_salt_update >= 3600) {
salt[0] = ntp_random();
@@ -3669,10 +3666,15 @@ static u_int32 derive_nonce(
# if defined(OPENSSL) && defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)
/* [Bug 3457] set flags and don't kill them again */
EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
- EVP_DigestInit_ex(ctx, EVP_get_digestbynid(NID_md5), NULL);
+ rc = EVP_DigestInit_ex(ctx, EVP_get_digestbynid(NID_md5), NULL);
# else
- EVP_DigestInit(ctx, EVP_get_digestbynid(NID_md5));
+ rc = EVP_DigestInit(ctx, EVP_get_digestbynid(NID_md5));
# endif
+ if (!rc) {
+ msyslog(LOG_ERR, "EVP_DigestInit failed in '%s'", __func__);
+ return (0);
+ }
+
EVP_DigestUpdate(ctx, salt, sizeof(salt));
EVP_DigestUpdate(ctx, &ts_i, sizeof(ts_i));
EVP_DigestUpdate(ctx, &ts_f, sizeof(ts_f));
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
index fa0017f73efe..a5d8954a06b6 100644
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ b/contrib/ntp/ntpd/ntp_crypto.c
@@ -1395,11 +1395,11 @@ crypto_xmit(
* puppy; if a response, return so the sender can flame, too.
*/
if (rval != XEVNT_OK) {
- u_int32 uint32;
+ u_int32 opcode_bits;
- uint32 = CRYPTO_ERROR;
- opcode |= uint32;
- fp->opcode |= htonl(uint32);
+ opcode_bits = CRYPTO_ERROR;
+ opcode |= opcode_bits;
+ fp->opcode |= htonl(opcode_bits);
snprintf(statstr, sizeof(statstr),
"%04x %d %02x %s", opcode, associd, rval,
eventstr(rval));
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index c0dcea598121..bb35ffd68511 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -2011,7 +2011,7 @@ update_interfaces(
*/
refresh_all_peerinterfaces();
- if (broadcast_client_enabled || sys_bclient)
+ if (sys_bclient)
io_setbclient();
#ifdef MCAST
@@ -2604,19 +2604,17 @@ io_setbclient(void)
{
#ifdef OPEN_BCAST_SOCKET
endpt * ep;
- unsigned int nif, ni4, ni6;
+ unsigned int nif, ni4;
- nif = ni4 = ni6 = 0;
+ nif = ni4 = 0;
set_reuseaddr(1);
for (ep = ep_list; ep != NULL; ep = ep->elink) {
- /* count IPv6 vs IPv4 interfaces. Needed later to decide
+ /* count IPv4 interfaces. Needed later to decide
* if we should log an error or not.
*/
- switch (ep->family) {
- case AF_INET : ++ni4; break;
- case AF_INET6: ++ni6; break;
- default : break;
+ if (AF_INET == ep->family) {
+ ++ni4;
}
if (ep->flags & (INT_WILDCARD | INT_LOOPBACK))
@@ -2696,7 +2694,7 @@ io_setbclient(void)
* and no IPv4 interfaces at all. We suppress the error
* log in that case... everything else should work!
*/
- if (ni4 && !ni6) {
+ if (ni4) {
msyslog(LOG_ERR,
"Unable to listen for broadcasts, no broadcast interfaces available");
}
@@ -3240,7 +3238,8 @@ sendpkt(
PKT_MODE(pkt->li_vn_mode),
pkt->stratum,
pkt->ppoll, pkt->precision,
- pkt->rootdelay, pkt->rootdisp, pkt->refid,
+ FPTOD(NTOHS_FP(pkt->rootdelay)),
+ FPTOD(NTOHS_FP(pkt->rootdisp)), pkt->refid,
len - MIN_V4_PKT_LEN, (u_char *)&pkt->exten);
return;
@@ -3403,7 +3402,7 @@ fetch_timestamp(
nts.l_uf = (unsigned long)(ticks * (unsigned long)(sys_tick * FRAC));
}
DPRINTF(4, ("fetch_timestamp: system bintime network time stamp: %ld.%09lu\n",
- pbt.sec, (unsigned long)((nts.l_uf / FRAC) * 1e9)));
+ (long)pbt.sec, (u_long)((nts.l_uf / FRAC) * 1e9)));
}
break;
#endif /* HAVE_BINTIME */
@@ -3444,7 +3443,7 @@ fetch_timestamp(
break;
#endif /* HAVE_TIMESTAMP */
}
- fuzz = ntp_random() * 2. / FRAC * sys_fuzz;
+ fuzz = ntp_uurandom() * sys_fuzz;
DTOLFP(fuzz, &lfpfuzz);
L_ADD(&nts, &lfpfuzz);
#ifdef DEBUG_TIMING
@@ -4512,7 +4511,7 @@ kill_asyncio(
/*
- * Add and delete functions for the list of open sockets
+ * Add and delete functions for the list of input file descriptors
*/
static void
add_fd_to_list(
@@ -4702,14 +4701,16 @@ localaddrtoa(
#ifdef HAS_ROUTING_SOCKET
# ifndef UPDATE_GRACE
-# define UPDATE_GRACE 2 /* wait UPDATE_GRACE seconds before scanning */
+# define UPDATE_GRACE 3 /* min. UPDATE_GRACE - 1 seconds before scanning */
# endif
static void
process_routing_msgs(struct asyncio_reader *reader)
{
- char buffer[5120];
- int cnt, msg_type;
+ static char * buffer;
+ static size_t buffsz = 8192;
+ int cnt, new, msg_type;
+ socklen_t len;
#ifdef HAVE_RTNETLINK
struct nlmsghdr *nh;
#else
@@ -4727,15 +4728,34 @@ process_routing_msgs(struct asyncio_reader *reader)
return;
}
- cnt = read(reader->fd, buffer, sizeof(buffer));
+ if (NULL == buffer) {
+ buffer = emalloc(buffsz);
+ }
+
+ cnt = read(reader->fd, buffer, buffsz);
if (cnt < 0) {
if (errno == ENOBUFS) {
- msyslog(LOG_ERR,
- "routing socket reports: %m");
+ /* increase socket buffer by 25% */
+ len = sizeof cnt;
+ if (0 > getsockopt(reader->fd, SOL_SOCKET, SO_RCVBUF, &cnt, &len) ||
+ sizeof cnt != len) {
+ msyslog(LOG_ERR,
+ "routing getsockopt SO_RCVBUF %u %u: %m - disabling",
+ (u_int)cnt, (u_int)sizeof cnt);
+ goto disable;
+ }
+ new = cnt + (cnt / 4);
+ if (0 > setsockopt(reader->fd, SOL_SOCKET, SO_RCVBUF, &new, sizeof new)) {
+ msyslog(LOG_ERR,
+ "routing setsockopt SO_RCVBUF %d -> %d: %m - disabling",
+ cnt, new);
+ goto disable;
+ }
} else {
msyslog(LOG_ERR,
"routing socket reports: %m - disabling");
+ disable:
remove_asyncio_reader(reader);
delete_asyncio_reader(reader);
}
diff --git a/contrib/ntp/ntpd/ntp_keyword.h b/contrib/ntp/ntpd/ntp_keyword.h
index ab96b47c0d7a..7b3efc2cda30 100644
--- a/contrib/ntp/ntpd/ntp_keyword.h
+++ b/contrib/ntp/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
* ntp_keyword.h
*
* NOTE: edit this file with caution, it is generated by keyword-gen.c
- * Generated 2020-02-13 08:56:28 UTC diff_ignore_line
+ * Generated 2022-03-27 14:17:11 UTC diff_ignore_line
*
*/
#include "ntp_scanner.h"
@@ -10,7 +10,7 @@
#define LOWEST_KEYWORD_ID 258
-const char * const keyword_text[209] = {
+const char * const keyword_text[212] = {
/* 0 258 T_Abbrev */ "abbrev",
/* 1 259 T_Age */ "age",
/* 2 260 T_All */ "all",
@@ -39,197 +39,200 @@ const char * const keyword_text[209] = {
/* 25 283 T_Ctl */ "ctl",
/* 26 284 T_Day */ "day",
/* 27 285 T_Default */ "default",
- /* 28 286 T_Digest */ "digest",
- /* 29 287 T_Disable */ "disable",
- /* 30 288 T_Discard */ "discard",
- /* 31 289 T_Dispersion */ "dispersion",
- /* 32 290 T_Double */ NULL,
- /* 33 291 T_Driftfile */ "driftfile",
- /* 34 292 T_Drop */ "drop",
- /* 35 293 T_Dscp */ "dscp",
- /* 36 294 T_Ellipsis */ "...",
- /* 37 295 T_Enable */ "enable",
- /* 38 296 T_End */ "end",
- /* 39 297 T_Epeer */ "epeer",
- /* 40 298 T_False */ NULL,
- /* 41 299 T_File */ "file",
- /* 42 300 T_Filegen */ "filegen",
- /* 43 301 T_Filenum */ "filenum",
- /* 44 302 T_Flag1 */ "flag1",
- /* 45 303 T_Flag2 */ "flag2",
- /* 46 304 T_Flag3 */ "flag3",
- /* 47 305 T_Flag4 */ "flag4",
- /* 48 306 T_Flake */ "flake",
- /* 49 307 T_Floor */ "floor",
- /* 50 308 T_Freq */ "freq",
- /* 51 309 T_Fudge */ "fudge",
- /* 52 310 T_Fuzz */ "fuzz",
- /* 53 311 T_Host */ "host",
- /* 54 312 T_Huffpuff */ "huffpuff",
- /* 55 313 T_Iburst */ "iburst",
- /* 56 314 T_Ident */ "ident",
- /* 57 315 T_Ignore */ "ignore",
- /* 58 316 T_Ignorehash */ "ignorehash",
- /* 59 317 T_Incalloc */ "incalloc",
- /* 60 318 T_Incmem */ "incmem",
- /* 61 319 T_Initalloc */ "initalloc",
- /* 62 320 T_Initmem */ "initmem",
- /* 63 321 T_Includefile */ "includefile",
- /* 64 322 T_Integer */ NULL,
- /* 65 323 T_Interface */ "interface",
- /* 66 324 T_Intrange */ NULL,
- /* 67 325 T_Io */ "io",
- /* 68 326 T_Ippeerlimit */ "ippeerlimit",
- /* 69 327 T_Ipv4 */ "ipv4",
- /* 70 328 T_Ipv4_flag */ "-4",
- /* 71 329 T_Ipv6 */ "ipv6",
- /* 72 330 T_Ipv6_flag */ "-6",
- /* 73 331 T_Kernel */ "kernel",
- /* 74 332 T_Key */ "key",
- /* 75 333 T_Keys */ "keys",
- /* 76 334 T_Keysdir */ "keysdir",
- /* 77 335 T_Kod */ "kod",
- /* 78 336 T_Leapfile */ "leapfile",
- /* 79 337 T_Leapsmearinterval */ "leapsmearinterval",
- /* 80 338 T_Limited */ "limited",
- /* 81 339 T_Link */ "link",
- /* 82 340 T_Listen */ "listen",
- /* 83 341 T_Logconfig */ "logconfig",
- /* 84 342 T_Logfile */ "logfile",
- /* 85 343 T_Loopstats */ "loopstats",
- /* 86 344 T_Lowpriotrap */ "lowpriotrap",
- /* 87 345 T_Manycastclient */ "manycastclient",
- /* 88 346 T_Manycastserver */ "manycastserver",
- /* 89 347 T_Mask */ "mask",
- /* 90 348 T_Maxage */ "maxage",
- /* 91 349 T_Maxclock */ "maxclock",
- /* 92 350 T_Maxdepth */ "maxdepth",
- /* 93 351 T_Maxdist */ "maxdist",
- /* 94 352 T_Maxmem */ "maxmem",
- /* 95 353 T_Maxpoll */ "maxpoll",
- /* 96 354 T_Mdnstries */ "mdnstries",
- /* 97 355 T_Mem */ "mem",
- /* 98 356 T_Memlock */ "memlock",
- /* 99 357 T_Minclock */ "minclock",
- /* 100 358 T_Mindepth */ "mindepth",
- /* 101 359 T_Mindist */ "mindist",
- /* 102 360 T_Minimum */ "minimum",
- /* 103 361 T_Minjitter */ "minjitter",
- /* 104 362 T_Minpoll */ "minpoll",
- /* 105 363 T_Minsane */ "minsane",
- /* 106 364 T_Mode */ "mode",
- /* 107 365 T_Mode7 */ "mode7",
- /* 108 366 T_Monitor */ "monitor",
- /* 109 367 T_Month */ "month",
- /* 110 368 T_Mru */ "mru",
- /* 111 369 T_Mssntp */ "mssntp",
- /* 112 370 T_Multicastclient */ "multicastclient",
- /* 113 371 T_Nic */ "nic",
- /* 114 372 T_Nolink */ "nolink",
- /* 115 373 T_Nomodify */ "nomodify",
- /* 116 374 T_Nomrulist */ "nomrulist",
- /* 117 375 T_None */ "none",
- /* 118 376 T_Nonvolatile */ "nonvolatile",
- /* 119 377 T_Noepeer */ "noepeer",
- /* 120 378 T_Nopeer */ "nopeer",
- /* 121 379 T_Noquery */ "noquery",
- /* 122 380 T_Noselect */ "noselect",
- /* 123 381 T_Noserve */ "noserve",
- /* 124 382 T_Notrap */ "notrap",
- /* 125 383 T_Notrust */ "notrust",
- /* 126 384 T_Ntp */ "ntp",
- /* 127 385 T_Ntpport */ "ntpport",
- /* 128 386 T_NtpSignDsocket */ "ntpsigndsocket",
- /* 129 387 T_Orphan */ "orphan",
- /* 130 388 T_Orphanwait */ "orphanwait",
- /* 131 389 T_PCEdigest */ "peer_clear_digest_early",
- /* 132 390 T_Panic */ "panic",
- /* 133 391 T_Peer */ "peer",
- /* 134 392 T_Peerstats */ "peerstats",
- /* 135 393 T_Phone */ "phone",
- /* 136 394 T_Pid */ "pid",
- /* 137 395 T_Pidfile */ "pidfile",
- /* 138 396 T_Poll */ "poll",
- /* 139 397 T_PollSkewList */ "pollskewlist",
- /* 140 398 T_Pool */ "pool",
- /* 141 399 T_Port */ "port",
- /* 142 400 T_Preempt */ "preempt",
- /* 143 401 T_Prefer */ "prefer",
- /* 144 402 T_Protostats */ "protostats",
- /* 145 403 T_Pw */ "pw",
- /* 146 404 T_Randfile */ "randfile",
- /* 147 405 T_Rawstats */ "rawstats",
- /* 148 406 T_Refid */ "refid",
- /* 149 407 T_Requestkey */ "requestkey",
- /* 150 408 T_Reset */ "reset",
- /* 151 409 T_Restrict */ "restrict",
- /* 152 410 T_Revoke */ "revoke",
- /* 153 411 T_Rlimit */ "rlimit",
- /* 154 412 T_Saveconfigdir */ "saveconfigdir",
- /* 155 413 T_Server */ "server",
- /* 156 414 T_Serverresponse */ "serverresponse",
- /* 157 415 T_ServerresponseFuzz */ NULL,
- /* 158 416 T_Setvar */ "setvar",
- /* 159 417 T_Source */ "source",
- /* 160 418 T_Stacksize */ "stacksize",
- /* 161 419 T_Statistics */ "statistics",
- /* 162 420 T_Stats */ "stats",
- /* 163 421 T_Statsdir */ "statsdir",
- /* 164 422 T_Step */ "step",
- /* 165 423 T_Stepback */ "stepback",
- /* 166 424 T_Stepfwd */ "stepfwd",
- /* 167 425 T_Stepout */ "stepout",
- /* 168 426 T_Stratum */ "stratum",
- /* 169 427 T_String */ NULL,
- /* 170 428 T_Sys */ "sys",
- /* 171 429 T_Sysstats */ "sysstats",
- /* 172 430 T_Tick */ "tick",
- /* 173 431 T_Time1 */ "time1",
- /* 174 432 T_Time2 */ "time2",
- /* 175 433 T_Timer */ "timer",
- /* 176 434 T_Timingstats */ "timingstats",
- /* 177 435 T_Tinker */ "tinker",
- /* 178 436 T_Tos */ "tos",
- /* 179 437 T_Trap */ "trap",
- /* 180 438 T_True */ "true",
- /* 181 439 T_Trustedkey */ "trustedkey",
- /* 182 440 T_Ttl */ "ttl",
- /* 183 441 T_Type */ "type",
- /* 184 442 T_U_int */ NULL,
- /* 185 443 T_UEcrypto */ "unpeer_crypto_early",
- /* 186 444 T_UEcryptonak */ "unpeer_crypto_nak_early",
- /* 187 445 T_UEdigest */ "unpeer_digest_early",
- /* 188 446 T_Unconfig */ "unconfig",
- /* 189 447 T_Unpeer */ "unpeer",
- /* 190 448 T_Version */ "version",
- /* 191 449 T_WanderThreshold */ NULL,
- /* 192 450 T_Week */ "week",
- /* 193 451 T_Wildcard */ "wildcard",
- /* 194 452 T_Xleave */ "xleave",
- /* 195 453 T_Xmtnonce */ "xmtnonce",
- /* 196 454 T_Year */ "year",
- /* 197 455 T_Flag */ NULL,
- /* 198 456 T_EOC */ NULL,
- /* 199 457 T_Simulate */ "simulate",
- /* 200 458 T_Beep_Delay */ "beep_delay",
- /* 201 459 T_Sim_Duration */ "simulation_duration",
- /* 202 460 T_Server_Offset */ "server_offset",
- /* 203 461 T_Duration */ "duration",
- /* 204 462 T_Freq_Offset */ "freq_offset",
- /* 205 463 T_Wander */ "wander",
- /* 206 464 T_Jitter */ "jitter",
- /* 207 465 T_Prop_Delay */ "prop_delay",
- /* 208 466 T_Proc_Delay */ "proc_delay"
+ /* 28 286 T_Device */ "device",
+ /* 29 287 T_Digest */ "digest",
+ /* 30 288 T_Disable */ "disable",
+ /* 31 289 T_Discard */ "discard",
+ /* 32 290 T_Dispersion */ "dispersion",
+ /* 33 291 T_Double */ NULL,
+ /* 34 292 T_Driftfile */ "driftfile",
+ /* 35 293 T_Drop */ "drop",
+ /* 36 294 T_Dscp */ "dscp",
+ /* 37 295 T_Ellipsis */ "...",
+ /* 38 296 T_Enable */ "enable",
+ /* 39 297 T_End */ "end",
+ /* 40 298 T_Epeer */ "epeer",
+ /* 41 299 T_False */ NULL,
+ /* 42 300 T_File */ "file",
+ /* 43 301 T_Filegen */ "filegen",
+ /* 44 302 T_Filenum */ "filenum",
+ /* 45 303 T_Flag1 */ "flag1",
+ /* 46 304 T_Flag2 */ "flag2",
+ /* 47 305 T_Flag3 */ "flag3",
+ /* 48 306 T_Flag4 */ "flag4",
+ /* 49 307 T_Flake */ "flake",
+ /* 50 308 T_Floor */ "floor",
+ /* 51 309 T_Freq */ "freq",
+ /* 52 310 T_Fudge */ "fudge",
+ /* 53 311 T_Fuzz */ "fuzz",
+ /* 54 312 T_Host */ "host",
+ /* 55 313 T_Huffpuff */ "huffpuff",
+ /* 56 314 T_Iburst */ "iburst",
+ /* 57 315 T_Ident */ "ident",
+ /* 58 316 T_Ignore */ "ignore",
+ /* 59 317 T_Ignorehash */ "ignorehash",
+ /* 60 318 T_Incalloc */ "incalloc",
+ /* 61 319 T_Incmem */ "incmem",
+ /* 62 320 T_Initalloc */ "initalloc",
+ /* 63 321 T_Initmem */ "initmem",
+ /* 64 322 T_Includefile */ "includefile",
+ /* 65 323 T_Integer */ NULL,
+ /* 66 324 T_Interface */ "interface",
+ /* 67 325 T_Intrange */ NULL,
+ /* 68 326 T_Io */ "io",
+ /* 69 327 T_Ippeerlimit */ "ippeerlimit",
+ /* 70 328 T_Ipv4 */ "ipv4",
+ /* 71 329 T_Ipv4_flag */ "-4",
+ /* 72 330 T_Ipv6 */ "ipv6",
+ /* 73 331 T_Ipv6_flag */ "-6",
+ /* 74 332 T_Kernel */ "kernel",
+ /* 75 333 T_Key */ "key",
+ /* 76 334 T_Keys */ "keys",
+ /* 77 335 T_Keysdir */ "keysdir",
+ /* 78 336 T_Kod */ "kod",
+ /* 79 337 T_Leapfile */ "leapfile",
+ /* 80 338 T_Leapsmearinterval */ "leapsmearinterval",
+ /* 81 339 T_Limited */ "limited",
+ /* 82 340 T_Link */ "link",
+ /* 83 341 T_Listen */ "listen",
+ /* 84 342 T_Logconfig */ "logconfig",
+ /* 85 343 T_Logfile */ "logfile",
+ /* 86 344 T_Loopstats */ "loopstats",
+ /* 87 345 T_Lowpriotrap */ "lowpriotrap",
+ /* 88 346 T_Manycastclient */ "manycastclient",
+ /* 89 347 T_Manycastserver */ "manycastserver",
+ /* 90 348 T_Mask */ "mask",
+ /* 91 349 T_Maxage */ "maxage",
+ /* 92 350 T_Maxclock */ "maxclock",
+ /* 93 351 T_Maxdepth */ "maxdepth",
+ /* 94 352 T_Maxdist */ "maxdist",
+ /* 95 353 T_Maxmem */ "maxmem",
+ /* 96 354 T_Maxpoll */ "maxpoll",
+ /* 97 355 T_Mdnstries */ "mdnstries",
+ /* 98 356 T_Mem */ "mem",
+ /* 99 357 T_Memlock */ "memlock",
+ /* 100 358 T_Minclock */ "minclock",
+ /* 101 359 T_Mindepth */ "mindepth",
+ /* 102 360 T_Mindist */ "mindist",
+ /* 103 361 T_Minimum */ "minimum",
+ /* 104 362 T_Minjitter */ "minjitter",
+ /* 105 363 T_Minpoll */ "minpoll",
+ /* 106 364 T_Minsane */ "minsane",
+ /* 107 365 T_Mode */ "mode",
+ /* 108 366 T_Mode7 */ "mode7",
+ /* 109 367 T_Monitor */ "monitor",
+ /* 110 368 T_Month */ "month",
+ /* 111 369 T_Mru */ "mru",
+ /* 112 370 T_Mssntp */ "mssntp",
+ /* 113 371 T_Multicastclient */ "multicastclient",
+ /* 114 372 T_Nic */ "nic",
+ /* 115 373 T_Nolink */ "nolink",
+ /* 116 374 T_Nomodify */ "nomodify",
+ /* 117 375 T_Nomrulist */ "nomrulist",
+ /* 118 376 T_None */ "none",
+ /* 119 377 T_Nonvolatile */ "nonvolatile",
+ /* 120 378 T_Noepeer */ "noepeer",
+ /* 121 379 T_Nopeer */ "nopeer",
+ /* 122 380 T_Noquery */ "noquery",
+ /* 123 381 T_Noselect */ "noselect",
+ /* 124 382 T_Noserve */ "noserve",
+ /* 125 383 T_Notrap */ "notrap",
+ /* 126 384 T_Notrust */ "notrust",
+ /* 127 385 T_Ntp */ "ntp",
+ /* 128 386 T_Ntpport */ "ntpport",
+ /* 129 387 T_NtpSignDsocket */ "ntpsigndsocket",
+ /* 130 388 T_Orphan */ "orphan",
+ /* 131 389 T_Orphanwait */ "orphanwait",
+ /* 132 390 T_PCEdigest */ "peer_clear_digest_early",
+ /* 133 391 T_Panic */ "panic",
+ /* 134 392 T_Peer */ "peer",
+ /* 135 393 T_Peerstats */ "peerstats",
+ /* 136 394 T_Phone */ "phone",
+ /* 137 395 T_Pid */ "pid",
+ /* 138 396 T_Pidfile */ "pidfile",
+ /* 139 397 T_Poll */ "poll",
+ /* 140 398 T_PollSkewList */ "pollskewlist",
+ /* 141 399 T_Pool */ "pool",
+ /* 142 400 T_Port */ "port",
+ /* 143 401 T_PpsData */ "ppsdata",
+ /* 144 402 T_Preempt */ "preempt",
+ /* 145 403 T_Prefer */ "prefer",
+ /* 146 404 T_Protostats */ "protostats",
+ /* 147 405 T_Pw */ "pw",
+ /* 148 406 T_Randfile */ "randfile",
+ /* 149 407 T_Rawstats */ "rawstats",
+ /* 150 408 T_Refid */ "refid",
+ /* 151 409 T_Requestkey */ "requestkey",
+ /* 152 410 T_Reset */ "reset",
+ /* 153 411 T_Restrict */ "restrict",
+ /* 154 412 T_Revoke */ "revoke",
+ /* 155 413 T_Rlimit */ "rlimit",
+ /* 156 414 T_Saveconfigdir */ "saveconfigdir",
+ /* 157 415 T_Server */ "server",
+ /* 158 416 T_Serverresponse */ "serverresponse",
+ /* 159 417 T_ServerresponseFuzz */ NULL,
+ /* 160 418 T_Setvar */ "setvar",
+ /* 161 419 T_Source */ "source",
+ /* 162 420 T_Stacksize */ "stacksize",
+ /* 163 421 T_Statistics */ "statistics",
+ /* 164 422 T_Stats */ "stats",
+ /* 165 423 T_Statsdir */ "statsdir",
+ /* 166 424 T_Step */ "step",
+ /* 167 425 T_Stepback */ "stepback",
+ /* 168 426 T_Stepfwd */ "stepfwd",
+ /* 169 427 T_Stepout */ "stepout",
+ /* 170 428 T_Stratum */ "stratum",
+ /* 171 429 T_String */ NULL,
+ /* 172 430 T_Sys */ "sys",
+ /* 173 431 T_Sysstats */ "sysstats",
+ /* 174 432 T_Tick */ "tick",
+ /* 175 433 T_Time1 */ "time1",
+ /* 176 434 T_Time2 */ "time2",
+ /* 177 435 T_TimeData */ "timedata",
+ /* 178 436 T_Timer */ "timer",
+ /* 179 437 T_Timingstats */ "timingstats",
+ /* 180 438 T_Tinker */ "tinker",
+ /* 181 439 T_Tos */ "tos",
+ /* 182 440 T_Trap */ "trap",
+ /* 183 441 T_True */ "true",
+ /* 184 442 T_Trustedkey */ "trustedkey",
+ /* 185 443 T_Ttl */ "ttl",
+ /* 186 444 T_Type */ "type",
+ /* 187 445 T_U_int */ NULL,
+ /* 188 446 T_UEcrypto */ "unpeer_crypto_early",
+ /* 189 447 T_UEcryptonak */ "unpeer_crypto_nak_early",
+ /* 190 448 T_UEdigest */ "unpeer_digest_early",
+ /* 191 449 T_Unconfig */ "unconfig",
+ /* 192 450 T_Unpeer */ "unpeer",
+ /* 193 451 T_Version */ "version",
+ /* 194 452 T_WanderThreshold */ NULL,
+ /* 195 453 T_Week */ "week",
+ /* 196 454 T_Wildcard */ "wildcard",
+ /* 197 455 T_Xleave */ "xleave",
+ /* 198 456 T_Xmtnonce */ "xmtnonce",
+ /* 199 457 T_Year */ "year",
+ /* 200 458 T_Flag */ NULL,
+ /* 201 459 T_EOC */ NULL,
+ /* 202 460 T_Simulate */ "simulate",
+ /* 203 461 T_Beep_Delay */ "beep_delay",
+ /* 204 462 T_Sim_Duration */ "simulation_duration",
+ /* 205 463 T_Server_Offset */ "server_offset",
+ /* 206 464 T_Duration */ "duration",
+ /* 207 465 T_Freq_Offset */ "freq_offset",
+ /* 208 466 T_Wander */ "wander",
+ /* 209 467 T_Jitter */ "jitter",
+ /* 210 468 T_Prop_Delay */ "prop_delay",
+ /* 211 469 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 985
+#define SCANNER_INIT_S 999
-const scan_state sst[988] = {
+const scan_state sst[1002] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
- S_ST( '-', 3, 330, 0 ), /* 1 */
+ S_ST( '-', 3, 331, 0 ), /* 1 */
S_ST( '.', 3, 3, 1 ), /* 2 */
- S_ST( '.', 3, 294, 0 ), /* 3 . */
+ S_ST( '.', 3, 295, 0 ), /* 3 . */
S_ST( 'a', 3, 23, 2 ), /* 4 */
S_ST( 'b', 3, 6, 0 ), /* 5 a */
S_ST( 'b', 3, 7, 0 ), /* 6 ab */
@@ -284,7 +287,7 @@ const scan_state sst[988] = {
S_ST( 'd', 3, 56, 0 ), /* 55 beep_ */
S_ST( 'e', 3, 57, 0 ), /* 56 beep_d */
S_ST( 'l', 3, 58, 0 ), /* 57 beep_de */
- S_ST( 'a', 3, 458, 0 ), /* 58 beep_del */
+ S_ST( 'a', 3, 461, 0 ), /* 58 beep_del */
S_ST( 'r', 3, 60, 48 ), /* 59 b */
S_ST( 'o', 3, 61, 0 ), /* 60 br */
S_ST( 'a', 3, 62, 0 ), /* 61 bro */
@@ -352,138 +355,138 @@ const scan_state sst[988] = {
S_ST( 'a', 3, 124, 0 ), /* 123 cryptost */
S_ST( 't', 3, 282, 0 ), /* 124 cryptosta */
S_ST( 't', 3, 283, 117 ), /* 125 c */
- S_ST( 'd', 3, 160, 78 ), /* 126 */
+ S_ST( 'd', 3, 163, 78 ), /* 126 */
S_ST( 'a', 3, 284, 0 ), /* 127 d */
- S_ST( 'e', 3, 129, 127 ), /* 128 d */
+ S_ST( 'e', 3, 133, 127 ), /* 128 d */
S_ST( 'f', 3, 130, 0 ), /* 129 de */
S_ST( 'a', 3, 131, 0 ), /* 130 def */
S_ST( 'u', 3, 132, 0 ), /* 131 defa */
S_ST( 'l', 3, 285, 0 ), /* 132 defau */
- S_ST( 'i', 3, 137, 128 ), /* 133 d */
- S_ST( 'g', 3, 135, 0 ), /* 134 di */
- S_ST( 'e', 3, 136, 0 ), /* 135 dig */
- S_ST( 's', 3, 286, 0 ), /* 136 dige */
- S_ST( 's', 3, 144, 134 ), /* 137 di */
- S_ST( 'a', 3, 139, 0 ), /* 138 dis */
- S_ST( 'b', 3, 140, 0 ), /* 139 disa */
- S_ST( 'l', 3, 287, 0 ), /* 140 disab */
- S_ST( 'c', 3, 142, 138 ), /* 141 dis */
- S_ST( 'a', 3, 143, 0 ), /* 142 disc */
- S_ST( 'r', 3, 288, 0 ), /* 143 disca */
- S_ST( 'p', 3, 145, 141 ), /* 144 dis */
- S_ST( 'e', 3, 146, 0 ), /* 145 disp */
- S_ST( 'r', 3, 147, 0 ), /* 146 dispe */
- S_ST( 's', 3, 148, 0 ), /* 147 disper */
- S_ST( 'i', 3, 149, 0 ), /* 148 dispers */
- S_ST( 'o', 3, 289, 0 ), /* 149 dispersi */
- S_ST( 'r', 3, 157, 133 ), /* 150 d */
- S_ST( 'i', 3, 152, 0 ), /* 151 dr */
- S_ST( 'f', 3, 153, 0 ), /* 152 dri */
- S_ST( 't', 3, 154, 0 ), /* 153 drif */
- S_ST( 'f', 3, 155, 0 ), /* 154 drift */
- S_ST( 'i', 3, 156, 0 ), /* 155 driftf */
- S_ST( 'l', 3, 291, 0 ), /* 156 driftfi */
- S_ST( 'o', 3, 292, 151 ), /* 157 dr */
- S_ST( 's', 3, 159, 150 ), /* 158 d */
- S_ST( 'c', 3, 293, 0 ), /* 159 ds */
- S_ST( 'u', 3, 161, 158 ), /* 160 d */
- S_ST( 'r', 3, 162, 0 ), /* 161 du */
- S_ST( 'a', 3, 163, 0 ), /* 162 dur */
- S_ST( 't', 3, 164, 0 ), /* 163 dura */
- S_ST( 'i', 3, 165, 0 ), /* 164 durat */
- S_ST( 'o', 3, 461, 0 ), /* 165 durati */
- S_ST( 'e', 3, 171, 126 ), /* 166 */
- S_ST( 'n', 3, 296, 0 ), /* 167 e */
- S_ST( 'a', 3, 169, 0 ), /* 168 en */
- S_ST( 'b', 3, 170, 0 ), /* 169 ena */
- S_ST( 'l', 3, 295, 0 ), /* 170 enab */
- S_ST( 'p', 3, 172, 167 ), /* 171 e */
- S_ST( 'e', 3, 173, 0 ), /* 172 ep */
- S_ST( 'e', 3, 297, 0 ), /* 173 epe */
- S_ST( 'f', 3, 195, 166 ), /* 174 */
- S_ST( 'i', 3, 176, 0 ), /* 175 f */
- S_ST( 'l', 3, 299, 0 ), /* 176 fi */
- S_ST( 'g', 3, 178, 0 ), /* 177 file */
- S_ST( 'e', 3, 300, 0 ), /* 178 fileg */
- S_ST( 'n', 3, 180, 177 ), /* 179 file */
- S_ST( 'u', 3, 301, 0 ), /* 180 filen */
- S_ST( 'l', 3, 185, 175 ), /* 181 f */
- S_ST( 'a', 3, 184, 0 ), /* 182 fl */
- S_ST( 'g', 3, 305, 0 ), /* 183 fla */
- S_ST( 'k', 3, 306, 183 ), /* 184 fla */
- S_ST( 'o', 3, 186, 182 ), /* 185 fl */
- S_ST( 'o', 3, 307, 0 ), /* 186 flo */
- S_ST( 'r', 3, 188, 181 ), /* 187 f */
- S_ST( 'e', 3, 308, 0 ), /* 188 fr */
- S_ST( '_', 3, 190, 0 ), /* 189 freq */
- S_ST( 'o', 3, 191, 0 ), /* 190 freq_ */
- S_ST( 'f', 3, 192, 0 ), /* 191 freq_o */
- S_ST( 'f', 3, 193, 0 ), /* 192 freq_of */
- S_ST( 's', 3, 194, 0 ), /* 193 freq_off */
- S_ST( 'e', 3, 462, 0 ), /* 194 freq_offs */
- S_ST( 'u', 3, 198, 187 ), /* 195 f */
- S_ST( 'd', 3, 197, 0 ), /* 196 fu */
- S_ST( 'g', 3, 309, 0 ), /* 197 fud */
- S_ST( 'z', 3, 310, 196 ), /* 198 fu */
- S_ST( 'h', 3, 202, 174 ), /* 199 */
- S_ST( 'o', 3, 201, 0 ), /* 200 h */
- S_ST( 's', 3, 311, 0 ), /* 201 ho */
- S_ST( 'u', 3, 203, 200 ), /* 202 h */
- S_ST( 'f', 3, 204, 0 ), /* 203 hu */
- S_ST( 'f', 3, 205, 0 ), /* 204 huf */
- S_ST( 'p', 3, 206, 0 ), /* 205 huff */
- S_ST( 'u', 3, 207, 0 ), /* 206 huffp */
- S_ST( 'f', 3, 312, 0 ), /* 207 huffpu */
- S_ST( 'i', 3, 252, 199 ), /* 208 */
- S_ST( 'b', 3, 210, 0 ), /* 209 i */
- S_ST( 'u', 3, 211, 0 ), /* 210 ib */
- S_ST( 'r', 3, 212, 0 ), /* 211 ibu */
- S_ST( 's', 3, 313, 0 ), /* 212 ibur */
- S_ST( 'd', 3, 214, 209 ), /* 213 i */
- S_ST( 'e', 3, 215, 0 ), /* 214 id */
- S_ST( 'n', 3, 314, 0 ), /* 215 ide */
- S_ST( 'g', 3, 217, 213 ), /* 216 i */
- S_ST( 'n', 3, 218, 0 ), /* 217 ig */
- S_ST( 'o', 3, 219, 0 ), /* 218 ign */
- S_ST( 'r', 3, 315, 0 ), /* 219 igno */
- S_ST( 'h', 3, 221, 0 ), /* 220 ignore */
- S_ST( 'a', 3, 222, 0 ), /* 221 ignoreh */
- S_ST( 's', 3, 316, 0 ), /* 222 ignoreha */
- S_ST( 'n', 3, 246, 216 ), /* 223 i */
- S_ST( 'c', 3, 236, 0 ), /* 224 in */
- S_ST( 'a', 3, 226, 0 ), /* 225 inc */
- S_ST( 'l', 3, 227, 0 ), /* 226 inca */
- S_ST( 'l', 3, 228, 0 ), /* 227 incal */
- S_ST( 'o', 3, 317, 0 ), /* 228 incall */
- S_ST( 'l', 3, 230, 225 ), /* 229 inc */
- S_ST( 'u', 3, 231, 0 ), /* 230 incl */
- S_ST( 'd', 3, 232, 0 ), /* 231 inclu */
- S_ST( 'e', 3, 233, 0 ), /* 232 includ */
- S_ST( 'f', 3, 234, 0 ), /* 233 include */
- S_ST( 'i', 3, 235, 0 ), /* 234 includef */
- S_ST( 'l', 3, 321, 0 ), /* 235 includefi */
- S_ST( 'm', 3, 237, 229 ), /* 236 inc */
- S_ST( 'e', 3, 318, 0 ), /* 237 incm */
- S_ST( 'i', 3, 239, 224 ), /* 238 in */
- S_ST( 't', 3, 244, 0 ), /* 239 ini */
- S_ST( 'a', 3, 241, 0 ), /* 240 init */
- S_ST( 'l', 3, 242, 0 ), /* 241 inita */
- S_ST( 'l', 3, 243, 0 ), /* 242 inital */
- S_ST( 'o', 3, 319, 0 ), /* 243 initall */
- S_ST( 'm', 3, 245, 240 ), /* 244 init */
- S_ST( 'e', 3, 320, 0 ), /* 245 initm */
- S_ST( 't', 3, 247, 238 ), /* 246 in */
- S_ST( 'e', 3, 248, 0 ), /* 247 int */
- S_ST( 'r', 3, 249, 0 ), /* 248 inte */
- S_ST( 'f', 3, 250, 0 ), /* 249 inter */
- S_ST( 'a', 3, 251, 0 ), /* 250 interf */
- S_ST( 'c', 3, 323, 0 ), /* 251 interfa */
- S_ST( 'p', 3, 324, 325 ), /* 252 i */
- S_ST( 'p', 3, 254, 0 ), /* 253 ip */
- S_ST( 'e', 3, 255, 0 ), /* 254 ipp */
- S_ST( 'e', 3, 256, 0 ), /* 255 ippe */
- S_ST( 'r', 3, 257, 0 ), /* 256 ippee */
- S_ST( 'l', 3, 290, 0 ), /* 257 ippeer */
+ S_ST( 'v', 3, 134, 129 ), /* 133 de */
+ S_ST( 'i', 3, 135, 0 ), /* 134 dev */
+ S_ST( 'c', 3, 286, 0 ), /* 135 devi */
+ S_ST( 'i', 3, 140, 128 ), /* 136 d */
+ S_ST( 'g', 3, 138, 0 ), /* 137 di */
+ S_ST( 'e', 3, 139, 0 ), /* 138 dig */
+ S_ST( 's', 3, 287, 0 ), /* 139 dige */
+ S_ST( 's', 3, 147, 137 ), /* 140 di */
+ S_ST( 'a', 3, 142, 0 ), /* 141 dis */
+ S_ST( 'b', 3, 143, 0 ), /* 142 disa */
+ S_ST( 'l', 3, 288, 0 ), /* 143 disab */
+ S_ST( 'c', 3, 145, 141 ), /* 144 dis */
+ S_ST( 'a', 3, 146, 0 ), /* 145 disc */
+ S_ST( 'r', 3, 289, 0 ), /* 146 disca */
+ S_ST( 'p', 3, 148, 144 ), /* 147 dis */
+ S_ST( 'e', 3, 149, 0 ), /* 148 disp */
+ S_ST( 'r', 3, 150, 0 ), /* 149 dispe */
+ S_ST( 's', 3, 151, 0 ), /* 150 disper */
+ S_ST( 'i', 3, 152, 0 ), /* 151 dispers */
+ S_ST( 'o', 3, 290, 0 ), /* 152 dispersi */
+ S_ST( 'r', 3, 160, 136 ), /* 153 d */
+ S_ST( 'i', 3, 155, 0 ), /* 154 dr */
+ S_ST( 'f', 3, 156, 0 ), /* 155 dri */
+ S_ST( 't', 3, 157, 0 ), /* 156 drif */
+ S_ST( 'f', 3, 158, 0 ), /* 157 drift */
+ S_ST( 'i', 3, 159, 0 ), /* 158 driftf */
+ S_ST( 'l', 3, 292, 0 ), /* 159 driftfi */
+ S_ST( 'o', 3, 293, 154 ), /* 160 dr */
+ S_ST( 's', 3, 162, 153 ), /* 161 d */
+ S_ST( 'c', 3, 294, 0 ), /* 162 ds */
+ S_ST( 'u', 3, 164, 161 ), /* 163 d */
+ S_ST( 'r', 3, 165, 0 ), /* 164 du */
+ S_ST( 'a', 3, 166, 0 ), /* 165 dur */
+ S_ST( 't', 3, 167, 0 ), /* 166 dura */
+ S_ST( 'i', 3, 168, 0 ), /* 167 durat */
+ S_ST( 'o', 3, 464, 0 ), /* 168 durati */
+ S_ST( 'e', 3, 174, 126 ), /* 169 */
+ S_ST( 'n', 3, 297, 0 ), /* 170 e */
+ S_ST( 'a', 3, 172, 0 ), /* 171 en */
+ S_ST( 'b', 3, 173, 0 ), /* 172 ena */
+ S_ST( 'l', 3, 296, 0 ), /* 173 enab */
+ S_ST( 'p', 3, 175, 170 ), /* 174 e */
+ S_ST( 'e', 3, 176, 0 ), /* 175 ep */
+ S_ST( 'e', 3, 298, 0 ), /* 176 epe */
+ S_ST( 'f', 3, 198, 169 ), /* 177 */
+ S_ST( 'i', 3, 179, 0 ), /* 178 f */
+ S_ST( 'l', 3, 300, 0 ), /* 179 fi */
+ S_ST( 'g', 3, 181, 0 ), /* 180 file */
+ S_ST( 'e', 3, 301, 0 ), /* 181 fileg */
+ S_ST( 'n', 3, 183, 180 ), /* 182 file */
+ S_ST( 'u', 3, 302, 0 ), /* 183 filen */
+ S_ST( 'l', 3, 188, 178 ), /* 184 f */
+ S_ST( 'a', 3, 187, 0 ), /* 185 fl */
+ S_ST( 'g', 3, 306, 0 ), /* 186 fla */
+ S_ST( 'k', 3, 307, 186 ), /* 187 fla */
+ S_ST( 'o', 3, 189, 185 ), /* 188 fl */
+ S_ST( 'o', 3, 308, 0 ), /* 189 flo */
+ S_ST( 'r', 3, 191, 184 ), /* 190 f */
+ S_ST( 'e', 3, 309, 0 ), /* 191 fr */
+ S_ST( '_', 3, 193, 0 ), /* 192 freq */
+ S_ST( 'o', 3, 194, 0 ), /* 193 freq_ */
+ S_ST( 'f', 3, 195, 0 ), /* 194 freq_o */
+ S_ST( 'f', 3, 196, 0 ), /* 195 freq_of */
+ S_ST( 's', 3, 197, 0 ), /* 196 freq_off */
+ S_ST( 'e', 3, 465, 0 ), /* 197 freq_offs */
+ S_ST( 'u', 3, 201, 190 ), /* 198 f */
+ S_ST( 'd', 3, 200, 0 ), /* 199 fu */
+ S_ST( 'g', 3, 310, 0 ), /* 200 fud */
+ S_ST( 'z', 3, 311, 199 ), /* 201 fu */
+ S_ST( 'h', 3, 205, 177 ), /* 202 */
+ S_ST( 'o', 3, 204, 0 ), /* 203 h */
+ S_ST( 's', 3, 312, 0 ), /* 204 ho */
+ S_ST( 'u', 3, 206, 203 ), /* 205 h */
+ S_ST( 'f', 3, 207, 0 ), /* 206 hu */
+ S_ST( 'f', 3, 208, 0 ), /* 207 huf */
+ S_ST( 'p', 3, 209, 0 ), /* 208 huff */
+ S_ST( 'u', 3, 210, 0 ), /* 209 huffp */
+ S_ST( 'f', 3, 313, 0 ), /* 210 huffpu */
+ S_ST( 'i', 3, 255, 202 ), /* 211 */
+ S_ST( 'b', 3, 213, 0 ), /* 212 i */
+ S_ST( 'u', 3, 214, 0 ), /* 213 ib */
+ S_ST( 'r', 3, 215, 0 ), /* 214 ibu */
+ S_ST( 's', 3, 314, 0 ), /* 215 ibur */
+ S_ST( 'd', 3, 217, 212 ), /* 216 i */
+ S_ST( 'e', 3, 218, 0 ), /* 217 id */
+ S_ST( 'n', 3, 315, 0 ), /* 218 ide */
+ S_ST( 'g', 3, 220, 216 ), /* 219 i */
+ S_ST( 'n', 3, 221, 0 ), /* 220 ig */
+ S_ST( 'o', 3, 222, 0 ), /* 221 ign */
+ S_ST( 'r', 3, 316, 0 ), /* 222 igno */
+ S_ST( 'h', 3, 224, 0 ), /* 223 ignore */
+ S_ST( 'a', 3, 225, 0 ), /* 224 ignoreh */
+ S_ST( 's', 3, 317, 0 ), /* 225 ignoreha */
+ S_ST( 'n', 3, 249, 219 ), /* 226 i */
+ S_ST( 'c', 3, 239, 0 ), /* 227 in */
+ S_ST( 'a', 3, 229, 0 ), /* 228 inc */
+ S_ST( 'l', 3, 230, 0 ), /* 229 inca */
+ S_ST( 'l', 3, 231, 0 ), /* 230 incal */
+ S_ST( 'o', 3, 318, 0 ), /* 231 incall */
+ S_ST( 'l', 3, 233, 228 ), /* 232 inc */
+ S_ST( 'u', 3, 234, 0 ), /* 233 incl */
+ S_ST( 'd', 3, 235, 0 ), /* 234 inclu */
+ S_ST( 'e', 3, 236, 0 ), /* 235 includ */
+ S_ST( 'f', 3, 237, 0 ), /* 236 include */
+ S_ST( 'i', 3, 238, 0 ), /* 237 includef */
+ S_ST( 'l', 3, 322, 0 ), /* 238 includefi */
+ S_ST( 'm', 3, 240, 232 ), /* 239 inc */
+ S_ST( 'e', 3, 319, 0 ), /* 240 incm */
+ S_ST( 'i', 3, 242, 227 ), /* 241 in */
+ S_ST( 't', 3, 247, 0 ), /* 242 ini */
+ S_ST( 'a', 3, 244, 0 ), /* 243 init */
+ S_ST( 'l', 3, 245, 0 ), /* 244 inita */
+ S_ST( 'l', 3, 246, 0 ), /* 245 inital */
+ S_ST( 'o', 3, 320, 0 ), /* 246 initall */
+ S_ST( 'm', 3, 248, 243 ), /* 247 init */
+ S_ST( 'e', 3, 321, 0 ), /* 248 initm */
+ S_ST( 't', 3, 250, 241 ), /* 249 in */
+ S_ST( 'e', 3, 251, 0 ), /* 250 int */
+ S_ST( 'r', 3, 252, 0 ), /* 251 inte */
+ S_ST( 'f', 3, 253, 0 ), /* 252 inter */
+ S_ST( 'a', 3, 254, 0 ), /* 253 interf */
+ S_ST( 'c', 3, 324, 0 ), /* 254 interfa */
+ S_ST( 'p', 3, 445, 326 ), /* 255 i */
+ S_ST( 'p', 3, 257, 0 ), /* 256 ip */
+ S_ST( 'e', 3, 291, 0 ), /* 257 ipp */
S_ST( 'v', 1, 0, 0 ), /* 258 T_Abbrev */
S_ST( 'e', 0, 0, 0 ), /* 259 T_Age */
S_ST( 'l', 0, 12, 0 ), /* 260 T_All */
@@ -512,707 +515,721 @@ const scan_state sst[988] = {
S_ST( 'l', 0, 0, 0 ), /* 283 T_Ctl */
S_ST( 'y', 0, 0, 0 ), /* 284 T_Day */
S_ST( 't', 0, 0, 0 ), /* 285 T_Default */
- S_ST( 't', 1, 0, 0 ), /* 286 T_Digest */
- S_ST( 'e', 0, 0, 0 ), /* 287 T_Disable */
- S_ST( 'd', 0, 0, 0 ), /* 288 T_Discard */
- S_ST( 'n', 0, 0, 0 ), /* 289 T_Dispersion */
- S_ST( 'i', 3, 298, 0 ), /* 290 ippeerl */
- S_ST( 'e', 1, 0, 0 ), /* 291 T_Driftfile */
- S_ST( 'p', 0, 0, 0 ), /* 292 T_Drop */
- S_ST( 'p', 0, 0, 0 ), /* 293 T_Dscp */
- S_ST( '.', 0, 0, 0 ), /* 294 T_Ellipsis */
- S_ST( 'e', 0, 0, 0 ), /* 295 T_Enable */
- S_ST( 'd', 0, 0, 168 ), /* 296 T_End */
- S_ST( 'r', 0, 0, 0 ), /* 297 T_Epeer */
- S_ST( 'm', 3, 322, 0 ), /* 298 ippeerli */
- S_ST( 'e', 1, 179, 0 ), /* 299 T_File */
- S_ST( 'n', 0, 0, 0 ), /* 300 T_Filegen */
- S_ST( 'm', 0, 0, 0 ), /* 301 T_Filenum */
- S_ST( '1', 0, 0, 0 ), /* 302 T_Flag1 */
- S_ST( '2', 0, 0, 302 ), /* 303 T_Flag2 */
- S_ST( '3', 0, 0, 303 ), /* 304 T_Flag3 */
- S_ST( '4', 0, 0, 304 ), /* 305 T_Flag4 */
- S_ST( 'e', 0, 0, 0 ), /* 306 T_Flake */
- S_ST( 'r', 0, 0, 0 ), /* 307 T_Floor */
- S_ST( 'q', 0, 189, 0 ), /* 308 T_Freq */
- S_ST( 'e', 1, 0, 0 ), /* 309 T_Fudge */
- S_ST( 'z', 0, 0, 0 ), /* 310 T_Fuzz */
- S_ST( 't', 1, 0, 0 ), /* 311 T_Host */
- S_ST( 'f', 0, 0, 0 ), /* 312 T_Huffpuff */
- S_ST( 't', 0, 0, 0 ), /* 313 T_Iburst */
- S_ST( 't', 1, 0, 0 ), /* 314 T_Ident */
- S_ST( 'e', 0, 220, 0 ), /* 315 T_Ignore */
- S_ST( 'h', 0, 0, 0 ), /* 316 T_Ignorehash */
- S_ST( 'c', 0, 0, 0 ), /* 317 T_Incalloc */
- S_ST( 'm', 0, 0, 0 ), /* 318 T_Incmem */
- S_ST( 'c', 0, 0, 0 ), /* 319 T_Initalloc */
- S_ST( 'm', 0, 0, 0 ), /* 320 T_Initmem */
- S_ST( 'e', 1, 0, 0 ), /* 321 T_Includefile */
- S_ST( 'i', 3, 326, 0 ), /* 322 ippeerlim */
- S_ST( 'e', 0, 0, 0 ), /* 323 T_Interface */
- S_ST( 'v', 3, 329, 253 ), /* 324 ip */
- S_ST( 'o', 0, 0, 223 ), /* 325 T_Io */
- S_ST( 't', 0, 0, 0 ), /* 326 T_Ippeerlimit */
- S_ST( '4', 0, 0, 0 ), /* 327 T_Ipv4 */
- S_ST( '4', 0, 0, 0 ), /* 328 T_Ipv4_flag */
- S_ST( '6', 0, 0, 327 ), /* 329 T_Ipv6 */
- S_ST( '6', 0, 0, 328 ), /* 330 T_Ipv6_flag */
- S_ST( 'l', 0, 0, 0 ), /* 331 T_Kernel */
- S_ST( 'y', 0, 333, 468 ), /* 332 T_Key */
- S_ST( 's', 1, 471, 0 ), /* 333 T_Keys */
- S_ST( 'r', 1, 0, 0 ), /* 334 T_Keysdir */
- S_ST( 'd', 0, 0, 0 ), /* 335 T_Kod */
- S_ST( 'e', 1, 0, 0 ), /* 336 T_Leapfile */
- S_ST( 'l', 0, 0, 0 ), /* 337 T_Leapsmearinterval */
- S_ST( 'd', 0, 0, 0 ), /* 338 T_Limited */
- S_ST( 'k', 0, 0, 0 ), /* 339 T_Link */
- S_ST( 'n', 0, 0, 0 ), /* 340 T_Listen */
- S_ST( 'g', 2, 0, 0 ), /* 341 T_Logconfig */
- S_ST( 'e', 1, 0, 0 ), /* 342 T_Logfile */
- S_ST( 's', 0, 0, 0 ), /* 343 T_Loopstats */
- S_ST( 'p', 0, 0, 0 ), /* 344 T_Lowpriotrap */
- S_ST( 't', 1, 0, 0 ), /* 345 T_Manycastclient */
- S_ST( 'r', 2, 0, 0 ), /* 346 T_Manycastserver */
- S_ST( 'k', 0, 0, 0 ), /* 347 T_Mask */
- S_ST( 'e', 0, 0, 0 ), /* 348 T_Maxage */
- S_ST( 'k', 0, 0, 0 ), /* 349 T_Maxclock */
- S_ST( 'h', 0, 0, 0 ), /* 350 T_Maxdepth */
- S_ST( 't', 0, 0, 0 ), /* 351 T_Maxdist */
- S_ST( 'm', 0, 0, 0 ), /* 352 T_Maxmem */
- S_ST( 'l', 0, 0, 0 ), /* 353 T_Maxpoll */
- S_ST( 's', 0, 0, 0 ), /* 354 T_Mdnstries */
- S_ST( 'm', 0, 571, 0 ), /* 355 T_Mem */
- S_ST( 'k', 0, 0, 0 ), /* 356 T_Memlock */
- S_ST( 'k', 0, 0, 0 ), /* 357 T_Minclock */
- S_ST( 'h', 0, 0, 0 ), /* 358 T_Mindepth */
- S_ST( 't', 0, 0, 0 ), /* 359 T_Mindist */
- S_ST( 'm', 0, 0, 0 ), /* 360 T_Minimum */
- S_ST( 'r', 0, 0, 0 ), /* 361 T_Minjitter */
- S_ST( 'l', 0, 0, 0 ), /* 362 T_Minpoll */
- S_ST( 'e', 0, 0, 0 ), /* 363 T_Minsane */
- S_ST( 'e', 0, 365, 0 ), /* 364 T_Mode */
- S_ST( '7', 0, 0, 0 ), /* 365 T_Mode7 */
- S_ST( 'r', 0, 0, 0 ), /* 366 T_Monitor */
- S_ST( 'h', 0, 0, 0 ), /* 367 T_Month */
- S_ST( 'u', 0, 0, 0 ), /* 368 T_Mru */
- S_ST( 'p', 0, 0, 0 ), /* 369 T_Mssntp */
- S_ST( 't', 2, 0, 0 ), /* 370 T_Multicastclient */
- S_ST( 'c', 0, 0, 0 ), /* 371 T_Nic */
- S_ST( 'k', 0, 0, 0 ), /* 372 T_Nolink */
- S_ST( 'y', 0, 0, 0 ), /* 373 T_Nomodify */
- S_ST( 't', 0, 0, 0 ), /* 374 T_Nomrulist */
- S_ST( 'e', 0, 0, 0 ), /* 375 T_None */
- S_ST( 'e', 0, 0, 0 ), /* 376 T_Nonvolatile */
- S_ST( 'r', 0, 0, 0 ), /* 377 T_Noepeer */
- S_ST( 'r', 0, 0, 0 ), /* 378 T_Nopeer */
- S_ST( 'y', 0, 0, 0 ), /* 379 T_Noquery */
- S_ST( 't', 0, 0, 0 ), /* 380 T_Noselect */
- S_ST( 'e', 0, 0, 0 ), /* 381 T_Noserve */
- S_ST( 'p', 0, 0, 0 ), /* 382 T_Notrap */
- S_ST( 't', 0, 0, 0 ), /* 383 T_Notrust */
- S_ST( 'p', 0, 676, 0 ), /* 384 T_Ntp */
- S_ST( 't', 0, 0, 0 ), /* 385 T_Ntpport */
- S_ST( 't', 1, 0, 0 ), /* 386 T_NtpSignDsocket */
- S_ST( 'n', 0, 691, 0 ), /* 387 T_Orphan */
- S_ST( 't', 0, 0, 0 ), /* 388 T_Orphanwait */
- S_ST( 'y', 0, 0, 0 ), /* 389 T_PCEdigest */
- S_ST( 'c', 0, 0, 0 ), /* 390 T_Panic */
- S_ST( 'r', 1, 718, 0 ), /* 391 T_Peer */
- S_ST( 's', 0, 0, 0 ), /* 392 T_Peerstats */
- S_ST( 'e', 2, 0, 0 ), /* 393 T_Phone */
- S_ST( 'd', 0, 726, 0 ), /* 394 T_Pid */
- S_ST( 'e', 1, 0, 0 ), /* 395 T_Pidfile */
- S_ST( 'l', 0, 731, 0 ), /* 396 T_Poll */
- S_ST( 't', 0, 0, 0 ), /* 397 T_PollSkewList */
- S_ST( 'l', 1, 0, 0 ), /* 398 T_Pool */
- S_ST( 't', 0, 0, 0 ), /* 399 T_Port */
- S_ST( 't', 0, 0, 0 ), /* 400 T_Preempt */
- S_ST( 'r', 0, 0, 0 ), /* 401 T_Prefer */
- S_ST( 's', 0, 0, 0 ), /* 402 T_Protostats */
- S_ST( 'w', 1, 0, 740 ), /* 403 T_Pw */
- S_ST( 'e', 1, 0, 0 ), /* 404 T_Randfile */
- S_ST( 's', 0, 0, 0 ), /* 405 T_Rawstats */
- S_ST( 'd', 1, 0, 0 ), /* 406 T_Refid */
- S_ST( 'y', 0, 0, 0 ), /* 407 T_Requestkey */
- S_ST( 't', 0, 0, 0 ), /* 408 T_Reset */
- S_ST( 't', 0, 0, 0 ), /* 409 T_Restrict */
- S_ST( 'e', 0, 0, 0 ), /* 410 T_Revoke */
- S_ST( 't', 0, 0, 0 ), /* 411 T_Rlimit */
- S_ST( 'r', 1, 0, 0 ), /* 412 T_Saveconfigdir */
- S_ST( 'r', 1, 823, 0 ), /* 413 T_Server */
- S_ST( 'e', 0, 0, 0 ), /* 414 T_Serverresponse */
- S_ST( 'j', 3, 427, 208 ), /* 415 */
- S_ST( 'r', 1, 0, 0 ), /* 416 T_Setvar */
- S_ST( 'e', 0, 0, 0 ), /* 417 T_Source */
- S_ST( 'e', 0, 0, 0 ), /* 418 T_Stacksize */
- S_ST( 's', 0, 0, 0 ), /* 419 T_Statistics */
- S_ST( 's', 0, 867, 862 ), /* 420 T_Stats */
- S_ST( 'r', 1, 0, 0 ), /* 421 T_Statsdir */
- S_ST( 'p', 0, 875, 0 ), /* 422 T_Step */
- S_ST( 'k', 0, 0, 0 ), /* 423 T_Stepback */
- S_ST( 'd', 0, 0, 0 ), /* 424 T_Stepfwd */
- S_ST( 't', 0, 0, 0 ), /* 425 T_Stepout */
- S_ST( 'm', 0, 0, 0 ), /* 426 T_Stratum */
- S_ST( 'i', 3, 442, 0 ), /* 427 j */
- S_ST( 's', 0, 882, 0 ), /* 428 T_Sys */
- S_ST( 's', 0, 0, 0 ), /* 429 T_Sysstats */
- S_ST( 'k', 0, 0, 0 ), /* 430 T_Tick */
- S_ST( '1', 0, 0, 0 ), /* 431 T_Time1 */
- S_ST( '2', 0, 0, 431 ), /* 432 T_Time2 */
- S_ST( 'r', 0, 0, 432 ), /* 433 T_Timer */
- S_ST( 's', 0, 0, 0 ), /* 434 T_Timingstats */
- S_ST( 'r', 0, 0, 0 ), /* 435 T_Tinker */
- S_ST( 's', 0, 0, 0 ), /* 436 T_Tos */
- S_ST( 'p', 1, 0, 0 ), /* 437 T_Trap */
- S_ST( 'e', 0, 0, 0 ), /* 438 T_True */
- S_ST( 'y', 0, 0, 0 ), /* 439 T_Trustedkey */
- S_ST( 'l', 0, 0, 0 ), /* 440 T_Ttl */
- S_ST( 'e', 0, 0, 0 ), /* 441 T_Type */
- S_ST( 't', 3, 449, 0 ), /* 442 ji */
- S_ST( 'y', 0, 0, 0 ), /* 443 T_UEcrypto */
- S_ST( 'y', 0, 0, 0 ), /* 444 T_UEcryptonak */
- S_ST( 'y', 0, 0, 0 ), /* 445 T_UEdigest */
- S_ST( 'g', 1, 0, 0 ), /* 446 T_Unconfig */
- S_ST( 'r', 1, 924, 0 ), /* 447 T_Unpeer */
- S_ST( 'n', 0, 0, 0 ), /* 448 T_Version */
- S_ST( 't', 3, 455, 0 ), /* 449 jit */
- S_ST( 'k', 0, 0, 0 ), /* 450 T_Week */
- S_ST( 'd', 0, 0, 0 ), /* 451 T_Wildcard */
- S_ST( 'e', 0, 0, 0 ), /* 452 T_Xleave */
- S_ST( 'e', 0, 0, 0 ), /* 453 T_Xmtnonce */
- S_ST( 'r', 0, 0, 0 ), /* 454 T_Year */
- S_ST( 'e', 3, 464, 0 ), /* 455 jitt */
- S_ST( 'k', 3, 473, 415 ), /* 456 */
- S_ST( 'e', 0, 0, 0 ), /* 457 T_Simulate */
- S_ST( 'y', 0, 0, 0 ), /* 458 T_Beep_Delay */
- S_ST( 'n', 0, 0, 0 ), /* 459 T_Sim_Duration */
- S_ST( 't', 0, 0, 0 ), /* 460 T_Server_Offset */
- S_ST( 'n', 0, 0, 0 ), /* 461 T_Duration */
- S_ST( 't', 0, 0, 0 ), /* 462 T_Freq_Offset */
- S_ST( 'r', 0, 0, 0 ), /* 463 T_Wander */
- S_ST( 'r', 0, 0, 0 ), /* 464 T_Jitter */
- S_ST( 'y', 0, 0, 0 ), /* 465 T_Prop_Delay */
- S_ST( 'y', 0, 0, 0 ), /* 466 T_Proc_Delay */
- S_ST( 'e', 3, 332, 0 ), /* 467 k */
- S_ST( 'r', 3, 469, 0 ), /* 468 ke */
- S_ST( 'n', 3, 470, 0 ), /* 469 ker */
- S_ST( 'e', 3, 331, 0 ), /* 470 kern */
- S_ST( 'd', 3, 472, 0 ), /* 471 keys */
- S_ST( 'i', 3, 334, 0 ), /* 472 keysd */
- S_ST( 'o', 3, 335, 467 ), /* 473 k */
- S_ST( 'l', 3, 502, 456 ), /* 474 */
- S_ST( 'e', 3, 476, 0 ), /* 475 l */
- S_ST( 'a', 3, 477, 0 ), /* 476 le */
- S_ST( 'p', 3, 481, 0 ), /* 477 lea */
- S_ST( 'f', 3, 479, 0 ), /* 478 leap */
- S_ST( 'i', 3, 480, 0 ), /* 479 leapf */
- S_ST( 'l', 3, 336, 0 ), /* 480 leapfi */
- S_ST( 's', 3, 482, 478 ), /* 481 leap */
- S_ST( 'm', 3, 483, 0 ), /* 482 leaps */
- S_ST( 'e', 3, 484, 0 ), /* 483 leapsm */
- S_ST( 'a', 3, 485, 0 ), /* 484 leapsme */
- S_ST( 'r', 3, 486, 0 ), /* 485 leapsmea */
- S_ST( 'i', 3, 487, 0 ), /* 486 leapsmear */
- S_ST( 'n', 3, 488, 0 ), /* 487 leapsmeari */
- S_ST( 't', 3, 489, 0 ), /* 488 leapsmearin */
- S_ST( 'e', 3, 490, 0 ), /* 489 leapsmearint */
- S_ST( 'r', 3, 491, 0 ), /* 490 leapsmearinte */
- S_ST( 'v', 3, 492, 0 ), /* 491 leapsmearinter */
- S_ST( 'a', 3, 337, 0 ), /* 492 leapsmearinterv */
- S_ST( 'i', 3, 499, 475 ), /* 493 l */
- S_ST( 'm', 3, 495, 0 ), /* 494 li */
- S_ST( 'i', 3, 496, 0 ), /* 495 lim */
- S_ST( 't', 3, 497, 0 ), /* 496 limi */
- S_ST( 'e', 3, 338, 0 ), /* 497 limit */
- S_ST( 'n', 3, 339, 494 ), /* 498 li */
- S_ST( 's', 3, 500, 498 ), /* 499 li */
- S_ST( 't', 3, 501, 0 ), /* 500 lis */
- S_ST( 'e', 3, 340, 0 ), /* 501 list */
- S_ST( 'o', 3, 518, 493 ), /* 502 l */
- S_ST( 'g', 3, 509, 0 ), /* 503 lo */
- S_ST( 'c', 3, 505, 0 ), /* 504 log */
- S_ST( 'o', 3, 506, 0 ), /* 505 logc */
- S_ST( 'n', 3, 507, 0 ), /* 506 logco */
- S_ST( 'f', 3, 508, 0 ), /* 507 logcon */
- S_ST( 'i', 3, 341, 0 ), /* 508 logconf */
- S_ST( 'f', 3, 510, 504 ), /* 509 log */
- S_ST( 'i', 3, 511, 0 ), /* 510 logf */
- S_ST( 'l', 3, 342, 0 ), /* 511 logfi */
- S_ST( 'o', 3, 513, 503 ), /* 512 lo */
- S_ST( 'p', 3, 514, 0 ), /* 513 loo */
- S_ST( 's', 3, 515, 0 ), /* 514 loop */
- S_ST( 't', 3, 516, 0 ), /* 515 loops */
- S_ST( 'a', 3, 517, 0 ), /* 516 loopst */
- S_ST( 't', 3, 343, 0 ), /* 517 loopsta */
- S_ST( 'w', 3, 519, 512 ), /* 518 lo */
- S_ST( 'p', 3, 520, 0 ), /* 519 low */
- S_ST( 'r', 3, 521, 0 ), /* 520 lowp */
- S_ST( 'i', 3, 522, 0 ), /* 521 lowpr */
- S_ST( 'o', 3, 523, 0 ), /* 522 lowpri */
- S_ST( 't', 3, 524, 0 ), /* 523 lowprio */
- S_ST( 'r', 3, 525, 0 ), /* 524 lowpriot */
- S_ST( 'a', 3, 344, 0 ), /* 525 lowpriotr */
- S_ST( 'm', 3, 612, 474 ), /* 526 */
- S_ST( 'a', 3, 545, 0 ), /* 527 m */
- S_ST( 'n', 3, 529, 0 ), /* 528 ma */
- S_ST( 'y', 3, 530, 0 ), /* 529 man */
- S_ST( 'c', 3, 531, 0 ), /* 530 many */
- S_ST( 'a', 3, 532, 0 ), /* 531 manyc */
- S_ST( 's', 3, 533, 0 ), /* 532 manyca */
- S_ST( 't', 3, 539, 0 ), /* 533 manycas */
- S_ST( 'c', 3, 535, 0 ), /* 534 manycast */
- S_ST( 'l', 3, 536, 0 ), /* 535 manycastc */
- S_ST( 'i', 3, 537, 0 ), /* 536 manycastcl */
- S_ST( 'e', 3, 538, 0 ), /* 537 manycastcli */
- S_ST( 'n', 3, 345, 0 ), /* 538 manycastclie */
- S_ST( 's', 3, 540, 534 ), /* 539 manycast */
- S_ST( 'e', 3, 541, 0 ), /* 540 manycasts */
- S_ST( 'r', 3, 542, 0 ), /* 541 manycastse */
- S_ST( 'v', 3, 543, 0 ), /* 542 manycastser */
- S_ST( 'e', 3, 346, 0 ), /* 543 manycastserv */
- S_ST( 's', 3, 347, 528 ), /* 544 ma */
- S_ST( 'x', 3, 560, 544 ), /* 545 ma */
- S_ST( 'a', 3, 547, 0 ), /* 546 max */
- S_ST( 'g', 3, 348, 0 ), /* 547 maxa */
- S_ST( 'c', 3, 549, 546 ), /* 548 max */
- S_ST( 'l', 3, 550, 0 ), /* 549 maxc */
- S_ST( 'o', 3, 551, 0 ), /* 550 maxcl */
- S_ST( 'c', 3, 349, 0 ), /* 551 maxclo */
- S_ST( 'd', 3, 556, 548 ), /* 552 max */
- S_ST( 'e', 3, 554, 0 ), /* 553 maxd */
- S_ST( 'p', 3, 555, 0 ), /* 554 maxde */
- S_ST( 't', 3, 350, 0 ), /* 555 maxdep */
- S_ST( 'i', 3, 557, 553 ), /* 556 maxd */
- S_ST( 's', 3, 351, 0 ), /* 557 maxdi */
- S_ST( 'm', 3, 559, 552 ), /* 558 max */
- S_ST( 'e', 3, 352, 0 ), /* 559 maxm */
- S_ST( 'p', 3, 561, 558 ), /* 560 max */
- S_ST( 'o', 3, 562, 0 ), /* 561 maxp */
- S_ST( 'l', 3, 353, 0 ), /* 562 maxpo */
- S_ST( 'd', 3, 564, 527 ), /* 563 m */
- S_ST( 'n', 3, 565, 0 ), /* 564 md */
- S_ST( 's', 3, 566, 0 ), /* 565 mdn */
- S_ST( 't', 3, 567, 0 ), /* 566 mdns */
- S_ST( 'r', 3, 568, 0 ), /* 567 mdnst */
- S_ST( 'i', 3, 569, 0 ), /* 568 mdnstr */
- S_ST( 'e', 3, 354, 0 ), /* 569 mdnstri */
- S_ST( 'e', 3, 355, 563 ), /* 570 m */
- S_ST( 'l', 3, 572, 0 ), /* 571 mem */
- S_ST( 'o', 3, 573, 0 ), /* 572 meml */
- S_ST( 'c', 3, 356, 0 ), /* 573 memlo */
- S_ST( 'i', 3, 575, 570 ), /* 574 m */
- S_ST( 'n', 3, 597, 0 ), /* 575 mi */
- S_ST( 'c', 3, 577, 0 ), /* 576 min */
- S_ST( 'l', 3, 578, 0 ), /* 577 minc */
- S_ST( 'o', 3, 579, 0 ), /* 578 mincl */
- S_ST( 'c', 3, 357, 0 ), /* 579 minclo */
- S_ST( 'd', 3, 584, 576 ), /* 580 min */
- S_ST( 'e', 3, 582, 0 ), /* 581 mind */
- S_ST( 'p', 3, 583, 0 ), /* 582 minde */
- S_ST( 't', 3, 358, 0 ), /* 583 mindep */
- S_ST( 'i', 3, 585, 581 ), /* 584 mind */
- S_ST( 's', 3, 359, 0 ), /* 585 mindi */
- S_ST( 'i', 3, 587, 580 ), /* 586 min */
- S_ST( 'm', 3, 588, 0 ), /* 587 mini */
- S_ST( 'u', 3, 360, 0 ), /* 588 minim */
- S_ST( 'j', 3, 590, 586 ), /* 589 min */
- S_ST( 'i', 3, 591, 0 ), /* 590 minj */
- S_ST( 't', 3, 592, 0 ), /* 591 minji */
- S_ST( 't', 3, 593, 0 ), /* 592 minjit */
- S_ST( 'e', 3, 361, 0 ), /* 593 minjitt */
- S_ST( 'p', 3, 595, 589 ), /* 594 min */
- S_ST( 'o', 3, 596, 0 ), /* 595 minp */
- S_ST( 'l', 3, 362, 0 ), /* 596 minpo */
- S_ST( 's', 3, 598, 594 ), /* 597 min */
- S_ST( 'a', 3, 599, 0 ), /* 598 mins */
- S_ST( 'n', 3, 363, 0 ), /* 599 minsa */
- S_ST( 'o', 3, 602, 574 ), /* 600 m */
- S_ST( 'd', 3, 364, 0 ), /* 601 mo */
- S_ST( 'n', 3, 606, 601 ), /* 602 mo */
- S_ST( 'i', 3, 604, 0 ), /* 603 mon */
- S_ST( 't', 3, 605, 0 ), /* 604 moni */
- S_ST( 'o', 3, 366, 0 ), /* 605 monit */
- S_ST( 't', 3, 367, 603 ), /* 606 mon */
- S_ST( 'r', 3, 368, 600 ), /* 607 m */
- S_ST( 's', 3, 609, 607 ), /* 608 m */
- S_ST( 's', 3, 610, 0 ), /* 609 ms */
- S_ST( 'n', 3, 611, 0 ), /* 610 mss */
- S_ST( 't', 3, 369, 0 ), /* 611 mssn */
- S_ST( 'u', 3, 613, 608 ), /* 612 m */
- S_ST( 'l', 3, 614, 0 ), /* 613 mu */
- S_ST( 't', 3, 615, 0 ), /* 614 mul */
- S_ST( 'i', 3, 616, 0 ), /* 615 mult */
- S_ST( 'c', 3, 617, 0 ), /* 616 multi */
- S_ST( 'a', 3, 618, 0 ), /* 617 multic */
- S_ST( 's', 3, 619, 0 ), /* 618 multica */
- S_ST( 't', 3, 620, 0 ), /* 619 multicas */
- S_ST( 'c', 3, 621, 0 ), /* 620 multicast */
- S_ST( 'l', 3, 622, 0 ), /* 621 multicastc */
- S_ST( 'i', 3, 623, 0 ), /* 622 multicastcl */
- S_ST( 'e', 3, 624, 0 ), /* 623 multicastcli */
- S_ST( 'n', 3, 370, 0 ), /* 624 multicastclie */
- S_ST( 'n', 3, 672, 526 ), /* 625 */
- S_ST( 'i', 3, 371, 0 ), /* 626 n */
- S_ST( 'o', 3, 667, 626 ), /* 627 n */
- S_ST( 'e', 3, 629, 0 ), /* 628 no */
- S_ST( 'p', 3, 630, 0 ), /* 629 noe */
- S_ST( 'e', 3, 631, 0 ), /* 630 noep */
- S_ST( 'e', 3, 377, 0 ), /* 631 noepe */
- S_ST( 'l', 3, 633, 628 ), /* 632 no */
- S_ST( 'i', 3, 634, 0 ), /* 633 nol */
- S_ST( 'n', 3, 372, 0 ), /* 634 noli */
- S_ST( 'm', 3, 640, 632 ), /* 635 no */
- S_ST( 'o', 3, 637, 0 ), /* 636 nom */
- S_ST( 'd', 3, 638, 0 ), /* 637 nomo */
- S_ST( 'i', 3, 639, 0 ), /* 638 nomod */
- S_ST( 'f', 3, 373, 0 ), /* 639 nomodi */
- S_ST( 'r', 3, 641, 636 ), /* 640 nom */
- S_ST( 'u', 3, 642, 0 ), /* 641 nomr */
- S_ST( 'l', 3, 643, 0 ), /* 642 nomru */
- S_ST( 'i', 3, 644, 0 ), /* 643 nomrul */
- S_ST( 's', 3, 374, 0 ), /* 644 nomruli */
- S_ST( 'n', 3, 646, 635 ), /* 645 no */
- S_ST( 'v', 3, 647, 375 ), /* 646 non */
- S_ST( 'o', 3, 648, 0 ), /* 647 nonv */
- S_ST( 'l', 3, 649, 0 ), /* 648 nonvo */
- S_ST( 'a', 3, 650, 0 ), /* 649 nonvol */
- S_ST( 't', 3, 651, 0 ), /* 650 nonvola */
- S_ST( 'i', 3, 652, 0 ), /* 651 nonvolat */
- S_ST( 'l', 3, 376, 0 ), /* 652 nonvolati */
- S_ST( 'p', 3, 654, 645 ), /* 653 no */
- S_ST( 'e', 3, 655, 0 ), /* 654 nop */
- S_ST( 'e', 3, 378, 0 ), /* 655 nope */
- S_ST( 'q', 3, 657, 653 ), /* 656 no */
- S_ST( 'u', 3, 658, 0 ), /* 657 noq */
- S_ST( 'e', 3, 659, 0 ), /* 658 noqu */
- S_ST( 'r', 3, 379, 0 ), /* 659 noque */
- S_ST( 's', 3, 661, 656 ), /* 660 no */
- S_ST( 'e', 3, 665, 0 ), /* 661 nos */
- S_ST( 'l', 3, 663, 0 ), /* 662 nose */
- S_ST( 'e', 3, 664, 0 ), /* 663 nosel */
- S_ST( 'c', 3, 380, 0 ), /* 664 nosele */
- S_ST( 'r', 3, 666, 662 ), /* 665 nose */
- S_ST( 'v', 3, 381, 0 ), /* 666 noser */
- S_ST( 't', 3, 668, 660 ), /* 667 no */
- S_ST( 'r', 3, 670, 0 ), /* 668 not */
- S_ST( 'a', 3, 382, 0 ), /* 669 notr */
- S_ST( 'u', 3, 671, 669 ), /* 670 notr */
- S_ST( 's', 3, 383, 0 ), /* 671 notru */
- S_ST( 't', 3, 384, 627 ), /* 672 n */
- S_ST( 'p', 3, 674, 0 ), /* 673 ntp */
- S_ST( 'o', 3, 675, 0 ), /* 674 ntpp */
- S_ST( 'r', 3, 385, 0 ), /* 675 ntppo */
- S_ST( 's', 3, 677, 673 ), /* 676 ntp */
- S_ST( 'i', 3, 678, 0 ), /* 677 ntps */
- S_ST( 'g', 3, 679, 0 ), /* 678 ntpsi */
- S_ST( 'n', 3, 680, 0 ), /* 679 ntpsig */
- S_ST( 'd', 3, 681, 0 ), /* 680 ntpsign */
- S_ST( 's', 3, 682, 0 ), /* 681 ntpsignd */
- S_ST( 'o', 3, 683, 0 ), /* 682 ntpsignds */
- S_ST( 'c', 3, 684, 0 ), /* 683 ntpsigndso */
- S_ST( 'k', 3, 685, 0 ), /* 684 ntpsigndsoc */
- S_ST( 'e', 3, 386, 0 ), /* 685 ntpsigndsock */
- S_ST( 'o', 3, 687, 625 ), /* 686 */
- S_ST( 'r', 3, 688, 0 ), /* 687 o */
- S_ST( 'p', 3, 689, 0 ), /* 688 or */
- S_ST( 'h', 3, 690, 0 ), /* 689 orp */
- S_ST( 'a', 3, 387, 0 ), /* 690 orph */
- S_ST( 'w', 3, 692, 0 ), /* 691 orphan */
- S_ST( 'a', 3, 693, 0 ), /* 692 orphanw */
- S_ST( 'i', 3, 388, 0 ), /* 693 orphanwa */
- S_ST( 'p', 3, 403, 686 ), /* 694 */
- S_ST( 'a', 3, 696, 0 ), /* 695 p */
- S_ST( 'n', 3, 697, 0 ), /* 696 pa */
- S_ST( 'i', 3, 390, 0 ), /* 697 pan */
- S_ST( 'e', 3, 699, 695 ), /* 698 p */
- S_ST( 'e', 3, 391, 0 ), /* 699 pe */
- S_ST( '_', 3, 701, 0 ), /* 700 peer */
- S_ST( 'c', 3, 702, 0 ), /* 701 peer_ */
- S_ST( 'l', 3, 703, 0 ), /* 702 peer_c */
- S_ST( 'e', 3, 704, 0 ), /* 703 peer_cl */
- S_ST( 'a', 3, 705, 0 ), /* 704 peer_cle */
- S_ST( 'r', 3, 706, 0 ), /* 705 peer_clea */
- S_ST( '_', 3, 707, 0 ), /* 706 peer_clear */
- S_ST( 'd', 3, 708, 0 ), /* 707 peer_clear_ */
- S_ST( 'i', 3, 709, 0 ), /* 708 peer_clear_d */
- S_ST( 'g', 3, 710, 0 ), /* 709 peer_clear_di */
- S_ST( 'e', 3, 711, 0 ), /* 710 peer_clear_dig */
- S_ST( 's', 3, 712, 0 ), /* 711 peer_clear_dige */
- S_ST( 't', 3, 713, 0 ), /* 712 peer_clear_diges */
- S_ST( '_', 3, 714, 0 ), /* 713 peer_clear_digest */
- S_ST( 'e', 3, 715, 0 ), /* 714 peer_clear_digest_ */
- S_ST( 'a', 3, 716, 0 ), /* 715 peer_clear_digest_e */
- S_ST( 'r', 3, 717, 0 ), /* 716 peer_clear_digest_ea */
- S_ST( 'l', 3, 389, 0 ), /* 717 peer_clear_digest_ear */
- S_ST( 's', 3, 719, 700 ), /* 718 peer */
- S_ST( 't', 3, 720, 0 ), /* 719 peers */
- S_ST( 'a', 3, 721, 0 ), /* 720 peerst */
- S_ST( 't', 3, 392, 0 ), /* 721 peersta */
- S_ST( 'h', 3, 723, 698 ), /* 722 p */
- S_ST( 'o', 3, 724, 0 ), /* 723 ph */
- S_ST( 'n', 3, 393, 0 ), /* 724 pho */
- S_ST( 'i', 3, 394, 722 ), /* 725 p */
- S_ST( 'f', 3, 727, 0 ), /* 726 pid */
- S_ST( 'i', 3, 728, 0 ), /* 727 pidf */
- S_ST( 'l', 3, 395, 0 ), /* 728 pidfi */
- S_ST( 'o', 3, 739, 725 ), /* 729 p */
- S_ST( 'l', 3, 396, 0 ), /* 730 po */
- S_ST( 's', 3, 732, 0 ), /* 731 poll */
- S_ST( 'k', 3, 733, 0 ), /* 732 polls */
- S_ST( 'e', 3, 734, 0 ), /* 733 pollsk */
- S_ST( 'w', 3, 735, 0 ), /* 734 pollske */
- S_ST( 'l', 3, 736, 0 ), /* 735 pollskew */
- S_ST( 'i', 3, 737, 0 ), /* 736 pollskewl */
- S_ST( 's', 3, 397, 0 ), /* 737 pollskewli */
- S_ST( 'o', 3, 398, 730 ), /* 738 po */
- S_ST( 'r', 3, 399, 738 ), /* 739 po */
- S_ST( 'r', 3, 747, 729 ), /* 740 p */
- S_ST( 'e', 3, 745, 0 ), /* 741 pr */
- S_ST( 'e', 3, 743, 0 ), /* 742 pre */
- S_ST( 'm', 3, 744, 0 ), /* 743 pree */
- S_ST( 'p', 3, 400, 0 ), /* 744 preem */
- S_ST( 'f', 3, 746, 742 ), /* 745 pre */
- S_ST( 'e', 3, 401, 0 ), /* 746 pref */
- S_ST( 'o', 3, 760, 741 ), /* 747 pr */
- S_ST( 'c', 3, 749, 0 ), /* 748 pro */
- S_ST( '_', 3, 750, 0 ), /* 749 proc */
- S_ST( 'd', 3, 751, 0 ), /* 750 proc_ */
- S_ST( 'e', 3, 752, 0 ), /* 751 proc_d */
- S_ST( 'l', 3, 753, 0 ), /* 752 proc_de */
- S_ST( 'a', 3, 466, 0 ), /* 753 proc_del */
- S_ST( 'p', 3, 755, 748 ), /* 754 pro */
- S_ST( '_', 3, 756, 0 ), /* 755 prop */
- S_ST( 'd', 3, 757, 0 ), /* 756 prop_ */
- S_ST( 'e', 3, 758, 0 ), /* 757 prop_d */
- S_ST( 'l', 3, 759, 0 ), /* 758 prop_de */
- S_ST( 'a', 3, 465, 0 ), /* 759 prop_del */
- S_ST( 't', 3, 761, 754 ), /* 760 pro */
- S_ST( 'o', 3, 762, 0 ), /* 761 prot */
- S_ST( 's', 3, 763, 0 ), /* 762 proto */
- S_ST( 't', 3, 764, 0 ), /* 763 protos */
- S_ST( 'a', 3, 765, 0 ), /* 764 protost */
- S_ST( 't', 3, 402, 0 ), /* 765 protosta */
- S_ST( 'r', 3, 797, 694 ), /* 766 */
- S_ST( 'a', 3, 773, 0 ), /* 767 r */
- S_ST( 'n', 3, 769, 0 ), /* 768 ra */
- S_ST( 'd', 3, 770, 0 ), /* 769 ran */
- S_ST( 'f', 3, 771, 0 ), /* 770 rand */
- S_ST( 'i', 3, 772, 0 ), /* 771 randf */
- S_ST( 'l', 3, 404, 0 ), /* 772 randfi */
- S_ST( 'w', 3, 774, 768 ), /* 773 ra */
- S_ST( 's', 3, 775, 0 ), /* 774 raw */
- S_ST( 't', 3, 776, 0 ), /* 775 raws */
- S_ST( 'a', 3, 777, 0 ), /* 776 rawst */
- S_ST( 't', 3, 405, 0 ), /* 777 rawsta */
- S_ST( 'e', 3, 794, 767 ), /* 778 r */
- S_ST( 'f', 3, 780, 0 ), /* 779 re */
- S_ST( 'i', 3, 406, 0 ), /* 780 ref */
- S_ST( 'q', 3, 782, 779 ), /* 781 re */
- S_ST( 'u', 3, 783, 0 ), /* 782 req */
- S_ST( 'e', 3, 784, 0 ), /* 783 requ */
- S_ST( 's', 3, 785, 0 ), /* 784 reque */
- S_ST( 't', 3, 786, 0 ), /* 785 reques */
- S_ST( 'k', 3, 787, 0 ), /* 786 request */
- S_ST( 'e', 3, 407, 0 ), /* 787 requestk */
- S_ST( 's', 3, 790, 781 ), /* 788 re */
- S_ST( 'e', 3, 408, 0 ), /* 789 res */
- S_ST( 't', 3, 791, 789 ), /* 790 res */
- S_ST( 'r', 3, 792, 0 ), /* 791 rest */
- S_ST( 'i', 3, 793, 0 ), /* 792 restr */
- S_ST( 'c', 3, 409, 0 ), /* 793 restri */
- S_ST( 'v', 3, 795, 788 ), /* 794 re */
- S_ST( 'o', 3, 796, 0 ), /* 795 rev */
- S_ST( 'k', 3, 410, 0 ), /* 796 revo */
- S_ST( 'l', 3, 798, 778 ), /* 797 r */
- S_ST( 'i', 3, 799, 0 ), /* 798 rl */
- S_ST( 'm', 3, 800, 0 ), /* 799 rli */
- S_ST( 'i', 3, 411, 0 ), /* 800 rlim */
- S_ST( 's', 3, 881, 766 ), /* 801 */
- S_ST( 'a', 3, 803, 0 ), /* 802 s */
- S_ST( 'v', 3, 804, 0 ), /* 803 sa */
- S_ST( 'e', 3, 805, 0 ), /* 804 sav */
- S_ST( 'c', 3, 806, 0 ), /* 805 save */
- S_ST( 'o', 3, 807, 0 ), /* 806 savec */
- S_ST( 'n', 3, 808, 0 ), /* 807 saveco */
- S_ST( 'f', 3, 809, 0 ), /* 808 savecon */
- S_ST( 'i', 3, 810, 0 ), /* 809 saveconf */
- S_ST( 'g', 3, 811, 0 ), /* 810 saveconfi */
- S_ST( 'd', 3, 812, 0 ), /* 811 saveconfig */
- S_ST( 'i', 3, 412, 0 ), /* 812 saveconfigd */
- S_ST( 'e', 3, 830, 802 ), /* 813 s */
- S_ST( 'r', 3, 815, 0 ), /* 814 se */
- S_ST( 'v', 3, 816, 0 ), /* 815 ser */
- S_ST( 'e', 3, 413, 0 ), /* 816 serv */
- S_ST( '_', 3, 818, 0 ), /* 817 server */
- S_ST( 'o', 3, 819, 0 ), /* 818 server_ */
- S_ST( 'f', 3, 820, 0 ), /* 819 server_o */
- S_ST( 'f', 3, 821, 0 ), /* 820 server_of */
- S_ST( 's', 3, 822, 0 ), /* 821 server_off */
- S_ST( 'e', 3, 460, 0 ), /* 822 server_offs */
- S_ST( 'r', 3, 824, 817 ), /* 823 server */
- S_ST( 'e', 3, 825, 0 ), /* 824 serverr */
- S_ST( 's', 3, 826, 0 ), /* 825 serverre */
- S_ST( 'p', 3, 827, 0 ), /* 826 serverres */
- S_ST( 'o', 3, 828, 0 ), /* 827 serverresp */
- S_ST( 'n', 3, 829, 0 ), /* 828 serverrespo */
- S_ST( 's', 3, 414, 0 ), /* 829 serverrespon */
- S_ST( 't', 3, 831, 814 ), /* 830 se */
- S_ST( 'v', 3, 832, 0 ), /* 831 set */
- S_ST( 'a', 3, 416, 0 ), /* 832 setv */
- S_ST( 'i', 3, 834, 813 ), /* 833 s */
- S_ST( 'm', 3, 835, 0 ), /* 834 si */
- S_ST( 'u', 3, 836, 0 ), /* 835 sim */
- S_ST( 'l', 3, 837, 0 ), /* 836 simu */
- S_ST( 'a', 3, 838, 0 ), /* 837 simul */
- S_ST( 't', 3, 839, 0 ), /* 838 simula */
- S_ST( 'i', 3, 840, 457 ), /* 839 simulat */
- S_ST( 'o', 3, 841, 0 ), /* 840 simulati */
- S_ST( 'n', 3, 842, 0 ), /* 841 simulatio */
- S_ST( '_', 3, 843, 0 ), /* 842 simulation */
- S_ST( 'd', 3, 844, 0 ), /* 843 simulation_ */
- S_ST( 'u', 3, 845, 0 ), /* 844 simulation_d */
- S_ST( 'r', 3, 846, 0 ), /* 845 simulation_du */
- S_ST( 'a', 3, 847, 0 ), /* 846 simulation_dur */
- S_ST( 't', 3, 848, 0 ), /* 847 simulation_dura */
- S_ST( 'i', 3, 849, 0 ), /* 848 simulation_durat */
- S_ST( 'o', 3, 459, 0 ), /* 849 simulation_durati */
- S_ST( 'o', 3, 851, 833 ), /* 850 s */
- S_ST( 'u', 3, 852, 0 ), /* 851 so */
- S_ST( 'r', 3, 853, 0 ), /* 852 sou */
- S_ST( 'c', 3, 417, 0 ), /* 853 sour */
- S_ST( 't', 3, 877, 850 ), /* 854 s */
- S_ST( 'a', 3, 861, 0 ), /* 855 st */
- S_ST( 'c', 3, 857, 0 ), /* 856 sta */
- S_ST( 'k', 3, 858, 0 ), /* 857 stac */
- S_ST( 's', 3, 859, 0 ), /* 858 stack */
- S_ST( 'i', 3, 860, 0 ), /* 859 stacks */
- S_ST( 'z', 3, 418, 0 ), /* 860 stacksi */
- S_ST( 't', 3, 420, 856 ), /* 861 sta */
- S_ST( 'i', 3, 863, 0 ), /* 862 stat */
- S_ST( 's', 3, 864, 0 ), /* 863 stati */
- S_ST( 't', 3, 865, 0 ), /* 864 statis */
- S_ST( 'i', 3, 866, 0 ), /* 865 statist */
- S_ST( 'c', 3, 419, 0 ), /* 866 statisti */
- S_ST( 'd', 3, 868, 0 ), /* 867 stats */
- S_ST( 'i', 3, 421, 0 ), /* 868 statsd */
- S_ST( 'e', 3, 422, 855 ), /* 869 st */
- S_ST( 'b', 3, 871, 0 ), /* 870 step */
- S_ST( 'a', 3, 872, 0 ), /* 871 stepb */
- S_ST( 'c', 3, 423, 0 ), /* 872 stepba */
- S_ST( 'f', 3, 874, 870 ), /* 873 step */
- S_ST( 'w', 3, 424, 0 ), /* 874 stepf */
- S_ST( 'o', 3, 876, 873 ), /* 875 step */
- S_ST( 'u', 3, 425, 0 ), /* 876 stepo */
- S_ST( 'r', 3, 878, 869 ), /* 877 st */
- S_ST( 'a', 3, 879, 0 ), /* 878 str */
- S_ST( 't', 3, 880, 0 ), /* 879 stra */
- S_ST( 'u', 3, 426, 0 ), /* 880 strat */
- S_ST( 'y', 3, 428, 854 ), /* 881 s */
- S_ST( 's', 3, 883, 0 ), /* 882 sys */
- S_ST( 't', 3, 884, 0 ), /* 883 syss */
- S_ST( 'a', 3, 885, 0 ), /* 884 sysst */
- S_ST( 't', 3, 429, 0 ), /* 885 syssta */
- S_ST( 't', 3, 912, 801 ), /* 886 */
- S_ST( 'i', 3, 898, 0 ), /* 887 t */
- S_ST( 'c', 3, 430, 0 ), /* 888 ti */
- S_ST( 'm', 3, 891, 888 ), /* 889 ti */
- S_ST( 'e', 3, 433, 0 ), /* 890 tim */
- S_ST( 'i', 3, 892, 890 ), /* 891 tim */
- S_ST( 'n', 3, 893, 0 ), /* 892 timi */
- S_ST( 'g', 3, 894, 0 ), /* 893 timin */
- S_ST( 's', 3, 895, 0 ), /* 894 timing */
- S_ST( 't', 3, 896, 0 ), /* 895 timings */
- S_ST( 'a', 3, 897, 0 ), /* 896 timingst */
- S_ST( 't', 3, 434, 0 ), /* 897 timingsta */
- S_ST( 'n', 3, 899, 889 ), /* 898 ti */
- S_ST( 'k', 3, 900, 0 ), /* 899 tin */
- S_ST( 'e', 3, 435, 0 ), /* 900 tink */
- S_ST( 'o', 3, 436, 887 ), /* 901 t */
- S_ST( 'r', 3, 904, 901 ), /* 902 t */
- S_ST( 'a', 3, 437, 0 ), /* 903 tr */
- S_ST( 'u', 3, 905, 903 ), /* 904 tr */
- S_ST( 's', 3, 906, 438 ), /* 905 tru */
- S_ST( 't', 3, 907, 0 ), /* 906 trus */
- S_ST( 'e', 3, 908, 0 ), /* 907 trust */
- S_ST( 'd', 3, 909, 0 ), /* 908 truste */
- S_ST( 'k', 3, 910, 0 ), /* 909 trusted */
- S_ST( 'e', 3, 439, 0 ), /* 910 trustedk */
- S_ST( 't', 3, 440, 902 ), /* 911 t */
- S_ST( 'y', 3, 913, 911 ), /* 912 t */
- S_ST( 'p', 3, 441, 0 ), /* 913 ty */
- S_ST( 'u', 3, 915, 886 ), /* 914 */
- S_ST( 'n', 3, 921, 0 ), /* 915 u */
- S_ST( 'c', 3, 917, 0 ), /* 916 un */
- S_ST( 'o', 3, 918, 0 ), /* 917 unc */
- S_ST( 'n', 3, 919, 0 ), /* 918 unco */
- S_ST( 'f', 3, 920, 0 ), /* 919 uncon */
- S_ST( 'i', 3, 446, 0 ), /* 920 unconf */
- S_ST( 'p', 3, 922, 916 ), /* 921 un */
- S_ST( 'e', 3, 923, 0 ), /* 922 unp */
- S_ST( 'e', 3, 447, 0 ), /* 923 unpe */
- S_ST( '_', 3, 944, 0 ), /* 924 unpeer */
- S_ST( 'c', 3, 926, 0 ), /* 925 unpeer_ */
- S_ST( 'r', 3, 927, 0 ), /* 926 unpeer_c */
- S_ST( 'y', 3, 928, 0 ), /* 927 unpeer_cr */
- S_ST( 'p', 3, 929, 0 ), /* 928 unpeer_cry */
- S_ST( 't', 3, 930, 0 ), /* 929 unpeer_cryp */
- S_ST( 'o', 3, 931, 0 ), /* 930 unpeer_crypt */
- S_ST( '_', 3, 936, 0 ), /* 931 unpeer_crypto */
- S_ST( 'e', 3, 933, 0 ), /* 932 unpeer_crypto_ */
- S_ST( 'a', 3, 934, 0 ), /* 933 unpeer_crypto_e */
- S_ST( 'r', 3, 935, 0 ), /* 934 unpeer_crypto_ea */
- S_ST( 'l', 3, 443, 0 ), /* 935 unpeer_crypto_ear */
- S_ST( 'n', 3, 937, 932 ), /* 936 unpeer_crypto_ */
- S_ST( 'a', 3, 938, 0 ), /* 937 unpeer_crypto_n */
- S_ST( 'k', 3, 939, 0 ), /* 938 unpeer_crypto_na */
- S_ST( '_', 3, 940, 0 ), /* 939 unpeer_crypto_nak */
- S_ST( 'e', 3, 941, 0 ), /* 940 unpeer_crypto_nak_ */
- S_ST( 'a', 3, 942, 0 ), /* 941 unpeer_crypto_nak_e */
- S_ST( 'r', 3, 943, 0 ), /* 942 unpeer_crypto_nak_ea */
- S_ST( 'l', 3, 444, 0 ), /* 943 unpeer_crypto_nak_ear */
- S_ST( 'd', 3, 945, 925 ), /* 944 unpeer_ */
- S_ST( 'i', 3, 946, 0 ), /* 945 unpeer_d */
- S_ST( 'g', 3, 947, 0 ), /* 946 unpeer_di */
- S_ST( 'e', 3, 948, 0 ), /* 947 unpeer_dig */
- S_ST( 's', 3, 949, 0 ), /* 948 unpeer_dige */
- S_ST( 't', 3, 950, 0 ), /* 949 unpeer_diges */
- S_ST( '_', 3, 951, 0 ), /* 950 unpeer_digest */
- S_ST( 'e', 3, 952, 0 ), /* 951 unpeer_digest_ */
- S_ST( 'a', 3, 953, 0 ), /* 952 unpeer_digest_e */
- S_ST( 'r', 3, 954, 0 ), /* 953 unpeer_digest_ea */
- S_ST( 'l', 3, 445, 0 ), /* 954 unpeer_digest_ear */
- S_ST( 'v', 3, 956, 914 ), /* 955 */
- S_ST( 'e', 3, 957, 0 ), /* 956 v */
- S_ST( 'r', 3, 958, 0 ), /* 957 ve */
- S_ST( 's', 3, 959, 0 ), /* 958 ver */
- S_ST( 'i', 3, 960, 0 ), /* 959 vers */
- S_ST( 'o', 3, 448, 0 ), /* 960 versi */
- S_ST( 'w', 3, 968, 955 ), /* 961 */
- S_ST( 'a', 3, 963, 0 ), /* 962 w */
- S_ST( 'n', 3, 964, 0 ), /* 963 wa */
- S_ST( 'd', 3, 965, 0 ), /* 964 wan */
- S_ST( 'e', 3, 463, 0 ), /* 965 wand */
- S_ST( 'e', 3, 967, 962 ), /* 966 w */
- S_ST( 'e', 3, 450, 0 ), /* 967 we */
- S_ST( 'i', 3, 969, 966 ), /* 968 w */
- S_ST( 'l', 3, 970, 0 ), /* 969 wi */
- S_ST( 'd', 3, 971, 0 ), /* 970 wil */
- S_ST( 'c', 3, 972, 0 ), /* 971 wild */
- S_ST( 'a', 3, 973, 0 ), /* 972 wildc */
- S_ST( 'r', 3, 451, 0 ), /* 973 wildca */
- S_ST( 'x', 3, 979, 961 ), /* 974 */
- S_ST( 'l', 3, 976, 0 ), /* 975 x */
- S_ST( 'e', 3, 977, 0 ), /* 976 xl */
- S_ST( 'a', 3, 978, 0 ), /* 977 xle */
- S_ST( 'v', 3, 452, 0 ), /* 978 xlea */
- S_ST( 'm', 3, 980, 975 ), /* 979 x */
- S_ST( 't', 3, 981, 0 ), /* 980 xm */
- S_ST( 'n', 3, 982, 0 ), /* 981 xmt */
- S_ST( 'o', 3, 983, 0 ), /* 982 xmtn */
- S_ST( 'n', 3, 984, 0 ), /* 983 xmtno */
- S_ST( 'c', 3, 453, 0 ), /* 984 xmtnon */
- S_ST( 'y', 3, 986, 974 ), /* 985 [initial state] */
- S_ST( 'e', 3, 987, 0 ), /* 986 y */
- S_ST( 'a', 3, 454, 0 ) /* 987 ye */
+ S_ST( 'e', 1, 0, 0 ), /* 286 T_Device */
+ S_ST( 't', 1, 0, 0 ), /* 287 T_Digest */
+ S_ST( 'e', 0, 0, 0 ), /* 288 T_Disable */
+ S_ST( 'd', 0, 0, 0 ), /* 289 T_Discard */
+ S_ST( 'n', 0, 0, 0 ), /* 290 T_Dispersion */
+ S_ST( 'e', 3, 299, 0 ), /* 291 ippe */
+ S_ST( 'e', 1, 0, 0 ), /* 292 T_Driftfile */
+ S_ST( 'p', 0, 0, 0 ), /* 293 T_Drop */
+ S_ST( 'p', 0, 0, 0 ), /* 294 T_Dscp */
+ S_ST( '.', 0, 0, 0 ), /* 295 T_Ellipsis */
+ S_ST( 'e', 0, 0, 0 ), /* 296 T_Enable */
+ S_ST( 'd', 0, 0, 171 ), /* 297 T_End */
+ S_ST( 'r', 0, 0, 0 ), /* 298 T_Epeer */
+ S_ST( 'r', 3, 323, 0 ), /* 299 ippee */
+ S_ST( 'e', 1, 182, 0 ), /* 300 T_File */
+ S_ST( 'n', 0, 0, 0 ), /* 301 T_Filegen */
+ S_ST( 'm', 0, 0, 0 ), /* 302 T_Filenum */
+ S_ST( '1', 0, 0, 0 ), /* 303 T_Flag1 */
+ S_ST( '2', 0, 0, 303 ), /* 304 T_Flag2 */
+ S_ST( '3', 0, 0, 304 ), /* 305 T_Flag3 */
+ S_ST( '4', 0, 0, 305 ), /* 306 T_Flag4 */
+ S_ST( 'e', 0, 0, 0 ), /* 307 T_Flake */
+ S_ST( 'r', 0, 0, 0 ), /* 308 T_Floor */
+ S_ST( 'q', 0, 192, 0 ), /* 309 T_Freq */
+ S_ST( 'e', 1, 0, 0 ), /* 310 T_Fudge */
+ S_ST( 'z', 0, 0, 0 ), /* 311 T_Fuzz */
+ S_ST( 't', 1, 0, 0 ), /* 312 T_Host */
+ S_ST( 'f', 0, 0, 0 ), /* 313 T_Huffpuff */
+ S_ST( 't', 0, 0, 0 ), /* 314 T_Iburst */
+ S_ST( 't', 1, 0, 0 ), /* 315 T_Ident */
+ S_ST( 'e', 0, 223, 0 ), /* 316 T_Ignore */
+ S_ST( 'h', 0, 0, 0 ), /* 317 T_Ignorehash */
+ S_ST( 'c', 0, 0, 0 ), /* 318 T_Incalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 319 T_Incmem */
+ S_ST( 'c', 0, 0, 0 ), /* 320 T_Initalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 321 T_Initmem */
+ S_ST( 'e', 1, 0, 0 ), /* 322 T_Includefile */
+ S_ST( 'l', 3, 325, 0 ), /* 323 ippeer */
+ S_ST( 'e', 0, 0, 0 ), /* 324 T_Interface */
+ S_ST( 'i', 3, 417, 0 ), /* 325 ippeerl */
+ S_ST( 'o', 0, 0, 226 ), /* 326 T_Io */
+ S_ST( 't', 0, 0, 0 ), /* 327 T_Ippeerlimit */
+ S_ST( '4', 0, 0, 0 ), /* 328 T_Ipv4 */
+ S_ST( '4', 0, 0, 0 ), /* 329 T_Ipv4_flag */
+ S_ST( '6', 0, 0, 328 ), /* 330 T_Ipv6 */
+ S_ST( '6', 0, 0, 329 ), /* 331 T_Ipv6_flag */
+ S_ST( 'l', 0, 0, 0 ), /* 332 T_Kernel */
+ S_ST( 'y', 0, 334, 474 ), /* 333 T_Key */
+ S_ST( 's', 1, 477, 0 ), /* 334 T_Keys */
+ S_ST( 'r', 1, 0, 0 ), /* 335 T_Keysdir */
+ S_ST( 'd', 0, 0, 0 ), /* 336 T_Kod */
+ S_ST( 'e', 1, 0, 0 ), /* 337 T_Leapfile */
+ S_ST( 'l', 0, 0, 0 ), /* 338 T_Leapsmearinterval */
+ S_ST( 'd', 0, 0, 0 ), /* 339 T_Limited */
+ S_ST( 'k', 0, 0, 0 ), /* 340 T_Link */
+ S_ST( 'n', 0, 0, 0 ), /* 341 T_Listen */
+ S_ST( 'g', 2, 0, 0 ), /* 342 T_Logconfig */
+ S_ST( 'e', 1, 0, 0 ), /* 343 T_Logfile */
+ S_ST( 's', 0, 0, 0 ), /* 344 T_Loopstats */
+ S_ST( 'p', 0, 0, 0 ), /* 345 T_Lowpriotrap */
+ S_ST( 't', 1, 0, 0 ), /* 346 T_Manycastclient */
+ S_ST( 'r', 2, 0, 0 ), /* 347 T_Manycastserver */
+ S_ST( 'k', 0, 0, 0 ), /* 348 T_Mask */
+ S_ST( 'e', 0, 0, 0 ), /* 349 T_Maxage */
+ S_ST( 'k', 0, 0, 0 ), /* 350 T_Maxclock */
+ S_ST( 'h', 0, 0, 0 ), /* 351 T_Maxdepth */
+ S_ST( 't', 0, 0, 0 ), /* 352 T_Maxdist */
+ S_ST( 'm', 0, 0, 0 ), /* 353 T_Maxmem */
+ S_ST( 'l', 0, 0, 0 ), /* 354 T_Maxpoll */
+ S_ST( 's', 0, 0, 0 ), /* 355 T_Mdnstries */
+ S_ST( 'm', 0, 577, 0 ), /* 356 T_Mem */
+ S_ST( 'k', 0, 0, 0 ), /* 357 T_Memlock */
+ S_ST( 'k', 0, 0, 0 ), /* 358 T_Minclock */
+ S_ST( 'h', 0, 0, 0 ), /* 359 T_Mindepth */
+ S_ST( 't', 0, 0, 0 ), /* 360 T_Mindist */
+ S_ST( 'm', 0, 0, 0 ), /* 361 T_Minimum */
+ S_ST( 'r', 0, 0, 0 ), /* 362 T_Minjitter */
+ S_ST( 'l', 0, 0, 0 ), /* 363 T_Minpoll */
+ S_ST( 'e', 0, 0, 0 ), /* 364 T_Minsane */
+ S_ST( 'e', 0, 366, 0 ), /* 365 T_Mode */
+ S_ST( '7', 0, 0, 0 ), /* 366 T_Mode7 */
+ S_ST( 'r', 0, 0, 0 ), /* 367 T_Monitor */
+ S_ST( 'h', 0, 0, 0 ), /* 368 T_Month */
+ S_ST( 'u', 0, 0, 0 ), /* 369 T_Mru */
+ S_ST( 'p', 0, 0, 0 ), /* 370 T_Mssntp */
+ S_ST( 't', 2, 0, 0 ), /* 371 T_Multicastclient */
+ S_ST( 'c', 0, 0, 0 ), /* 372 T_Nic */
+ S_ST( 'k', 0, 0, 0 ), /* 373 T_Nolink */
+ S_ST( 'y', 0, 0, 0 ), /* 374 T_Nomodify */
+ S_ST( 't', 0, 0, 0 ), /* 375 T_Nomrulist */
+ S_ST( 'e', 0, 0, 0 ), /* 376 T_None */
+ S_ST( 'e', 0, 0, 0 ), /* 377 T_Nonvolatile */
+ S_ST( 'r', 0, 0, 0 ), /* 378 T_Noepeer */
+ S_ST( 'r', 0, 0, 0 ), /* 379 T_Nopeer */
+ S_ST( 'y', 0, 0, 0 ), /* 380 T_Noquery */
+ S_ST( 't', 0, 0, 0 ), /* 381 T_Noselect */
+ S_ST( 'e', 0, 0, 0 ), /* 382 T_Noserve */
+ S_ST( 'p', 0, 0, 0 ), /* 383 T_Notrap */
+ S_ST( 't', 0, 0, 0 ), /* 384 T_Notrust */
+ S_ST( 'p', 0, 682, 0 ), /* 385 T_Ntp */
+ S_ST( 't', 0, 0, 0 ), /* 386 T_Ntpport */
+ S_ST( 't', 1, 0, 0 ), /* 387 T_NtpSignDsocket */
+ S_ST( 'n', 0, 697, 0 ), /* 388 T_Orphan */
+ S_ST( 't', 0, 0, 0 ), /* 389 T_Orphanwait */
+ S_ST( 'y', 0, 0, 0 ), /* 390 T_PCEdigest */
+ S_ST( 'c', 0, 0, 0 ), /* 391 T_Panic */
+ S_ST( 'r', 1, 724, 0 ), /* 392 T_Peer */
+ S_ST( 's', 0, 0, 0 ), /* 393 T_Peerstats */
+ S_ST( 'e', 2, 0, 0 ), /* 394 T_Phone */
+ S_ST( 'd', 0, 732, 0 ), /* 395 T_Pid */
+ S_ST( 'e', 1, 0, 0 ), /* 396 T_Pidfile */
+ S_ST( 'l', 0, 737, 0 ), /* 397 T_Poll */
+ S_ST( 't', 0, 0, 0 ), /* 398 T_PollSkewList */
+ S_ST( 'l', 1, 0, 0 ), /* 399 T_Pool */
+ S_ST( 't', 0, 0, 0 ), /* 400 T_Port */
+ S_ST( 'a', 1, 0, 0 ), /* 401 T_PpsData */
+ S_ST( 't', 0, 0, 0 ), /* 402 T_Preempt */
+ S_ST( 'r', 0, 0, 0 ), /* 403 T_Prefer */
+ S_ST( 's', 0, 0, 0 ), /* 404 T_Protostats */
+ S_ST( 'w', 1, 0, 751 ), /* 405 T_Pw */
+ S_ST( 'e', 1, 0, 0 ), /* 406 T_Randfile */
+ S_ST( 's', 0, 0, 0 ), /* 407 T_Rawstats */
+ S_ST( 'd', 1, 0, 0 ), /* 408 T_Refid */
+ S_ST( 'y', 0, 0, 0 ), /* 409 T_Requestkey */
+ S_ST( 't', 0, 0, 0 ), /* 410 T_Reset */
+ S_ST( 't', 0, 0, 0 ), /* 411 T_Restrict */
+ S_ST( 'e', 0, 0, 0 ), /* 412 T_Revoke */
+ S_ST( 't', 0, 0, 0 ), /* 413 T_Rlimit */
+ S_ST( 'r', 1, 0, 0 ), /* 414 T_Saveconfigdir */
+ S_ST( 'r', 1, 834, 0 ), /* 415 T_Server */
+ S_ST( 'e', 0, 0, 0 ), /* 416 T_Serverresponse */
+ S_ST( 'm', 3, 429, 0 ), /* 417 ippeerli */
+ S_ST( 'r', 1, 0, 0 ), /* 418 T_Setvar */
+ S_ST( 'e', 0, 0, 0 ), /* 419 T_Source */
+ S_ST( 'e', 0, 0, 0 ), /* 420 T_Stacksize */
+ S_ST( 's', 0, 0, 0 ), /* 421 T_Statistics */
+ S_ST( 's', 0, 878, 873 ), /* 422 T_Stats */
+ S_ST( 'r', 1, 0, 0 ), /* 423 T_Statsdir */
+ S_ST( 'p', 0, 886, 0 ), /* 424 T_Step */
+ S_ST( 'k', 0, 0, 0 ), /* 425 T_Stepback */
+ S_ST( 'd', 0, 0, 0 ), /* 426 T_Stepfwd */
+ S_ST( 't', 0, 0, 0 ), /* 427 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 428 T_Stratum */
+ S_ST( 'i', 3, 327, 0 ), /* 429 ippeerlim */
+ S_ST( 's', 0, 893, 0 ), /* 430 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 431 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 432 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 433 T_Time1 */
+ S_ST( '2', 0, 0, 433 ), /* 434 T_Time2 */
+ S_ST( 'a', 1, 0, 0 ), /* 435 T_TimeData */
+ S_ST( 'r', 0, 0, 902 ), /* 436 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 437 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 438 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 439 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 440 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 441 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 442 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 443 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 444 T_Type */
+ S_ST( 'v', 3, 330, 256 ), /* 445 ip */
+ S_ST( 'y', 0, 0, 0 ), /* 446 T_UEcrypto */
+ S_ST( 'y', 0, 0, 0 ), /* 447 T_UEcryptonak */
+ S_ST( 'y', 0, 0, 0 ), /* 448 T_UEdigest */
+ S_ST( 'g', 1, 0, 0 ), /* 449 T_Unconfig */
+ S_ST( 'r', 1, 938, 0 ), /* 450 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 451 T_Version */
+ S_ST( 'j', 3, 458, 211 ), /* 452 */
+ S_ST( 'k', 0, 0, 0 ), /* 453 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 454 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 455 T_Xleave */
+ S_ST( 'e', 0, 0, 0 ), /* 456 T_Xmtnonce */
+ S_ST( 'r', 0, 0, 0 ), /* 457 T_Year */
+ S_ST( 'i', 3, 459, 0 ), /* 458 j */
+ S_ST( 't', 3, 470, 0 ), /* 459 ji */
+ S_ST( 'e', 0, 0, 0 ), /* 460 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 461 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 462 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 463 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 464 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 465 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 466 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 467 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 468 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 469 T_Proc_Delay */
+ S_ST( 't', 3, 471, 0 ), /* 470 jit */
+ S_ST( 'e', 3, 467, 0 ), /* 471 jitt */
+ S_ST( 'k', 3, 479, 452 ), /* 472 */
+ S_ST( 'e', 3, 333, 0 ), /* 473 k */
+ S_ST( 'r', 3, 475, 0 ), /* 474 ke */
+ S_ST( 'n', 3, 476, 0 ), /* 475 ker */
+ S_ST( 'e', 3, 332, 0 ), /* 476 kern */
+ S_ST( 'd', 3, 478, 0 ), /* 477 keys */
+ S_ST( 'i', 3, 335, 0 ), /* 478 keysd */
+ S_ST( 'o', 3, 336, 473 ), /* 479 k */
+ S_ST( 'l', 3, 508, 472 ), /* 480 */
+ S_ST( 'e', 3, 482, 0 ), /* 481 l */
+ S_ST( 'a', 3, 483, 0 ), /* 482 le */
+ S_ST( 'p', 3, 487, 0 ), /* 483 lea */
+ S_ST( 'f', 3, 485, 0 ), /* 484 leap */
+ S_ST( 'i', 3, 486, 0 ), /* 485 leapf */
+ S_ST( 'l', 3, 337, 0 ), /* 486 leapfi */
+ S_ST( 's', 3, 488, 484 ), /* 487 leap */
+ S_ST( 'm', 3, 489, 0 ), /* 488 leaps */
+ S_ST( 'e', 3, 490, 0 ), /* 489 leapsm */
+ S_ST( 'a', 3, 491, 0 ), /* 490 leapsme */
+ S_ST( 'r', 3, 492, 0 ), /* 491 leapsmea */
+ S_ST( 'i', 3, 493, 0 ), /* 492 leapsmear */
+ S_ST( 'n', 3, 494, 0 ), /* 493 leapsmeari */
+ S_ST( 't', 3, 495, 0 ), /* 494 leapsmearin */
+ S_ST( 'e', 3, 496, 0 ), /* 495 leapsmearint */
+ S_ST( 'r', 3, 497, 0 ), /* 496 leapsmearinte */
+ S_ST( 'v', 3, 498, 0 ), /* 497 leapsmearinter */
+ S_ST( 'a', 3, 338, 0 ), /* 498 leapsmearinterv */
+ S_ST( 'i', 3, 505, 481 ), /* 499 l */
+ S_ST( 'm', 3, 501, 0 ), /* 500 li */
+ S_ST( 'i', 3, 502, 0 ), /* 501 lim */
+ S_ST( 't', 3, 503, 0 ), /* 502 limi */
+ S_ST( 'e', 3, 339, 0 ), /* 503 limit */
+ S_ST( 'n', 3, 340, 500 ), /* 504 li */
+ S_ST( 's', 3, 506, 504 ), /* 505 li */
+ S_ST( 't', 3, 507, 0 ), /* 506 lis */
+ S_ST( 'e', 3, 341, 0 ), /* 507 list */
+ S_ST( 'o', 3, 524, 499 ), /* 508 l */
+ S_ST( 'g', 3, 515, 0 ), /* 509 lo */
+ S_ST( 'c', 3, 511, 0 ), /* 510 log */
+ S_ST( 'o', 3, 512, 0 ), /* 511 logc */
+ S_ST( 'n', 3, 513, 0 ), /* 512 logco */
+ S_ST( 'f', 3, 514, 0 ), /* 513 logcon */
+ S_ST( 'i', 3, 342, 0 ), /* 514 logconf */
+ S_ST( 'f', 3, 516, 510 ), /* 515 log */
+ S_ST( 'i', 3, 517, 0 ), /* 516 logf */
+ S_ST( 'l', 3, 343, 0 ), /* 517 logfi */
+ S_ST( 'o', 3, 519, 509 ), /* 518 lo */
+ S_ST( 'p', 3, 520, 0 ), /* 519 loo */
+ S_ST( 's', 3, 521, 0 ), /* 520 loop */
+ S_ST( 't', 3, 522, 0 ), /* 521 loops */
+ S_ST( 'a', 3, 523, 0 ), /* 522 loopst */
+ S_ST( 't', 3, 344, 0 ), /* 523 loopsta */
+ S_ST( 'w', 3, 525, 518 ), /* 524 lo */
+ S_ST( 'p', 3, 526, 0 ), /* 525 low */
+ S_ST( 'r', 3, 527, 0 ), /* 526 lowp */
+ S_ST( 'i', 3, 528, 0 ), /* 527 lowpr */
+ S_ST( 'o', 3, 529, 0 ), /* 528 lowpri */
+ S_ST( 't', 3, 530, 0 ), /* 529 lowprio */
+ S_ST( 'r', 3, 531, 0 ), /* 530 lowpriot */
+ S_ST( 'a', 3, 345, 0 ), /* 531 lowpriotr */
+ S_ST( 'm', 3, 618, 480 ), /* 532 */
+ S_ST( 'a', 3, 551, 0 ), /* 533 m */
+ S_ST( 'n', 3, 535, 0 ), /* 534 ma */
+ S_ST( 'y', 3, 536, 0 ), /* 535 man */
+ S_ST( 'c', 3, 537, 0 ), /* 536 many */
+ S_ST( 'a', 3, 538, 0 ), /* 537 manyc */
+ S_ST( 's', 3, 539, 0 ), /* 538 manyca */
+ S_ST( 't', 3, 545, 0 ), /* 539 manycas */
+ S_ST( 'c', 3, 541, 0 ), /* 540 manycast */
+ S_ST( 'l', 3, 542, 0 ), /* 541 manycastc */
+ S_ST( 'i', 3, 543, 0 ), /* 542 manycastcl */
+ S_ST( 'e', 3, 544, 0 ), /* 543 manycastcli */
+ S_ST( 'n', 3, 346, 0 ), /* 544 manycastclie */
+ S_ST( 's', 3, 546, 540 ), /* 545 manycast */
+ S_ST( 'e', 3, 547, 0 ), /* 546 manycasts */
+ S_ST( 'r', 3, 548, 0 ), /* 547 manycastse */
+ S_ST( 'v', 3, 549, 0 ), /* 548 manycastser */
+ S_ST( 'e', 3, 347, 0 ), /* 549 manycastserv */
+ S_ST( 's', 3, 348, 534 ), /* 550 ma */
+ S_ST( 'x', 3, 566, 550 ), /* 551 ma */
+ S_ST( 'a', 3, 553, 0 ), /* 552 max */
+ S_ST( 'g', 3, 349, 0 ), /* 553 maxa */
+ S_ST( 'c', 3, 555, 552 ), /* 554 max */
+ S_ST( 'l', 3, 556, 0 ), /* 555 maxc */
+ S_ST( 'o', 3, 557, 0 ), /* 556 maxcl */
+ S_ST( 'c', 3, 350, 0 ), /* 557 maxclo */
+ S_ST( 'd', 3, 562, 554 ), /* 558 max */
+ S_ST( 'e', 3, 560, 0 ), /* 559 maxd */
+ S_ST( 'p', 3, 561, 0 ), /* 560 maxde */
+ S_ST( 't', 3, 351, 0 ), /* 561 maxdep */
+ S_ST( 'i', 3, 563, 559 ), /* 562 maxd */
+ S_ST( 's', 3, 352, 0 ), /* 563 maxdi */
+ S_ST( 'm', 3, 565, 558 ), /* 564 max */
+ S_ST( 'e', 3, 353, 0 ), /* 565 maxm */
+ S_ST( 'p', 3, 567, 564 ), /* 566 max */
+ S_ST( 'o', 3, 568, 0 ), /* 567 maxp */
+ S_ST( 'l', 3, 354, 0 ), /* 568 maxpo */
+ S_ST( 'd', 3, 570, 533 ), /* 569 m */
+ S_ST( 'n', 3, 571, 0 ), /* 570 md */
+ S_ST( 's', 3, 572, 0 ), /* 571 mdn */
+ S_ST( 't', 3, 573, 0 ), /* 572 mdns */
+ S_ST( 'r', 3, 574, 0 ), /* 573 mdnst */
+ S_ST( 'i', 3, 575, 0 ), /* 574 mdnstr */
+ S_ST( 'e', 3, 355, 0 ), /* 575 mdnstri */
+ S_ST( 'e', 3, 356, 569 ), /* 576 m */
+ S_ST( 'l', 3, 578, 0 ), /* 577 mem */
+ S_ST( 'o', 3, 579, 0 ), /* 578 meml */
+ S_ST( 'c', 3, 357, 0 ), /* 579 memlo */
+ S_ST( 'i', 3, 581, 576 ), /* 580 m */
+ S_ST( 'n', 3, 603, 0 ), /* 581 mi */
+ S_ST( 'c', 3, 583, 0 ), /* 582 min */
+ S_ST( 'l', 3, 584, 0 ), /* 583 minc */
+ S_ST( 'o', 3, 585, 0 ), /* 584 mincl */
+ S_ST( 'c', 3, 358, 0 ), /* 585 minclo */
+ S_ST( 'd', 3, 590, 582 ), /* 586 min */
+ S_ST( 'e', 3, 588, 0 ), /* 587 mind */
+ S_ST( 'p', 3, 589, 0 ), /* 588 minde */
+ S_ST( 't', 3, 359, 0 ), /* 589 mindep */
+ S_ST( 'i', 3, 591, 587 ), /* 590 mind */
+ S_ST( 's', 3, 360, 0 ), /* 591 mindi */
+ S_ST( 'i', 3, 593, 586 ), /* 592 min */
+ S_ST( 'm', 3, 594, 0 ), /* 593 mini */
+ S_ST( 'u', 3, 361, 0 ), /* 594 minim */
+ S_ST( 'j', 3, 596, 592 ), /* 595 min */
+ S_ST( 'i', 3, 597, 0 ), /* 596 minj */
+ S_ST( 't', 3, 598, 0 ), /* 597 minji */
+ S_ST( 't', 3, 599, 0 ), /* 598 minjit */
+ S_ST( 'e', 3, 362, 0 ), /* 599 minjitt */
+ S_ST( 'p', 3, 601, 595 ), /* 600 min */
+ S_ST( 'o', 3, 602, 0 ), /* 601 minp */
+ S_ST( 'l', 3, 363, 0 ), /* 602 minpo */
+ S_ST( 's', 3, 604, 600 ), /* 603 min */
+ S_ST( 'a', 3, 605, 0 ), /* 604 mins */
+ S_ST( 'n', 3, 364, 0 ), /* 605 minsa */
+ S_ST( 'o', 3, 608, 580 ), /* 606 m */
+ S_ST( 'd', 3, 365, 0 ), /* 607 mo */
+ S_ST( 'n', 3, 612, 607 ), /* 608 mo */
+ S_ST( 'i', 3, 610, 0 ), /* 609 mon */
+ S_ST( 't', 3, 611, 0 ), /* 610 moni */
+ S_ST( 'o', 3, 367, 0 ), /* 611 monit */
+ S_ST( 't', 3, 368, 609 ), /* 612 mon */
+ S_ST( 'r', 3, 369, 606 ), /* 613 m */
+ S_ST( 's', 3, 615, 613 ), /* 614 m */
+ S_ST( 's', 3, 616, 0 ), /* 615 ms */
+ S_ST( 'n', 3, 617, 0 ), /* 616 mss */
+ S_ST( 't', 3, 370, 0 ), /* 617 mssn */
+ S_ST( 'u', 3, 619, 614 ), /* 618 m */
+ S_ST( 'l', 3, 620, 0 ), /* 619 mu */
+ S_ST( 't', 3, 621, 0 ), /* 620 mul */
+ S_ST( 'i', 3, 622, 0 ), /* 621 mult */
+ S_ST( 'c', 3, 623, 0 ), /* 622 multi */
+ S_ST( 'a', 3, 624, 0 ), /* 623 multic */
+ S_ST( 's', 3, 625, 0 ), /* 624 multica */
+ S_ST( 't', 3, 626, 0 ), /* 625 multicas */
+ S_ST( 'c', 3, 627, 0 ), /* 626 multicast */
+ S_ST( 'l', 3, 628, 0 ), /* 627 multicastc */
+ S_ST( 'i', 3, 629, 0 ), /* 628 multicastcl */
+ S_ST( 'e', 3, 630, 0 ), /* 629 multicastcli */
+ S_ST( 'n', 3, 371, 0 ), /* 630 multicastclie */
+ S_ST( 'n', 3, 678, 532 ), /* 631 */
+ S_ST( 'i', 3, 372, 0 ), /* 632 n */
+ S_ST( 'o', 3, 673, 632 ), /* 633 n */
+ S_ST( 'e', 3, 635, 0 ), /* 634 no */
+ S_ST( 'p', 3, 636, 0 ), /* 635 noe */
+ S_ST( 'e', 3, 637, 0 ), /* 636 noep */
+ S_ST( 'e', 3, 378, 0 ), /* 637 noepe */
+ S_ST( 'l', 3, 639, 634 ), /* 638 no */
+ S_ST( 'i', 3, 640, 0 ), /* 639 nol */
+ S_ST( 'n', 3, 373, 0 ), /* 640 noli */
+ S_ST( 'm', 3, 646, 638 ), /* 641 no */
+ S_ST( 'o', 3, 643, 0 ), /* 642 nom */
+ S_ST( 'd', 3, 644, 0 ), /* 643 nomo */
+ S_ST( 'i', 3, 645, 0 ), /* 644 nomod */
+ S_ST( 'f', 3, 374, 0 ), /* 645 nomodi */
+ S_ST( 'r', 3, 647, 642 ), /* 646 nom */
+ S_ST( 'u', 3, 648, 0 ), /* 647 nomr */
+ S_ST( 'l', 3, 649, 0 ), /* 648 nomru */
+ S_ST( 'i', 3, 650, 0 ), /* 649 nomrul */
+ S_ST( 's', 3, 375, 0 ), /* 650 nomruli */
+ S_ST( 'n', 3, 652, 641 ), /* 651 no */
+ S_ST( 'v', 3, 653, 376 ), /* 652 non */
+ S_ST( 'o', 3, 654, 0 ), /* 653 nonv */
+ S_ST( 'l', 3, 655, 0 ), /* 654 nonvo */
+ S_ST( 'a', 3, 656, 0 ), /* 655 nonvol */
+ S_ST( 't', 3, 657, 0 ), /* 656 nonvola */
+ S_ST( 'i', 3, 658, 0 ), /* 657 nonvolat */
+ S_ST( 'l', 3, 377, 0 ), /* 658 nonvolati */
+ S_ST( 'p', 3, 660, 651 ), /* 659 no */
+ S_ST( 'e', 3, 661, 0 ), /* 660 nop */
+ S_ST( 'e', 3, 379, 0 ), /* 661 nope */
+ S_ST( 'q', 3, 663, 659 ), /* 662 no */
+ S_ST( 'u', 3, 664, 0 ), /* 663 noq */
+ S_ST( 'e', 3, 665, 0 ), /* 664 noqu */
+ S_ST( 'r', 3, 380, 0 ), /* 665 noque */
+ S_ST( 's', 3, 667, 662 ), /* 666 no */
+ S_ST( 'e', 3, 671, 0 ), /* 667 nos */
+ S_ST( 'l', 3, 669, 0 ), /* 668 nose */
+ S_ST( 'e', 3, 670, 0 ), /* 669 nosel */
+ S_ST( 'c', 3, 381, 0 ), /* 670 nosele */
+ S_ST( 'r', 3, 672, 668 ), /* 671 nose */
+ S_ST( 'v', 3, 382, 0 ), /* 672 noser */
+ S_ST( 't', 3, 674, 666 ), /* 673 no */
+ S_ST( 'r', 3, 676, 0 ), /* 674 not */
+ S_ST( 'a', 3, 383, 0 ), /* 675 notr */
+ S_ST( 'u', 3, 677, 675 ), /* 676 notr */
+ S_ST( 's', 3, 384, 0 ), /* 677 notru */
+ S_ST( 't', 3, 385, 633 ), /* 678 n */
+ S_ST( 'p', 3, 680, 0 ), /* 679 ntp */
+ S_ST( 'o', 3, 681, 0 ), /* 680 ntpp */
+ S_ST( 'r', 3, 386, 0 ), /* 681 ntppo */
+ S_ST( 's', 3, 683, 679 ), /* 682 ntp */
+ S_ST( 'i', 3, 684, 0 ), /* 683 ntps */
+ S_ST( 'g', 3, 685, 0 ), /* 684 ntpsi */
+ S_ST( 'n', 3, 686, 0 ), /* 685 ntpsig */
+ S_ST( 'd', 3, 687, 0 ), /* 686 ntpsign */
+ S_ST( 's', 3, 688, 0 ), /* 687 ntpsignd */
+ S_ST( 'o', 3, 689, 0 ), /* 688 ntpsignds */
+ S_ST( 'c', 3, 690, 0 ), /* 689 ntpsigndso */
+ S_ST( 'k', 3, 691, 0 ), /* 690 ntpsigndsoc */
+ S_ST( 'e', 3, 387, 0 ), /* 691 ntpsigndsock */
+ S_ST( 'o', 3, 693, 631 ), /* 692 */
+ S_ST( 'r', 3, 694, 0 ), /* 693 o */
+ S_ST( 'p', 3, 695, 0 ), /* 694 or */
+ S_ST( 'h', 3, 696, 0 ), /* 695 orp */
+ S_ST( 'a', 3, 388, 0 ), /* 696 orph */
+ S_ST( 'w', 3, 698, 0 ), /* 697 orphan */
+ S_ST( 'a', 3, 699, 0 ), /* 698 orphanw */
+ S_ST( 'i', 3, 389, 0 ), /* 699 orphanwa */
+ S_ST( 'p', 3, 405, 692 ), /* 700 */
+ S_ST( 'a', 3, 702, 0 ), /* 701 p */
+ S_ST( 'n', 3, 703, 0 ), /* 702 pa */
+ S_ST( 'i', 3, 391, 0 ), /* 703 pan */
+ S_ST( 'e', 3, 705, 701 ), /* 704 p */
+ S_ST( 'e', 3, 392, 0 ), /* 705 pe */
+ S_ST( '_', 3, 707, 0 ), /* 706 peer */
+ S_ST( 'c', 3, 708, 0 ), /* 707 peer_ */
+ S_ST( 'l', 3, 709, 0 ), /* 708 peer_c */
+ S_ST( 'e', 3, 710, 0 ), /* 709 peer_cl */
+ S_ST( 'a', 3, 711, 0 ), /* 710 peer_cle */
+ S_ST( 'r', 3, 712, 0 ), /* 711 peer_clea */
+ S_ST( '_', 3, 713, 0 ), /* 712 peer_clear */
+ S_ST( 'd', 3, 714, 0 ), /* 713 peer_clear_ */
+ S_ST( 'i', 3, 715, 0 ), /* 714 peer_clear_d */
+ S_ST( 'g', 3, 716, 0 ), /* 715 peer_clear_di */
+ S_ST( 'e', 3, 717, 0 ), /* 716 peer_clear_dig */
+ S_ST( 's', 3, 718, 0 ), /* 717 peer_clear_dige */
+ S_ST( 't', 3, 719, 0 ), /* 718 peer_clear_diges */
+ S_ST( '_', 3, 720, 0 ), /* 719 peer_clear_digest */
+ S_ST( 'e', 3, 721, 0 ), /* 720 peer_clear_digest_ */
+ S_ST( 'a', 3, 722, 0 ), /* 721 peer_clear_digest_e */
+ S_ST( 'r', 3, 723, 0 ), /* 722 peer_clear_digest_ea */
+ S_ST( 'l', 3, 390, 0 ), /* 723 peer_clear_digest_ear */
+ S_ST( 's', 3, 725, 706 ), /* 724 peer */
+ S_ST( 't', 3, 726, 0 ), /* 725 peers */
+ S_ST( 'a', 3, 727, 0 ), /* 726 peerst */
+ S_ST( 't', 3, 393, 0 ), /* 727 peersta */
+ S_ST( 'h', 3, 729, 704 ), /* 728 p */
+ S_ST( 'o', 3, 730, 0 ), /* 729 ph */
+ S_ST( 'n', 3, 394, 0 ), /* 730 pho */
+ S_ST( 'i', 3, 395, 728 ), /* 731 p */
+ S_ST( 'f', 3, 733, 0 ), /* 732 pid */
+ S_ST( 'i', 3, 734, 0 ), /* 733 pidf */
+ S_ST( 'l', 3, 396, 0 ), /* 734 pidfi */
+ S_ST( 'o', 3, 745, 731 ), /* 735 p */
+ S_ST( 'l', 3, 397, 0 ), /* 736 po */
+ S_ST( 's', 3, 738, 0 ), /* 737 poll */
+ S_ST( 'k', 3, 739, 0 ), /* 738 polls */
+ S_ST( 'e', 3, 740, 0 ), /* 739 pollsk */
+ S_ST( 'w', 3, 741, 0 ), /* 740 pollske */
+ S_ST( 'l', 3, 742, 0 ), /* 741 pollskew */
+ S_ST( 'i', 3, 743, 0 ), /* 742 pollskewl */
+ S_ST( 's', 3, 398, 0 ), /* 743 pollskewli */
+ S_ST( 'o', 3, 399, 736 ), /* 744 po */
+ S_ST( 'r', 3, 400, 744 ), /* 745 po */
+ S_ST( 'p', 3, 747, 735 ), /* 746 p */
+ S_ST( 's', 3, 748, 0 ), /* 747 pp */
+ S_ST( 'd', 3, 749, 0 ), /* 748 pps */
+ S_ST( 'a', 3, 750, 0 ), /* 749 ppsd */
+ S_ST( 't', 3, 401, 0 ), /* 750 ppsda */
+ S_ST( 'r', 3, 758, 746 ), /* 751 p */
+ S_ST( 'e', 3, 756, 0 ), /* 752 pr */
+ S_ST( 'e', 3, 754, 0 ), /* 753 pre */
+ S_ST( 'm', 3, 755, 0 ), /* 754 pree */
+ S_ST( 'p', 3, 402, 0 ), /* 755 preem */
+ S_ST( 'f', 3, 757, 753 ), /* 756 pre */
+ S_ST( 'e', 3, 403, 0 ), /* 757 pref */
+ S_ST( 'o', 3, 771, 752 ), /* 758 pr */
+ S_ST( 'c', 3, 760, 0 ), /* 759 pro */
+ S_ST( '_', 3, 761, 0 ), /* 760 proc */
+ S_ST( 'd', 3, 762, 0 ), /* 761 proc_ */
+ S_ST( 'e', 3, 763, 0 ), /* 762 proc_d */
+ S_ST( 'l', 3, 764, 0 ), /* 763 proc_de */
+ S_ST( 'a', 3, 469, 0 ), /* 764 proc_del */
+ S_ST( 'p', 3, 766, 759 ), /* 765 pro */
+ S_ST( '_', 3, 767, 0 ), /* 766 prop */
+ S_ST( 'd', 3, 768, 0 ), /* 767 prop_ */
+ S_ST( 'e', 3, 769, 0 ), /* 768 prop_d */
+ S_ST( 'l', 3, 770, 0 ), /* 769 prop_de */
+ S_ST( 'a', 3, 468, 0 ), /* 770 prop_del */
+ S_ST( 't', 3, 772, 765 ), /* 771 pro */
+ S_ST( 'o', 3, 773, 0 ), /* 772 prot */
+ S_ST( 's', 3, 774, 0 ), /* 773 proto */
+ S_ST( 't', 3, 775, 0 ), /* 774 protos */
+ S_ST( 'a', 3, 776, 0 ), /* 775 protost */
+ S_ST( 't', 3, 404, 0 ), /* 776 protosta */
+ S_ST( 'r', 3, 808, 700 ), /* 777 */
+ S_ST( 'a', 3, 784, 0 ), /* 778 r */
+ S_ST( 'n', 3, 780, 0 ), /* 779 ra */
+ S_ST( 'd', 3, 781, 0 ), /* 780 ran */
+ S_ST( 'f', 3, 782, 0 ), /* 781 rand */
+ S_ST( 'i', 3, 783, 0 ), /* 782 randf */
+ S_ST( 'l', 3, 406, 0 ), /* 783 randfi */
+ S_ST( 'w', 3, 785, 779 ), /* 784 ra */
+ S_ST( 's', 3, 786, 0 ), /* 785 raw */
+ S_ST( 't', 3, 787, 0 ), /* 786 raws */
+ S_ST( 'a', 3, 788, 0 ), /* 787 rawst */
+ S_ST( 't', 3, 407, 0 ), /* 788 rawsta */
+ S_ST( 'e', 3, 805, 778 ), /* 789 r */
+ S_ST( 'f', 3, 791, 0 ), /* 790 re */
+ S_ST( 'i', 3, 408, 0 ), /* 791 ref */
+ S_ST( 'q', 3, 793, 790 ), /* 792 re */
+ S_ST( 'u', 3, 794, 0 ), /* 793 req */
+ S_ST( 'e', 3, 795, 0 ), /* 794 requ */
+ S_ST( 's', 3, 796, 0 ), /* 795 reque */
+ S_ST( 't', 3, 797, 0 ), /* 796 reques */
+ S_ST( 'k', 3, 798, 0 ), /* 797 request */
+ S_ST( 'e', 3, 409, 0 ), /* 798 requestk */
+ S_ST( 's', 3, 801, 792 ), /* 799 re */
+ S_ST( 'e', 3, 410, 0 ), /* 800 res */
+ S_ST( 't', 3, 802, 800 ), /* 801 res */
+ S_ST( 'r', 3, 803, 0 ), /* 802 rest */
+ S_ST( 'i', 3, 804, 0 ), /* 803 restr */
+ S_ST( 'c', 3, 411, 0 ), /* 804 restri */
+ S_ST( 'v', 3, 806, 799 ), /* 805 re */
+ S_ST( 'o', 3, 807, 0 ), /* 806 rev */
+ S_ST( 'k', 3, 412, 0 ), /* 807 revo */
+ S_ST( 'l', 3, 809, 789 ), /* 808 r */
+ S_ST( 'i', 3, 810, 0 ), /* 809 rl */
+ S_ST( 'm', 3, 811, 0 ), /* 810 rli */
+ S_ST( 'i', 3, 413, 0 ), /* 811 rlim */
+ S_ST( 's', 3, 892, 777 ), /* 812 */
+ S_ST( 'a', 3, 814, 0 ), /* 813 s */
+ S_ST( 'v', 3, 815, 0 ), /* 814 sa */
+ S_ST( 'e', 3, 816, 0 ), /* 815 sav */
+ S_ST( 'c', 3, 817, 0 ), /* 816 save */
+ S_ST( 'o', 3, 818, 0 ), /* 817 savec */
+ S_ST( 'n', 3, 819, 0 ), /* 818 saveco */
+ S_ST( 'f', 3, 820, 0 ), /* 819 savecon */
+ S_ST( 'i', 3, 821, 0 ), /* 820 saveconf */
+ S_ST( 'g', 3, 822, 0 ), /* 821 saveconfi */
+ S_ST( 'd', 3, 823, 0 ), /* 822 saveconfig */
+ S_ST( 'i', 3, 414, 0 ), /* 823 saveconfigd */
+ S_ST( 'e', 3, 841, 813 ), /* 824 s */
+ S_ST( 'r', 3, 826, 0 ), /* 825 se */
+ S_ST( 'v', 3, 827, 0 ), /* 826 ser */
+ S_ST( 'e', 3, 415, 0 ), /* 827 serv */
+ S_ST( '_', 3, 829, 0 ), /* 828 server */
+ S_ST( 'o', 3, 830, 0 ), /* 829 server_ */
+ S_ST( 'f', 3, 831, 0 ), /* 830 server_o */
+ S_ST( 'f', 3, 832, 0 ), /* 831 server_of */
+ S_ST( 's', 3, 833, 0 ), /* 832 server_off */
+ S_ST( 'e', 3, 463, 0 ), /* 833 server_offs */
+ S_ST( 'r', 3, 835, 828 ), /* 834 server */
+ S_ST( 'e', 3, 836, 0 ), /* 835 serverr */
+ S_ST( 's', 3, 837, 0 ), /* 836 serverre */
+ S_ST( 'p', 3, 838, 0 ), /* 837 serverres */
+ S_ST( 'o', 3, 839, 0 ), /* 838 serverresp */
+ S_ST( 'n', 3, 840, 0 ), /* 839 serverrespo */
+ S_ST( 's', 3, 416, 0 ), /* 840 serverrespon */
+ S_ST( 't', 3, 842, 825 ), /* 841 se */
+ S_ST( 'v', 3, 843, 0 ), /* 842 set */
+ S_ST( 'a', 3, 418, 0 ), /* 843 setv */
+ S_ST( 'i', 3, 845, 824 ), /* 844 s */
+ S_ST( 'm', 3, 846, 0 ), /* 845 si */
+ S_ST( 'u', 3, 847, 0 ), /* 846 sim */
+ S_ST( 'l', 3, 848, 0 ), /* 847 simu */
+ S_ST( 'a', 3, 849, 0 ), /* 848 simul */
+ S_ST( 't', 3, 850, 0 ), /* 849 simula */
+ S_ST( 'i', 3, 851, 460 ), /* 850 simulat */
+ S_ST( 'o', 3, 852, 0 ), /* 851 simulati */
+ S_ST( 'n', 3, 853, 0 ), /* 852 simulatio */
+ S_ST( '_', 3, 854, 0 ), /* 853 simulation */
+ S_ST( 'd', 3, 855, 0 ), /* 854 simulation_ */
+ S_ST( 'u', 3, 856, 0 ), /* 855 simulation_d */
+ S_ST( 'r', 3, 857, 0 ), /* 856 simulation_du */
+ S_ST( 'a', 3, 858, 0 ), /* 857 simulation_dur */
+ S_ST( 't', 3, 859, 0 ), /* 858 simulation_dura */
+ S_ST( 'i', 3, 860, 0 ), /* 859 simulation_durat */
+ S_ST( 'o', 3, 462, 0 ), /* 860 simulation_durati */
+ S_ST( 'o', 3, 862, 844 ), /* 861 s */
+ S_ST( 'u', 3, 863, 0 ), /* 862 so */
+ S_ST( 'r', 3, 864, 0 ), /* 863 sou */
+ S_ST( 'c', 3, 419, 0 ), /* 864 sour */
+ S_ST( 't', 3, 888, 861 ), /* 865 s */
+ S_ST( 'a', 3, 872, 0 ), /* 866 st */
+ S_ST( 'c', 3, 868, 0 ), /* 867 sta */
+ S_ST( 'k', 3, 869, 0 ), /* 868 stac */
+ S_ST( 's', 3, 870, 0 ), /* 869 stack */
+ S_ST( 'i', 3, 871, 0 ), /* 870 stacks */
+ S_ST( 'z', 3, 420, 0 ), /* 871 stacksi */
+ S_ST( 't', 3, 422, 867 ), /* 872 sta */
+ S_ST( 'i', 3, 874, 0 ), /* 873 stat */
+ S_ST( 's', 3, 875, 0 ), /* 874 stati */
+ S_ST( 't', 3, 876, 0 ), /* 875 statis */
+ S_ST( 'i', 3, 877, 0 ), /* 876 statist */
+ S_ST( 'c', 3, 421, 0 ), /* 877 statisti */
+ S_ST( 'd', 3, 879, 0 ), /* 878 stats */
+ S_ST( 'i', 3, 423, 0 ), /* 879 statsd */
+ S_ST( 'e', 3, 424, 866 ), /* 880 st */
+ S_ST( 'b', 3, 882, 0 ), /* 881 step */
+ S_ST( 'a', 3, 883, 0 ), /* 882 stepb */
+ S_ST( 'c', 3, 425, 0 ), /* 883 stepba */
+ S_ST( 'f', 3, 885, 881 ), /* 884 step */
+ S_ST( 'w', 3, 426, 0 ), /* 885 stepf */
+ S_ST( 'o', 3, 887, 884 ), /* 886 step */
+ S_ST( 'u', 3, 427, 0 ), /* 887 stepo */
+ S_ST( 'r', 3, 889, 880 ), /* 888 st */
+ S_ST( 'a', 3, 890, 0 ), /* 889 str */
+ S_ST( 't', 3, 891, 0 ), /* 890 stra */
+ S_ST( 'u', 3, 428, 0 ), /* 891 strat */
+ S_ST( 'y', 3, 430, 865 ), /* 892 s */
+ S_ST( 's', 3, 894, 0 ), /* 893 sys */
+ S_ST( 't', 3, 895, 0 ), /* 894 syss */
+ S_ST( 'a', 3, 896, 0 ), /* 895 sysst */
+ S_ST( 't', 3, 431, 0 ), /* 896 syssta */
+ S_ST( 't', 3, 926, 812 ), /* 897 */
+ S_ST( 'i', 3, 912, 0 ), /* 898 t */
+ S_ST( 'c', 3, 432, 0 ), /* 899 ti */
+ S_ST( 'm', 3, 905, 899 ), /* 900 ti */
+ S_ST( 'e', 3, 436, 0 ), /* 901 tim */
+ S_ST( 'd', 3, 903, 434 ), /* 902 time */
+ S_ST( 'a', 3, 904, 0 ), /* 903 timed */
+ S_ST( 't', 3, 435, 0 ), /* 904 timeda */
+ S_ST( 'i', 3, 906, 901 ), /* 905 tim */
+ S_ST( 'n', 3, 907, 0 ), /* 906 timi */
+ S_ST( 'g', 3, 908, 0 ), /* 907 timin */
+ S_ST( 's', 3, 909, 0 ), /* 908 timing */
+ S_ST( 't', 3, 910, 0 ), /* 909 timings */
+ S_ST( 'a', 3, 911, 0 ), /* 910 timingst */
+ S_ST( 't', 3, 437, 0 ), /* 911 timingsta */
+ S_ST( 'n', 3, 913, 900 ), /* 912 ti */
+ S_ST( 'k', 3, 914, 0 ), /* 913 tin */
+ S_ST( 'e', 3, 438, 0 ), /* 914 tink */
+ S_ST( 'o', 3, 439, 898 ), /* 915 t */
+ S_ST( 'r', 3, 918, 915 ), /* 916 t */
+ S_ST( 'a', 3, 440, 0 ), /* 917 tr */
+ S_ST( 'u', 3, 919, 917 ), /* 918 tr */
+ S_ST( 's', 3, 920, 441 ), /* 919 tru */
+ S_ST( 't', 3, 921, 0 ), /* 920 trus */
+ S_ST( 'e', 3, 922, 0 ), /* 921 trust */
+ S_ST( 'd', 3, 923, 0 ), /* 922 truste */
+ S_ST( 'k', 3, 924, 0 ), /* 923 trusted */
+ S_ST( 'e', 3, 442, 0 ), /* 924 trustedk */
+ S_ST( 't', 3, 443, 916 ), /* 925 t */
+ S_ST( 'y', 3, 927, 925 ), /* 926 t */
+ S_ST( 'p', 3, 444, 0 ), /* 927 ty */
+ S_ST( 'u', 3, 929, 897 ), /* 928 */
+ S_ST( 'n', 3, 935, 0 ), /* 929 u */
+ S_ST( 'c', 3, 931, 0 ), /* 930 un */
+ S_ST( 'o', 3, 932, 0 ), /* 931 unc */
+ S_ST( 'n', 3, 933, 0 ), /* 932 unco */
+ S_ST( 'f', 3, 934, 0 ), /* 933 uncon */
+ S_ST( 'i', 3, 449, 0 ), /* 934 unconf */
+ S_ST( 'p', 3, 936, 930 ), /* 935 un */
+ S_ST( 'e', 3, 937, 0 ), /* 936 unp */
+ S_ST( 'e', 3, 450, 0 ), /* 937 unpe */
+ S_ST( '_', 3, 958, 0 ), /* 938 unpeer */
+ S_ST( 'c', 3, 940, 0 ), /* 939 unpeer_ */
+ S_ST( 'r', 3, 941, 0 ), /* 940 unpeer_c */
+ S_ST( 'y', 3, 942, 0 ), /* 941 unpeer_cr */
+ S_ST( 'p', 3, 943, 0 ), /* 942 unpeer_cry */
+ S_ST( 't', 3, 944, 0 ), /* 943 unpeer_cryp */
+ S_ST( 'o', 3, 945, 0 ), /* 944 unpeer_crypt */
+ S_ST( '_', 3, 950, 0 ), /* 945 unpeer_crypto */
+ S_ST( 'e', 3, 947, 0 ), /* 946 unpeer_crypto_ */
+ S_ST( 'a', 3, 948, 0 ), /* 947 unpeer_crypto_e */
+ S_ST( 'r', 3, 949, 0 ), /* 948 unpeer_crypto_ea */
+ S_ST( 'l', 3, 446, 0 ), /* 949 unpeer_crypto_ear */
+ S_ST( 'n', 3, 951, 946 ), /* 950 unpeer_crypto_ */
+ S_ST( 'a', 3, 952, 0 ), /* 951 unpeer_crypto_n */
+ S_ST( 'k', 3, 953, 0 ), /* 952 unpeer_crypto_na */
+ S_ST( '_', 3, 954, 0 ), /* 953 unpeer_crypto_nak */
+ S_ST( 'e', 3, 955, 0 ), /* 954 unpeer_crypto_nak_ */
+ S_ST( 'a', 3, 956, 0 ), /* 955 unpeer_crypto_nak_e */
+ S_ST( 'r', 3, 957, 0 ), /* 956 unpeer_crypto_nak_ea */
+ S_ST( 'l', 3, 447, 0 ), /* 957 unpeer_crypto_nak_ear */
+ S_ST( 'd', 3, 959, 939 ), /* 958 unpeer_ */
+ S_ST( 'i', 3, 960, 0 ), /* 959 unpeer_d */
+ S_ST( 'g', 3, 961, 0 ), /* 960 unpeer_di */
+ S_ST( 'e', 3, 962, 0 ), /* 961 unpeer_dig */
+ S_ST( 's', 3, 963, 0 ), /* 962 unpeer_dige */
+ S_ST( 't', 3, 964, 0 ), /* 963 unpeer_diges */
+ S_ST( '_', 3, 965, 0 ), /* 964 unpeer_digest */
+ S_ST( 'e', 3, 966, 0 ), /* 965 unpeer_digest_ */
+ S_ST( 'a', 3, 967, 0 ), /* 966 unpeer_digest_e */
+ S_ST( 'r', 3, 968, 0 ), /* 967 unpeer_digest_ea */
+ S_ST( 'l', 3, 448, 0 ), /* 968 unpeer_digest_ear */
+ S_ST( 'v', 3, 970, 928 ), /* 969 */
+ S_ST( 'e', 3, 971, 0 ), /* 970 v */
+ S_ST( 'r', 3, 972, 0 ), /* 971 ve */
+ S_ST( 's', 3, 973, 0 ), /* 972 ver */
+ S_ST( 'i', 3, 974, 0 ), /* 973 vers */
+ S_ST( 'o', 3, 451, 0 ), /* 974 versi */
+ S_ST( 'w', 3, 982, 969 ), /* 975 */
+ S_ST( 'a', 3, 977, 0 ), /* 976 w */
+ S_ST( 'n', 3, 978, 0 ), /* 977 wa */
+ S_ST( 'd', 3, 979, 0 ), /* 978 wan */
+ S_ST( 'e', 3, 466, 0 ), /* 979 wand */
+ S_ST( 'e', 3, 981, 976 ), /* 980 w */
+ S_ST( 'e', 3, 453, 0 ), /* 981 we */
+ S_ST( 'i', 3, 983, 980 ), /* 982 w */
+ S_ST( 'l', 3, 984, 0 ), /* 983 wi */
+ S_ST( 'd', 3, 985, 0 ), /* 984 wil */
+ S_ST( 'c', 3, 986, 0 ), /* 985 wild */
+ S_ST( 'a', 3, 987, 0 ), /* 986 wildc */
+ S_ST( 'r', 3, 454, 0 ), /* 987 wildca */
+ S_ST( 'x', 3, 993, 975 ), /* 988 */
+ S_ST( 'l', 3, 990, 0 ), /* 989 x */
+ S_ST( 'e', 3, 991, 0 ), /* 990 xl */
+ S_ST( 'a', 3, 992, 0 ), /* 991 xle */
+ S_ST( 'v', 3, 455, 0 ), /* 992 xlea */
+ S_ST( 'm', 3, 994, 989 ), /* 993 x */
+ S_ST( 't', 3, 995, 0 ), /* 994 xm */
+ S_ST( 'n', 3, 996, 0 ), /* 995 xmt */
+ S_ST( 'o', 3, 997, 0 ), /* 996 xmtn */
+ S_ST( 'n', 3, 998, 0 ), /* 997 xmtno */
+ S_ST( 'c', 3, 456, 0 ), /* 998 xmtnon */
+ S_ST( 'y', 3, 1000, 988 ), /* 999 [initial state] */
+ S_ST( 'e', 3, 1001, 0 ), /* 1000 y */
+ S_ST( 'a', 3, 457, 0 ) /* 1001 ye */
};
diff --git a/contrib/ntp/ntpd/ntp_leapsec.c b/contrib/ntp/ntpd/ntp_leapsec.c
index 7d20873d618d..88f9d4e1cc23 100644
--- a/contrib/ntp/ntpd/ntp_leapsec.c
+++ b/contrib/ntp/ntpd/ntp_leapsec.c
@@ -183,10 +183,11 @@ leapsec_load(
void * farg,
int use_build_limit)
{
- char *cp, *ep, linebuf[50];
- vint64 ttime, limit;
- long taiof;
- struct calendar build;
+ char const *ep;
+ char *cp, *endp, linebuf[50];
+ vint64 ttime, limit;
+ long taiof;
+ struct calendar build;
leapsec_clear(pt);
if (use_build_limit && ntpcal_get_build_date(&build)) {
@@ -220,9 +221,9 @@ leapsec_load(
if (parsefail(cp, ep))
goto fail_read;
cp = skipws(ep);
- taiof = strtol(cp, &ep, 10);
- if ( parsefail(cp, ep)
- || taiof > SHRT_MAX || taiof < SHRT_MIN)
+ taiof = strtol(cp, &endp, 10);
+ if ( parsefail(cp, endp)
+ || taiof > INT16_MAX || taiof < INT16_MIN)
goto fail_read;
if (ucmpv64(&ttime, &limit) >= 0) {
if (!leapsec_raw(pt, &ttime,
diff --git a/contrib/ntp/ntpd/ntp_loopfilter.c b/contrib/ntp/ntpd/ntp_loopfilter.c
index b7a742bbd183..0499c363393d 100644
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ b/contrib/ntp/ntpd/ntp_loopfilter.c
@@ -1117,6 +1117,11 @@ start_kern_loop(void)
* unconditionally set to sys_poll, whereas elsewhere is is
* modified depending on nanosecond vs. microsecond kernel?
*/
+ /*[bug 3699] make sure kernel PLL sees our initial drift compensation */
+ if (freq_set) {
+ ntv.modes |= MOD_FREQUENCY;
+ ntv.freq = DTOFREQ(drift_comp);
+ }
#ifdef SIGSYS
/*
* Use sigsetjmp() to save state and then call ntp_adjtime(); if
@@ -1314,7 +1319,12 @@ loop_config(
case LOOP_FREQ: /* initial frequency (freq) */
init_drift_comp = freq;
- freq_set++;
+ freq_set = 1;
+ break;
+
+ case LOOP_NOFREQ: /* remove any initial drift comp spec */
+ init_drift_comp = 0;
+ freq_set = 0;
break;
case LOOP_HUFFPUFF: /* huff-n'-puff length (huffpuff) */
diff --git a/contrib/ntp/ntpd/ntp_monitor.c b/contrib/ntp/ntpd/ntp_monitor.c
index a07a1aaef196..b3db452a243e 100644
--- a/contrib/ntp/ntpd/ntp_monitor.c
+++ b/contrib/ntp/ntpd/ntp_monitor.c
@@ -82,8 +82,10 @@ static u_int mon_mem_increments; /* times called malloc() */
* headway is less than the minimum, as well as if the average headway
* is less than eight times the increment.
*/
-int ntp_minpkt = NTP_MINPKT; /* minimum (log 2 s) */
-u_char ntp_minpoll = NTP_MINPOLL; /* increment (log 2 s) */
+int ntp_minpkt = NTP_MINPKT; /* minimum seconds between */
+ /* requests from a client */
+u_char ntp_minpoll = NTP_MINPOLL; /* minimum average log2 seconds */
+ /* between client requests */
/*
* Initialization state. We may be monitoring, we may not. If
@@ -459,7 +461,7 @@ ntp_monitor(
mon_getmoremem();
UNLINK_HEAD_SLIST(mon, mon_free, hash_next);
/* Preempt from the MRU list if old enough. */
- } else if (ntp_random() / (2. * FRAC) >
+ } else if (ntp_uurandom() >
(double)oldest_age / mon_age) {
return ~(RES_LIMITED | RES_KOD) & flags;
} else {
diff --git a/contrib/ntp/ntpd/ntp_parser.c b/contrib/ntp/ntpd/ntp_parser.c
index dfaa8db24cc1..834b1fbd1acc 100644
--- a/contrib/ntp/ntpd/ntp_parser.c
+++ b/contrib/ntp/ntpd/ntp_parser.c
@@ -1,8 +1,9 @@
-/* A Bison parser, made by GNU Bison 3.0.4. */
+/* A Bison parser, made by GNU Bison 3.7.6. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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
@@ -15,7 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -33,6 +34,10 @@
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
@@ -40,11 +45,11 @@
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
-/* Identify Bison output. */
-#define YYBISON 1
+/* Identify Bison output, and Bison version. */
+#define YYBISON 30706
-/* Bison version. */
-#define YYBISON_VERSION "3.0.4"
+/* Bison version string. */
+#define YYBISON_VERSION "3.7.6"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -61,8 +66,8 @@
-/* Copy the first part of user declarations. */
-#line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339 */
+/* First part of user prologue. */
+#line 11 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -97,28 +102,33 @@
# define ONLY_SIM(a) NULL
#endif
-#line 101 "../../ntpd/ntp_parser.c" /* yacc.c:339 */
+#line 106 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+# ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
+# else
+# define YY_CAST(Type, Val) ((Type) (Val))
+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# endif
+# endif
# ifndef YY_NULLPTR
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
# else
-# define YY_NULLPTR 0
+# define YY_NULLPTR ((void*)0)
# endif
# endif
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "y.tab.h". */
-#ifndef YY_YY__NTPD_NTP_PARSER_H_INCLUDED
-# define YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+/* Use api.header.include to #include this header
+ instead of duplicating it here. */
+#ifndef YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
+# define YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -127,223 +137,235 @@
extern int yydebug;
#endif
-/* Token type. */
+/* Token kinds. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
- T_Abbrev = 258,
- T_Age = 259,
- T_All = 260,
- T_Allan = 261,
- T_Allpeers = 262,
- T_Auth = 263,
- T_Autokey = 264,
- T_Automax = 265,
- T_Average = 266,
- T_Basedate = 267,
- T_Bclient = 268,
- T_Bcpollbstep = 269,
- T_Beacon = 270,
- T_Broadcast = 271,
- T_Broadcastclient = 272,
- T_Broadcastdelay = 273,
- T_Burst = 274,
- T_Calibrate = 275,
- T_Ceiling = 276,
- T_Checkhash = 277,
- T_Clockstats = 278,
- T_Cohort = 279,
- T_ControlKey = 280,
- T_Crypto = 281,
- T_Cryptostats = 282,
- T_Ctl = 283,
- T_Day = 284,
- T_Default = 285,
- T_Digest = 286,
- T_Disable = 287,
- T_Discard = 288,
- T_Dispersion = 289,
- T_Double = 290,
- T_Driftfile = 291,
- T_Drop = 292,
- T_Dscp = 293,
- T_Ellipsis = 294,
- T_Enable = 295,
- T_End = 296,
- T_Epeer = 297,
- T_False = 298,
- T_File = 299,
- T_Filegen = 300,
- T_Filenum = 301,
- T_Flag1 = 302,
- T_Flag2 = 303,
- T_Flag3 = 304,
- T_Flag4 = 305,
- T_Flake = 306,
- T_Floor = 307,
- T_Freq = 308,
- T_Fudge = 309,
- T_Fuzz = 310,
- T_Host = 311,
- T_Huffpuff = 312,
- T_Iburst = 313,
- T_Ident = 314,
- T_Ignore = 315,
- T_Ignorehash = 316,
- T_Incalloc = 317,
- T_Incmem = 318,
- T_Initalloc = 319,
- T_Initmem = 320,
- T_Includefile = 321,
- T_Integer = 322,
- T_Interface = 323,
- T_Intrange = 324,
- T_Io = 325,
- T_Ippeerlimit = 326,
- T_Ipv4 = 327,
- T_Ipv4_flag = 328,
- T_Ipv6 = 329,
- T_Ipv6_flag = 330,
- T_Kernel = 331,
- T_Key = 332,
- T_Keys = 333,
- T_Keysdir = 334,
- T_Kod = 335,
- T_Leapfile = 336,
- T_Leapsmearinterval = 337,
- T_Limited = 338,
- T_Link = 339,
- T_Listen = 340,
- T_Logconfig = 341,
- T_Logfile = 342,
- T_Loopstats = 343,
- T_Lowpriotrap = 344,
- T_Manycastclient = 345,
- T_Manycastserver = 346,
- T_Mask = 347,
- T_Maxage = 348,
- T_Maxclock = 349,
- T_Maxdepth = 350,
- T_Maxdist = 351,
- T_Maxmem = 352,
- T_Maxpoll = 353,
- T_Mdnstries = 354,
- T_Mem = 355,
- T_Memlock = 356,
- T_Minclock = 357,
- T_Mindepth = 358,
- T_Mindist = 359,
- T_Minimum = 360,
- T_Minjitter = 361,
- T_Minpoll = 362,
- T_Minsane = 363,
- T_Mode = 364,
- T_Mode7 = 365,
- T_Monitor = 366,
- T_Month = 367,
- T_Mru = 368,
- T_Mssntp = 369,
- T_Multicastclient = 370,
- T_Nic = 371,
- T_Nolink = 372,
- T_Nomodify = 373,
- T_Nomrulist = 374,
- T_None = 375,
- T_Nonvolatile = 376,
- T_Noepeer = 377,
- T_Nopeer = 378,
- T_Noquery = 379,
- T_Noselect = 380,
- T_Noserve = 381,
- T_Notrap = 382,
- T_Notrust = 383,
- T_Ntp = 384,
- T_Ntpport = 385,
- T_NtpSignDsocket = 386,
- T_Orphan = 387,
- T_Orphanwait = 388,
- T_PCEdigest = 389,
- T_Panic = 390,
- T_Peer = 391,
- T_Peerstats = 392,
- T_Phone = 393,
- T_Pid = 394,
- T_Pidfile = 395,
- T_Poll = 396,
- T_PollSkewList = 397,
- T_Pool = 398,
- T_Port = 399,
- T_Preempt = 400,
- T_Prefer = 401,
- T_Protostats = 402,
- T_Pw = 403,
- T_Randfile = 404,
- T_Rawstats = 405,
- T_Refid = 406,
- T_Requestkey = 407,
- T_Reset = 408,
- T_Restrict = 409,
- T_Revoke = 410,
- T_Rlimit = 411,
- T_Saveconfigdir = 412,
- T_Server = 413,
- T_Serverresponse = 414,
- T_ServerresponseFuzz = 415,
- T_Setvar = 416,
- T_Source = 417,
- T_Stacksize = 418,
- T_Statistics = 419,
- T_Stats = 420,
- T_Statsdir = 421,
- T_Step = 422,
- T_Stepback = 423,
- T_Stepfwd = 424,
- T_Stepout = 425,
- T_Stratum = 426,
- T_String = 427,
- T_Sys = 428,
- T_Sysstats = 429,
- T_Tick = 430,
- T_Time1 = 431,
- T_Time2 = 432,
- T_Timer = 433,
- T_Timingstats = 434,
- T_Tinker = 435,
- T_Tos = 436,
- T_Trap = 437,
- T_True = 438,
- T_Trustedkey = 439,
- T_Ttl = 440,
- T_Type = 441,
- T_U_int = 442,
- T_UEcrypto = 443,
- T_UEcryptonak = 444,
- T_UEdigest = 445,
- T_Unconfig = 446,
- T_Unpeer = 447,
- T_Version = 448,
- T_WanderThreshold = 449,
- T_Week = 450,
- T_Wildcard = 451,
- T_Xleave = 452,
- T_Xmtnonce = 453,
- T_Year = 454,
- T_Flag = 455,
- T_EOC = 456,
- T_Simulate = 457,
- T_Beep_Delay = 458,
- T_Sim_Duration = 459,
- T_Server_Offset = 460,
- T_Duration = 461,
- T_Freq_Offset = 462,
- T_Wander = 463,
- T_Jitter = 464,
- T_Prop_Delay = 465,
- T_Proc_Delay = 466
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ T_Abbrev = 258, /* T_Abbrev */
+ T_Age = 259, /* T_Age */
+ T_All = 260, /* T_All */
+ T_Allan = 261, /* T_Allan */
+ T_Allpeers = 262, /* T_Allpeers */
+ T_Auth = 263, /* T_Auth */
+ T_Autokey = 264, /* T_Autokey */
+ T_Automax = 265, /* T_Automax */
+ T_Average = 266, /* T_Average */
+ T_Basedate = 267, /* T_Basedate */
+ T_Bclient = 268, /* T_Bclient */
+ T_Bcpollbstep = 269, /* T_Bcpollbstep */
+ T_Beacon = 270, /* T_Beacon */
+ T_Broadcast = 271, /* T_Broadcast */
+ T_Broadcastclient = 272, /* T_Broadcastclient */
+ T_Broadcastdelay = 273, /* T_Broadcastdelay */
+ T_Burst = 274, /* T_Burst */
+ T_Calibrate = 275, /* T_Calibrate */
+ T_Ceiling = 276, /* T_Ceiling */
+ T_Checkhash = 277, /* T_Checkhash */
+ T_Clockstats = 278, /* T_Clockstats */
+ T_Cohort = 279, /* T_Cohort */
+ T_ControlKey = 280, /* T_ControlKey */
+ T_Crypto = 281, /* T_Crypto */
+ T_Cryptostats = 282, /* T_Cryptostats */
+ T_Ctl = 283, /* T_Ctl */
+ T_Day = 284, /* T_Day */
+ T_Default = 285, /* T_Default */
+ T_Device = 286, /* T_Device */
+ T_Digest = 287, /* T_Digest */
+ T_Disable = 288, /* T_Disable */
+ T_Discard = 289, /* T_Discard */
+ T_Dispersion = 290, /* T_Dispersion */
+ T_Double = 291, /* T_Double */
+ T_Driftfile = 292, /* T_Driftfile */
+ T_Drop = 293, /* T_Drop */
+ T_Dscp = 294, /* T_Dscp */
+ T_Ellipsis = 295, /* T_Ellipsis */
+ T_Enable = 296, /* T_Enable */
+ T_End = 297, /* T_End */
+ T_Epeer = 298, /* T_Epeer */
+ T_False = 299, /* T_False */
+ T_File = 300, /* T_File */
+ T_Filegen = 301, /* T_Filegen */
+ T_Filenum = 302, /* T_Filenum */
+ T_Flag1 = 303, /* T_Flag1 */
+ T_Flag2 = 304, /* T_Flag2 */
+ T_Flag3 = 305, /* T_Flag3 */
+ T_Flag4 = 306, /* T_Flag4 */
+ T_Flake = 307, /* T_Flake */
+ T_Floor = 308, /* T_Floor */
+ T_Freq = 309, /* T_Freq */
+ T_Fudge = 310, /* T_Fudge */
+ T_Fuzz = 311, /* T_Fuzz */
+ T_Host = 312, /* T_Host */
+ T_Huffpuff = 313, /* T_Huffpuff */
+ T_Iburst = 314, /* T_Iburst */
+ T_Ident = 315, /* T_Ident */
+ T_Ignore = 316, /* T_Ignore */
+ T_Ignorehash = 317, /* T_Ignorehash */
+ T_Incalloc = 318, /* T_Incalloc */
+ T_Incmem = 319, /* T_Incmem */
+ T_Initalloc = 320, /* T_Initalloc */
+ T_Initmem = 321, /* T_Initmem */
+ T_Includefile = 322, /* T_Includefile */
+ T_Integer = 323, /* T_Integer */
+ T_Interface = 324, /* T_Interface */
+ T_Intrange = 325, /* T_Intrange */
+ T_Io = 326, /* T_Io */
+ T_Ippeerlimit = 327, /* T_Ippeerlimit */
+ T_Ipv4 = 328, /* T_Ipv4 */
+ T_Ipv4_flag = 329, /* T_Ipv4_flag */
+ T_Ipv6 = 330, /* T_Ipv6 */
+ T_Ipv6_flag = 331, /* T_Ipv6_flag */
+ T_Kernel = 332, /* T_Kernel */
+ T_Key = 333, /* T_Key */
+ T_Keys = 334, /* T_Keys */
+ T_Keysdir = 335, /* T_Keysdir */
+ T_Kod = 336, /* T_Kod */
+ T_Leapfile = 337, /* T_Leapfile */
+ T_Leapsmearinterval = 338, /* T_Leapsmearinterval */
+ T_Limited = 339, /* T_Limited */
+ T_Link = 340, /* T_Link */
+ T_Listen = 341, /* T_Listen */
+ T_Logconfig = 342, /* T_Logconfig */
+ T_Logfile = 343, /* T_Logfile */
+ T_Loopstats = 344, /* T_Loopstats */
+ T_Lowpriotrap = 345, /* T_Lowpriotrap */
+ T_Manycastclient = 346, /* T_Manycastclient */
+ T_Manycastserver = 347, /* T_Manycastserver */
+ T_Mask = 348, /* T_Mask */
+ T_Maxage = 349, /* T_Maxage */
+ T_Maxclock = 350, /* T_Maxclock */
+ T_Maxdepth = 351, /* T_Maxdepth */
+ T_Maxdist = 352, /* T_Maxdist */
+ T_Maxmem = 353, /* T_Maxmem */
+ T_Maxpoll = 354, /* T_Maxpoll */
+ T_Mdnstries = 355, /* T_Mdnstries */
+ T_Mem = 356, /* T_Mem */
+ T_Memlock = 357, /* T_Memlock */
+ T_Minclock = 358, /* T_Minclock */
+ T_Mindepth = 359, /* T_Mindepth */
+ T_Mindist = 360, /* T_Mindist */
+ T_Minimum = 361, /* T_Minimum */
+ T_Minjitter = 362, /* T_Minjitter */
+ T_Minpoll = 363, /* T_Minpoll */
+ T_Minsane = 364, /* T_Minsane */
+ T_Mode = 365, /* T_Mode */
+ T_Mode7 = 366, /* T_Mode7 */
+ T_Monitor = 367, /* T_Monitor */
+ T_Month = 368, /* T_Month */
+ T_Mru = 369, /* T_Mru */
+ T_Mssntp = 370, /* T_Mssntp */
+ T_Multicastclient = 371, /* T_Multicastclient */
+ T_Nic = 372, /* T_Nic */
+ T_Nolink = 373, /* T_Nolink */
+ T_Nomodify = 374, /* T_Nomodify */
+ T_Nomrulist = 375, /* T_Nomrulist */
+ T_None = 376, /* T_None */
+ T_Nonvolatile = 377, /* T_Nonvolatile */
+ T_Noepeer = 378, /* T_Noepeer */
+ T_Nopeer = 379, /* T_Nopeer */
+ T_Noquery = 380, /* T_Noquery */
+ T_Noselect = 381, /* T_Noselect */
+ T_Noserve = 382, /* T_Noserve */
+ T_Notrap = 383, /* T_Notrap */
+ T_Notrust = 384, /* T_Notrust */
+ T_Ntp = 385, /* T_Ntp */
+ T_Ntpport = 386, /* T_Ntpport */
+ T_NtpSignDsocket = 387, /* T_NtpSignDsocket */
+ T_Orphan = 388, /* T_Orphan */
+ T_Orphanwait = 389, /* T_Orphanwait */
+ T_PCEdigest = 390, /* T_PCEdigest */
+ T_Panic = 391, /* T_Panic */
+ T_Peer = 392, /* T_Peer */
+ T_Peerstats = 393, /* T_Peerstats */
+ T_Phone = 394, /* T_Phone */
+ T_Pid = 395, /* T_Pid */
+ T_Pidfile = 396, /* T_Pidfile */
+ T_Poll = 397, /* T_Poll */
+ T_PollSkewList = 398, /* T_PollSkewList */
+ T_Pool = 399, /* T_Pool */
+ T_Port = 400, /* T_Port */
+ T_PpsData = 401, /* T_PpsData */
+ T_Preempt = 402, /* T_Preempt */
+ T_Prefer = 403, /* T_Prefer */
+ T_Protostats = 404, /* T_Protostats */
+ T_Pw = 405, /* T_Pw */
+ T_Randfile = 406, /* T_Randfile */
+ T_Rawstats = 407, /* T_Rawstats */
+ T_Refid = 408, /* T_Refid */
+ T_Requestkey = 409, /* T_Requestkey */
+ T_Reset = 410, /* T_Reset */
+ T_Restrict = 411, /* T_Restrict */
+ T_Revoke = 412, /* T_Revoke */
+ T_Rlimit = 413, /* T_Rlimit */
+ T_Saveconfigdir = 414, /* T_Saveconfigdir */
+ T_Server = 415, /* T_Server */
+ T_Serverresponse = 416, /* T_Serverresponse */
+ T_ServerresponseFuzz = 417, /* T_ServerresponseFuzz */
+ T_Setvar = 418, /* T_Setvar */
+ T_Source = 419, /* T_Source */
+ T_Stacksize = 420, /* T_Stacksize */
+ T_Statistics = 421, /* T_Statistics */
+ T_Stats = 422, /* T_Stats */
+ T_Statsdir = 423, /* T_Statsdir */
+ T_Step = 424, /* T_Step */
+ T_Stepback = 425, /* T_Stepback */
+ T_Stepfwd = 426, /* T_Stepfwd */
+ T_Stepout = 427, /* T_Stepout */
+ T_Stratum = 428, /* T_Stratum */
+ T_String = 429, /* T_String */
+ T_Sys = 430, /* T_Sys */
+ T_Sysstats = 431, /* T_Sysstats */
+ T_Tick = 432, /* T_Tick */
+ T_Time1 = 433, /* T_Time1 */
+ T_Time2 = 434, /* T_Time2 */
+ T_TimeData = 435, /* T_TimeData */
+ T_Timer = 436, /* T_Timer */
+ T_Timingstats = 437, /* T_Timingstats */
+ T_Tinker = 438, /* T_Tinker */
+ T_Tos = 439, /* T_Tos */
+ T_Trap = 440, /* T_Trap */
+ T_True = 441, /* T_True */
+ T_Trustedkey = 442, /* T_Trustedkey */
+ T_Ttl = 443, /* T_Ttl */
+ T_Type = 444, /* T_Type */
+ T_U_int = 445, /* T_U_int */
+ T_UEcrypto = 446, /* T_UEcrypto */
+ T_UEcryptonak = 447, /* T_UEcryptonak */
+ T_UEdigest = 448, /* T_UEdigest */
+ T_Unconfig = 449, /* T_Unconfig */
+ T_Unpeer = 450, /* T_Unpeer */
+ T_Version = 451, /* T_Version */
+ T_WanderThreshold = 452, /* T_WanderThreshold */
+ T_Week = 453, /* T_Week */
+ T_Wildcard = 454, /* T_Wildcard */
+ T_Xleave = 455, /* T_Xleave */
+ T_Xmtnonce = 456, /* T_Xmtnonce */
+ T_Year = 457, /* T_Year */
+ T_Flag = 458, /* T_Flag */
+ T_EOC = 459, /* T_EOC */
+ T_Simulate = 460, /* T_Simulate */
+ T_Beep_Delay = 461, /* T_Beep_Delay */
+ T_Sim_Duration = 462, /* T_Sim_Duration */
+ T_Server_Offset = 463, /* T_Server_Offset */
+ T_Duration = 464, /* T_Duration */
+ T_Freq_Offset = 465, /* T_Freq_Offset */
+ T_Wander = 466, /* T_Wander */
+ T_Jitter = 467, /* T_Jitter */
+ T_Prop_Delay = 468, /* T_Prop_Delay */
+ T_Proc_Delay = 469 /* T_Proc_Delay */
};
+ typedef enum yytokentype yytoken_kind_t;
#endif
-/* Tokens. */
+/* Token kinds. */
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYerror 256
+#define YYUNDEF 257
#define T_Abbrev 258
#define T_Age 259
#define T_All 260
@@ -372,194 +394,196 @@ extern int yydebug;
#define T_Ctl 283
#define T_Day 284
#define T_Default 285
-#define T_Digest 286
-#define T_Disable 287
-#define T_Discard 288
-#define T_Dispersion 289
-#define T_Double 290
-#define T_Driftfile 291
-#define T_Drop 292
-#define T_Dscp 293
-#define T_Ellipsis 294
-#define T_Enable 295
-#define T_End 296
-#define T_Epeer 297
-#define T_False 298
-#define T_File 299
-#define T_Filegen 300
-#define T_Filenum 301
-#define T_Flag1 302
-#define T_Flag2 303
-#define T_Flag3 304
-#define T_Flag4 305
-#define T_Flake 306
-#define T_Floor 307
-#define T_Freq 308
-#define T_Fudge 309
-#define T_Fuzz 310
-#define T_Host 311
-#define T_Huffpuff 312
-#define T_Iburst 313
-#define T_Ident 314
-#define T_Ignore 315
-#define T_Ignorehash 316
-#define T_Incalloc 317
-#define T_Incmem 318
-#define T_Initalloc 319
-#define T_Initmem 320
-#define T_Includefile 321
-#define T_Integer 322
-#define T_Interface 323
-#define T_Intrange 324
-#define T_Io 325
-#define T_Ippeerlimit 326
-#define T_Ipv4 327
-#define T_Ipv4_flag 328
-#define T_Ipv6 329
-#define T_Ipv6_flag 330
-#define T_Kernel 331
-#define T_Key 332
-#define T_Keys 333
-#define T_Keysdir 334
-#define T_Kod 335
-#define T_Leapfile 336
-#define T_Leapsmearinterval 337
-#define T_Limited 338
-#define T_Link 339
-#define T_Listen 340
-#define T_Logconfig 341
-#define T_Logfile 342
-#define T_Loopstats 343
-#define T_Lowpriotrap 344
-#define T_Manycastclient 345
-#define T_Manycastserver 346
-#define T_Mask 347
-#define T_Maxage 348
-#define T_Maxclock 349
-#define T_Maxdepth 350
-#define T_Maxdist 351
-#define T_Maxmem 352
-#define T_Maxpoll 353
-#define T_Mdnstries 354
-#define T_Mem 355
-#define T_Memlock 356
-#define T_Minclock 357
-#define T_Mindepth 358
-#define T_Mindist 359
-#define T_Minimum 360
-#define T_Minjitter 361
-#define T_Minpoll 362
-#define T_Minsane 363
-#define T_Mode 364
-#define T_Mode7 365
-#define T_Monitor 366
-#define T_Month 367
-#define T_Mru 368
-#define T_Mssntp 369
-#define T_Multicastclient 370
-#define T_Nic 371
-#define T_Nolink 372
-#define T_Nomodify 373
-#define T_Nomrulist 374
-#define T_None 375
-#define T_Nonvolatile 376
-#define T_Noepeer 377
-#define T_Nopeer 378
-#define T_Noquery 379
-#define T_Noselect 380
-#define T_Noserve 381
-#define T_Notrap 382
-#define T_Notrust 383
-#define T_Ntp 384
-#define T_Ntpport 385
-#define T_NtpSignDsocket 386
-#define T_Orphan 387
-#define T_Orphanwait 388
-#define T_PCEdigest 389
-#define T_Panic 390
-#define T_Peer 391
-#define T_Peerstats 392
-#define T_Phone 393
-#define T_Pid 394
-#define T_Pidfile 395
-#define T_Poll 396
-#define T_PollSkewList 397
-#define T_Pool 398
-#define T_Port 399
-#define T_Preempt 400
-#define T_Prefer 401
-#define T_Protostats 402
-#define T_Pw 403
-#define T_Randfile 404
-#define T_Rawstats 405
-#define T_Refid 406
-#define T_Requestkey 407
-#define T_Reset 408
-#define T_Restrict 409
-#define T_Revoke 410
-#define T_Rlimit 411
-#define T_Saveconfigdir 412
-#define T_Server 413
-#define T_Serverresponse 414
-#define T_ServerresponseFuzz 415
-#define T_Setvar 416
-#define T_Source 417
-#define T_Stacksize 418
-#define T_Statistics 419
-#define T_Stats 420
-#define T_Statsdir 421
-#define T_Step 422
-#define T_Stepback 423
-#define T_Stepfwd 424
-#define T_Stepout 425
-#define T_Stratum 426
-#define T_String 427
-#define T_Sys 428
-#define T_Sysstats 429
-#define T_Tick 430
-#define T_Time1 431
-#define T_Time2 432
-#define T_Timer 433
-#define T_Timingstats 434
-#define T_Tinker 435
-#define T_Tos 436
-#define T_Trap 437
-#define T_True 438
-#define T_Trustedkey 439
-#define T_Ttl 440
-#define T_Type 441
-#define T_U_int 442
-#define T_UEcrypto 443
-#define T_UEcryptonak 444
-#define T_UEdigest 445
-#define T_Unconfig 446
-#define T_Unpeer 447
-#define T_Version 448
-#define T_WanderThreshold 449
-#define T_Week 450
-#define T_Wildcard 451
-#define T_Xleave 452
-#define T_Xmtnonce 453
-#define T_Year 454
-#define T_Flag 455
-#define T_EOC 456
-#define T_Simulate 457
-#define T_Beep_Delay 458
-#define T_Sim_Duration 459
-#define T_Server_Offset 460
-#define T_Duration 461
-#define T_Freq_Offset 462
-#define T_Wander 463
-#define T_Jitter 464
-#define T_Prop_Delay 465
-#define T_Proc_Delay 466
+#define T_Device 286
+#define T_Digest 287
+#define T_Disable 288
+#define T_Discard 289
+#define T_Dispersion 290
+#define T_Double 291
+#define T_Driftfile 292
+#define T_Drop 293
+#define T_Dscp 294
+#define T_Ellipsis 295
+#define T_Enable 296
+#define T_End 297
+#define T_Epeer 298
+#define T_False 299
+#define T_File 300
+#define T_Filegen 301
+#define T_Filenum 302
+#define T_Flag1 303
+#define T_Flag2 304
+#define T_Flag3 305
+#define T_Flag4 306
+#define T_Flake 307
+#define T_Floor 308
+#define T_Freq 309
+#define T_Fudge 310
+#define T_Fuzz 311
+#define T_Host 312
+#define T_Huffpuff 313
+#define T_Iburst 314
+#define T_Ident 315
+#define T_Ignore 316
+#define T_Ignorehash 317
+#define T_Incalloc 318
+#define T_Incmem 319
+#define T_Initalloc 320
+#define T_Initmem 321
+#define T_Includefile 322
+#define T_Integer 323
+#define T_Interface 324
+#define T_Intrange 325
+#define T_Io 326
+#define T_Ippeerlimit 327
+#define T_Ipv4 328
+#define T_Ipv4_flag 329
+#define T_Ipv6 330
+#define T_Ipv6_flag 331
+#define T_Kernel 332
+#define T_Key 333
+#define T_Keys 334
+#define T_Keysdir 335
+#define T_Kod 336
+#define T_Leapfile 337
+#define T_Leapsmearinterval 338
+#define T_Limited 339
+#define T_Link 340
+#define T_Listen 341
+#define T_Logconfig 342
+#define T_Logfile 343
+#define T_Loopstats 344
+#define T_Lowpriotrap 345
+#define T_Manycastclient 346
+#define T_Manycastserver 347
+#define T_Mask 348
+#define T_Maxage 349
+#define T_Maxclock 350
+#define T_Maxdepth 351
+#define T_Maxdist 352
+#define T_Maxmem 353
+#define T_Maxpoll 354
+#define T_Mdnstries 355
+#define T_Mem 356
+#define T_Memlock 357
+#define T_Minclock 358
+#define T_Mindepth 359
+#define T_Mindist 360
+#define T_Minimum 361
+#define T_Minjitter 362
+#define T_Minpoll 363
+#define T_Minsane 364
+#define T_Mode 365
+#define T_Mode7 366
+#define T_Monitor 367
+#define T_Month 368
+#define T_Mru 369
+#define T_Mssntp 370
+#define T_Multicastclient 371
+#define T_Nic 372
+#define T_Nolink 373
+#define T_Nomodify 374
+#define T_Nomrulist 375
+#define T_None 376
+#define T_Nonvolatile 377
+#define T_Noepeer 378
+#define T_Nopeer 379
+#define T_Noquery 380
+#define T_Noselect 381
+#define T_Noserve 382
+#define T_Notrap 383
+#define T_Notrust 384
+#define T_Ntp 385
+#define T_Ntpport 386
+#define T_NtpSignDsocket 387
+#define T_Orphan 388
+#define T_Orphanwait 389
+#define T_PCEdigest 390
+#define T_Panic 391
+#define T_Peer 392
+#define T_Peerstats 393
+#define T_Phone 394
+#define T_Pid 395
+#define T_Pidfile 396
+#define T_Poll 397
+#define T_PollSkewList 398
+#define T_Pool 399
+#define T_Port 400
+#define T_PpsData 401
+#define T_Preempt 402
+#define T_Prefer 403
+#define T_Protostats 404
+#define T_Pw 405
+#define T_Randfile 406
+#define T_Rawstats 407
+#define T_Refid 408
+#define T_Requestkey 409
+#define T_Reset 410
+#define T_Restrict 411
+#define T_Revoke 412
+#define T_Rlimit 413
+#define T_Saveconfigdir 414
+#define T_Server 415
+#define T_Serverresponse 416
+#define T_ServerresponseFuzz 417
+#define T_Setvar 418
+#define T_Source 419
+#define T_Stacksize 420
+#define T_Statistics 421
+#define T_Stats 422
+#define T_Statsdir 423
+#define T_Step 424
+#define T_Stepback 425
+#define T_Stepfwd 426
+#define T_Stepout 427
+#define T_Stratum 428
+#define T_String 429
+#define T_Sys 430
+#define T_Sysstats 431
+#define T_Tick 432
+#define T_Time1 433
+#define T_Time2 434
+#define T_TimeData 435
+#define T_Timer 436
+#define T_Timingstats 437
+#define T_Tinker 438
+#define T_Tos 439
+#define T_Trap 440
+#define T_True 441
+#define T_Trustedkey 442
+#define T_Ttl 443
+#define T_Type 444
+#define T_U_int 445
+#define T_UEcrypto 446
+#define T_UEcryptonak 447
+#define T_UEdigest 448
+#define T_Unconfig 449
+#define T_Unpeer 450
+#define T_Version 451
+#define T_WanderThreshold 452
+#define T_Week 453
+#define T_Wildcard 454
+#define T_Xleave 455
+#define T_Xmtnonce 456
+#define T_Year 457
+#define T_Flag 458
+#define T_EOC 459
+#define T_Simulate 460
+#define T_Beep_Delay 461
+#define T_Sim_Duration 462
+#define T_Server_Offset 463
+#define T_Duration 464
+#define T_Freq_Offset 465
+#define T_Wander 466
+#define T_Jitter 467
+#define T_Prop_Delay 468
+#define T_Proc_Delay 469
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-
union YYSTYPE
{
-#line 52 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
+#line 52 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
char * String;
double Double;
@@ -578,9 +602,9 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 582 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
-};
+#line 606 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+};
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -591,38 +615,438 @@ extern YYSTYPE yylval;
int yyparse (void);
-#endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED */
+#endif /* !YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED */
+/* Symbol kind. */
+enum yysymbol_kind_t
+{
+ YYSYMBOL_YYEMPTY = -2,
+ YYSYMBOL_YYEOF = 0, /* "end of file" */
+ YYSYMBOL_YYerror = 1, /* error */
+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
+ YYSYMBOL_T_Abbrev = 3, /* T_Abbrev */
+ YYSYMBOL_T_Age = 4, /* T_Age */
+ YYSYMBOL_T_All = 5, /* T_All */
+ YYSYMBOL_T_Allan = 6, /* T_Allan */
+ YYSYMBOL_T_Allpeers = 7, /* T_Allpeers */
+ YYSYMBOL_T_Auth = 8, /* T_Auth */
+ YYSYMBOL_T_Autokey = 9, /* T_Autokey */
+ YYSYMBOL_T_Automax = 10, /* T_Automax */
+ YYSYMBOL_T_Average = 11, /* T_Average */
+ YYSYMBOL_T_Basedate = 12, /* T_Basedate */
+ YYSYMBOL_T_Bclient = 13, /* T_Bclient */
+ YYSYMBOL_T_Bcpollbstep = 14, /* T_Bcpollbstep */
+ YYSYMBOL_T_Beacon = 15, /* T_Beacon */
+ YYSYMBOL_T_Broadcast = 16, /* T_Broadcast */
+ YYSYMBOL_T_Broadcastclient = 17, /* T_Broadcastclient */
+ YYSYMBOL_T_Broadcastdelay = 18, /* T_Broadcastdelay */
+ YYSYMBOL_T_Burst = 19, /* T_Burst */
+ YYSYMBOL_T_Calibrate = 20, /* T_Calibrate */
+ YYSYMBOL_T_Ceiling = 21, /* T_Ceiling */
+ YYSYMBOL_T_Checkhash = 22, /* T_Checkhash */
+ YYSYMBOL_T_Clockstats = 23, /* T_Clockstats */
+ YYSYMBOL_T_Cohort = 24, /* T_Cohort */
+ YYSYMBOL_T_ControlKey = 25, /* T_ControlKey */
+ YYSYMBOL_T_Crypto = 26, /* T_Crypto */
+ YYSYMBOL_T_Cryptostats = 27, /* T_Cryptostats */
+ YYSYMBOL_T_Ctl = 28, /* T_Ctl */
+ YYSYMBOL_T_Day = 29, /* T_Day */
+ YYSYMBOL_T_Default = 30, /* T_Default */
+ YYSYMBOL_T_Device = 31, /* T_Device */
+ YYSYMBOL_T_Digest = 32, /* T_Digest */
+ YYSYMBOL_T_Disable = 33, /* T_Disable */
+ YYSYMBOL_T_Discard = 34, /* T_Discard */
+ YYSYMBOL_T_Dispersion = 35, /* T_Dispersion */
+ YYSYMBOL_T_Double = 36, /* T_Double */
+ YYSYMBOL_T_Driftfile = 37, /* T_Driftfile */
+ YYSYMBOL_T_Drop = 38, /* T_Drop */
+ YYSYMBOL_T_Dscp = 39, /* T_Dscp */
+ YYSYMBOL_T_Ellipsis = 40, /* T_Ellipsis */
+ YYSYMBOL_T_Enable = 41, /* T_Enable */
+ YYSYMBOL_T_End = 42, /* T_End */
+ YYSYMBOL_T_Epeer = 43, /* T_Epeer */
+ YYSYMBOL_T_False = 44, /* T_False */
+ YYSYMBOL_T_File = 45, /* T_File */
+ YYSYMBOL_T_Filegen = 46, /* T_Filegen */
+ YYSYMBOL_T_Filenum = 47, /* T_Filenum */
+ YYSYMBOL_T_Flag1 = 48, /* T_Flag1 */
+ YYSYMBOL_T_Flag2 = 49, /* T_Flag2 */
+ YYSYMBOL_T_Flag3 = 50, /* T_Flag3 */
+ YYSYMBOL_T_Flag4 = 51, /* T_Flag4 */
+ YYSYMBOL_T_Flake = 52, /* T_Flake */
+ YYSYMBOL_T_Floor = 53, /* T_Floor */
+ YYSYMBOL_T_Freq = 54, /* T_Freq */
+ YYSYMBOL_T_Fudge = 55, /* T_Fudge */
+ YYSYMBOL_T_Fuzz = 56, /* T_Fuzz */
+ YYSYMBOL_T_Host = 57, /* T_Host */
+ YYSYMBOL_T_Huffpuff = 58, /* T_Huffpuff */
+ YYSYMBOL_T_Iburst = 59, /* T_Iburst */
+ YYSYMBOL_T_Ident = 60, /* T_Ident */
+ YYSYMBOL_T_Ignore = 61, /* T_Ignore */
+ YYSYMBOL_T_Ignorehash = 62, /* T_Ignorehash */
+ YYSYMBOL_T_Incalloc = 63, /* T_Incalloc */
+ YYSYMBOL_T_Incmem = 64, /* T_Incmem */
+ YYSYMBOL_T_Initalloc = 65, /* T_Initalloc */
+ YYSYMBOL_T_Initmem = 66, /* T_Initmem */
+ YYSYMBOL_T_Includefile = 67, /* T_Includefile */
+ YYSYMBOL_T_Integer = 68, /* T_Integer */
+ YYSYMBOL_T_Interface = 69, /* T_Interface */
+ YYSYMBOL_T_Intrange = 70, /* T_Intrange */
+ YYSYMBOL_T_Io = 71, /* T_Io */
+ YYSYMBOL_T_Ippeerlimit = 72, /* T_Ippeerlimit */
+ YYSYMBOL_T_Ipv4 = 73, /* T_Ipv4 */
+ YYSYMBOL_T_Ipv4_flag = 74, /* T_Ipv4_flag */
+ YYSYMBOL_T_Ipv6 = 75, /* T_Ipv6 */
+ YYSYMBOL_T_Ipv6_flag = 76, /* T_Ipv6_flag */
+ YYSYMBOL_T_Kernel = 77, /* T_Kernel */
+ YYSYMBOL_T_Key = 78, /* T_Key */
+ YYSYMBOL_T_Keys = 79, /* T_Keys */
+ YYSYMBOL_T_Keysdir = 80, /* T_Keysdir */
+ YYSYMBOL_T_Kod = 81, /* T_Kod */
+ YYSYMBOL_T_Leapfile = 82, /* T_Leapfile */
+ YYSYMBOL_T_Leapsmearinterval = 83, /* T_Leapsmearinterval */
+ YYSYMBOL_T_Limited = 84, /* T_Limited */
+ YYSYMBOL_T_Link = 85, /* T_Link */
+ YYSYMBOL_T_Listen = 86, /* T_Listen */
+ YYSYMBOL_T_Logconfig = 87, /* T_Logconfig */
+ YYSYMBOL_T_Logfile = 88, /* T_Logfile */
+ YYSYMBOL_T_Loopstats = 89, /* T_Loopstats */
+ YYSYMBOL_T_Lowpriotrap = 90, /* T_Lowpriotrap */
+ YYSYMBOL_T_Manycastclient = 91, /* T_Manycastclient */
+ YYSYMBOL_T_Manycastserver = 92, /* T_Manycastserver */
+ YYSYMBOL_T_Mask = 93, /* T_Mask */
+ YYSYMBOL_T_Maxage = 94, /* T_Maxage */
+ YYSYMBOL_T_Maxclock = 95, /* T_Maxclock */
+ YYSYMBOL_T_Maxdepth = 96, /* T_Maxdepth */
+ YYSYMBOL_T_Maxdist = 97, /* T_Maxdist */
+ YYSYMBOL_T_Maxmem = 98, /* T_Maxmem */
+ YYSYMBOL_T_Maxpoll = 99, /* T_Maxpoll */
+ YYSYMBOL_T_Mdnstries = 100, /* T_Mdnstries */
+ YYSYMBOL_T_Mem = 101, /* T_Mem */
+ YYSYMBOL_T_Memlock = 102, /* T_Memlock */
+ YYSYMBOL_T_Minclock = 103, /* T_Minclock */
+ YYSYMBOL_T_Mindepth = 104, /* T_Mindepth */
+ YYSYMBOL_T_Mindist = 105, /* T_Mindist */
+ YYSYMBOL_T_Minimum = 106, /* T_Minimum */
+ YYSYMBOL_T_Minjitter = 107, /* T_Minjitter */
+ YYSYMBOL_T_Minpoll = 108, /* T_Minpoll */
+ YYSYMBOL_T_Minsane = 109, /* T_Minsane */
+ YYSYMBOL_T_Mode = 110, /* T_Mode */
+ YYSYMBOL_T_Mode7 = 111, /* T_Mode7 */
+ YYSYMBOL_T_Monitor = 112, /* T_Monitor */
+ YYSYMBOL_T_Month = 113, /* T_Month */
+ YYSYMBOL_T_Mru = 114, /* T_Mru */
+ YYSYMBOL_T_Mssntp = 115, /* T_Mssntp */
+ YYSYMBOL_T_Multicastclient = 116, /* T_Multicastclient */
+ YYSYMBOL_T_Nic = 117, /* T_Nic */
+ YYSYMBOL_T_Nolink = 118, /* T_Nolink */
+ YYSYMBOL_T_Nomodify = 119, /* T_Nomodify */
+ YYSYMBOL_T_Nomrulist = 120, /* T_Nomrulist */
+ YYSYMBOL_T_None = 121, /* T_None */
+ YYSYMBOL_T_Nonvolatile = 122, /* T_Nonvolatile */
+ YYSYMBOL_T_Noepeer = 123, /* T_Noepeer */
+ YYSYMBOL_T_Nopeer = 124, /* T_Nopeer */
+ YYSYMBOL_T_Noquery = 125, /* T_Noquery */
+ YYSYMBOL_T_Noselect = 126, /* T_Noselect */
+ YYSYMBOL_T_Noserve = 127, /* T_Noserve */
+ YYSYMBOL_T_Notrap = 128, /* T_Notrap */
+ YYSYMBOL_T_Notrust = 129, /* T_Notrust */
+ YYSYMBOL_T_Ntp = 130, /* T_Ntp */
+ YYSYMBOL_T_Ntpport = 131, /* T_Ntpport */
+ YYSYMBOL_T_NtpSignDsocket = 132, /* T_NtpSignDsocket */
+ YYSYMBOL_T_Orphan = 133, /* T_Orphan */
+ YYSYMBOL_T_Orphanwait = 134, /* T_Orphanwait */
+ YYSYMBOL_T_PCEdigest = 135, /* T_PCEdigest */
+ YYSYMBOL_T_Panic = 136, /* T_Panic */
+ YYSYMBOL_T_Peer = 137, /* T_Peer */
+ YYSYMBOL_T_Peerstats = 138, /* T_Peerstats */
+ YYSYMBOL_T_Phone = 139, /* T_Phone */
+ YYSYMBOL_T_Pid = 140, /* T_Pid */
+ YYSYMBOL_T_Pidfile = 141, /* T_Pidfile */
+ YYSYMBOL_T_Poll = 142, /* T_Poll */
+ YYSYMBOL_T_PollSkewList = 143, /* T_PollSkewList */
+ YYSYMBOL_T_Pool = 144, /* T_Pool */
+ YYSYMBOL_T_Port = 145, /* T_Port */
+ YYSYMBOL_T_PpsData = 146, /* T_PpsData */
+ YYSYMBOL_T_Preempt = 147, /* T_Preempt */
+ YYSYMBOL_T_Prefer = 148, /* T_Prefer */
+ YYSYMBOL_T_Protostats = 149, /* T_Protostats */
+ YYSYMBOL_T_Pw = 150, /* T_Pw */
+ YYSYMBOL_T_Randfile = 151, /* T_Randfile */
+ YYSYMBOL_T_Rawstats = 152, /* T_Rawstats */
+ YYSYMBOL_T_Refid = 153, /* T_Refid */
+ YYSYMBOL_T_Requestkey = 154, /* T_Requestkey */
+ YYSYMBOL_T_Reset = 155, /* T_Reset */
+ YYSYMBOL_T_Restrict = 156, /* T_Restrict */
+ YYSYMBOL_T_Revoke = 157, /* T_Revoke */
+ YYSYMBOL_T_Rlimit = 158, /* T_Rlimit */
+ YYSYMBOL_T_Saveconfigdir = 159, /* T_Saveconfigdir */
+ YYSYMBOL_T_Server = 160, /* T_Server */
+ YYSYMBOL_T_Serverresponse = 161, /* T_Serverresponse */
+ YYSYMBOL_T_ServerresponseFuzz = 162, /* T_ServerresponseFuzz */
+ YYSYMBOL_T_Setvar = 163, /* T_Setvar */
+ YYSYMBOL_T_Source = 164, /* T_Source */
+ YYSYMBOL_T_Stacksize = 165, /* T_Stacksize */
+ YYSYMBOL_T_Statistics = 166, /* T_Statistics */
+ YYSYMBOL_T_Stats = 167, /* T_Stats */
+ YYSYMBOL_T_Statsdir = 168, /* T_Statsdir */
+ YYSYMBOL_T_Step = 169, /* T_Step */
+ YYSYMBOL_T_Stepback = 170, /* T_Stepback */
+ YYSYMBOL_T_Stepfwd = 171, /* T_Stepfwd */
+ YYSYMBOL_T_Stepout = 172, /* T_Stepout */
+ YYSYMBOL_T_Stratum = 173, /* T_Stratum */
+ YYSYMBOL_T_String = 174, /* T_String */
+ YYSYMBOL_T_Sys = 175, /* T_Sys */
+ YYSYMBOL_T_Sysstats = 176, /* T_Sysstats */
+ YYSYMBOL_T_Tick = 177, /* T_Tick */
+ YYSYMBOL_T_Time1 = 178, /* T_Time1 */
+ YYSYMBOL_T_Time2 = 179, /* T_Time2 */
+ YYSYMBOL_T_TimeData = 180, /* T_TimeData */
+ YYSYMBOL_T_Timer = 181, /* T_Timer */
+ YYSYMBOL_T_Timingstats = 182, /* T_Timingstats */
+ YYSYMBOL_T_Tinker = 183, /* T_Tinker */
+ YYSYMBOL_T_Tos = 184, /* T_Tos */
+ YYSYMBOL_T_Trap = 185, /* T_Trap */
+ YYSYMBOL_T_True = 186, /* T_True */
+ YYSYMBOL_T_Trustedkey = 187, /* T_Trustedkey */
+ YYSYMBOL_T_Ttl = 188, /* T_Ttl */
+ YYSYMBOL_T_Type = 189, /* T_Type */
+ YYSYMBOL_T_U_int = 190, /* T_U_int */
+ YYSYMBOL_T_UEcrypto = 191, /* T_UEcrypto */
+ YYSYMBOL_T_UEcryptonak = 192, /* T_UEcryptonak */
+ YYSYMBOL_T_UEdigest = 193, /* T_UEdigest */
+ YYSYMBOL_T_Unconfig = 194, /* T_Unconfig */
+ YYSYMBOL_T_Unpeer = 195, /* T_Unpeer */
+ YYSYMBOL_T_Version = 196, /* T_Version */
+ YYSYMBOL_T_WanderThreshold = 197, /* T_WanderThreshold */
+ YYSYMBOL_T_Week = 198, /* T_Week */
+ YYSYMBOL_T_Wildcard = 199, /* T_Wildcard */
+ YYSYMBOL_T_Xleave = 200, /* T_Xleave */
+ YYSYMBOL_T_Xmtnonce = 201, /* T_Xmtnonce */
+ YYSYMBOL_T_Year = 202, /* T_Year */
+ YYSYMBOL_T_Flag = 203, /* T_Flag */
+ YYSYMBOL_T_EOC = 204, /* T_EOC */
+ YYSYMBOL_T_Simulate = 205, /* T_Simulate */
+ YYSYMBOL_T_Beep_Delay = 206, /* T_Beep_Delay */
+ YYSYMBOL_T_Sim_Duration = 207, /* T_Sim_Duration */
+ YYSYMBOL_T_Server_Offset = 208, /* T_Server_Offset */
+ YYSYMBOL_T_Duration = 209, /* T_Duration */
+ YYSYMBOL_T_Freq_Offset = 210, /* T_Freq_Offset */
+ YYSYMBOL_T_Wander = 211, /* T_Wander */
+ YYSYMBOL_T_Jitter = 212, /* T_Jitter */
+ YYSYMBOL_T_Prop_Delay = 213, /* T_Prop_Delay */
+ YYSYMBOL_T_Proc_Delay = 214, /* T_Proc_Delay */
+ YYSYMBOL_215_ = 215, /* '|' */
+ YYSYMBOL_216_ = 216, /* '=' */
+ YYSYMBOL_217_ = 217, /* '(' */
+ YYSYMBOL_218_ = 218, /* ')' */
+ YYSYMBOL_219_ = 219, /* '{' */
+ YYSYMBOL_220_ = 220, /* '}' */
+ YYSYMBOL_YYACCEPT = 221, /* $accept */
+ YYSYMBOL_configuration = 222, /* configuration */
+ YYSYMBOL_command_list = 223, /* command_list */
+ YYSYMBOL_command = 224, /* command */
+ YYSYMBOL_server_command = 225, /* server_command */
+ YYSYMBOL_client_type = 226, /* client_type */
+ YYSYMBOL_address = 227, /* address */
+ YYSYMBOL_ip_address = 228, /* ip_address */
+ YYSYMBOL_address_fam = 229, /* address_fam */
+ YYSYMBOL_option_list = 230, /* option_list */
+ YYSYMBOL_option = 231, /* option */
+ YYSYMBOL_option_flag = 232, /* option_flag */
+ YYSYMBOL_option_flag_keyword = 233, /* option_flag_keyword */
+ YYSYMBOL_option_int = 234, /* option_int */
+ YYSYMBOL_option_int_keyword = 235, /* option_int_keyword */
+ YYSYMBOL_option_str = 236, /* option_str */
+ YYSYMBOL_option_str_keyword = 237, /* option_str_keyword */
+ YYSYMBOL_unpeer_command = 238, /* unpeer_command */
+ YYSYMBOL_unpeer_keyword = 239, /* unpeer_keyword */
+ YYSYMBOL_other_mode_command = 240, /* other_mode_command */
+ YYSYMBOL_authentication_command = 241, /* authentication_command */
+ YYSYMBOL_crypto_command_list = 242, /* crypto_command_list */
+ YYSYMBOL_crypto_command = 243, /* crypto_command */
+ YYSYMBOL_crypto_str_keyword = 244, /* crypto_str_keyword */
+ YYSYMBOL_orphan_mode_command = 245, /* orphan_mode_command */
+ YYSYMBOL_tos_option_list = 246, /* tos_option_list */
+ YYSYMBOL_tos_option = 247, /* tos_option */
+ YYSYMBOL_tos_option_int_keyword = 248, /* tos_option_int_keyword */
+ YYSYMBOL_tos_option_dbl_keyword = 249, /* tos_option_dbl_keyword */
+ YYSYMBOL_monitoring_command = 250, /* monitoring_command */
+ YYSYMBOL_stats_list = 251, /* stats_list */
+ YYSYMBOL_stat = 252, /* stat */
+ YYSYMBOL_filegen_option_list = 253, /* filegen_option_list */
+ YYSYMBOL_filegen_option = 254, /* filegen_option */
+ YYSYMBOL_link_nolink = 255, /* link_nolink */
+ YYSYMBOL_enable_disable = 256, /* enable_disable */
+ YYSYMBOL_filegen_type = 257, /* filegen_type */
+ YYSYMBOL_access_control_command = 258, /* access_control_command */
+ YYSYMBOL_res_ippeerlimit = 259, /* res_ippeerlimit */
+ YYSYMBOL_ac_flag_list = 260, /* ac_flag_list */
+ YYSYMBOL_access_control_flag = 261, /* access_control_flag */
+ YYSYMBOL_discard_option_list = 262, /* discard_option_list */
+ YYSYMBOL_discard_option = 263, /* discard_option */
+ YYSYMBOL_discard_option_keyword = 264, /* discard_option_keyword */
+ YYSYMBOL_mru_option_list = 265, /* mru_option_list */
+ YYSYMBOL_mru_option = 266, /* mru_option */
+ YYSYMBOL_mru_option_keyword = 267, /* mru_option_keyword */
+ YYSYMBOL_fudge_command = 268, /* fudge_command */
+ YYSYMBOL_fudge_factor_list = 269, /* fudge_factor_list */
+ YYSYMBOL_fudge_factor = 270, /* fudge_factor */
+ YYSYMBOL_fudge_factor_dbl_keyword = 271, /* fudge_factor_dbl_keyword */
+ YYSYMBOL_fudge_factor_bool_keyword = 272, /* fudge_factor_bool_keyword */
+ YYSYMBOL_device_command = 273, /* device_command */
+ YYSYMBOL_device_item_list = 274, /* device_item_list */
+ YYSYMBOL_device_item = 275, /* device_item */
+ YYSYMBOL_device_item_path_keyword = 276, /* device_item_path_keyword */
+ YYSYMBOL_rlimit_command = 277, /* rlimit_command */
+ YYSYMBOL_rlimit_option_list = 278, /* rlimit_option_list */
+ YYSYMBOL_rlimit_option = 279, /* rlimit_option */
+ YYSYMBOL_rlimit_option_keyword = 280, /* rlimit_option_keyword */
+ YYSYMBOL_system_option_command = 281, /* system_option_command */
+ YYSYMBOL_system_option_list = 282, /* system_option_list */
+ YYSYMBOL_system_option = 283, /* system_option */
+ YYSYMBOL_system_option_flag_keyword = 284, /* system_option_flag_keyword */
+ YYSYMBOL_system_option_local_flag_keyword = 285, /* system_option_local_flag_keyword */
+ YYSYMBOL_tinker_command = 286, /* tinker_command */
+ YYSYMBOL_tinker_option_list = 287, /* tinker_option_list */
+ YYSYMBOL_tinker_option = 288, /* tinker_option */
+ YYSYMBOL_tinker_option_keyword = 289, /* tinker_option_keyword */
+ YYSYMBOL_miscellaneous_command = 290, /* miscellaneous_command */
+ YYSYMBOL_misc_cmd_dbl_keyword = 291, /* misc_cmd_dbl_keyword */
+ YYSYMBOL_misc_cmd_int_keyword = 292, /* misc_cmd_int_keyword */
+ YYSYMBOL_opt_hash_check = 293, /* opt_hash_check */
+ YYSYMBOL_misc_cmd_str_keyword = 294, /* misc_cmd_str_keyword */
+ YYSYMBOL_misc_cmd_str_lcl_keyword = 295, /* misc_cmd_str_lcl_keyword */
+ YYSYMBOL_drift_parm = 296, /* drift_parm */
+ YYSYMBOL_pollskew_list = 297, /* pollskew_list */
+ YYSYMBOL_pollskew_spec = 298, /* pollskew_spec */
+ YYSYMBOL_pollskew_cycle = 299, /* pollskew_cycle */
+ YYSYMBOL_variable_assign = 300, /* variable_assign */
+ YYSYMBOL_t_default_or_zero = 301, /* t_default_or_zero */
+ YYSYMBOL_trap_option_list = 302, /* trap_option_list */
+ YYSYMBOL_trap_option = 303, /* trap_option */
+ YYSYMBOL_log_config_list = 304, /* log_config_list */
+ YYSYMBOL_log_config_command = 305, /* log_config_command */
+ YYSYMBOL_interface_command = 306, /* interface_command */
+ YYSYMBOL_interface_nic = 307, /* interface_nic */
+ YYSYMBOL_nic_rule_class = 308, /* nic_rule_class */
+ YYSYMBOL_nic_rule_action = 309, /* nic_rule_action */
+ YYSYMBOL_reset_command = 310, /* reset_command */
+ YYSYMBOL_counter_set_list = 311, /* counter_set_list */
+ YYSYMBOL_counter_set_keyword = 312, /* counter_set_keyword */
+ YYSYMBOL_integer_list = 313, /* integer_list */
+ YYSYMBOL_integer_list_range = 314, /* integer_list_range */
+ YYSYMBOL_integer_list_range_elt = 315, /* integer_list_range_elt */
+ YYSYMBOL_integer_range = 316, /* integer_range */
+ YYSYMBOL_string_list = 317, /* string_list */
+ YYSYMBOL_address_list = 318, /* address_list */
+ YYSYMBOL_boolean = 319, /* boolean */
+ YYSYMBOL_number = 320, /* number */
+ YYSYMBOL_basedate = 321, /* basedate */
+ YYSYMBOL_simulate_command = 322, /* simulate_command */
+ YYSYMBOL_sim_conf_start = 323, /* sim_conf_start */
+ YYSYMBOL_sim_init_statement_list = 324, /* sim_init_statement_list */
+ YYSYMBOL_sim_init_statement = 325, /* sim_init_statement */
+ YYSYMBOL_sim_init_keyword = 326, /* sim_init_keyword */
+ YYSYMBOL_sim_server_list = 327, /* sim_server_list */
+ YYSYMBOL_sim_server = 328, /* sim_server */
+ YYSYMBOL_sim_server_offset = 329, /* sim_server_offset */
+ YYSYMBOL_sim_server_name = 330, /* sim_server_name */
+ YYSYMBOL_sim_act_list = 331, /* sim_act_list */
+ YYSYMBOL_sim_act = 332, /* sim_act */
+ YYSYMBOL_sim_act_stmt_list = 333, /* sim_act_stmt_list */
+ YYSYMBOL_sim_act_stmt = 334, /* sim_act_stmt */
+ YYSYMBOL_sim_act_keyword = 335 /* sim_act_keyword */
+};
+typedef enum yysymbol_kind_t yysymbol_kind_t;
+
-/* Copy the second part of user declarations. */
-#line 599 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
#endif
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+ <limits.h> and (if available) <stdint.h> are included
+ so that the code can choose integer types of a good width. */
+
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_STDINT_H
+# endif
#endif
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
+/* Narrow types that promote to a signed type and that can represent a
+ signed or unsigned integer of at least N bits. In tables they can
+ save space and decrease cache pressure. Promoting to a signed type
+ helps avoid bugs in integer arithmetic. */
+
+#ifdef __INT_LEAST8_MAX__
+typedef __INT_LEAST8_TYPE__ yytype_int8;
+#elif defined YY_STDINT_H
+typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
+#ifdef __INT_LEAST16_MAX__
+typedef __INT_LEAST16_TYPE__ yytype_int16;
+#elif defined YY_STDINT_H
+typedef int_least16_t yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+/* Work around bug in HP-UX 11.23, which defines these macros
+ incorrectly for preprocessor constants. This workaround can likely
+ be removed in 2023, as HPE has promised support for HP-UX 11.23
+ (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
+ <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
+#ifdef __hpux
+# undef UINT_LEAST8_MAX
+# undef UINT_LEAST16_MAX
+# define UINT_LEAST8_MAX 255
+# define UINT_LEAST16_MAX 65535
+#endif
+
+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST8_MAX <= INT_MAX)
+typedef uint_least8_t yytype_uint8;
+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+typedef unsigned char yytype_uint8;
#else
-typedef unsigned short int yytype_uint16;
+typedef short yytype_uint8;
#endif
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST16_MAX <= INT_MAX)
+typedef uint_least16_t yytype_uint16;
+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
+typedef unsigned short yytype_uint16;
#else
-typedef short int yytype_int16;
+typedef int yytype_uint16;
+#endif
+
+#ifndef YYPTRDIFF_T
+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
+# define YYPTRDIFF_T __PTRDIFF_TYPE__
+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
+# elif defined PTRDIFF_MAX
+# ifndef ptrdiff_t
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# endif
+# define YYPTRDIFF_T ptrdiff_t
+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
+# else
+# define YYPTRDIFF_T long
+# define YYPTRDIFF_MAXIMUM LONG_MAX
+# endif
#endif
#ifndef YYSIZE_T
@@ -630,15 +1054,28 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T
+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned int
+# define YYSIZE_T unsigned
# endif
#endif
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+#define YYSIZE_MAXIMUM \
+ YY_CAST (YYPTRDIFF_T, \
+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
+ ? YYPTRDIFF_MAXIMUM \
+ : YY_CAST (YYSIZE_T, -1)))
+
+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
+
+/* Stored state numbers (used for stacks). */
+typedef yytype_int16 yy_state_t;
+
+/* State numbers in computations. */
+typedef int yy_state_fast_t;
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
@@ -652,47 +1089,37 @@ typedef short int yytype_int16;
# endif
#endif
-#ifndef YY_ATTRIBUTE
-# if (defined __GNUC__ \
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
-# else
-# define YY_ATTRIBUTE(Spec) /* empty */
-# endif
-#endif
#ifndef YY_ATTRIBUTE_PURE
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define YY_ATTRIBUTE_PURE
+# endif
#endif
#ifndef YY_ATTRIBUTE_UNUSED
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
-#endif
-
-#if !defined _Noreturn \
- && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
-# if defined _MSC_VER && 1200 <= _MSC_VER
-# define _Noreturn __declspec (noreturn)
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
-# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# define YY_ATTRIBUTE_UNUSED
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
+# define YY_USE(E) ((void) (E))
#else
-# define YYUSE(E) /* empty */
+# define YY_USE(E) /* empty */
#endif
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
@@ -705,8 +1132,22 @@ typedef short int yytype_int16;
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
+# define YY_IGNORE_USELESS_CAST_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
+# define YY_IGNORE_USELESS_CAST_END \
+ _Pragma ("GCC diagnostic pop")
+#endif
+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_END
+#endif
+
-#if ! defined yyoverflow || YYERROR_VERBOSE
+#define YY_ASSERT(E) ((void) (0 && (E)))
+
+#if !defined yyoverflow
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -771,8 +1212,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
+#endif /* !defined yyoverflow */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
@@ -781,17 +1221,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
+ yy_state_t yyss_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
@@ -804,11 +1244,11 @@ union yyalloc
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
- YYSIZE_T yynewbytes; \
+ YYPTRDIFF_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
} \
while (0)
@@ -820,12 +1260,12 @@ union yyalloc
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
- YYSIZE_T yyi; \
+ YYPTRDIFF_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
@@ -835,44 +1275,47 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 219
+#define YYFINAL 222
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 740
+#define YYLAST 688
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 218
+#define YYNTOKENS 221
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 111
+#define YYNNTS 115
/* YYNRULES -- Number of rules. */
-#define YYNRULES 336
+#define YYNRULES 343
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 453
+#define YYNSTATES 463
+
+/* YYMAXUTOK -- Last valid token kind. */
+#define YYMAXUTOK 469
-/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
- by yylex, with out-of-bounds checking. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 466
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
+ : YYSYMBOL_YYUNDEF)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, without out-of-bounds checking. */
+ as returned by yylex. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 214, 215, 2, 2, 2, 2, 2, 2, 2, 2,
+ 217, 218, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 213, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 216, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 216, 212, 217, 2, 2, 2, 2,
+ 2, 2, 2, 219, 215, 220, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -906,114 +1349,124 @@ static const yytype_uint8 yytranslate[] =
175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
- 205, 206, 207, 208, 209, 210, 211
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
+static const yytype_int16 yyrline[] =
{
- 0, 391, 391, 395, 396, 397, 412, 413, 414, 415,
- 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
- 433, 443, 444, 445, 446, 447, 451, 452, 457, 462,
- 464, 470, 471, 479, 480, 481, 485, 490, 491, 492,
- 493, 494, 495, 496, 497, 498, 502, 504, 509, 510,
- 511, 512, 513, 514, 518, 523, 532, 542, 543, 553,
- 555, 557, 559, 570, 577, 579, 584, 586, 588, 590,
- 592, 602, 608, 609, 617, 619, 631, 632, 633, 634,
- 635, 644, 649, 654, 662, 664, 666, 668, 673, 674,
- 675, 676, 677, 678, 679, 680, 681, 685, 686, 695,
- 697, 706, 716, 721, 729, 730, 731, 732, 733, 734,
- 735, 736, 741, 742, 750, 760, 769, 784, 789, 790,
- 794, 795, 799, 800, 801, 802, 803, 804, 805, 814,
- 818, 822, 830, 838, 846, 861, 876, 889, 890, 910,
- 911, 919, 930, 931, 932, 933, 934, 935, 936, 937,
- 938, 939, 940, 941, 942, 943, 944, 945, 946, 950,
- 955, 963, 968, 969, 970, 974, 979, 987, 992, 993,
- 994, 995, 996, 997, 998, 999, 1007, 1017, 1022, 1030,
- 1032, 1034, 1043, 1045, 1050, 1051, 1052, 1056, 1057, 1058,
- 1059, 1067, 1072, 1077, 1085, 1090, 1091, 1092, 1101, 1103,
- 1108, 1113, 1121, 1123, 1140, 1141, 1142, 1143, 1144, 1145,
- 1149, 1150, 1151, 1152, 1153, 1154, 1162, 1167, 1172, 1180,
- 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194,
- 1203, 1204, 1205, 1212, 1219, 1226, 1242, 1261, 1269, 1271,
- 1273, 1275, 1277, 1279, 1281, 1288, 1293, 1294, 1295, 1299,
- 1303, 1312, 1314, 1317, 1321, 1325, 1326, 1327, 1331, 1342,
- 1360, 1373, 1374, 1379, 1405, 1406, 1411, 1416, 1418, 1423,
- 1424, 1432, 1434, 1442, 1447, 1455, 1480, 1487, 1497, 1498,
- 1502, 1503, 1504, 1505, 1509, 1510, 1511, 1515, 1520, 1525,
- 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1549, 1554, 1562,
- 1567, 1575, 1577, 1581, 1586, 1591, 1599, 1604, 1612, 1621,
- 1622, 1626, 1627, 1631, 1639, 1657, 1661, 1666, 1674, 1679,
- 1680, 1684, 1689, 1697, 1702, 1707, 1712, 1717, 1725, 1730,
- 1735, 1743, 1748, 1749, 1750, 1751, 1752
+ 0, 397, 397, 401, 402, 403, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 440, 450, 451, 452, 453, 454, 458, 459, 464,
+ 469, 471, 477, 478, 486, 487, 488, 492, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 509, 511, 516,
+ 517, 518, 519, 520, 521, 525, 530, 539, 549, 550,
+ 560, 562, 564, 566, 577, 584, 586, 591, 593, 595,
+ 597, 599, 609, 615, 616, 624, 626, 638, 639, 640,
+ 641, 642, 651, 656, 661, 669, 671, 673, 675, 680,
+ 681, 682, 683, 684, 685, 686, 687, 688, 692, 693,
+ 702, 704, 713, 723, 728, 736, 737, 738, 739, 740,
+ 741, 742, 743, 748, 749, 757, 767, 776, 791, 796,
+ 797, 801, 802, 806, 807, 808, 809, 810, 811, 812,
+ 821, 825, 829, 837, 845, 853, 868, 883, 896, 897,
+ 917, 918, 926, 937, 938, 939, 940, 941, 942, 943,
+ 944, 945, 946, 947, 948, 949, 950, 951, 952, 953,
+ 957, 962, 970, 975, 976, 977, 981, 986, 994, 999,
+ 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1014, 1024, 1029,
+ 1037, 1039, 1041, 1050, 1052, 1057, 1058, 1059, 1063, 1064,
+ 1065, 1066, 1074, 1084, 1089, 1097, 1102, 1103, 1111, 1116,
+ 1121, 1129, 1134, 1135, 1136, 1145, 1147, 1152, 1157, 1165,
+ 1167, 1184, 1185, 1186, 1187, 1188, 1189, 1193, 1194, 1195,
+ 1196, 1197, 1198, 1206, 1211, 1216, 1224, 1229, 1230, 1231,
+ 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1247, 1248, 1249,
+ 1256, 1263, 1270, 1286, 1305, 1313, 1315, 1317, 1319, 1321,
+ 1323, 1325, 1332, 1337, 1338, 1339, 1343, 1347, 1356, 1358,
+ 1361, 1365, 1369, 1370, 1371, 1375, 1386, 1404, 1417, 1418,
+ 1423, 1449, 1450, 1455, 1460, 1462, 1467, 1468, 1476, 1478,
+ 1486, 1491, 1499, 1524, 1531, 1541, 1542, 1546, 1547, 1548,
+ 1549, 1553, 1554, 1555, 1559, 1564, 1569, 1577, 1578, 1579,
+ 1580, 1581, 1582, 1583, 1593, 1598, 1606, 1611, 1619, 1621,
+ 1625, 1630, 1635, 1643, 1648, 1656, 1665, 1666, 1670, 1671,
+ 1675, 1683, 1701, 1705, 1710, 1718, 1723, 1724, 1728, 1733,
+ 1741, 1746, 1751, 1756, 1761, 1769, 1774, 1779, 1787, 1792,
+ 1793, 1794, 1795, 1796
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || 1
+/** Accessing symbol of state STATE. */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
+
+#if YYDEBUG || 1
+/* The user-facing name of the symbol whose (internal) number is
+ YYSYMBOL. No bounds checking. */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
+
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
- "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
- "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
- "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
- "T_Ceiling", "T_Checkhash", "T_Clockstats", "T_Cohort", "T_ControlKey",
- "T_Crypto", "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest",
- "T_Disable", "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile",
- "T_Drop", "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer",
- "T_False", "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2",
- "T_Flag3", "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge",
- "T_Fuzz", "T_Host", "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore",
- "T_Ignorehash", "T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem",
- "T_Includefile", "T_Integer", "T_Interface", "T_Intrange", "T_Io",
- "T_Ippeerlimit", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag",
- "T_Kernel", "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Leapfile",
- "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen", "T_Logconfig",
- "T_Logfile", "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient",
- "T_Manycastserver", "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth",
- "T_Maxdist", "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem",
- "T_Memlock", "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum",
- "T_Minjitter", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
- "T_Monitor", "T_Month", "T_Mru", "T_Mssntp", "T_Multicastclient",
- "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None",
- "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery", "T_Noselect",
- "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
- "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
- "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Poll",
- "T_PollSkewList", "T_Pool", "T_Port", "T_Preempt", "T_Prefer",
- "T_Protostats", "T_Pw", "T_Randfile", "T_Rawstats", "T_Refid",
- "T_Requestkey", "T_Reset", "T_Restrict", "T_Revoke", "T_Rlimit",
- "T_Saveconfigdir", "T_Server", "T_Serverresponse",
- "T_ServerresponseFuzz", "T_Setvar", "T_Source", "T_Stacksize",
- "T_Statistics", "T_Stats", "T_Statsdir", "T_Step", "T_Stepback",
- "T_Stepfwd", "T_Stepout", "T_Stratum", "T_String", "T_Sys", "T_Sysstats",
- "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats", "T_Tinker",
- "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl", "T_Type",
- "T_U_int", "T_UEcrypto", "T_UEcryptonak", "T_UEdigest", "T_Unconfig",
- "T_Unpeer", "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard",
- "T_Xleave", "T_Xmtnonce", "T_Year", "T_Flag", "T_EOC", "T_Simulate",
- "T_Beep_Delay", "T_Sim_Duration", "T_Server_Offset", "T_Duration",
- "T_Freq_Offset", "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay",
- "'|'", "'='", "'('", "')'", "'{'", "'}'", "$accept", "configuration",
- "command_list", "command", "server_command", "client_type", "address",
- "ip_address", "address_fam", "option_list", "option", "option_flag",
- "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
- "option_str_keyword", "unpeer_command", "unpeer_keyword",
- "other_mode_command", "authentication_command", "crypto_command_list",
- "crypto_command", "crypto_str_keyword", "orphan_mode_command",
- "tos_option_list", "tos_option", "tos_option_int_keyword",
- "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
- "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
- "filegen_type", "access_control_command", "res_ippeerlimit",
- "ac_flag_list", "access_control_flag", "discard_option_list",
- "discard_option", "discard_option_keyword", "mru_option_list",
- "mru_option", "mru_option_keyword", "fudge_command", "fudge_factor_list",
+ "\"end of file\"", "error", "\"invalid token\"", "T_Abbrev", "T_Age",
+ "T_All", "T_Allan", "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax",
+ "T_Average", "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon",
+ "T_Broadcast", "T_Broadcastclient", "T_Broadcastdelay", "T_Burst",
+ "T_Calibrate", "T_Ceiling", "T_Checkhash", "T_Clockstats", "T_Cohort",
+ "T_ControlKey", "T_Crypto", "T_Cryptostats", "T_Ctl", "T_Day",
+ "T_Default", "T_Device", "T_Digest", "T_Disable", "T_Discard",
+ "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "T_Dscp",
+ "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False", "T_File",
+ "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4",
+ "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Fuzz", "T_Host",
+ "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Ignorehash",
+ "T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile",
+ "T_Integer", "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit",
+ "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key",
+ "T_Keys", "T_Keysdir", "T_Kod", "T_Leapfile", "T_Leapsmearinterval",
+ "T_Limited", "T_Link", "T_Listen", "T_Logconfig", "T_Logfile",
+ "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver",
+ "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist",
+ "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock",
+ "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minjitter",
+ "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month",
+ "T_Mru", "T_Mssntp", "T_Multicastclient", "T_Nic", "T_Nolink",
+ "T_Nomodify", "T_Nomrulist", "T_None", "T_Nonvolatile", "T_Noepeer",
+ "T_Nopeer", "T_Noquery", "T_Noselect", "T_Noserve", "T_Notrap",
+ "T_Notrust", "T_Ntp", "T_Ntpport", "T_NtpSignDsocket", "T_Orphan",
+ "T_Orphanwait", "T_PCEdigest", "T_Panic", "T_Peer", "T_Peerstats",
+ "T_Phone", "T_Pid", "T_Pidfile", "T_Poll", "T_PollSkewList", "T_Pool",
+ "T_Port", "T_PpsData", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw",
+ "T_Randfile", "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset",
+ "T_Restrict", "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server",
+ "T_Serverresponse", "T_ServerresponseFuzz", "T_Setvar", "T_Source",
+ "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir", "T_Step",
+ "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum", "T_String", "T_Sys",
+ "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_TimeData", "T_Timer",
+ "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True", "T_Trustedkey",
+ "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto", "T_UEcryptonak",
+ "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version", "T_WanderThreshold",
+ "T_Week", "T_Wildcard", "T_Xleave", "T_Xmtnonce", "T_Year", "T_Flag",
+ "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
+ "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
+ "T_Prop_Delay", "T_Proc_Delay", "'|'", "'='", "'('", "')'", "'{'", "'}'",
+ "$accept", "configuration", "command_list", "command", "server_command",
+ "client_type", "address", "ip_address", "address_fam", "option_list",
+ "option", "option_flag", "option_flag_keyword", "option_int",
+ "option_int_keyword", "option_str", "option_str_keyword",
+ "unpeer_command", "unpeer_keyword", "other_mode_command",
+ "authentication_command", "crypto_command_list", "crypto_command",
+ "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
+ "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
+ "monitoring_command", "stats_list", "stat", "filegen_option_list",
+ "filegen_option", "link_nolink", "enable_disable", "filegen_type",
+ "access_control_command", "res_ippeerlimit", "ac_flag_list",
+ "access_control_flag", "discard_option_list", "discard_option",
+ "discard_option_keyword", "mru_option_list", "mru_option",
+ "mru_option_keyword", "fudge_command", "fudge_factor_list",
"fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
- "rlimit_command", "rlimit_option_list", "rlimit_option",
- "rlimit_option_keyword", "system_option_command", "system_option_list",
- "system_option", "system_option_flag_keyword",
+ "device_command", "device_item_list", "device_item",
+ "device_item_path_keyword", "rlimit_command", "rlimit_option_list",
+ "rlimit_option", "rlimit_option_keyword", "system_option_command",
+ "system_option_list", "system_option", "system_option_flag_keyword",
"system_option_local_flag_keyword", "tinker_command",
"tinker_option_list", "tinker_option", "tinker_option_keyword",
"miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
@@ -1031,12 +1484,18 @@ static const char *const yytname[] =
"sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
"sim_act_keyword", YY_NULLPTR
};
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+ return yytname[yysymbol];
+}
#endif
-# ifdef YYPRINT
+#ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
(internal) symbol number NUM (which must be that of a token). */
-static const yytype_uint16 yytoknum[] =
+static const yytype_int16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -1059,157 +1518,160 @@ static const yytype_uint16 yytoknum[] =
435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
- 465, 466, 124, 61, 40, 41, 123, 125
+ 465, 466, 467, 468, 469, 124, 61, 40, 41, 123,
+ 125
};
-# endif
+#endif
-#define YYPACT_NINF -261
+#define YYPACT_NINF (-247)
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-261)))
+#define yypact_value_is_default(Yyn) \
+ ((Yyn) == YYPACT_NINF)
-#define YYTABLE_NINF -7
+#define YYTABLE_NINF (-7)
-#define yytable_value_is_error(Yytable_value) \
+#define yytable_value_is_error(Yyn) \
0
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 19, -163, -36, -261, -261, -261, -25, -261, 326, 77,
- -125, -261, 326, -261, 16, -45, -261, -119, -261, -103,
- -100, -98, -261, -95, -261, -261, -45, 13, 238, -45,
- -261, -261, -88, -261, -86, -261, -261, -261, 22, 109,
- -8, 23, -38, -261, -261, -81, 16, -80, -261, 443,
- 607, -73, -58, 35, -261, -261, -261, 103, 229, -90,
- -261, -45, -261, -45, -261, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, -9, 45, -53, -51, -261, -19,
- -261, -261, -102, -261, -261, -261, 82, -261, -261, -261,
- -261, -261, -261, -261, -261, -261, -261, -261, -261, 326,
- -261, -261, -261, -261, -261, -261, 77, -261, 55, 91,
- -261, 326, -261, -261, -261, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, 46, -261, -42, 407, -261, -261,
- -11, -261, -95, -261, -261, -45, -261, -261, -261, -261,
- -261, -261, -261, -261, -261, 238, -261, 64, -45, -261,
- -261, -28, -13, -261, -261, -261, -261, -261, -261, -261,
- -261, 109, -261, 74, 118, 119, 74, -31, -261, -261,
- -261, -261, -38, -261, 93, -55, -261, 16, -261, -261,
- -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
- 443, -261, -9, -7, -261, -261, -261, -40, -261, -261,
- -261, -261, -261, -261, -261, -261, 607, -261, 100, -9,
- -261, -261, -261, 101, -58, -261, -261, -261, 102, -261,
- -23, -261, -261, -261, -261, -261, -261, -261, -261, -261,
- -261, -261, -261, 9, -170, -261, -261, -261, -261, -261,
- 122, -261, -2, -261, -261, -261, -261, 107, 14, -261,
- -261, -261, -261, -261, 20, 126, -261, -261, 46, -261,
- -9, -40, -261, -261, -261, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, -261, 129, -261, 139, -261, 74,
- 74, -261, -73, -261, -261, -261, 36, -261, -261, -261,
- -261, -261, -261, -261, -261, -261, -261, -261, -62, 168,
- -261, -261, -261, 410, -261, -261, -261, -261, -261, -261,
- -261, -261, -96, 17, 6, -261, -261, -261, -261, 61,
- -261, -261, 3, -261, -261, -261, -261, -261, -261, -261,
- -261, -261, 24, -261, 534, -261, -261, 534, 74, 534,
- 204, -73, 173, -261, 174, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, -261, -63, -261, 70, 31, 47,
- -146, -261, 33, -261, -9, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, 183, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
- -261, 196, -261, -261, 534, 534, -261, -261, -261, -261,
- -261, 37, -261, -261, -261, -45, -261, -261, -261, 48,
- -261, -261, -261, 534, -261, -261, 43, 51, -9, 50,
- -193, -261, 57, -9, -261, -261, -261, 52, 5, -261,
- -261, -261, -261, -261, 18, 58, 53, -261, 63, -261,
- -9, -261, -261
+ 5, -178, -19, -247, -247, -247, -2, -247, -58, 294,
+ 29, -94, -247, 294, -247, 109, -58, -247, -79, -247,
+ -70, -68, -65, -247, -63, -247, -247, -58, 42, 205,
+ -58, -247, -247, -56, -247, -50, -247, -247, -247, 45,
+ 27, 41, 55, -34, -247, -247, -49, 109, -41, -247,
+ 271, 554, -40, -64, 72, -247, -247, -247, 145, 196,
+ -54, -247, -58, -247, -58, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, 33, 83, -22, -17,
+ -247, -11, -247, -247, -52, -247, -247, -247, 26, -247,
+ -247, -247, -121, -247, -5, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, 294, -247, -247,
+ -247, -247, -247, -247, 29, -247, 86, 119, -247, 294,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, 319,
+ 377, -247, -247, -10, -247, -63, -247, -247, -58, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, 205, -247,
+ 104, -58, -247, -247, 7, 23, -247, -247, -247, -247,
+ -247, -247, -247, -247, 27, -247, 103, 154, 156, 103,
+ 1, -247, -247, -247, -247, -34, -247, 126, -29, -247,
+ 109, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, 271, -247, 33, 30, -247, -247, -247,
+ -20, -247, -247, -247, -247, -247, -247, -247, -247, 554,
+ -247, 139, 33, -247, -247, -247, 143, -64, -247, -247,
+ -247, 155, -247, 20, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, 4, -104, -247, -247,
+ -247, -247, -247, 157, -247, 54, -247, -247, -121, -247,
+ 57, -247, -247, -247, -247, -247, -4, 58, -247, -247,
+ -247, -247, -247, 67, 175, -247, -247, 319, -247, 33,
+ -20, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, 178, -247, 184, -247, 103, 103, -247,
+ -40, -247, -247, -247, 79, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -55, 214, -247, -247,
+ -247, 48, -247, -247, -247, -247, -247, -247, -247, -247,
+ -143, 51, 43, -247, -247, -247, -247, -247, -247, 88,
+ -247, -247, -1, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, 49, -247, 465, -247, -247, 465, 103, 465,
+ 227, -40, 192, -247, 198, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -61, -247, 98, 64, 69,
+ -150, -247, 62, -247, 33, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, 206, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, 226, -247, -247, 465, 465, -247, -247, -247, -247,
+ -247, 68, -247, -247, -247, -58, -247, -247, -247, 81,
+ -247, -247, -247, 465, -247, -247, 74, 84, 33, 76,
+ -131, -247, 90, 33, -247, -247, -247, 78, 131, -247,
+ -247, -247, -247, -247, 6, 91, 82, -247, 100, -247,
+ 33, -247, -247
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE does not specify something else to do. Zero
means the default is an error. */
-static const yytype_uint16 yydefact[] =
+static const yytype_int16 yydefact[] =
{
- 0, 0, 0, 24, 59, 246, 0, 72, 0, 0,
- 260, 249, 0, 238, 0, 0, 254, 0, 278, 0,
- 0, 0, 250, 0, 255, 25, 0, 0, 0, 0,
- 279, 247, 0, 23, 0, 256, 261, 22, 0, 0,
- 0, 0, 0, 257, 21, 0, 0, 0, 248, 0,
- 0, 0, 0, 0, 57, 58, 315, 0, 2, 0,
- 7, 0, 8, 0, 9, 10, 13, 11, 12, 14,
- 15, 16, 17, 18, 0, 0, 0, 0, 230, 0,
- 231, 19, 0, 5, 63, 64, 65, 204, 205, 206,
- 207, 210, 208, 209, 211, 212, 213, 214, 215, 199,
- 201, 202, 203, 162, 163, 164, 129, 160, 0, 258,
- 239, 198, 104, 105, 106, 107, 111, 108, 109, 110,
- 112, 29, 30, 28, 0, 26, 0, 6, 66, 67,
- 253, 275, 240, 274, 307, 60, 62, 168, 169, 170,
- 171, 172, 173, 174, 175, 130, 166, 0, 61, 71,
- 305, 241, 242, 68, 290, 291, 292, 293, 294, 295,
- 296, 287, 289, 137, 29, 30, 137, 137, 69, 197,
- 195, 196, 191, 193, 0, 0, 243, 99, 103, 100,
- 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
- 216, 218, 0, 0, 88, 89, 90, 0, 91, 92,
- 98, 93, 97, 94, 95, 96, 81, 83, 0, 0,
- 87, 269, 301, 0, 70, 300, 302, 298, 245, 1,
- 0, 4, 31, 56, 312, 311, 232, 233, 234, 235,
- 286, 285, 284, 0, 0, 80, 76, 77, 78, 79,
- 0, 73, 0, 200, 159, 161, 259, 101, 0, 187,
- 188, 189, 190, 186, 0, 0, 184, 185, 176, 178,
- 0, 0, 27, 236, 252, 251, 237, 273, 306, 165,
- 167, 304, 265, 264, 262, 0, 288, 0, 139, 137,
- 137, 139, 0, 139, 192, 194, 0, 102, 217, 219,
- 313, 310, 308, 309, 86, 82, 84, 85, 244, 0,
- 299, 297, 3, 20, 280, 281, 282, 277, 283, 276,
- 319, 320, 0, 0, 0, 75, 74, 121, 120, 0,
- 118, 119, 0, 113, 116, 117, 182, 183, 181, 177,
- 179, 180, 0, 138, 133, 139, 139, 136, 137, 131,
- 268, 0, 0, 270, 0, 37, 38, 39, 55, 48,
- 50, 49, 52, 40, 41, 42, 43, 51, 53, 44,
- 45, 32, 33, 36, 34, 0, 35, 0, 0, 0,
- 0, 322, 0, 317, 0, 114, 128, 124, 126, 122,
- 123, 125, 127, 115, 0, 142, 143, 144, 145, 146,
- 147, 148, 150, 151, 149, 152, 153, 154, 155, 156,
- 157, 0, 158, 140, 134, 135, 139, 267, 266, 272,
- 271, 0, 46, 47, 54, 0, 316, 314, 321, 0,
- 318, 263, 141, 132, 303, 325, 0, 0, 0, 0,
- 0, 327, 0, 0, 323, 326, 324, 0, 0, 332,
- 333, 334, 335, 336, 0, 0, 0, 328, 0, 330,
- 0, 329, 331
+ 0, 0, 0, 25, 60, 253, 0, 73, 0, 0,
+ 0, 267, 256, 0, 245, 0, 0, 261, 0, 285,
+ 0, 0, 0, 257, 0, 262, 26, 0, 0, 0,
+ 0, 286, 254, 0, 24, 0, 263, 268, 23, 0,
+ 0, 0, 0, 0, 264, 22, 0, 0, 0, 255,
+ 0, 0, 0, 0, 0, 58, 59, 322, 0, 2,
+ 0, 7, 0, 8, 0, 9, 10, 13, 11, 12,
+ 14, 20, 15, 16, 17, 18, 0, 0, 0, 0,
+ 237, 0, 238, 19, 0, 5, 64, 65, 66, 30,
+ 31, 29, 0, 27, 0, 211, 212, 213, 214, 217,
+ 215, 216, 218, 219, 220, 221, 222, 206, 208, 209,
+ 210, 163, 164, 165, 130, 161, 0, 265, 246, 205,
+ 105, 106, 107, 108, 112, 109, 110, 111, 113, 0,
+ 6, 67, 68, 260, 282, 247, 281, 314, 61, 63,
+ 169, 170, 171, 172, 173, 174, 175, 176, 131, 167,
+ 0, 62, 72, 312, 248, 249, 69, 297, 298, 299,
+ 300, 301, 302, 303, 294, 296, 138, 30, 31, 138,
+ 138, 70, 204, 202, 203, 198, 200, 0, 0, 250,
+ 100, 104, 101, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 223, 225, 0, 0, 89, 90, 91,
+ 0, 92, 93, 99, 94, 98, 95, 96, 97, 82,
+ 84, 0, 0, 88, 276, 308, 0, 71, 307, 309,
+ 305, 252, 1, 0, 4, 32, 57, 319, 318, 239,
+ 240, 241, 242, 293, 292, 291, 0, 0, 81, 77,
+ 78, 79, 80, 0, 74, 0, 197, 196, 192, 194,
+ 0, 28, 207, 160, 162, 266, 102, 0, 188, 189,
+ 190, 191, 187, 0, 0, 185, 186, 177, 179, 0,
+ 0, 243, 259, 258, 244, 280, 313, 166, 168, 311,
+ 272, 271, 269, 0, 295, 0, 140, 138, 138, 140,
+ 0, 140, 199, 201, 0, 103, 224, 226, 320, 317,
+ 315, 316, 87, 83, 85, 86, 251, 0, 306, 304,
+ 3, 21, 287, 288, 289, 284, 290, 283, 326, 327,
+ 0, 0, 0, 76, 75, 193, 195, 122, 121, 0,
+ 119, 120, 0, 114, 117, 118, 183, 184, 182, 178,
+ 180, 181, 0, 139, 134, 140, 140, 137, 138, 132,
+ 275, 0, 0, 277, 0, 38, 39, 40, 56, 49,
+ 51, 50, 53, 41, 42, 43, 44, 52, 54, 45,
+ 46, 33, 34, 37, 35, 0, 36, 0, 0, 0,
+ 0, 329, 0, 324, 0, 115, 129, 125, 127, 123,
+ 124, 126, 128, 116, 0, 143, 144, 145, 146, 147,
+ 148, 149, 151, 152, 150, 153, 154, 155, 156, 157,
+ 158, 0, 159, 141, 135, 136, 140, 274, 273, 279,
+ 278, 0, 47, 48, 55, 0, 323, 321, 328, 0,
+ 325, 270, 142, 133, 310, 332, 0, 0, 0, 0,
+ 0, 334, 0, 0, 330, 333, 331, 0, 0, 339,
+ 340, 341, 342, 343, 0, 0, 0, 335, 0, 337,
+ 0, 336, 338
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -261, -261, -261, -48, -261, -261, -15, -50, -261, -261,
- -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, -261, -261, 65, -261, -261, -261,
- -261, -41, -261, -261, -261, -261, -261, -261, -151, -260,
- -261, -261, 166, -261, -261, 128, -261, -261, -261, 21,
- -261, -261, -261, -261, 104, -261, -261, 263, -43, -261,
- -261, -261, -261, 87, -261, -261, -261, -261, -261, -261,
- -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
- 146, -261, -261, -261, -261, -261, -261, 120, -261, -261,
- 66, -261, -261, 255, 25, -190, -261, -261, -261, -261,
- -27, -261, -261, -78, -261, -261, -261, -141, -261, -154,
- -261
+ -247, -247, -247, -48, -247, -247, -8, -51, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, -247, -247, 96, -247, -247, -247,
+ -247, -42, -247, -247, -247, -247, -247, -247, -108, -246,
+ -247, -247, 194, -247, -247, 163, -247, -247, -247, 50,
+ -247, -247, -247, -247, 71, -247, -247, -247, 140, -247,
+ -247, 303, -87, -247, -247, -247, -247, 127, -247, -247,
+ -247, -247, -247, -247, -247, -247, -247, -247, -247, -247,
+ -247, -247, -247, -247, 186, -247, -247, -247, -247, -247,
+ -247, 159, -247, -247, 107, -247, -247, 296, 60, -193,
+ -247, -247, -247, -247, 11, -247, -247, -53, -247, -247,
+ -247, -106, -247, -122, -247
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 57, 58, 59, 60, 61, 134, 125, 126, 303,
- 361, 362, 363, 364, 365, 366, 367, 62, 63, 64,
- 65, 86, 241, 242, 66, 206, 207, 208, 209, 67,
- 177, 120, 247, 323, 324, 325, 383, 68, 278, 334,
- 403, 106, 107, 108, 145, 146, 147, 69, 258, 259,
- 260, 261, 70, 172, 173, 174, 71, 99, 100, 101,
- 102, 72, 190, 191, 192, 73, 74, 75, 266, 76,
- 77, 110, 152, 274, 275, 176, 408, 298, 343, 132,
- 133, 78, 79, 309, 233, 80, 161, 162, 218, 214,
- 215, 216, 151, 135, 294, 226, 210, 81, 82, 312,
- 313, 314, 370, 371, 427, 372, 430, 431, 444, 445,
- 446
+ 0, 58, 59, 60, 61, 62, 137, 93, 94, 311,
+ 371, 372, 373, 374, 375, 376, 377, 63, 64, 65,
+ 66, 88, 244, 245, 67, 209, 210, 211, 212, 68,
+ 180, 128, 256, 333, 334, 335, 393, 69, 286, 344,
+ 413, 114, 115, 116, 148, 149, 150, 70, 267, 268,
+ 269, 270, 71, 248, 249, 250, 72, 175, 176, 177,
+ 73, 107, 108, 109, 110, 74, 193, 194, 195, 75,
+ 76, 77, 274, 78, 79, 118, 155, 282, 283, 179,
+ 418, 306, 353, 135, 136, 80, 81, 317, 236, 82,
+ 164, 165, 221, 217, 218, 219, 154, 138, 302, 229,
+ 213, 83, 84, 320, 321, 322, 380, 381, 437, 382,
+ 440, 441, 454, 455, 456
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1217,297 +1679,288 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 124, 211, 289, 291, 412, 178, 341, 376, 169, 212,
- 220, 264, 368, 429, 304, 281, 283, 272, 230, 297,
- 1, 337, 163, 339, 434, 167, 224, 292, 121, 2,
- 122, 84, 377, 310, 311, 3, 4, 5, 83, 112,
- 277, 231, 85, 113, 6, 7, 222, 109, 223, 248,
- 265, 8, 9, 127, 273, 10, 243, 11, 225, 12,
- 13, 282, 368, 170, 14, 164, 232, 165, 243, 128,
- 330, 417, 129, 15, 130, 404, 405, 131, 16, 263,
- 136, 305, 342, 306, 149, 17, 150, 18, 103, 153,
- 168, 175, 179, 249, 250, 251, 252, 19, 20, 123,
- 21, 22, 217, 219, 114, 23, 24, 310, 311, 25,
- 26, 221, 227, 235, 234, 378, 154, 155, 27, 228,
- 268, 229, 245, 379, 413, 171, 246, 123, 335, 336,
- 262, 270, 28, 268, 29, 30, 287, 156, 236, 317,
- 31, 237, 380, 293, 271, 277, 423, 318, 279, 280,
- 32, 319, 253, 115, 166, 33, 213, 34, 286, 35,
- 285, 36, 37, 116, 123, 290, 117, 296, 299, 301,
- 316, 38, 39, 40, 41, 42, 43, 44, 302, 157,
- 45, 307, 104, 46, 420, 47, 326, 406, 105, 315,
- 118, 320, 327, 328, 48, 119, 332, 254, 381, 49,
- 50, 51, 382, 52, 53, 308, 333, 344, 340, 158,
- 54, 55, 439, 440, 441, 442, 443, 255, 373, 374,
- -6, 56, 256, 257, 321, 439, 440, 441, 442, 443,
- 238, 239, 338, 375, 407, 447, 384, 240, 432, 2,
- 410, 411, 414, 437, 415, 3, 4, 5, 416, 419,
- 421, 422, 424, 426, 6, 7, 428, 429, 436, 449,
- 452, 8, 9, 433, 451, 10, 450, 11, 438, 12,
- 13, 295, 244, 269, 14, 111, 284, 288, 267, 329,
- 300, 276, 159, 15, 148, 369, 331, 160, 16, 435,
- 448, 409, 418, 322, 0, 17, 0, 18, 0, 0,
- 137, 138, 139, 140, 0, 0, 0, 19, 20, 0,
- 21, 22, 0, 0, 0, 23, 24, 0, 0, 25,
- 26, 0, 0, 0, 0, 0, 0, 0, 27, 0,
- 0, 141, 0, 142, 87, 143, 0, 0, 0, 88,
- 0, 144, 28, 0, 29, 30, 89, 0, 0, 0,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 32, 0, 0, 0, 0, 33, 0, 34, 0, 35,
- 0, 36, 37, 0, 0, 0, 0, 0, 0, 0,
- 0, 38, 39, 40, 41, 42, 43, 44, 0, 0,
- 45, 0, 0, 46, 0, 47, 0, 0, 0, 0,
- 425, 0, 90, 0, 48, 0, 0, 0, 0, 49,
- 50, 51, 0, 52, 53, 0, 0, 2, 0, 345,
- 54, 55, 0, 3, 4, 5, 0, 0, 0, 346,
- -6, 56, 6, 7, 0, 0, 91, 92, 0, 8,
- 9, 0, 0, 10, 0, 11, 0, 12, 13, 180,
- 0, 0, 14, 0, 0, 93, 0, 0, 0, 0,
- 94, 15, 0, 0, 0, 0, 16, 0, 347, 348,
- 0, 0, 0, 17, 0, 18, 0, 181, 0, 0,
- 0, 0, 0, 0, 0, 19, 20, 349, 21, 22,
- 0, 95, 0, 23, 24, 0, 182, 25, 26, 0,
- 183, 0, 0, 0, 0, 0, 27, 0, 350, 0,
- 0, 0, 0, 0, 96, 97, 98, 351, 0, 352,
- 28, 0, 29, 30, 0, 0, 0, 0, 31, 0,
- 0, 0, 0, 0, 0, 353, 0, 0, 32, 0,
- 0, 0, 0, 33, 0, 34, 0, 35, 0, 36,
- 37, 0, 0, 0, 0, 354, 355, 0, 0, 38,
- 39, 40, 41, 42, 43, 44, 0, 0, 45, 0,
- 0, 46, 0, 47, 0, 0, 385, 0, 184, 0,
- 0, 0, 48, 0, 0, 386, 0, 49, 50, 51,
- 0, 52, 53, 356, 387, 357, 0, 0, 54, 55,
- 0, 0, 0, 358, 0, 0, 0, 359, 360, 56,
- 185, 186, 187, 188, 388, 0, 0, 389, 189, 193,
- 0, 194, 195, 390, 0, 0, 0, 0, 196, 0,
- 0, 197, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 391, 0,
- 0, 0, 392, 393, 0, 0, 394, 395, 396, 198,
- 397, 398, 399, 0, 400, 0, 0, 0, 0, 0,
+ 92, 214, 297, 386, 215, 181, 1, 422, 129, 312,
+ 378, 223, 272, 172, 351, 2, 89, 378, 90, 305,
+ 252, 3, 4, 5, 299, 246, 85, 233, 387, 327,
+ 6, 7, 252, 170, 157, 158, 8, 328, 9, 10,
+ 111, 329, 11, 347, 12, 349, 13, 14, 300, 86,
+ 234, 15, 273, 280, 225, 159, 226, 355, 238, 247,
+ 16, 289, 291, 318, 319, 17, 87, 356, 173, 227,
+ 427, 166, 18, 285, 19, 235, 340, 313, 439, 314,
+ 117, 330, 271, 239, 20, 21, 240, 22, 23, 444,
+ 352, 281, 24, 25, 290, 130, 26, 27, 160, 414,
+ 415, 228, 318, 319, 131, 28, 132, 357, 358, 133,
+ 139, 134, 388, 156, 331, 167, 91, 168, 152, 29,
+ 389, 30, 31, 171, 153, 178, 359, 32, 161, 423,
+ 276, 174, 120, 182, 91, 112, 121, 33, 295, 390,
+ 220, 113, 34, 276, 35, 222, 36, 360, 37, 38,
+ 224, 230, 231, 216, 254, 255, 361, 232, 362, 39,
+ 40, 41, 42, 43, 44, 45, 301, 237, 46, 251,
+ 433, 47, 278, 48, 363, 285, 241, 242, 315, 345,
+ 346, 279, 49, 243, 287, 332, 288, 294, 50, 51,
+ 52, 430, 53, 54, 293, 364, 365, 391, 122, 55,
+ 56, 392, 162, 316, 298, 169, 2, 304, 163, -6,
+ 57, 307, 3, 4, 5, 91, 449, 450, 451, 452,
+ 453, 6, 7, 309, 310, 323, 457, 8, 324, 9,
+ 10, 326, 336, 11, 366, 12, 367, 13, 14, 348,
+ 416, 337, 15, 338, 368, 442, 342, 123, 369, 370,
+ 447, 16, 343, 350, 354, 383, 17, 417, 124, 384,
+ 420, 125, 385, 18, 394, 19, 421, 462, 140, 141,
+ 142, 143, 424, 426, 431, 20, 21, 183, 22, 23,
+ 425, 429, 432, 24, 25, 126, 434, 26, 27, 436,
+ 438, 127, 443, 439, 446, 459, 28, 448, 460, 144,
+ 419, 145, 95, 146, 461, 303, 184, 96, 253, 147,
+ 29, 277, 30, 31, 97, 292, 119, 339, 32, 325,
+ 296, 275, 257, 284, 308, 185, 151, 428, 33, 186,
+ 341, 379, 458, 34, 445, 35, 0, 36, 0, 37,
+ 38, 449, 450, 451, 452, 453, 0, 0, 0, 0,
+ 39, 40, 41, 42, 43, 44, 45, 0, 0, 46,
+ 0, 0, 47, 0, 48, 0, 0, 258, 259, 260,
+ 261, 98, 0, 49, 0, 0, 0, 0, 0, 50,
+ 51, 52, 0, 53, 54, 0, 0, 2, 0, 0,
+ 55, 56, 0, 3, 4, 5, 0, 0, 0, 0,
+ -6, 57, 6, 7, 0, 99, 100, 187, 8, 0,
+ 9, 10, 0, 0, 11, 0, 12, 435, 13, 14,
+ 0, 0, 0, 15, 101, 0, 262, 0, 0, 102,
+ 0, 0, 16, 0, 0, 0, 0, 17, 0, 0,
+ 188, 189, 190, 191, 18, 0, 19, 0, 192, 0,
+ 0, 0, 0, 0, 0, 0, 20, 21, 0, 22,
+ 23, 103, 0, 0, 24, 25, 0, 0, 26, 27,
+ 0, 0, 263, 0, 0, 0, 0, 28, 0, 0,
+ 0, 0, 0, 0, 0, 104, 105, 106, 0, 0,
+ 0, 29, 264, 30, 31, 0, 0, 265, 266, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 395, 33,
+ 0, 0, 0, 0, 34, 0, 35, 396, 36, 0,
+ 37, 38, 0, 0, 0, 0, 397, 0, 0, 0,
+ 0, 39, 40, 41, 42, 43, 44, 45, 0, 0,
+ 46, 0, 0, 47, 0, 48, 398, 0, 0, 399,
+ 0, 0, 0, 0, 49, 400, 0, 0, 0, 0,
+ 50, 51, 52, 0, 53, 54, 196, 0, 197, 198,
+ 0, 55, 56, 0, 0, 199, 0, 0, 200, 0,
+ 401, 0, 57, 0, 402, 403, 0, 0, 404, 405,
+ 406, 0, 407, 408, 409, 0, 410, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 201, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 411, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 202,
+ 0, 203, 0, 0, 0, 0, 0, 204, 0, 205,
+ 0, 412, 0, 206, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 401, 0, 0, 0, 0, 0, 0,
- 0, 199, 0, 200, 0, 0, 0, 0, 0, 201,
- 0, 202, 0, 0, 0, 203, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 402, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 204,
- 205
+ 0, 0, 0, 0, 0, 0, 0, 207, 208
};
static const yytype_int16 yycheck[] =
{
- 15, 51, 192, 43, 67, 46, 68, 4, 46, 67,
- 58, 22, 158, 206, 5, 166, 167, 30, 37, 209,
- 1, 281, 30, 283, 217, 40, 35, 67, 73, 10,
- 75, 67, 29, 203, 204, 16, 17, 18, 201, 23,
- 71, 60, 67, 27, 25, 26, 61, 172, 63, 3,
- 61, 32, 33, 172, 67, 36, 99, 38, 67, 40,
- 41, 92, 158, 101, 45, 73, 85, 75, 111, 172,
- 260, 217, 172, 54, 172, 335, 336, 172, 59, 127,
- 67, 72, 144, 74, 172, 66, 172, 68, 11, 67,
- 67, 172, 172, 47, 48, 49, 50, 78, 79, 172,
- 81, 82, 67, 0, 88, 86, 87, 203, 204, 90,
- 91, 201, 67, 31, 216, 112, 7, 8, 99, 172,
- 135, 172, 67, 120, 187, 163, 35, 172, 279, 280,
- 172, 67, 113, 148, 115, 116, 177, 28, 56, 32,
- 121, 59, 139, 183, 172, 71, 406, 40, 30, 30,
- 131, 44, 106, 137, 162, 136, 214, 138, 213, 140,
- 67, 142, 143, 147, 172, 172, 150, 67, 67, 67,
- 172, 152, 153, 154, 155, 156, 157, 158, 201, 70,
- 161, 172, 105, 164, 374, 166, 172, 338, 111, 67,
- 174, 84, 172, 67, 175, 179, 67, 151, 195, 180,
- 181, 182, 199, 184, 185, 196, 67, 39, 172, 100,
- 191, 192, 207, 208, 209, 210, 211, 171, 201, 213,
- 201, 202, 176, 177, 117, 207, 208, 209, 210, 211,
- 148, 149, 282, 172, 30, 217, 212, 155, 428, 10,
- 67, 67, 172, 433, 213, 16, 17, 18, 201, 216,
- 67, 55, 215, 205, 25, 26, 213, 206, 201, 201,
- 450, 32, 33, 213, 201, 36, 213, 38, 216, 40,
- 41, 206, 106, 145, 45, 12, 172, 190, 132, 258,
- 214, 161, 173, 54, 29, 312, 261, 178, 59, 430,
- 444, 341, 370, 186, -1, 66, -1, 68, -1, -1,
- 62, 63, 64, 65, -1, -1, -1, 78, 79, -1,
- 81, 82, -1, -1, -1, 86, 87, -1, -1, 90,
- 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
- -1, 93, -1, 95, 8, 97, -1, -1, -1, 13,
- -1, 103, 113, -1, 115, 116, 20, -1, -1, -1,
- 121, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 131, -1, -1, -1, -1, 136, -1, 138, -1, 140,
- -1, 142, 143, -1, -1, -1, -1, -1, -1, -1,
- -1, 152, 153, 154, 155, 156, 157, 158, -1, -1,
- 161, -1, -1, 164, -1, 166, -1, -1, -1, -1,
- 415, -1, 76, -1, 175, -1, -1, -1, -1, 180,
- 181, 182, -1, 184, 185, -1, -1, 10, -1, 9,
- 191, 192, -1, 16, 17, 18, -1, -1, -1, 19,
- 201, 202, 25, 26, -1, -1, 110, 111, -1, 32,
- 33, -1, -1, 36, -1, 38, -1, 40, 41, 6,
- -1, -1, 45, -1, -1, 129, -1, -1, -1, -1,
- 134, 54, -1, -1, -1, -1, 59, -1, 58, 59,
- -1, -1, -1, 66, -1, 68, -1, 34, -1, -1,
- -1, -1, -1, -1, -1, 78, 79, 77, 81, 82,
- -1, 165, -1, 86, 87, -1, 53, 90, 91, -1,
- 57, -1, -1, -1, -1, -1, 99, -1, 98, -1,
- -1, -1, -1, -1, 188, 189, 190, 107, -1, 109,
- 113, -1, 115, 116, -1, -1, -1, -1, 121, -1,
- -1, -1, -1, -1, -1, 125, -1, -1, 131, -1,
- -1, -1, -1, 136, -1, 138, -1, 140, -1, 142,
- 143, -1, -1, -1, -1, 145, 146, -1, -1, 152,
- 153, 154, 155, 156, 157, 158, -1, -1, 161, -1,
- -1, 164, -1, 166, -1, -1, 42, -1, 135, -1,
- -1, -1, 175, -1, -1, 51, -1, 180, 181, 182,
- -1, 184, 185, 183, 60, 185, -1, -1, 191, 192,
- -1, -1, -1, 193, -1, -1, -1, 197, 198, 202,
- 167, 168, 169, 170, 80, -1, -1, 83, 175, 12,
- -1, 14, 15, 89, -1, -1, -1, -1, 21, -1,
- -1, 24, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 114, -1,
- -1, -1, 118, 119, -1, -1, 122, 123, 124, 52,
- 126, 127, 128, -1, 130, -1, -1, -1, -1, -1,
+ 8, 52, 195, 4, 68, 47, 1, 68, 16, 5,
+ 160, 59, 22, 47, 69, 10, 74, 160, 76, 212,
+ 107, 16, 17, 18, 44, 146, 204, 38, 29, 33,
+ 25, 26, 119, 41, 7, 8, 31, 41, 33, 34,
+ 11, 45, 37, 289, 39, 291, 41, 42, 68, 68,
+ 61, 46, 62, 30, 62, 28, 64, 9, 32, 180,
+ 55, 169, 170, 206, 207, 60, 68, 19, 102, 36,
+ 220, 30, 67, 72, 69, 86, 269, 73, 209, 75,
+ 174, 85, 130, 57, 79, 80, 60, 82, 83, 220,
+ 145, 68, 87, 88, 93, 174, 91, 92, 71, 345,
+ 346, 68, 206, 207, 174, 100, 174, 59, 60, 174,
+ 68, 174, 113, 68, 118, 74, 174, 76, 174, 114,
+ 121, 116, 117, 68, 174, 174, 78, 122, 101, 190,
+ 138, 165, 23, 174, 174, 106, 27, 132, 180, 140,
+ 68, 112, 137, 151, 139, 0, 141, 99, 143, 144,
+ 204, 68, 174, 217, 68, 36, 108, 174, 110, 154,
+ 155, 156, 157, 158, 159, 160, 186, 219, 163, 174,
+ 416, 166, 68, 168, 126, 72, 150, 151, 174, 287,
+ 288, 174, 177, 157, 30, 189, 30, 216, 183, 184,
+ 185, 384, 187, 188, 68, 147, 148, 198, 89, 194,
+ 195, 202, 175, 199, 174, 164, 10, 68, 181, 204,
+ 205, 68, 16, 17, 18, 174, 210, 211, 212, 213,
+ 214, 25, 26, 68, 204, 68, 220, 31, 174, 33,
+ 34, 174, 174, 37, 186, 39, 188, 41, 42, 290,
+ 348, 174, 46, 68, 196, 438, 68, 138, 200, 201,
+ 443, 55, 68, 174, 40, 204, 60, 30, 149, 216,
+ 68, 152, 174, 67, 215, 69, 68, 460, 63, 64,
+ 65, 66, 174, 204, 68, 79, 80, 6, 82, 83,
+ 216, 219, 56, 87, 88, 176, 218, 91, 92, 208,
+ 216, 182, 216, 209, 204, 204, 100, 219, 216, 94,
+ 351, 96, 8, 98, 204, 209, 35, 13, 114, 104,
+ 114, 148, 116, 117, 20, 175, 13, 267, 122, 248,
+ 193, 135, 3, 164, 217, 54, 30, 380, 132, 58,
+ 270, 320, 454, 137, 440, 139, -1, 141, -1, 143,
+ 144, 210, 211, 212, 213, 214, -1, -1, -1, -1,
+ 154, 155, 156, 157, 158, 159, 160, -1, -1, 163,
+ -1, -1, 166, -1, 168, -1, -1, 48, 49, 50,
+ 51, 77, -1, 177, -1, -1, -1, -1, -1, 183,
+ 184, 185, -1, 187, 188, -1, -1, 10, -1, -1,
+ 194, 195, -1, 16, 17, 18, -1, -1, -1, -1,
+ 204, 205, 25, 26, -1, 111, 112, 136, 31, -1,
+ 33, 34, -1, -1, 37, -1, 39, 425, 41, 42,
+ -1, -1, -1, 46, 130, -1, 107, -1, -1, 135,
+ -1, -1, 55, -1, -1, -1, -1, 60, -1, -1,
+ 169, 170, 171, 172, 67, -1, 69, -1, 177, -1,
+ -1, -1, -1, -1, -1, -1, 79, 80, -1, 82,
+ 83, 167, -1, -1, 87, 88, -1, -1, 91, 92,
+ -1, -1, 153, -1, -1, -1, -1, 100, -1, -1,
+ -1, -1, -1, -1, -1, 191, 192, 193, -1, -1,
+ -1, 114, 173, 116, 117, -1, -1, 178, 179, 122,
+ -1, -1, -1, -1, -1, -1, -1, -1, 43, 132,
+ -1, -1, -1, -1, 137, -1, 139, 52, 141, -1,
+ 143, 144, -1, -1, -1, -1, 61, -1, -1, -1,
+ -1, 154, 155, 156, 157, 158, 159, 160, -1, -1,
+ 163, -1, -1, 166, -1, 168, 81, -1, -1, 84,
+ -1, -1, -1, -1, 177, 90, -1, -1, -1, -1,
+ 183, 184, 185, -1, 187, 188, 12, -1, 14, 15,
+ -1, 194, 195, -1, -1, 21, -1, -1, 24, -1,
+ 115, -1, 205, -1, 119, 120, -1, -1, 123, 124,
+ 125, -1, 127, 128, 129, -1, 131, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 53, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 161, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 159, -1, -1, -1, -1, -1, -1,
- -1, 94, -1, 96, -1, -1, -1, -1, -1, 102,
- -1, 104, -1, -1, -1, 108, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 193, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 132,
- 133
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
+ -1, 97, -1, -1, -1, -1, -1, 103, -1, 105,
+ -1, 196, -1, 109, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 133, 134
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const yytype_uint16 yystos[] =
+static const yytype_int16 yystos[] =
{
- 0, 1, 10, 16, 17, 18, 25, 26, 32, 33,
- 36, 38, 40, 41, 45, 54, 59, 66, 68, 78,
- 79, 81, 82, 86, 87, 90, 91, 99, 113, 115,
- 116, 121, 131, 136, 138, 140, 142, 143, 152, 153,
- 154, 155, 156, 157, 158, 161, 164, 166, 175, 180,
- 181, 182, 184, 185, 191, 192, 202, 219, 220, 221,
- 222, 223, 235, 236, 237, 238, 242, 247, 255, 265,
- 270, 274, 279, 283, 284, 285, 287, 288, 299, 300,
- 303, 315, 316, 201, 67, 67, 239, 8, 13, 20,
- 76, 110, 111, 129, 134, 165, 188, 189, 190, 275,
- 276, 277, 278, 11, 105, 111, 259, 260, 261, 172,
- 289, 275, 23, 27, 88, 137, 147, 150, 174, 179,
- 249, 73, 75, 172, 224, 225, 226, 172, 172, 172,
- 172, 172, 297, 298, 224, 311, 67, 62, 63, 64,
- 65, 93, 95, 97, 103, 262, 263, 264, 311, 172,
- 172, 310, 290, 67, 7, 8, 28, 70, 100, 173,
- 178, 304, 305, 30, 73, 75, 162, 224, 67, 46,
- 101, 163, 271, 272, 273, 172, 293, 248, 249, 172,
- 6, 34, 53, 57, 135, 167, 168, 169, 170, 175,
- 280, 281, 282, 12, 14, 15, 21, 24, 52, 94,
- 96, 102, 104, 108, 132, 133, 243, 244, 245, 246,
- 314, 225, 67, 214, 307, 308, 309, 67, 306, 0,
- 221, 201, 224, 224, 35, 67, 313, 67, 172, 172,
- 37, 60, 85, 302, 216, 31, 56, 59, 148, 149,
- 155, 240, 241, 276, 260, 67, 35, 250, 3, 47,
- 48, 49, 50, 106, 151, 171, 176, 177, 266, 267,
- 268, 269, 172, 221, 22, 61, 286, 298, 224, 263,
- 67, 172, 30, 67, 291, 292, 305, 71, 256, 30,
- 30, 256, 92, 256, 272, 67, 213, 249, 281, 313,
- 172, 43, 67, 183, 312, 244, 67, 313, 295, 67,
- 308, 67, 201, 227, 5, 72, 74, 172, 196, 301,
- 203, 204, 317, 318, 319, 67, 172, 32, 40, 44,
- 84, 117, 186, 251, 252, 253, 172, 172, 67, 267,
- 313, 312, 67, 67, 257, 256, 256, 257, 225, 257,
- 172, 68, 144, 296, 39, 9, 19, 58, 59, 77,
- 98, 107, 109, 125, 145, 146, 183, 185, 193, 197,
- 198, 228, 229, 230, 231, 232, 233, 234, 158, 318,
- 320, 321, 323, 201, 213, 172, 4, 29, 112, 120,
- 139, 195, 199, 254, 212, 42, 51, 60, 80, 83,
- 89, 114, 118, 119, 122, 123, 124, 126, 127, 128,
- 130, 159, 193, 258, 257, 257, 256, 30, 294, 225,
- 67, 67, 67, 187, 172, 213, 201, 217, 321, 216,
- 313, 67, 55, 257, 215, 224, 205, 322, 213, 206,
- 324, 325, 313, 213, 217, 325, 201, 313, 216, 207,
- 208, 209, 210, 211, 326, 327, 328, 217, 327, 201,
- 213, 201, 313
+ 0, 1, 10, 16, 17, 18, 25, 26, 31, 33,
+ 34, 37, 39, 41, 42, 46, 55, 60, 67, 69,
+ 79, 80, 82, 83, 87, 88, 91, 92, 100, 114,
+ 116, 117, 122, 132, 137, 139, 141, 143, 144, 154,
+ 155, 156, 157, 158, 159, 160, 163, 166, 168, 177,
+ 183, 184, 185, 187, 188, 194, 195, 205, 222, 223,
+ 224, 225, 226, 238, 239, 240, 241, 245, 250, 258,
+ 268, 273, 277, 281, 286, 290, 291, 292, 294, 295,
+ 306, 307, 310, 322, 323, 204, 68, 68, 242, 74,
+ 76, 174, 227, 228, 229, 8, 13, 20, 77, 111,
+ 112, 130, 135, 167, 191, 192, 193, 282, 283, 284,
+ 285, 11, 106, 112, 262, 263, 264, 174, 296, 282,
+ 23, 27, 89, 138, 149, 152, 176, 182, 252, 227,
+ 174, 174, 174, 174, 174, 304, 305, 227, 318, 68,
+ 63, 64, 65, 66, 94, 96, 98, 104, 265, 266,
+ 267, 318, 174, 174, 317, 297, 68, 7, 8, 28,
+ 71, 101, 175, 181, 311, 312, 30, 74, 76, 164,
+ 227, 68, 47, 102, 165, 278, 279, 280, 174, 300,
+ 251, 252, 174, 6, 35, 54, 58, 136, 169, 170,
+ 171, 172, 177, 287, 288, 289, 12, 14, 15, 21,
+ 24, 53, 95, 97, 103, 105, 109, 133, 134, 246,
+ 247, 248, 249, 321, 228, 68, 217, 314, 315, 316,
+ 68, 313, 0, 224, 204, 227, 227, 36, 68, 320,
+ 68, 174, 174, 38, 61, 86, 309, 219, 32, 57,
+ 60, 150, 151, 157, 243, 244, 146, 180, 274, 275,
+ 276, 174, 283, 263, 68, 36, 253, 3, 48, 49,
+ 50, 51, 107, 153, 173, 178, 179, 269, 270, 271,
+ 272, 224, 22, 62, 293, 305, 227, 266, 68, 174,
+ 30, 68, 298, 299, 312, 72, 259, 30, 30, 259,
+ 93, 259, 279, 68, 216, 252, 288, 320, 174, 44,
+ 68, 186, 319, 247, 68, 320, 302, 68, 315, 68,
+ 204, 230, 5, 73, 75, 174, 199, 308, 206, 207,
+ 324, 325, 326, 68, 174, 275, 174, 33, 41, 45,
+ 85, 118, 189, 254, 255, 256, 174, 174, 68, 270,
+ 320, 319, 68, 68, 260, 259, 259, 260, 228, 260,
+ 174, 69, 145, 303, 40, 9, 19, 59, 60, 78,
+ 99, 108, 110, 126, 147, 148, 186, 188, 196, 200,
+ 201, 231, 232, 233, 234, 235, 236, 237, 160, 325,
+ 327, 328, 330, 204, 216, 174, 4, 29, 113, 121,
+ 140, 198, 202, 257, 215, 43, 52, 61, 81, 84,
+ 90, 115, 119, 120, 123, 124, 125, 127, 128, 129,
+ 131, 161, 196, 261, 260, 260, 259, 30, 301, 228,
+ 68, 68, 68, 190, 174, 216, 204, 220, 328, 219,
+ 320, 68, 56, 260, 218, 227, 208, 329, 216, 209,
+ 331, 332, 320, 216, 220, 332, 204, 320, 219, 210,
+ 211, 212, 213, 214, 333, 334, 335, 220, 334, 204,
+ 216, 204, 320
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint16 yyr1[] =
+static const yytype_int16 yyr1[] =
{
- 0, 218, 219, 220, 220, 220, 221, 221, 221, 221,
- 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
- 222, 223, 223, 223, 223, 223, 224, 224, 225, 226,
- 226, 227, 227, 228, 228, 228, 229, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 231, 231, 232, 232,
- 232, 232, 232, 232, 233, 234, 235, 236, 236, 237,
- 237, 237, 237, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 239, 239, 240, 240, 241, 241, 241, 241,
- 241, 242, 243, 243, 244, 244, 244, 244, 245, 245,
- 245, 245, 245, 245, 245, 245, 245, 246, 246, 247,
- 247, 247, 248, 248, 249, 249, 249, 249, 249, 249,
- 249, 249, 250, 250, 251, 251, 251, 251, 252, 252,
- 253, 253, 254, 254, 254, 254, 254, 254, 254, 255,
- 255, 255, 255, 255, 255, 255, 255, 256, 256, 257,
- 257, 257, 258, 258, 258, 258, 258, 258, 258, 258,
- 258, 258, 258, 258, 258, 258, 258, 258, 258, 259,
- 259, 260, 261, 261, 261, 262, 262, 263, 264, 264,
- 264, 264, 264, 264, 264, 264, 265, 266, 266, 267,
- 267, 267, 267, 267, 268, 268, 268, 269, 269, 269,
- 269, 270, 271, 271, 272, 273, 273, 273, 274, 274,
- 275, 275, 276, 276, 277, 277, 277, 277, 277, 277,
- 278, 278, 278, 278, 278, 278, 279, 280, 280, 281,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 283, 283, 283, 283, 284, 284, 284, 285,
- 285, 286, 286, 286, 287, 288, 288, 288, 289, 289,
- 289, 290, 290, 291, 292, 292, 293, 294, 294, 295,
- 295, 296, 296, 297, 297, 298, 299, 299, 300, 300,
- 301, 301, 301, 301, 302, 302, 302, 303, 304, 304,
- 305, 305, 305, 305, 305, 305, 305, 306, 306, 307,
- 307, 308, 308, 309, 310, 310, 311, 311, 312, 312,
- 312, 313, 313, 314, 315, 316, 317, 317, 318, 319,
- 319, 320, 320, 321, 322, 323, 324, 324, 325, 326,
- 326, 327, 328, 328, 328, 328, 328
+ 0, 221, 222, 223, 223, 223, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 225, 226, 226, 226, 226, 226, 227, 227, 228,
+ 229, 229, 230, 230, 231, 231, 231, 232, 233, 233,
+ 233, 233, 233, 233, 233, 233, 233, 234, 234, 235,
+ 235, 235, 235, 235, 235, 236, 237, 238, 239, 239,
+ 240, 240, 240, 240, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 242, 242, 243, 243, 244, 244, 244,
+ 244, 244, 245, 246, 246, 247, 247, 247, 247, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248, 249, 249,
+ 250, 250, 250, 251, 251, 252, 252, 252, 252, 252,
+ 252, 252, 252, 253, 253, 254, 254, 254, 254, 255,
+ 255, 256, 256, 257, 257, 257, 257, 257, 257, 257,
+ 258, 258, 258, 258, 258, 258, 258, 258, 259, 259,
+ 260, 260, 260, 261, 261, 261, 261, 261, 261, 261,
+ 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
+ 262, 262, 263, 264, 264, 264, 265, 265, 266, 267,
+ 267, 267, 267, 267, 267, 267, 267, 268, 269, 269,
+ 270, 270, 270, 270, 270, 271, 271, 271, 272, 272,
+ 272, 272, 273, 274, 274, 275, 276, 276, 277, 278,
+ 278, 279, 280, 280, 280, 281, 281, 282, 282, 283,
+ 283, 284, 284, 284, 284, 284, 284, 285, 285, 285,
+ 285, 285, 285, 286, 287, 287, 288, 289, 289, 289,
+ 289, 289, 289, 289, 289, 289, 289, 290, 290, 290,
+ 290, 290, 290, 290, 290, 290, 290, 290, 290, 290,
+ 290, 290, 290, 291, 291, 291, 292, 292, 293, 293,
+ 293, 294, 295, 295, 295, 296, 296, 296, 297, 297,
+ 298, 299, 299, 300, 301, 301, 302, 302, 303, 303,
+ 304, 304, 305, 306, 306, 307, 307, 308, 308, 308,
+ 308, 309, 309, 309, 310, 311, 311, 312, 312, 312,
+ 312, 312, 312, 312, 313, 313, 314, 314, 315, 315,
+ 316, 317, 317, 318, 318, 319, 319, 319, 320, 320,
+ 321, 322, 323, 324, 324, 325, 326, 326, 327, 327,
+ 328, 329, 330, 331, 331, 332, 333, 333, 334, 335,
+ 335, 335, 335, 335
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
+static const yytype_int8 yyr2[] =
{
0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
- 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 2, 1, 1,
- 1, 1, 1, 1, 2, 1, 2, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 0, 2, 2, 2, 1, 1, 1, 1,
- 1, 2, 2, 1, 2, 2, 2, 1, 1, 1,
+ 1, 3, 1, 1, 1, 1, 1, 1, 2, 1,
+ 1, 1, 0, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
+ 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
+ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 0, 2, 2, 2, 1, 1, 1,
+ 1, 1, 2, 2, 1, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 3, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 2, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 4, 6, 4, 5, 5, 4, 0, 2,
+ 0, 2, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 1, 2, 1, 1, 1, 2, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 3, 2, 1,
+ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
+ 1, 1, 3, 2, 1, 2, 1, 1, 2, 2,
+ 1, 2, 1, 1, 1, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 3, 3, 1, 2, 2, 2, 2,
2, 3, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 2, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 4, 6, 4, 5, 5, 4, 0, 2, 0,
- 2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 1, 2, 1, 1, 1, 2, 1, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 3, 2, 1, 2,
- 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 1, 2, 1, 1, 1, 2, 2,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 2, 1, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 2, 2, 2, 3, 3, 1, 2,
- 2, 2, 2, 2, 3, 2, 1, 1, 1, 1,
- 1, 1, 1, 0, 1, 1, 1, 1, 1, 2,
- 0, 0, 2, 4, 1, 1, 4, 1, 0, 0,
- 2, 2, 2, 2, 1, 1, 3, 3, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
- 1, 1, 1, 5, 2, 1, 2, 1, 1, 1,
- 1, 1, 1, 2, 5, 1, 3, 2, 3, 1,
- 1, 2, 1, 5, 4, 3, 2, 1, 6, 3,
- 2, 3, 1, 1, 1, 1, 1
+ 0, 1, 1, 1, 1, 1, 2, 0, 0, 2,
+ 4, 1, 1, 4, 1, 0, 0, 2, 2, 2,
+ 2, 1, 1, 3, 3, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 1, 2, 1, 1, 1,
+ 5, 2, 1, 2, 1, 1, 1, 1, 1, 1,
+ 2, 5, 1, 3, 2, 3, 1, 1, 2, 1,
+ 5, 4, 3, 2, 1, 6, 3, 2, 3, 1,
+ 1, 1, 1, 1
};
+enum { YYENOMEM = -2 };
+
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
@@ -1516,27 +1969,26 @@ static const yytype_uint8 yyr2[] =
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (0)
-
-/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Backward compatibility with an undocumented macro.
+ Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
/* Enable debugging if requested. */
@@ -1554,54 +2006,58 @@ do { \
} while (0)
/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
+# ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
- Type, Value); \
+ Kind, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
-/*----------------------------------------.
-| Print this symbol's value on YYOUTPUT. |
-`----------------------------------------*/
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_value_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
+ FILE *yyoutput = yyo;
+ YY_USE (yyoutput);
if (!yyvaluep)
return;
# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+ if (yykind < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
# endif
- YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YY_USE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
- YYFPRINTF (yyoutput, "%s %s (",
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+ YYFPRINTF (yyo, "%s %s (",
+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
+ yy_symbol_value_print (yyo, yykind, yyvaluep);
+ YYFPRINTF (yyo, ")");
}
/*------------------------------------------------------------------.
@@ -1610,7 +2066,7 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
`------------------------------------------------------------------*/
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1633,21 +2089,21 @@ do { \
`------------------------------------------------*/
static void
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
+ int yyrule)
{
- unsigned long int yylno = yyrline[yyrule];
+ int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr,
- yystos[yyssp[yyi + 1 - yynrhs]],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+ &yyvsp[(yyi + 1) - (yynrhs)]);
YYFPRINTF (stderr, "\n");
}
}
@@ -1662,8 +2118,8 @@ do { \
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -1686,249 +2142,30 @@ int yydebug;
#endif
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-static YYSIZE_T
-yystrlen (const char *yystr)
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULLPTR;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- {
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
- }
-
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
-
- {
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg,
+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
- YYUSE (yyvaluep);
+ YY_USE (yyvaluep);
if (!yymsg)
yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YYUSE (yytype);
+ YY_USE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
-
-
-/* The lookahead symbol. */
+/* Lookahead token kind. */
int yychar;
/* The semantic value of the lookahead symbol. */
@@ -1937,6 +2174,8 @@ YYSTYPE yylval;
int yynerrs;
+
+
/*----------.
| yyparse. |
`----------*/
@@ -1944,43 +2183,36 @@ int yynerrs;
int
yyparse (void)
{
- int yystate;
+ yy_state_fast_t yystate = 0;
/* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- 'yyss': related to states.
- 'yyvs': related to semantic values.
+ int yyerrstatus = 0;
- Refer to the stacks through separate pointers, to allow yyoverflow
+ /* Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
+ /* Their size. */
+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
+ /* The state stack: array, bottom, top. */
+ yy_state_t yyssa[YYINITDEPTH];
+ yy_state_t *yyss = yyssa;
+ yy_state_t *yyssp = yyss;
- YYSIZE_T yystacksize;
+ /* The semantic value stack: array, bottom, top. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp = yyvs;
int yyn;
+ /* The return value of yyparse. */
int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken = 0;
+ /* Lookahead symbol kind. */
+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
@@ -1988,58 +2220,60 @@ yyparse (void)
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yyssp = yyss = yyssa;
- yyvsp = yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
goto yysetstate;
+
/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
+| yynewstate -- push a new state, which is found in yystate. |
`------------------------------------------------------------*/
- yynewstate:
+yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
- yysetstate:
- *yyssp = yystate;
+
+/*--------------------------------------------------------------------.
+| yysetstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+ YY_IGNORE_USELESS_CAST_BEGIN
+ *yyssp = YY_CAST (yy_state_t, yystate);
+ YY_IGNORE_USELESS_CAST_END
+ YY_STACK_PRINT (yyss, yyssp);
if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+#else
{
/* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
-#ifdef yyoverflow
+# if defined yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
+ yy_state_t *yyss1 = yyss;
YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
+ &yyss1, yysize * YYSIZEOF (*yyssp),
+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
&yystacksize);
-
yyss = yyss1;
yyvs = yyvs1;
}
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
+# else /* defined YYSTACK_RELOCATE */
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
@@ -2048,9 +2282,10 @@ yyparse (void)
yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
+ yy_state_t *yyss1 = yyss;
union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ YY_CAST (union yyalloc *,
+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
@@ -2060,30 +2295,30 @@ yyparse (void)
YYSTACK_FREE (yyss1);
}
# endif
-#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ YY_IGNORE_USELESS_CAST_BEGIN
+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
+ YY_CAST (long, yystacksize)));
+ YY_IGNORE_USELESS_CAST_END
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
+
/*-----------.
| yybackup. |
`-----------*/
yybackup:
-
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
@@ -2094,18 +2329,29 @@ yybackup:
/* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, "Reading a token: "));
+ YYDPRINTF ((stderr, "Reading a token\n"));
yychar = yylex ();
}
if (yychar <= YYEOF)
{
- yychar = yytoken = YYEOF;
+ yychar = YYEOF;
+ yytoken = YYSYMBOL_YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
+ else if (yychar == YYerror)
+ {
+ /* The scanner already issued an error message, process directly
+ to error recovery. But do not keep the error token as
+ lookahead, it is too special and may lead us to an endless
+ loop in error recovery. */
+ yychar = YYUNDEF;
+ yytoken = YYSYMBOL_YYerror;
+ goto yyerrlab1;
+ }
else
{
yytoken = YYTRANSLATE (yychar);
@@ -2133,15 +2379,13 @@ yybackup:
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
goto yynewstate;
@@ -2156,7 +2400,7 @@ yydefault:
/*-----------------------------.
-| yyreduce -- Do a reduction. |
+| yyreduce -- do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
@@ -2176,9 +2420,9 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 5:
-#line 398 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 5: /* command_list: error T_EOC */
+#line 404 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
* the time being.
@@ -2190,172 +2434,172 @@ yyreduce:
ip_ctx->errpos.nline,
ip_ctx->errpos.ncol);
}
-#line 2194 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2438 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 20:
-#line 434 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 21: /* server_command: client_type address option_list */
+#line 441 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
peer_node *my_node;
my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.peers, my_node);
}
-#line 2205 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2449 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 27:
-#line 453 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2211 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 28: /* address: address_fam T_String */
+#line 460 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
+#line 2455 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 28:
-#line 458 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2217 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 29: /* ip_address: T_String */
+#line 465 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
+#line 2461 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 29:
-#line 463 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = AF_INET; }
-#line 2223 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 30: /* address_fam: T_Ipv4_flag */
+#line 470 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = AF_INET; }
+#line 2467 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 30:
-#line 465 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = AF_INET6; }
-#line 2229 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 31: /* address_fam: T_Ipv6_flag */
+#line 472 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = AF_INET6; }
+#line 2473 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 31:
-#line 470 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val_fifo) = NULL; }
-#line 2235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 32: /* option_list: %empty */
+#line 477 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 32:
-#line 472 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 33: /* option_list: option_list option */
+#line 479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2244 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2488 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 36:
-#line 486 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2250 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 37: /* option_flag: option_flag_keyword */
+#line 493 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2494 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 46:
-#line 503 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2256 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 47: /* option_int: option_int_keyword T_Integer */
+#line 510 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2500 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 47:
-#line 505 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2262 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 48: /* option_int: option_int_keyword T_U_int */
+#line 512 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2506 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 54:
-#line 519 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2268 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 55: /* option_str: option_str_keyword T_String */
+#line 526 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2512 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 56:
-#line 533 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 57: /* unpeer_command: unpeer_keyword address */
+#line 540 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
unpeer_node *my_node;
my_node = create_unpeer_node((yyvsp[0].Address_node));
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2280 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2524 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 59:
-#line 554 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.broadcastclient = 1; }
-#line 2286 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 60: /* other_mode_command: T_Broadcastclient */
+#line 561 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.broadcastclient = 1; }
+#line 2530 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 60:
-#line 556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2292 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 61: /* other_mode_command: T_Manycastserver address_list */
+#line 563 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
+#line 2536 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 61:
-#line 558 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2298 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 62: /* other_mode_command: T_Multicastclient address_list */
+#line 565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
+#line 2542 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 62:
-#line 560 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.mdnstries = (yyvsp[0].Integer); }
-#line 2304 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 63: /* other_mode_command: T_Mdnstries T_Integer */
+#line 567 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.mdnstries = (yyvsp[0].Integer); }
+#line 2548 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 63:
-#line 571 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 64: /* authentication_command: T_Automax T_Integer */
+#line 578 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
attr_val *atrv;
atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, atrv);
}
-#line 2315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2559 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 64:
-#line 578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2321 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 65: /* authentication_command: T_ControlKey T_Integer */
+#line 585 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.auth.control_key = (yyvsp[0].Integer); }
+#line 2565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 65:
-#line 580 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 66: /* authentication_command: T_Crypto crypto_command_list */
+#line 587 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2330 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2574 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 66:
-#line 585 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.auth.keys = (yyvsp[0].String); }
-#line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 67: /* authentication_command: T_Keys T_String */
+#line 592 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.auth.keys = (yyvsp[0].String); }
+#line 2580 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 67:
-#line 587 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 68: /* authentication_command: T_Keysdir T_String */
+#line 594 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.auth.keysdir = (yyvsp[0].String); }
+#line 2586 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 68:
-#line 589 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2348 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 69: /* authentication_command: T_Requestkey T_Integer */
+#line 596 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.auth.request_key = (yyvsp[0].Integer); }
+#line 2592 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 69:
-#line 591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2354 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 70: /* authentication_command: T_Revoke T_Integer */
+#line 598 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.auth.revoke = (yyvsp[0].Integer); }
+#line 2598 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 70:
-#line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 71: /* authentication_command: T_Trustedkey integer_list_range */
+#line 600 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
/* [Bug 948] leaves it open if appending or
* replacing the trusted key list is the right
* way. In any case, either alternative should
@@ -2364,39 +2608,39 @@ yyreduce:
DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2368 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2612 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 71:
-#line 603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2374 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 72: /* authentication_command: T_NtpSignDsocket T_String */
+#line 610 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
+#line 2618 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 72:
-#line 608 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val_fifo) = NULL; }
-#line 2380 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 73: /* crypto_command_list: %empty */
+#line 615 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2624 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 73:
-#line 610 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 74: /* crypto_command_list: crypto_command_list crypto_command */
+#line 617 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2389 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2633 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 74:
-#line 618 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2395 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 75: /* crypto_command: crypto_str_keyword T_String */
+#line 625 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2639 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 75:
-#line 620 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 76: /* crypto_command: T_Revoke T_Integer */
+#line 627 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
msyslog(LOG_WARNING,
@@ -2404,66 +2648,66 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2408 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2652 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 81:
-#line 645 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2414 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 82: /* orphan_mode_command: T_Tos tos_option_list */
+#line 652 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
+#line 2658 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 82:
-#line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 83: /* tos_option_list: tos_option_list tos_option */
+#line 657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2423 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2667 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 83:
-#line 655 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 84: /* tos_option_list: tos_option */
+#line 662 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 84:
-#line 663 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2438 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 85: /* tos_option: tos_option_int_keyword T_Integer */
+#line 670 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
+#line 2682 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 85:
-#line 665 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2444 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 86: /* tos_option: tos_option_dbl_keyword number */
+#line 672 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2688 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 86:
-#line 667 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2450 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 87: /* tos_option: T_Cohort boolean */
+#line 674 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
+#line 2694 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 87:
-#line 669 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
-#line 2456 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 88: /* tos_option: basedate */
+#line 676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
+#line 2700 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 99:
-#line 696 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2462 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 100: /* monitoring_command: T_Statistics stats_list */
+#line 703 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
+#line 2706 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 100:
-#line 698 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 101: /* monitoring_command: T_Statsdir T_String */
+#line 705 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (lex_from_file()) {
cfgt.stats_dir = (yyvsp[0].String);
} else {
@@ -2471,56 +2715,56 @@ yyreduce:
yyerror("statsdir remote configuration ignored");
}
}
-#line 2475 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2719 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 101:
-#line 707 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 102: /* monitoring_command: T_Filegen stat filegen_option_list */
+#line 714 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
filegen_node *fgn;
fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
-#line 2486 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2730 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 102:
-#line 717 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 103: /* stats_list: stats_list stat */
+#line 724 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2495 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2739 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 103:
-#line 722 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 104: /* stats_list: stat */
+#line 729 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2504 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 112:
-#line 741 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val_fifo) = NULL; }
-#line 2510 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 113: /* filegen_option_list: %empty */
+#line 748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2754 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 113:
-#line 743 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 114: /* filegen_option_list: filegen_option_list filegen_option */
+#line 750 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2519 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2763 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 114:
-#line 751 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 115: /* filegen_option: T_File T_String */
+#line 758 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
} else {
@@ -2529,12 +2773,12 @@ yyreduce:
yyerror("filegen file remote config ignored");
}
}
-#line 2533 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2777 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 115:
-#line 761 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 116: /* filegen_option: T_Type filegen_type */
+#line 768 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
} else {
@@ -2542,12 +2786,12 @@ yyreduce:
yyerror("filegen type remote config ignored");
}
}
-#line 2546 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2790 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 116:
-#line 770 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 117: /* filegen_option: link_nolink */
+#line 777 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
const char *err;
if (lex_from_file()) {
@@ -2561,70 +2805,70 @@ yyreduce:
yyerror(err);
}
}
-#line 2565 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2809 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 117:
-#line 785 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2571 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 118: /* filegen_option: enable_disable */
+#line 792 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2815 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 129:
-#line 815 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 130: /* access_control_command: T_Discard discard_option_list */
+#line 822 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2579 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2823 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 130:
-#line 819 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 131: /* access_control_command: T_Mru mru_option_list */
+#line 826 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2587 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2831 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 131:
-#line 823 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 132: /* access_control_command: T_Restrict address res_ippeerlimit ac_flag_list */
+#line 830 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
restrict_node *rn;
rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2599 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2843 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 132:
-#line 831 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 133: /* access_control_command: T_Restrict address T_Mask ip_address res_ippeerlimit ac_flag_list */
+#line 838 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
restrict_node *rn;
rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2611 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2855 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 133:
-#line 839 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 134: /* access_control_command: T_Restrict T_Default res_ippeerlimit ac_flag_list */
+#line 846 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
restrict_node *rn;
rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2623 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2867 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 134:
-#line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 135: /* access_control_command: T_Restrict T_Ipv4_flag T_Default res_ippeerlimit ac_flag_list */
+#line 854 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
restrict_node *rn;
rn = create_restrict_node(
@@ -2638,12 +2882,12 @@ yyreduce:
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2642 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2886 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 135:
-#line 862 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 136: /* access_control_command: T_Restrict T_Ipv6_flag T_Default res_ippeerlimit ac_flag_list */
+#line 869 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
restrict_node *rn;
rn = create_restrict_node(
@@ -2657,12 +2901,12 @@ yyreduce:
lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2661 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2905 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 136:
-#line 877 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 137: /* access_control_command: T_Restrict T_Source res_ippeerlimit ac_flag_list */
+#line 884 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
restrict_node * rn;
APPEND_G_FIFO((yyvsp[0].Attr_val_fifo), create_attr_ival((yyvsp[-2].Integer), 1));
@@ -2670,18 +2914,18 @@ yyreduce:
NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), lex_current()->curpos.nline);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2674 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2918 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 137:
-#line 889 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = -1; }
-#line 2680 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 138: /* res_ippeerlimit: %empty */
+#line 896 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = -1; }
+#line 2924 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 138:
-#line 891 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 139: /* res_ippeerlimit: T_Ippeerlimit T_Integer */
+#line 898 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
struct FILE_INFO * ip_ctx;
@@ -2696,131 +2940,131 @@ yyreduce:
}
(yyval.Integer) = (yyvsp[0].Integer);
}
-#line 2700 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2944 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 139:
-#line 910 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val_fifo) = NULL; }
-#line 2706 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 140: /* ac_flag_list: %empty */
+#line 917 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2950 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 140:
-#line 912 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 141: /* ac_flag_list: ac_flag_list access_control_flag */
+#line 919 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
attr_val *av;
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
av = create_attr_ival((yyvsp[0].Integer), 1);
APPEND_G_FIFO((yyval.Attr_val_fifo), av);
}
-#line 2718 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2962 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 141:
-#line 920 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 142: /* ac_flag_list: ac_flag_list T_Serverresponse T_Fuzz */
+#line 927 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
attr_val *av;
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
av = create_attr_ival(T_ServerresponseFuzz, 1);
APPEND_G_FIFO((yyval.Attr_val_fifo), av);
}
-#line 2730 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2974 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 159:
-#line 951 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 160: /* discard_option_list: discard_option_list discard_option */
+#line 958 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2739 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2983 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 160:
-#line 956 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 161: /* discard_option_list: discard_option */
+#line 963 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2748 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2992 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 161:
-#line 964 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2754 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 162: /* discard_option: discard_option_keyword T_Integer */
+#line 971 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2998 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 165:
-#line 975 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 166: /* mru_option_list: mru_option_list mru_option */
+#line 982 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2763 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3007 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 166:
-#line 980 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 167: /* mru_option_list: mru_option */
+#line 987 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2772 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3016 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 167:
-#line 988 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2778 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 168: /* mru_option: mru_option_keyword T_Integer */
+#line 995 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 3022 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 176:
-#line 1008 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 177: /* fudge_command: T_Fudge address fudge_factor_list */
+#line 1015 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.fudge, aon);
}
-#line 2789 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3033 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 177:
-#line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 178: /* fudge_factor_list: fudge_factor_list fudge_factor */
+#line 1025 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2798 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3042 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 178:
-#line 1023 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 179: /* fudge_factor_list: fudge_factor */
+#line 1030 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2807 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3051 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 179:
-#line 1031 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2813 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 180: /* fudge_factor: fudge_factor_dbl_keyword number */
+#line 1038 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 3057 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 180:
-#line 1033 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2819 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 181: /* fudge_factor: fudge_factor_bool_keyword boolean */
+#line 1040 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 3063 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 181:
-#line 1035 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 182: /* fudge_factor: T_Stratum T_Integer */
+#line 1042 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
} else {
@@ -2828,90 +3072,125 @@ yyreduce:
yyerror("fudge factor: stratum value not in [0..16], ignored");
}
}
-#line 2832 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3076 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 182:
-#line 1044 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2838 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 183: /* fudge_factor: T_Abbrev T_String */
+#line 1051 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 3082 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 183:
-#line 1046 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2844 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 184: /* fudge_factor: T_Refid T_String */
+#line 1053 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 3088 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 191:
-#line 1068 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 2850 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 192: /* device_command: T_Device address device_item_list */
+#line 1075 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
+ addr_opts_node *aon;
+
+ aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
+ APPEND_G_FIFO(cfgt.device, aon);
+ }
+#line 3099 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 192:
-#line 1073 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 193: /* device_item_list: device_item_list device_item */
+#line 1085 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2859 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3108 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 193:
-#line 1078 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 194: /* device_item_list: device_item */
+#line 1090 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2868 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3117 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 194:
-#line 1086 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2874 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 195: /* device_item: device_item_path_keyword T_String */
+#line 1098 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 3123 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 198:
-#line 1102 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2880 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 198: /* rlimit_command: T_Rlimit rlimit_option_list */
+#line 1112 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
+#line 3129 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 199:
-#line 1104 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2886 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 199: /* rlimit_option_list: rlimit_option_list rlimit_option */
+#line 1117 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 3138 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 200:
-#line 1109 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 200: /* rlimit_option_list: rlimit_option */
+#line 1122 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 3147 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+ break;
+
+ case 201: /* rlimit_option: rlimit_option_keyword T_Integer */
+#line 1130 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 3153 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+ break;
+
+ case 205: /* system_option_command: T_Enable system_option_list */
+#line 1146 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
+#line 3159 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+ break;
+
+ case 206: /* system_option_command: T_Disable system_option_list */
+#line 1148 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
+#line 3165 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+ break;
+
+ case 207: /* system_option_list: system_option_list system_option */
+#line 1153 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2895 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3174 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 201:
-#line 1114 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 208: /* system_option_list: system_option */
+#line 1158 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2904 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3183 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 202:
-#line 1122 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2910 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 209: /* system_option: system_option_flag_keyword */
+#line 1166 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 3189 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 203:
-#line 1124 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 210: /* system_option: system_option_local_flag_keyword */
+#line 1168 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (lex_from_file()) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
} else {
@@ -2924,75 +3203,75 @@ yyreduce:
yyerror(err_str);
}
}
-#line 2928 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3207 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 216:
-#line 1163 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 2934 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 223: /* tinker_command: T_Tinker tinker_option_list */
+#line 1207 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
+#line 3213 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 217:
-#line 1168 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 224: /* tinker_option_list: tinker_option_list tinker_option */
+#line 1212 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2943 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3222 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 218:
-#line 1173 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 225: /* tinker_option_list: tinker_option */
+#line 1217 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2952 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3231 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 219:
-#line 1181 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 226: /* tinker_option: tinker_option_keyword number */
+#line 1225 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 3237 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 232:
-#line 1206 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 239: /* miscellaneous_command: misc_cmd_dbl_keyword number */
+#line 1250 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
attr_val *av;
av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2969 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3248 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 233:
-#line 1213 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 240: /* miscellaneous_command: misc_cmd_int_keyword T_Integer */
+#line 1257 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
attr_val *av;
av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2980 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3259 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 234:
-#line 1220 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 241: /* miscellaneous_command: misc_cmd_str_keyword T_String */
+#line 1264 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
attr_val *av;
av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2991 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3270 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 235:
-#line 1227 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 242: /* miscellaneous_command: misc_cmd_str_lcl_keyword T_String */
+#line 1271 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
char error_text[64];
attr_val *av;
@@ -3007,12 +3286,12 @@ yyreduce:
yyerror(error_text);
}
}
-#line 3011 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3290 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 236:
-#line 1243 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 243: /* miscellaneous_command: T_Includefile T_String command */
+#line 1287 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (!lex_from_file()) {
YYFREE((yyvsp[-1].String)); /* avoid leak */
yyerror("remote includefile ignored");
@@ -3030,105 +3309,105 @@ yyreduce:
}
YYFREE((yyvsp[-1].String)); /* avoid leak */
}
-#line 3034 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3313 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 237:
-#line 1262 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 244: /* miscellaneous_command: T_Leapfile T_String opt_hash_check */
+#line 1306 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
attr_val *av;
av = create_attr_sval((yyvsp[-2].Integer), (yyvsp[-1].String));
av->flag = (yyvsp[0].Integer);
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 3046 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3325 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 238:
-#line 1270 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { lex_flush_stack(); }
-#line 3052 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 245: /* miscellaneous_command: T_End */
+#line 1314 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { lex_flush_stack(); }
+#line 3331 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 239:
-#line 1272 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { /* see drift_parm below for actions */ }
-#line 3058 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 246: /* miscellaneous_command: T_Driftfile drift_parm */
+#line 1316 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { /* see drift_parm below for actions */ }
+#line 3337 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 240:
-#line 1274 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 3064 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 247: /* miscellaneous_command: T_Logconfig log_config_list */
+#line 1318 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
+#line 3343 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 241:
-#line 1276 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 3070 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 248: /* miscellaneous_command: T_Phone string_list */
+#line 1320 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
+#line 3349 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 242:
-#line 1278 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.pollskewlist, (yyvsp[0].Attr_val_fifo)); }
-#line 3076 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 249: /* miscellaneous_command: T_PollSkewList pollskew_list */
+#line 1322 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.pollskewlist, (yyvsp[0].Attr_val_fifo)); }
+#line 3355 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 243:
-#line 1280 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 3082 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 250: /* miscellaneous_command: T_Setvar variable_assign */
+#line 1324 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
+#line 3361 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 244:
-#line 1282 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 251: /* miscellaneous_command: T_Trap ip_address trap_option_list */
+#line 1326 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.trap, aon);
}
-#line 3093 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3372 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 245:
-#line 1289 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 3099 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 252: /* miscellaneous_command: T_Ttl integer_list */
+#line 1333 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
+#line 3378 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 250:
-#line 1304 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 257: /* misc_cmd_int_keyword: T_Leapsmearinterval */
+#line 1348 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
#ifndef LEAP_SMEAR
yyerror("Built without LEAP_SMEAR support.");
#endif
}
-#line 3109 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3388 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 251:
-#line 1313 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = FALSE; }
-#line 3115 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 258: /* opt_hash_check: T_Ignorehash */
+#line 1357 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = FALSE; }
+#line 3394 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 252:
-#line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = TRUE; }
-#line 3121 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 259: /* opt_hash_check: T_Checkhash */
+#line 1359 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = TRUE; }
+#line 3400 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 253:
-#line 1317 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = TRUE; }
-#line 3127 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 260: /* opt_hash_check: %empty */
+#line 1361 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = TRUE; }
+#line 3406 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 258:
-#line 1332 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 265: /* drift_parm: T_String */
+#line 1376 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (lex_from_file()) {
attr_val *av;
av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
@@ -3138,12 +3417,12 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3142 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3421 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 259:
-#line 1343 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 266: /* drift_parm: T_String T_Double */
+#line 1387 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (lex_from_file()) {
attr_val *av;
av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
@@ -3159,12 +3438,12 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3163 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3442 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 260:
-#line 1360 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 267: /* drift_parm: %empty */
+#line 1404 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if (lex_from_file()) {
attr_val *av;
av = create_attr_sval(T_Driftfile, estrdup(""));
@@ -3173,24 +3452,24 @@ yyreduce:
yyerror("driftfile remote configuration ignored");
}
}
-#line 3177 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3456 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 261:
-#line 1373 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val_fifo) = NULL; }
-#line 3183 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 268: /* pollskew_list: %empty */
+#line 1417 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 3462 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 262:
-#line 1375 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val_fifo) = append_gen_fifo((yyvsp[-1].Attr_val_fifo), (yyvsp[0].Attr_val)); }
-#line 3189 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 269: /* pollskew_list: pollskew_list pollskew_spec */
+#line 1419 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val_fifo) = append_gen_fifo((yyvsp[-1].Attr_val_fifo), (yyvsp[0].Attr_val)); }
+#line 3468 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 263:
-#line 1380 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 270: /* pollskew_spec: pollskew_cycle T_Integer '|' T_Integer */
+#line 1424 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if ((yyvsp[-2].Integer) < 0 || (yyvsp[0].Integer) < 0) {
/* bad numbers */
yyerror("pollskewlist: skew values must be >=0");
@@ -3212,84 +3491,84 @@ yyreduce:
}
(yyval.Attr_val) = (yyvsp[-3].Attr_val);
}
-#line 3216 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3495 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 264:
-#line 1405 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = ((yyvsp[0].Integer) >= 3 && (yyvsp[0].Integer) <= 17) ? create_attr_rval((yyvsp[0].Integer), 0, 0) : NULL; }
-#line 3222 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 271: /* pollskew_cycle: T_Integer */
+#line 1449 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = ((yyvsp[0].Integer) >= 3 && (yyvsp[0].Integer) <= 17) ? create_attr_rval((yyvsp[0].Integer), 0, 0) : NULL; }
+#line 3501 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 265:
-#line 1406 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_rval(-1, 0, 0); }
-#line 3228 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 272: /* pollskew_cycle: T_Default */
+#line 1450 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_rval(-1, 0, 0); }
+#line 3507 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 266:
-#line 1412 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 3234 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 273: /* variable_assign: T_String '=' T_String t_default_or_zero */
+#line 1456 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
+#line 3513 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 268:
-#line 1418 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = 0; }
-#line 3240 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 275: /* t_default_or_zero: %empty */
+#line 1462 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = 0; }
+#line 3519 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 269:
-#line 1423 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val_fifo) = NULL; }
-#line 3246 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 276: /* trap_option_list: %empty */
+#line 1467 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 3525 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 270:
-#line 1425 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 277: /* trap_option_list: trap_option_list trap_option */
+#line 1469 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3255 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3534 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 271:
-#line 1433 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 3261 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 278: /* trap_option: T_Port T_Integer */
+#line 1477 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 3540 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 272:
-#line 1435 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 279: /* trap_option: T_Interface ip_address */
+#line 1479 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
destroy_address_node((yyvsp[0].Address_node));
}
-#line 3270 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3549 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 273:
-#line 1443 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 280: /* log_config_list: log_config_list log_config_command */
+#line 1487 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3279 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3558 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 274:
-#line 1448 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 281: /* log_config_list: log_config_command */
+#line 1492 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3288 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3567 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 275:
-#line 1456 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 282: /* log_config_command: T_String */
+#line 1500 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
char prefix;
char * type;
@@ -3310,142 +3589,142 @@ yyreduce:
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
YYFREE((yyvsp[0].String));
}
-#line 3314 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3593 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 276:
-#line 1481 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 283: /* interface_command: interface_nic nic_rule_action nic_rule_class */
+#line 1525 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
nic_rule_node *nrn;
nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3604 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 277:
-#line 1488 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 284: /* interface_command: interface_nic nic_rule_action T_String */
+#line 1532 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
nic_rule_node *nrn;
nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3615 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 287:
-#line 1516 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 294: /* reset_command: T_Reset counter_set_list */
+#line 1560 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
+#line 3621 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 288:
-#line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 295: /* counter_set_list: counter_set_list counter_set_keyword */
+#line 1565 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3351 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3630 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 289:
-#line 1526 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 296: /* counter_set_list: counter_set_keyword */
+#line 1570 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3360 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3639 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 297:
-#line 1550 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 304: /* integer_list: integer_list T_Integer */
+#line 1594 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3369 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3648 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 298:
-#line 1555 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 305: /* integer_list: T_Integer */
+#line 1599 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3378 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 299:
-#line 1563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 306: /* integer_list_range: integer_list_range integer_list_range_elt */
+#line 1607 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3387 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3666 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 300:
-#line 1568 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 307: /* integer_list_range: integer_list_range_elt */
+#line 1612 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3396 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3675 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 301:
-#line 1576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3402 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 308: /* integer_list_range_elt: T_Integer */
+#line 1620 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
+#line 3681 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 303:
-#line 1582 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_rval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3408 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 310: /* integer_range: '(' T_Integer T_Ellipsis T_Integer ')' */
+#line 1626 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_rval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
+#line 3687 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 304:
-#line 1587 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 311: /* string_list: string_list T_String */
+#line 1631 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.String_fifo) = (yyvsp[-1].String_fifo);
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3417 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3696 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 305:
-#line 1592 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 312: /* string_list: T_String */
+#line 1636 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3426 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3705 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 306:
-#line 1600 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 313: /* address_list: address_list address */
+#line 1644 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3435 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3714 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 307:
-#line 1605 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 314: /* address_list: address */
+#line 1649 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3444 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3723 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 308:
-#line 1613 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 315: /* boolean: T_Integer */
+#line 1657 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
yyerror("Integer value is not boolean (0 or 1). Assuming 1");
(yyval.Integer) = 1;
@@ -3453,36 +3732,36 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3457 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3736 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 309:
-#line 1621 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = 1; }
-#line 3463 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 316: /* boolean: T_True */
+#line 1665 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = 1; }
+#line 3742 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 310:
-#line 1622 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = 0; }
-#line 3469 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 317: /* boolean: T_False */
+#line 1666 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = 0; }
+#line 3748 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 311:
-#line 1626 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3475 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 318: /* number: T_Integer */
+#line 1670 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Double) = (double)(yyvsp[0].Integer); }
+#line 3754 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 313:
-#line 1632 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
-#line 3481 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 320: /* basedate: T_Basedate T_String */
+#line 1676 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
+#line 3760 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 314:
-#line 1640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 321: /* simulate_command: sim_conf_start '{' sim_init_statement_list sim_server_list '}' */
+#line 1684 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
sim_node *sn;
sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
@@ -3491,125 +3770,126 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3495 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3774 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 315:
-#line 1657 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { old_config_style = 0; }
-#line 3501 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 322: /* sim_conf_start: T_Simulate */
+#line 1701 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { old_config_style = 0; }
+#line 3780 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 316:
-#line 1662 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 323: /* sim_init_statement_list: sim_init_statement_list sim_init_statement T_EOC */
+#line 1706 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3510 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3789 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 317:
-#line 1667 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 324: /* sim_init_statement_list: sim_init_statement T_EOC */
+#line 1711 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3519 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3798 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 318:
-#line 1675 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3525 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 325: /* sim_init_statement: sim_init_keyword '=' number */
+#line 1719 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
+#line 3804 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 321:
-#line 1685 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 328: /* sim_server_list: sim_server_list sim_server */
+#line 1729 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3534 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3813 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 322:
-#line 1690 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 329: /* sim_server_list: sim_server */
+#line 1734 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3543 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3822 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 323:
-#line 1698 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
-#line 3549 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 330: /* sim_server: sim_server_name '{' sim_server_offset sim_act_list '}' */
+#line 1742 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
+#line 3828 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 324:
-#line 1703 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Double) = (yyvsp[-1].Double); }
-#line 3555 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 331: /* sim_server_offset: T_Server_Offset '=' number T_EOC */
+#line 1747 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Double) = (yyvsp[-1].Double); }
+#line 3834 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 325:
-#line 1708 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3561 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 332: /* sim_server_name: T_Server '=' address */
+#line 1752 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Address_node) = (yyvsp[0].Address_node); }
+#line 3840 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 326:
-#line 1713 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 333: /* sim_act_list: sim_act_list sim_act */
+#line 1757 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3570 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3849 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 327:
-#line 1718 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 334: /* sim_act_list: sim_act */
+#line 1762 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3579 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3858 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 328:
-#line 1726 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3585 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 335: /* sim_act: T_Duration '=' number '{' sim_act_stmt_list '}' */
+#line 1770 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
+#line 3864 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 329:
-#line 1731 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 336: /* sim_act_stmt_list: sim_act_stmt_list sim_act_stmt T_EOC */
+#line 1775 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3594 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3873 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 330:
-#line 1736 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- {
+ case 337: /* sim_act_stmt_list: sim_act_stmt T_EOC */
+#line 1780 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ {
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3603 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3882 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
- case 331:
-#line 1744 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3609 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 338: /* sim_act_stmt: sim_act_keyword '=' number */
+#line 1788 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
+#line 3888 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
break;
-#line 3613 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3892 "../../../src/ntp-stable-3758/ntpd/ntp_parser.c"
+
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3623,25 +3903,23 @@ yyreduce:
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
/* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
goto yynewstate;
@@ -3652,50 +3930,14 @@ yyreduce:
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
-#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
}
-
-
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
@@ -3724,12 +3966,10 @@ yyerrlab:
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
@@ -3746,13 +3986,14 @@ yyerrorlab:
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
+ /* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
{
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ yyn += YYSYMBOL_YYerror;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
{
yyn = yytable[yyn];
if (0 < yyn)
@@ -3766,7 +4007,7 @@ yyerrlab1:
yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
+ YY_ACCESSING_SYMBOL (yystate), yyvsp);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -3778,7 +4019,7 @@ yyerrlab1:
/* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
@@ -3791,6 +4032,7 @@ yyacceptlab:
yyresult = 0;
goto yyreturn;
+
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
@@ -3798,16 +4040,21 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined yyoverflow || YYERROR_VERBOSE
+
+#if !defined yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (YY_("memory exhausted"));
yyresult = 2;
- /* Fall through. */
+ goto yyreturn;
#endif
+
+/*-------------------------------------------------------.
+| yyreturn -- parsing is finished, clean up and return. |
+`-------------------------------------------------------*/
yyreturn:
if (yychar != YYEMPTY)
{
@@ -3824,20 +4071,18 @@ yyreturn:
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
+
return yyresult;
}
-#line 1755 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
+
+#line 1799 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
void
@@ -3856,7 +4101,7 @@ yyerror(
if (!lex_from_file()) {
/* Save the error message in the correct buffer */
retval = snprintf(remote_config.err_msg + remote_config.err_pos,
- MAXLINE - remote_config.err_pos,
+ sizeof remote_config.err_msg - remote_config.err_pos,
"column %d %s",
ip_ctx->errpos.ncol, msg);
diff --git a/contrib/ntp/ntpd/ntp_parser.h b/contrib/ntp/ntpd/ntp_parser.h
index d232a89a1ba4..426b4b9666ba 100644
--- a/contrib/ntp/ntpd/ntp_parser.h
+++ b/contrib/ntp/ntpd/ntp_parser.h
@@ -1,8 +1,9 @@
-/* A Bison parser, made by GNU Bison 3.0.4. */
+/* A Bison parser, made by GNU Bison 3.7.6. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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
@@ -15,7 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -30,8 +31,12 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_YY__NTPD_NTP_PARSER_H_INCLUDED
-# define YY_YY__NTPD_NTP_PARSER_H_INCLUDED
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+#ifndef YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
+# define YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -40,223 +45,235 @@
extern int yydebug;
#endif
-/* Token type. */
+/* Token kinds. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
- T_Abbrev = 258,
- T_Age = 259,
- T_All = 260,
- T_Allan = 261,
- T_Allpeers = 262,
- T_Auth = 263,
- T_Autokey = 264,
- T_Automax = 265,
- T_Average = 266,
- T_Basedate = 267,
- T_Bclient = 268,
- T_Bcpollbstep = 269,
- T_Beacon = 270,
- T_Broadcast = 271,
- T_Broadcastclient = 272,
- T_Broadcastdelay = 273,
- T_Burst = 274,
- T_Calibrate = 275,
- T_Ceiling = 276,
- T_Checkhash = 277,
- T_Clockstats = 278,
- T_Cohort = 279,
- T_ControlKey = 280,
- T_Crypto = 281,
- T_Cryptostats = 282,
- T_Ctl = 283,
- T_Day = 284,
- T_Default = 285,
- T_Digest = 286,
- T_Disable = 287,
- T_Discard = 288,
- T_Dispersion = 289,
- T_Double = 290,
- T_Driftfile = 291,
- T_Drop = 292,
- T_Dscp = 293,
- T_Ellipsis = 294,
- T_Enable = 295,
- T_End = 296,
- T_Epeer = 297,
- T_False = 298,
- T_File = 299,
- T_Filegen = 300,
- T_Filenum = 301,
- T_Flag1 = 302,
- T_Flag2 = 303,
- T_Flag3 = 304,
- T_Flag4 = 305,
- T_Flake = 306,
- T_Floor = 307,
- T_Freq = 308,
- T_Fudge = 309,
- T_Fuzz = 310,
- T_Host = 311,
- T_Huffpuff = 312,
- T_Iburst = 313,
- T_Ident = 314,
- T_Ignore = 315,
- T_Ignorehash = 316,
- T_Incalloc = 317,
- T_Incmem = 318,
- T_Initalloc = 319,
- T_Initmem = 320,
- T_Includefile = 321,
- T_Integer = 322,
- T_Interface = 323,
- T_Intrange = 324,
- T_Io = 325,
- T_Ippeerlimit = 326,
- T_Ipv4 = 327,
- T_Ipv4_flag = 328,
- T_Ipv6 = 329,
- T_Ipv6_flag = 330,
- T_Kernel = 331,
- T_Key = 332,
- T_Keys = 333,
- T_Keysdir = 334,
- T_Kod = 335,
- T_Leapfile = 336,
- T_Leapsmearinterval = 337,
- T_Limited = 338,
- T_Link = 339,
- T_Listen = 340,
- T_Logconfig = 341,
- T_Logfile = 342,
- T_Loopstats = 343,
- T_Lowpriotrap = 344,
- T_Manycastclient = 345,
- T_Manycastserver = 346,
- T_Mask = 347,
- T_Maxage = 348,
- T_Maxclock = 349,
- T_Maxdepth = 350,
- T_Maxdist = 351,
- T_Maxmem = 352,
- T_Maxpoll = 353,
- T_Mdnstries = 354,
- T_Mem = 355,
- T_Memlock = 356,
- T_Minclock = 357,
- T_Mindepth = 358,
- T_Mindist = 359,
- T_Minimum = 360,
- T_Minjitter = 361,
- T_Minpoll = 362,
- T_Minsane = 363,
- T_Mode = 364,
- T_Mode7 = 365,
- T_Monitor = 366,
- T_Month = 367,
- T_Mru = 368,
- T_Mssntp = 369,
- T_Multicastclient = 370,
- T_Nic = 371,
- T_Nolink = 372,
- T_Nomodify = 373,
- T_Nomrulist = 374,
- T_None = 375,
- T_Nonvolatile = 376,
- T_Noepeer = 377,
- T_Nopeer = 378,
- T_Noquery = 379,
- T_Noselect = 380,
- T_Noserve = 381,
- T_Notrap = 382,
- T_Notrust = 383,
- T_Ntp = 384,
- T_Ntpport = 385,
- T_NtpSignDsocket = 386,
- T_Orphan = 387,
- T_Orphanwait = 388,
- T_PCEdigest = 389,
- T_Panic = 390,
- T_Peer = 391,
- T_Peerstats = 392,
- T_Phone = 393,
- T_Pid = 394,
- T_Pidfile = 395,
- T_Poll = 396,
- T_PollSkewList = 397,
- T_Pool = 398,
- T_Port = 399,
- T_Preempt = 400,
- T_Prefer = 401,
- T_Protostats = 402,
- T_Pw = 403,
- T_Randfile = 404,
- T_Rawstats = 405,
- T_Refid = 406,
- T_Requestkey = 407,
- T_Reset = 408,
- T_Restrict = 409,
- T_Revoke = 410,
- T_Rlimit = 411,
- T_Saveconfigdir = 412,
- T_Server = 413,
- T_Serverresponse = 414,
- T_ServerresponseFuzz = 415,
- T_Setvar = 416,
- T_Source = 417,
- T_Stacksize = 418,
- T_Statistics = 419,
- T_Stats = 420,
- T_Statsdir = 421,
- T_Step = 422,
- T_Stepback = 423,
- T_Stepfwd = 424,
- T_Stepout = 425,
- T_Stratum = 426,
- T_String = 427,
- T_Sys = 428,
- T_Sysstats = 429,
- T_Tick = 430,
- T_Time1 = 431,
- T_Time2 = 432,
- T_Timer = 433,
- T_Timingstats = 434,
- T_Tinker = 435,
- T_Tos = 436,
- T_Trap = 437,
- T_True = 438,
- T_Trustedkey = 439,
- T_Ttl = 440,
- T_Type = 441,
- T_U_int = 442,
- T_UEcrypto = 443,
- T_UEcryptonak = 444,
- T_UEdigest = 445,
- T_Unconfig = 446,
- T_Unpeer = 447,
- T_Version = 448,
- T_WanderThreshold = 449,
- T_Week = 450,
- T_Wildcard = 451,
- T_Xleave = 452,
- T_Xmtnonce = 453,
- T_Year = 454,
- T_Flag = 455,
- T_EOC = 456,
- T_Simulate = 457,
- T_Beep_Delay = 458,
- T_Sim_Duration = 459,
- T_Server_Offset = 460,
- T_Duration = 461,
- T_Freq_Offset = 462,
- T_Wander = 463,
- T_Jitter = 464,
- T_Prop_Delay = 465,
- T_Proc_Delay = 466
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ T_Abbrev = 258, /* T_Abbrev */
+ T_Age = 259, /* T_Age */
+ T_All = 260, /* T_All */
+ T_Allan = 261, /* T_Allan */
+ T_Allpeers = 262, /* T_Allpeers */
+ T_Auth = 263, /* T_Auth */
+ T_Autokey = 264, /* T_Autokey */
+ T_Automax = 265, /* T_Automax */
+ T_Average = 266, /* T_Average */
+ T_Basedate = 267, /* T_Basedate */
+ T_Bclient = 268, /* T_Bclient */
+ T_Bcpollbstep = 269, /* T_Bcpollbstep */
+ T_Beacon = 270, /* T_Beacon */
+ T_Broadcast = 271, /* T_Broadcast */
+ T_Broadcastclient = 272, /* T_Broadcastclient */
+ T_Broadcastdelay = 273, /* T_Broadcastdelay */
+ T_Burst = 274, /* T_Burst */
+ T_Calibrate = 275, /* T_Calibrate */
+ T_Ceiling = 276, /* T_Ceiling */
+ T_Checkhash = 277, /* T_Checkhash */
+ T_Clockstats = 278, /* T_Clockstats */
+ T_Cohort = 279, /* T_Cohort */
+ T_ControlKey = 280, /* T_ControlKey */
+ T_Crypto = 281, /* T_Crypto */
+ T_Cryptostats = 282, /* T_Cryptostats */
+ T_Ctl = 283, /* T_Ctl */
+ T_Day = 284, /* T_Day */
+ T_Default = 285, /* T_Default */
+ T_Device = 286, /* T_Device */
+ T_Digest = 287, /* T_Digest */
+ T_Disable = 288, /* T_Disable */
+ T_Discard = 289, /* T_Discard */
+ T_Dispersion = 290, /* T_Dispersion */
+ T_Double = 291, /* T_Double */
+ T_Driftfile = 292, /* T_Driftfile */
+ T_Drop = 293, /* T_Drop */
+ T_Dscp = 294, /* T_Dscp */
+ T_Ellipsis = 295, /* T_Ellipsis */
+ T_Enable = 296, /* T_Enable */
+ T_End = 297, /* T_End */
+ T_Epeer = 298, /* T_Epeer */
+ T_False = 299, /* T_False */
+ T_File = 300, /* T_File */
+ T_Filegen = 301, /* T_Filegen */
+ T_Filenum = 302, /* T_Filenum */
+ T_Flag1 = 303, /* T_Flag1 */
+ T_Flag2 = 304, /* T_Flag2 */
+ T_Flag3 = 305, /* T_Flag3 */
+ T_Flag4 = 306, /* T_Flag4 */
+ T_Flake = 307, /* T_Flake */
+ T_Floor = 308, /* T_Floor */
+ T_Freq = 309, /* T_Freq */
+ T_Fudge = 310, /* T_Fudge */
+ T_Fuzz = 311, /* T_Fuzz */
+ T_Host = 312, /* T_Host */
+ T_Huffpuff = 313, /* T_Huffpuff */
+ T_Iburst = 314, /* T_Iburst */
+ T_Ident = 315, /* T_Ident */
+ T_Ignore = 316, /* T_Ignore */
+ T_Ignorehash = 317, /* T_Ignorehash */
+ T_Incalloc = 318, /* T_Incalloc */
+ T_Incmem = 319, /* T_Incmem */
+ T_Initalloc = 320, /* T_Initalloc */
+ T_Initmem = 321, /* T_Initmem */
+ T_Includefile = 322, /* T_Includefile */
+ T_Integer = 323, /* T_Integer */
+ T_Interface = 324, /* T_Interface */
+ T_Intrange = 325, /* T_Intrange */
+ T_Io = 326, /* T_Io */
+ T_Ippeerlimit = 327, /* T_Ippeerlimit */
+ T_Ipv4 = 328, /* T_Ipv4 */
+ T_Ipv4_flag = 329, /* T_Ipv4_flag */
+ T_Ipv6 = 330, /* T_Ipv6 */
+ T_Ipv6_flag = 331, /* T_Ipv6_flag */
+ T_Kernel = 332, /* T_Kernel */
+ T_Key = 333, /* T_Key */
+ T_Keys = 334, /* T_Keys */
+ T_Keysdir = 335, /* T_Keysdir */
+ T_Kod = 336, /* T_Kod */
+ T_Leapfile = 337, /* T_Leapfile */
+ T_Leapsmearinterval = 338, /* T_Leapsmearinterval */
+ T_Limited = 339, /* T_Limited */
+ T_Link = 340, /* T_Link */
+ T_Listen = 341, /* T_Listen */
+ T_Logconfig = 342, /* T_Logconfig */
+ T_Logfile = 343, /* T_Logfile */
+ T_Loopstats = 344, /* T_Loopstats */
+ T_Lowpriotrap = 345, /* T_Lowpriotrap */
+ T_Manycastclient = 346, /* T_Manycastclient */
+ T_Manycastserver = 347, /* T_Manycastserver */
+ T_Mask = 348, /* T_Mask */
+ T_Maxage = 349, /* T_Maxage */
+ T_Maxclock = 350, /* T_Maxclock */
+ T_Maxdepth = 351, /* T_Maxdepth */
+ T_Maxdist = 352, /* T_Maxdist */
+ T_Maxmem = 353, /* T_Maxmem */
+ T_Maxpoll = 354, /* T_Maxpoll */
+ T_Mdnstries = 355, /* T_Mdnstries */
+ T_Mem = 356, /* T_Mem */
+ T_Memlock = 357, /* T_Memlock */
+ T_Minclock = 358, /* T_Minclock */
+ T_Mindepth = 359, /* T_Mindepth */
+ T_Mindist = 360, /* T_Mindist */
+ T_Minimum = 361, /* T_Minimum */
+ T_Minjitter = 362, /* T_Minjitter */
+ T_Minpoll = 363, /* T_Minpoll */
+ T_Minsane = 364, /* T_Minsane */
+ T_Mode = 365, /* T_Mode */
+ T_Mode7 = 366, /* T_Mode7 */
+ T_Monitor = 367, /* T_Monitor */
+ T_Month = 368, /* T_Month */
+ T_Mru = 369, /* T_Mru */
+ T_Mssntp = 370, /* T_Mssntp */
+ T_Multicastclient = 371, /* T_Multicastclient */
+ T_Nic = 372, /* T_Nic */
+ T_Nolink = 373, /* T_Nolink */
+ T_Nomodify = 374, /* T_Nomodify */
+ T_Nomrulist = 375, /* T_Nomrulist */
+ T_None = 376, /* T_None */
+ T_Nonvolatile = 377, /* T_Nonvolatile */
+ T_Noepeer = 378, /* T_Noepeer */
+ T_Nopeer = 379, /* T_Nopeer */
+ T_Noquery = 380, /* T_Noquery */
+ T_Noselect = 381, /* T_Noselect */
+ T_Noserve = 382, /* T_Noserve */
+ T_Notrap = 383, /* T_Notrap */
+ T_Notrust = 384, /* T_Notrust */
+ T_Ntp = 385, /* T_Ntp */
+ T_Ntpport = 386, /* T_Ntpport */
+ T_NtpSignDsocket = 387, /* T_NtpSignDsocket */
+ T_Orphan = 388, /* T_Orphan */
+ T_Orphanwait = 389, /* T_Orphanwait */
+ T_PCEdigest = 390, /* T_PCEdigest */
+ T_Panic = 391, /* T_Panic */
+ T_Peer = 392, /* T_Peer */
+ T_Peerstats = 393, /* T_Peerstats */
+ T_Phone = 394, /* T_Phone */
+ T_Pid = 395, /* T_Pid */
+ T_Pidfile = 396, /* T_Pidfile */
+ T_Poll = 397, /* T_Poll */
+ T_PollSkewList = 398, /* T_PollSkewList */
+ T_Pool = 399, /* T_Pool */
+ T_Port = 400, /* T_Port */
+ T_PpsData = 401, /* T_PpsData */
+ T_Preempt = 402, /* T_Preempt */
+ T_Prefer = 403, /* T_Prefer */
+ T_Protostats = 404, /* T_Protostats */
+ T_Pw = 405, /* T_Pw */
+ T_Randfile = 406, /* T_Randfile */
+ T_Rawstats = 407, /* T_Rawstats */
+ T_Refid = 408, /* T_Refid */
+ T_Requestkey = 409, /* T_Requestkey */
+ T_Reset = 410, /* T_Reset */
+ T_Restrict = 411, /* T_Restrict */
+ T_Revoke = 412, /* T_Revoke */
+ T_Rlimit = 413, /* T_Rlimit */
+ T_Saveconfigdir = 414, /* T_Saveconfigdir */
+ T_Server = 415, /* T_Server */
+ T_Serverresponse = 416, /* T_Serverresponse */
+ T_ServerresponseFuzz = 417, /* T_ServerresponseFuzz */
+ T_Setvar = 418, /* T_Setvar */
+ T_Source = 419, /* T_Source */
+ T_Stacksize = 420, /* T_Stacksize */
+ T_Statistics = 421, /* T_Statistics */
+ T_Stats = 422, /* T_Stats */
+ T_Statsdir = 423, /* T_Statsdir */
+ T_Step = 424, /* T_Step */
+ T_Stepback = 425, /* T_Stepback */
+ T_Stepfwd = 426, /* T_Stepfwd */
+ T_Stepout = 427, /* T_Stepout */
+ T_Stratum = 428, /* T_Stratum */
+ T_String = 429, /* T_String */
+ T_Sys = 430, /* T_Sys */
+ T_Sysstats = 431, /* T_Sysstats */
+ T_Tick = 432, /* T_Tick */
+ T_Time1 = 433, /* T_Time1 */
+ T_Time2 = 434, /* T_Time2 */
+ T_TimeData = 435, /* T_TimeData */
+ T_Timer = 436, /* T_Timer */
+ T_Timingstats = 437, /* T_Timingstats */
+ T_Tinker = 438, /* T_Tinker */
+ T_Tos = 439, /* T_Tos */
+ T_Trap = 440, /* T_Trap */
+ T_True = 441, /* T_True */
+ T_Trustedkey = 442, /* T_Trustedkey */
+ T_Ttl = 443, /* T_Ttl */
+ T_Type = 444, /* T_Type */
+ T_U_int = 445, /* T_U_int */
+ T_UEcrypto = 446, /* T_UEcrypto */
+ T_UEcryptonak = 447, /* T_UEcryptonak */
+ T_UEdigest = 448, /* T_UEdigest */
+ T_Unconfig = 449, /* T_Unconfig */
+ T_Unpeer = 450, /* T_Unpeer */
+ T_Version = 451, /* T_Version */
+ T_WanderThreshold = 452, /* T_WanderThreshold */
+ T_Week = 453, /* T_Week */
+ T_Wildcard = 454, /* T_Wildcard */
+ T_Xleave = 455, /* T_Xleave */
+ T_Xmtnonce = 456, /* T_Xmtnonce */
+ T_Year = 457, /* T_Year */
+ T_Flag = 458, /* T_Flag */
+ T_EOC = 459, /* T_EOC */
+ T_Simulate = 460, /* T_Simulate */
+ T_Beep_Delay = 461, /* T_Beep_Delay */
+ T_Sim_Duration = 462, /* T_Sim_Duration */
+ T_Server_Offset = 463, /* T_Server_Offset */
+ T_Duration = 464, /* T_Duration */
+ T_Freq_Offset = 465, /* T_Freq_Offset */
+ T_Wander = 466, /* T_Wander */
+ T_Jitter = 467, /* T_Jitter */
+ T_Prop_Delay = 468, /* T_Prop_Delay */
+ T_Proc_Delay = 469 /* T_Proc_Delay */
};
+ typedef enum yytokentype yytoken_kind_t;
#endif
-/* Tokens. */
+/* Token kinds. */
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYerror 256
+#define YYUNDEF 257
#define T_Abbrev 258
#define T_Age 259
#define T_All 260
@@ -285,194 +302,196 @@ extern int yydebug;
#define T_Ctl 283
#define T_Day 284
#define T_Default 285
-#define T_Digest 286
-#define T_Disable 287
-#define T_Discard 288
-#define T_Dispersion 289
-#define T_Double 290
-#define T_Driftfile 291
-#define T_Drop 292
-#define T_Dscp 293
-#define T_Ellipsis 294
-#define T_Enable 295
-#define T_End 296
-#define T_Epeer 297
-#define T_False 298
-#define T_File 299
-#define T_Filegen 300
-#define T_Filenum 301
-#define T_Flag1 302
-#define T_Flag2 303
-#define T_Flag3 304
-#define T_Flag4 305
-#define T_Flake 306
-#define T_Floor 307
-#define T_Freq 308
-#define T_Fudge 309
-#define T_Fuzz 310
-#define T_Host 311
-#define T_Huffpuff 312
-#define T_Iburst 313
-#define T_Ident 314
-#define T_Ignore 315
-#define T_Ignorehash 316
-#define T_Incalloc 317
-#define T_Incmem 318
-#define T_Initalloc 319
-#define T_Initmem 320
-#define T_Includefile 321
-#define T_Integer 322
-#define T_Interface 323
-#define T_Intrange 324
-#define T_Io 325
-#define T_Ippeerlimit 326
-#define T_Ipv4 327
-#define T_Ipv4_flag 328
-#define T_Ipv6 329
-#define T_Ipv6_flag 330
-#define T_Kernel 331
-#define T_Key 332
-#define T_Keys 333
-#define T_Keysdir 334
-#define T_Kod 335
-#define T_Leapfile 336
-#define T_Leapsmearinterval 337
-#define T_Limited 338
-#define T_Link 339
-#define T_Listen 340
-#define T_Logconfig 341
-#define T_Logfile 342
-#define T_Loopstats 343
-#define T_Lowpriotrap 344
-#define T_Manycastclient 345
-#define T_Manycastserver 346
-#define T_Mask 347
-#define T_Maxage 348
-#define T_Maxclock 349
-#define T_Maxdepth 350
-#define T_Maxdist 351
-#define T_Maxmem 352
-#define T_Maxpoll 353
-#define T_Mdnstries 354
-#define T_Mem 355
-#define T_Memlock 356
-#define T_Minclock 357
-#define T_Mindepth 358
-#define T_Mindist 359
-#define T_Minimum 360
-#define T_Minjitter 361
-#define T_Minpoll 362
-#define T_Minsane 363
-#define T_Mode 364
-#define T_Mode7 365
-#define T_Monitor 366
-#define T_Month 367
-#define T_Mru 368
-#define T_Mssntp 369
-#define T_Multicastclient 370
-#define T_Nic 371
-#define T_Nolink 372
-#define T_Nomodify 373
-#define T_Nomrulist 374
-#define T_None 375
-#define T_Nonvolatile 376
-#define T_Noepeer 377
-#define T_Nopeer 378
-#define T_Noquery 379
-#define T_Noselect 380
-#define T_Noserve 381
-#define T_Notrap 382
-#define T_Notrust 383
-#define T_Ntp 384
-#define T_Ntpport 385
-#define T_NtpSignDsocket 386
-#define T_Orphan 387
-#define T_Orphanwait 388
-#define T_PCEdigest 389
-#define T_Panic 390
-#define T_Peer 391
-#define T_Peerstats 392
-#define T_Phone 393
-#define T_Pid 394
-#define T_Pidfile 395
-#define T_Poll 396
-#define T_PollSkewList 397
-#define T_Pool 398
-#define T_Port 399
-#define T_Preempt 400
-#define T_Prefer 401
-#define T_Protostats 402
-#define T_Pw 403
-#define T_Randfile 404
-#define T_Rawstats 405
-#define T_Refid 406
-#define T_Requestkey 407
-#define T_Reset 408
-#define T_Restrict 409
-#define T_Revoke 410
-#define T_Rlimit 411
-#define T_Saveconfigdir 412
-#define T_Server 413
-#define T_Serverresponse 414
-#define T_ServerresponseFuzz 415
-#define T_Setvar 416
-#define T_Source 417
-#define T_Stacksize 418
-#define T_Statistics 419
-#define T_Stats 420
-#define T_Statsdir 421
-#define T_Step 422
-#define T_Stepback 423
-#define T_Stepfwd 424
-#define T_Stepout 425
-#define T_Stratum 426
-#define T_String 427
-#define T_Sys 428
-#define T_Sysstats 429
-#define T_Tick 430
-#define T_Time1 431
-#define T_Time2 432
-#define T_Timer 433
-#define T_Timingstats 434
-#define T_Tinker 435
-#define T_Tos 436
-#define T_Trap 437
-#define T_True 438
-#define T_Trustedkey 439
-#define T_Ttl 440
-#define T_Type 441
-#define T_U_int 442
-#define T_UEcrypto 443
-#define T_UEcryptonak 444
-#define T_UEdigest 445
-#define T_Unconfig 446
-#define T_Unpeer 447
-#define T_Version 448
-#define T_WanderThreshold 449
-#define T_Week 450
-#define T_Wildcard 451
-#define T_Xleave 452
-#define T_Xmtnonce 453
-#define T_Year 454
-#define T_Flag 455
-#define T_EOC 456
-#define T_Simulate 457
-#define T_Beep_Delay 458
-#define T_Sim_Duration 459
-#define T_Server_Offset 460
-#define T_Duration 461
-#define T_Freq_Offset 462
-#define T_Wander 463
-#define T_Jitter 464
-#define T_Prop_Delay 465
-#define T_Proc_Delay 466
+#define T_Device 286
+#define T_Digest 287
+#define T_Disable 288
+#define T_Discard 289
+#define T_Dispersion 290
+#define T_Double 291
+#define T_Driftfile 292
+#define T_Drop 293
+#define T_Dscp 294
+#define T_Ellipsis 295
+#define T_Enable 296
+#define T_End 297
+#define T_Epeer 298
+#define T_False 299
+#define T_File 300
+#define T_Filegen 301
+#define T_Filenum 302
+#define T_Flag1 303
+#define T_Flag2 304
+#define T_Flag3 305
+#define T_Flag4 306
+#define T_Flake 307
+#define T_Floor 308
+#define T_Freq 309
+#define T_Fudge 310
+#define T_Fuzz 311
+#define T_Host 312
+#define T_Huffpuff 313
+#define T_Iburst 314
+#define T_Ident 315
+#define T_Ignore 316
+#define T_Ignorehash 317
+#define T_Incalloc 318
+#define T_Incmem 319
+#define T_Initalloc 320
+#define T_Initmem 321
+#define T_Includefile 322
+#define T_Integer 323
+#define T_Interface 324
+#define T_Intrange 325
+#define T_Io 326
+#define T_Ippeerlimit 327
+#define T_Ipv4 328
+#define T_Ipv4_flag 329
+#define T_Ipv6 330
+#define T_Ipv6_flag 331
+#define T_Kernel 332
+#define T_Key 333
+#define T_Keys 334
+#define T_Keysdir 335
+#define T_Kod 336
+#define T_Leapfile 337
+#define T_Leapsmearinterval 338
+#define T_Limited 339
+#define T_Link 340
+#define T_Listen 341
+#define T_Logconfig 342
+#define T_Logfile 343
+#define T_Loopstats 344
+#define T_Lowpriotrap 345
+#define T_Manycastclient 346
+#define T_Manycastserver 347
+#define T_Mask 348
+#define T_Maxage 349
+#define T_Maxclock 350
+#define T_Maxdepth 351
+#define T_Maxdist 352
+#define T_Maxmem 353
+#define T_Maxpoll 354
+#define T_Mdnstries 355
+#define T_Mem 356
+#define T_Memlock 357
+#define T_Minclock 358
+#define T_Mindepth 359
+#define T_Mindist 360
+#define T_Minimum 361
+#define T_Minjitter 362
+#define T_Minpoll 363
+#define T_Minsane 364
+#define T_Mode 365
+#define T_Mode7 366
+#define T_Monitor 367
+#define T_Month 368
+#define T_Mru 369
+#define T_Mssntp 370
+#define T_Multicastclient 371
+#define T_Nic 372
+#define T_Nolink 373
+#define T_Nomodify 374
+#define T_Nomrulist 375
+#define T_None 376
+#define T_Nonvolatile 377
+#define T_Noepeer 378
+#define T_Nopeer 379
+#define T_Noquery 380
+#define T_Noselect 381
+#define T_Noserve 382
+#define T_Notrap 383
+#define T_Notrust 384
+#define T_Ntp 385
+#define T_Ntpport 386
+#define T_NtpSignDsocket 387
+#define T_Orphan 388
+#define T_Orphanwait 389
+#define T_PCEdigest 390
+#define T_Panic 391
+#define T_Peer 392
+#define T_Peerstats 393
+#define T_Phone 394
+#define T_Pid 395
+#define T_Pidfile 396
+#define T_Poll 397
+#define T_PollSkewList 398
+#define T_Pool 399
+#define T_Port 400
+#define T_PpsData 401
+#define T_Preempt 402
+#define T_Prefer 403
+#define T_Protostats 404
+#define T_Pw 405
+#define T_Randfile 406
+#define T_Rawstats 407
+#define T_Refid 408
+#define T_Requestkey 409
+#define T_Reset 410
+#define T_Restrict 411
+#define T_Revoke 412
+#define T_Rlimit 413
+#define T_Saveconfigdir 414
+#define T_Server 415
+#define T_Serverresponse 416
+#define T_ServerresponseFuzz 417
+#define T_Setvar 418
+#define T_Source 419
+#define T_Stacksize 420
+#define T_Statistics 421
+#define T_Stats 422
+#define T_Statsdir 423
+#define T_Step 424
+#define T_Stepback 425
+#define T_Stepfwd 426
+#define T_Stepout 427
+#define T_Stratum 428
+#define T_String 429
+#define T_Sys 430
+#define T_Sysstats 431
+#define T_Tick 432
+#define T_Time1 433
+#define T_Time2 434
+#define T_TimeData 435
+#define T_Timer 436
+#define T_Timingstats 437
+#define T_Tinker 438
+#define T_Tos 439
+#define T_Trap 440
+#define T_True 441
+#define T_Trustedkey 442
+#define T_Ttl 443
+#define T_Type 444
+#define T_U_int 445
+#define T_UEcrypto 446
+#define T_UEcryptonak 447
+#define T_UEdigest 448
+#define T_Unconfig 449
+#define T_Unpeer 450
+#define T_Version 451
+#define T_WanderThreshold 452
+#define T_Week 453
+#define T_Wildcard 454
+#define T_Xleave 455
+#define T_Xmtnonce 456
+#define T_Year 457
+#define T_Flag 458
+#define T_EOC 459
+#define T_Simulate 460
+#define T_Beep_Delay 461
+#define T_Sim_Duration 462
+#define T_Server_Offset 463
+#define T_Duration 464
+#define T_Freq_Offset 465
+#define T_Wander 466
+#define T_Jitter 467
+#define T_Prop_Delay 468
+#define T_Proc_Delay 469
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-
union YYSTYPE
{
-#line 52 "../../ntpd/ntp_parser.y" /* yacc.c:1909 */
+#line 52 "../../../src/ntp-stable-3758/ntpd/ntp_parser.y"
char * String;
double Double;
@@ -491,9 +510,9 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 495 "../../ntpd/ntp_parser.h" /* yacc.c:1909 */
-};
+#line 514 "../../../src/ntp-stable-3758/ntpd/ntp_parser.h"
+};
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -504,4 +523,4 @@ extern YYSTYPE yylval;
int yyparse (void);
-#endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED */
+#endif /* !YY_YY__SRC_NTP_STABLE_NTPD_NTP_PARSER_H_INCLUDED */
diff --git a/contrib/ntp/ntpd/ntp_ppsdev.c b/contrib/ntp/ntpd/ntp_ppsdev.c
new file mode 100644
index 000000000000..d2d9727e36a7
--- /dev/null
+++ b/contrib/ntp/ntpd/ntp_ppsdev.c
@@ -0,0 +1,459 @@
+/*
+ * ntp_ppsdev.c - PPS-device support
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * ---------------------------------------------------------------------
+ * Helper code to work around (or with) a Linux 'specialty': PPS devices
+ * are created via attaching the PPS line discipline to a TTY. This
+ * creates new pps devices, and the PPS API is *not* available through
+ * the original TTY fd.
+ *
+ * Findig the PPS device associated with a TTY is possible but needs
+ * quite a bit of file system traversal & lookup in the 'sysfs' tree.
+ *
+ * The code below does the job for kernel versions 4 & 5, and will
+ * probably work for older and newer kernels, too... and in any case, if
+ * the device or symlink to the PPS device with the given name exists,
+ * it will take precedence anyway.
+ * ---------------------------------------------------------------------
+ */
+#ifdef __linux__
+# define _GNU_SOURCE
+#endif
+
+#include "config.h"
+
+#include "ntpd.h"
+
+#ifdef REFCLOCK
+
+#if defined(HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#if defined(HAVE_FCNTL_H)
+# include <fcntl.h>
+#endif
+
+#include <stdlib.h>
+
+/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
+#if defined(__linux__) && defined(HAVE_OPENAT) && defined(HAVE_FDOPENDIR)
+#define WITH_PPSDEV_MATCH
+/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
+
+#include <stdio.h>
+#include <dirent.h>
+#include <string.h>
+#include <errno.h>
+
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+#include <linux/tty.h>
+
+typedef int BOOL;
+#ifndef TRUE
+# define TRUE 1
+#endif
+#ifndef FALSE
+# define FALSE 0
+#endif
+
+static const int OModeF = O_CLOEXEC|O_RDONLY|O_NOCTTY;
+static const int OModeD = O_CLOEXEC|O_RDONLY|O_DIRECTORY;
+
+/* ------------------------------------------------------------------ */
+/* extended directory stream
+ */
+typedef struct {
+ int dfd; /* file descriptor for dir for 'openat()' */
+ DIR *dir; /* directory stream for iteration */
+} XDIR;
+
+static void
+xdirClose(
+ XDIR *pxdir)
+{
+ if (NULL != pxdir->dir)
+ closedir(pxdir->dir); /* closes the internal FD, too! */
+ else if (-1 != pxdir->dfd)
+ close(pxdir->dfd); /* otherwise _we_ have to do it */
+ pxdir->dfd = -1;
+ pxdir->dir = NULL;
+}
+
+static BOOL
+xdirOpenAt(
+ XDIR *pxdir,
+ int fdo ,
+ const char *path )
+{
+ /* Officially, the directory stream owns the file discriptor it
+ * received via 'fdopendir()'. But for the purpose of 'openat()'
+ * it's ok to keep the value around -- even if we should do
+ * _absolutely_nothing_ with it apart from using it as a path
+ * reference!
+ */
+ pxdir->dir = NULL;
+ if (-1 == (pxdir->dfd = openat(fdo, path, OModeD)))
+ goto fail;
+ if (NULL == (pxdir->dir = fdopendir(pxdir->dfd)))
+ goto fail;
+ return TRUE;
+
+ fail:
+ xdirClose(pxdir);
+ return FALSE;
+}
+
+/* --------------------------------------------------------------------
+ * read content of a file (with a size limit) into a piece of allocated
+ * memory and trim any trailing whitespace.
+ *
+ * The issue here is that several files in the 'sysfs' tree claim a size
+ * of 4096 bytes when you 'stat' them -- but reading gives EOF after a
+ * few chars. (I *can* understand why the kernel takes this shortcut.
+ * it's just a bit unwieldy...)
+ */
+static char*
+readFileAt(
+ int rfd ,
+ const char *path)
+{
+ struct stat sb;
+ char *ret = NULL;
+ ssize_t rdlen;
+ int dfd;
+
+ if (-1 == (dfd = openat(rfd, path, OModeF)) || -1 == fstat(dfd, &sb))
+ goto fail;
+ if ((sb.st_size > 0x2000) || (NULL == (ret = malloc(sb.st_size + 1))))
+ goto fail;
+ if (1 > (rdlen = read(dfd, ret, sb.st_size)))
+ goto fail;
+ close(dfd);
+
+ while (rdlen > 0 && ret[rdlen - 1] <= ' ')
+ --rdlen;
+ ret[rdlen] = '\0';
+ return ret;
+
+ fail:
+ free(ret);
+ if (-1 != dfd)
+ close(dfd);
+ return NULL;
+}
+
+/* --------------------------------------------------------------------
+ * Scan the "/dev" directory for a device with a given major and minor
+ * device id. Return the path if found.
+ */
+static char*
+findDevByDevId(
+ dev_t rdev)
+{
+ struct stat sb;
+ struct dirent *dent;
+ XDIR xdir;
+ char *name = NULL;
+
+ if (!xdirOpenAt(&xdir, AT_FDCWD, "/dev"))
+ goto done;
+
+ while (!name && (dent = readdir(xdir.dir))) {
+ if (-1 == fstatat(xdir.dfd, dent->d_name,
+ &sb, AT_SYMLINK_NOFOLLOW))
+ continue;
+ if (!S_ISCHR(sb.st_mode))
+ continue;
+ if (sb.st_rdev == rdev) {
+ if (-1 == asprintf(&name, "/dev/%s", dent->d_name))
+ name = NULL;
+ }
+ }
+ xdirClose(&xdir);
+
+ done:
+ return name;
+}
+
+/* --------------------------------------------------------------------
+ * Get the mofor:minor device id for a character device file descriptor
+ */
+static BOOL
+getCharDevId(
+ int fd ,
+ dev_t *out,
+ struct stat *psb)
+{
+ BOOL rc = FALSE;
+ struct stat sb;
+
+ if (NULL == psb)
+ psb = &sb;
+ if (-1 != fstat(fd, psb)) {
+ rc = S_ISCHR(psb->st_mode);
+ if (rc)
+ *out = psb->st_rdev;
+ else
+ errno = EINVAL;
+ }
+ return rc;
+}
+
+/* --------------------------------------------------------------------
+ * given the dir-fd of a pps instance dir in the linux sysfs tree, get
+ * the device IDs for the PPS device and the associated TTY.
+ */
+static BOOL
+getPpsTuple(
+ int fdDir,
+ dev_t *pTty,
+ dev_t *pPps)
+{
+ BOOL rc = FALSE;
+ unsigned long dmaj, dmin;
+ struct stat sb;
+ char *bufp, *endp, *scan;
+
+ /* 'path' contains the primary path to the associated TTY:
+ * we 'stat()' for the device id in 'st_rdev'.
+ */
+ if (NULL == (bufp = readFileAt(fdDir, "path")))
+ goto done;
+ if ((-1 == stat(bufp, &sb)) || !S_ISCHR(sb.st_mode))
+ goto done;
+ *pTty = sb.st_rdev;
+ free(bufp);
+
+ /* 'dev' holds the device ID of the PPS device as 'major:minor'
+ * in text format. *sigh* couldn't that simply be the name of
+ * the PPS device itself, as in 'path' above??? But nooooo....
+ */
+ if (NULL == (bufp = readFileAt(fdDir, "dev")))
+ goto done;
+ dmaj = strtoul((scan = bufp), &endp, 10);
+ if ((endp == scan) || (*endp != ':') || (dmaj >= 256))
+ goto done;
+ dmin = strtoul((scan = endp + 1), &endp, 10);
+ if ((endp == scan) || (*endp >= ' ') || (dmin >= 256))
+ goto done;
+ *pPps = makedev((unsigned int)dmaj, (unsigned int)dmin);
+ rc = TRUE;
+
+ done:
+ free(bufp);
+ return rc;
+}
+
+/* --------------------------------------------------------------------
+ * for a given (TTY) device id, lookup the corresponding PPS device id
+ * by processing the contents of the kernel sysfs tree.
+ * Returns false if no such PS device can be found; otherwise set the
+ * ouput parameter to the PPS dev id and return true...
+ */
+static BOOL
+findPpsDevId(
+ dev_t ttyId ,
+ dev_t *pPpsId)
+{
+ BOOL found = FALSE;
+ XDIR ClassDir;
+ struct dirent *dent;
+ dev_t othId, ppsId;
+ int fdDevDir;
+
+ if (!xdirOpenAt(&ClassDir, AT_FDCWD, "/sys/class/pps"))
+ goto done;
+
+ while (!found && (dent = readdir(ClassDir.dir))) {
+
+ /* If the entry is not a referring to a PPS device or
+ * if we can't open the directory for reading, skipt it:
+ */
+ if (strncmp("pps", dent->d_name, 3))
+ continue;
+ fdDevDir = openat(ClassDir.dfd, dent->d_name, OModeD);
+ if (-1 == fdDevDir)
+ continue;
+
+ /* get the data and check if device ID for the TTY
+ * is what we're looking for:
+ */
+ found = getPpsTuple(fdDevDir, &othId, &ppsId)
+ && (ttyId == othId);
+ close(fdDevDir);
+ }
+
+ xdirClose(&ClassDir);
+
+ if (found)
+ *pPpsId = ppsId;
+ done:
+ return found;
+}
+
+/* --------------------------------------------------------------------
+ * Return the path to a PPS device related to tghe TT fd given. The
+ * function might even try to instantiate such a PPS device when
+ * running es effective root. Returns NULL if no PPS device can be
+ * established; otherwise it is a 'malloc()'ed area that should be
+ * 'free()'d after use.
+ */
+static char*
+findMatchingPpsDev(
+ int fdtty)
+{
+ struct stat sb;
+ dev_t ttyId, ppsId;
+ int fdpps, ldisc = N_PPS;
+ char *dpath = NULL;
+
+ /* Without the device identifier of the TTY, we're busted: */
+ if (!getCharDevId(fdtty, &ttyId, &sb))
+ goto done;
+
+ /* If we find a matching PPS device ID, return the path to the
+ * device. It might not open, but it's the best we can get.
+ */
+ if (findPpsDevId(ttyId, &ppsId)) {
+ dpath = findDevByDevId(ppsId);
+ goto done;
+ }
+
+# ifdef ENABLE_MAGICPPS
+ /* 'magic' PPS support -- try to instantiate missing PPS devices
+ * on-the-fly. Our mileage may vary -- running as root at that
+ * moment is vital for success. (We *can* create the PPS device
+ * as ordnary user, but we won't be able to open it!)
+ */
+
+ /* If we're root, try to push the PPS LDISC to the tty FD. If
+ * that does not work out, we're busted again:
+ */
+ if ((0 != geteuid()) || (-1 == ioctl(fdtty, TIOCSETD, &ldisc)))
+ goto done;
+ msyslog(LOG_INFO, "auto-instantiated PPS device for device %u:%u",
+ major(ttyId), minor(ttyId));
+
+ /* We really should find a matching PPS device now. And since
+ * we're root (see above!), we should be able to open that device.
+ */
+ if (findPpsDevId(ttyId, &ppsId))
+ dpath = findDevByDevId(ppsId);
+ if (!dpath)
+ goto done;
+
+ /* And since we're 'root', we might as well try to clone the
+ * ownership and access rights from the original TTY to the
+ * PPS device. If that does not work, we just have to live with
+ * what we've got so far...
+ */
+ if (-1 == (fdpps = open(dpath, OModeF))) {
+ msyslog(LOG_ERR, "could not open auto-created '%s': %m", dpath);
+ goto done;
+ }
+ if (-1 == fchmod(fdpps, sb.st_mode)) {
+ msyslog(LOG_ERR, "could not chmod auto-created '%s': %m", dpath);
+ }
+ if (-1 == fchown(fdpps, sb.st_uid, sb.st_gid)) {
+ msyslog(LOG_ERR, "could not chown auto-created '%s': %m", dpath);
+ }
+ close(fdpps);
+# else
+ (void)ldisc;
+# endif
+
+ done:
+ /* Whatever we go so far, that's it. */
+ return dpath;
+}
+
+/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
+#endif /* linux PPS device matcher */
+/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
+
+#include "ntp_clockdev.h"
+
+int
+ppsdev_reopen(
+ const sockaddr_u *srcadr,
+ int ttyfd , /* current tty FD, or -1 */
+ int ppsfd , /* current pps FD, or -1 */
+ const char *ppspath, /* path to pps device, or NULL */
+ int omode , /* open mode for pps device */
+ int oflags ) /* openn flags for pps device */
+{
+ int retfd = -1;
+ const char *altpath;
+
+ /* avoid 'unused' warnings: we might not use all args, no
+ * thanks to conditional compiling:)
+ */
+ (void)ppspath;
+ (void)omode;
+ (void)oflags;
+
+ if (NULL != (altpath = clockdev_lookup(srcadr, 1)))
+ ppspath = altpath;
+
+# if defined(__unix__) && !defined(_WIN32)
+ if (-1 == retfd) {
+ if (ppspath && *ppspath) {
+ retfd = open(ppspath, omode, oflags);
+ msyslog(LOG_INFO, "ppsdev_open(%s) %s",
+ ppspath, (retfd != -1 ? "succeeded" : "failed"));
+ }
+ }
+# endif
+
+# if defined(WITH_PPSDEV_MATCH)
+ if ((-1 == retfd) && (-1 != ttyfd)) {
+ char *xpath = findMatchingPpsDev(ttyfd);
+ if (xpath && *xpath) {
+ retfd = open(xpath, omode, oflags);
+ msyslog(LOG_INFO, "ppsdev_open(%s) %s",
+ xpath, (retfd != -1 ? "succeeded" : "failed"));
+ }
+ free(xpath);
+ }
+# endif
+
+ /* BSDs and probably SOLARIS can use the TTY fd for the PPS API,
+ * and so does Windows where the PPS API is implemented via an
+ * IOCTL. Likewise does the 'SoftPPS' implementation in Windows
+ * based on COM Events. So, if everything else fails, simply
+ * try the FD given for the TTY/COMport...
+ */
+ if (-1 == retfd)
+ retfd = ppsfd;
+ if (-1 == retfd)
+ retfd = ttyfd;
+
+ /* Close the old pps FD, but only if the new pps FD is neither
+ * the tty FD nor the existing pps FD!
+ */
+ if ((retfd != ttyfd) && (retfd != ppsfd))
+ ppsdev_close(ttyfd, ppsfd);
+
+ return retfd;
+}
+
+void
+ppsdev_close(
+ int ttyfd, /* current tty FD, or -1 */
+ int ppsfd) /* current pps FD, or -1 */
+{
+ /* The pps fd might be the same as the tty fd. We close the pps
+ * channel only if it's valid and _NOT_ the tty itself:
+ */
+ if ((-1 != ppsfd) && (ttyfd != ppsfd))
+ close(ppsfd);
+}
+/* --*-- that's all folks --*-- */
+#else
+NONEMPTY_TRANSLATION_UNIT
+#endif /* !defined(REFCLOCK) */
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
index cde5a30852dd..ea72dd3d37ae 100644
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ b/contrib/ntp/ntpd/ntp_proto.c
@@ -87,7 +87,7 @@ nak_error_codes {
#define POOL_SOLICIT_WINDOW 8
/*
- * flag bits propagated from pool to individual peers
+ * flag bits propagated from pool/manycast to individual peers
*/
#define POOL_FLAG_PMASK (FLAG_IBURST | FLAG_NOSELECT)
@@ -141,6 +141,7 @@ int leap_sec_in_progress;
* Nonspecified system state variables
*/
int sys_bclient; /* broadcast client enable */
+int sys_mclient; /* multicast client enable */
double sys_bdelay; /* broadcast client default delay */
int sys_authenticate; /* requre authentication for config */
l_fp sys_authdelay; /* authentication delay */
@@ -740,7 +741,7 @@ receive(
* surviving packets.
*/
if (restrict_mask & RES_FLAKE) {
- if ((double)ntp_random() / 0x7fffffff < .1) {
+ if (ntp_uurandom() < .1) {
DPRINTF(2, ("receive: drop: RES_FLAKE\n"));
sys_restricted++;
return; /* no flakeway */
@@ -791,6 +792,28 @@ receive(
}
/*
+ * Validate the poll interval in the packet.
+ * 0 probably indicates a data-minimized packet.
+ * A valid poll interval is required for RATEKISS, where
+ * a value of 0 is not allowed. We check for this below.
+ *
+ * There might be arguments against this check. If you have
+ * any of these arguments, please let us know.
+ *
+ * At this point, the packet cannot be a mode[67] packet.
+ */
+ if ( pkt->ppoll
+ && ( (NTP_MINPOLL > pkt->ppoll)
+ || (NTP_MAXPOLL < pkt->ppoll)
+ )
+ ) {
+ DPRINTF(2, ("receive: drop: Invalid ppoll (%d) from %s\n",
+ pkt->ppoll, stoa(&rbufp->recv_srcadr)));
+ sys_badlength++;
+ return; /* invalid packet poll */
+ }
+
+ /*
* Parse the extension field if present. We figure out whether
* an extension field is present by measuring the MAC size. If
* the number of words following the packet header is 0, no MAC
@@ -1333,7 +1356,7 @@ receive(
* manycaster has already synchronized to us.
*/
if ( sys_leap == LEAP_NOTINSYNC
- || sys_stratum > hisstratum + 1
+ || sys_stratum >= hisstratum
|| (!sys_cohort && sys_stratum == hisstratum + 1)
|| rbufp->dstadr->addr_refid == pkt->refid) {
DPRINTF(2, ("receive: sys leap: %0x, sys_stratum %d > hisstratum+1 %d, !sys_cohort %d && sys_stratum == hisstratum+1, loop refid %#x == pkt refid %#x\n", sys_leap, sys_stratum, hisstratum + 1, !sys_cohort, rbufp->dstadr->addr_refid, pkt->refid));
@@ -1475,8 +1498,8 @@ receive(
return;
}
#endif /* AUTOKEY */
- if (sys_bclient == 0) {
- DPRINTF(2, ("receive: AM_NEWBCL drop: not a bclient\n"));
+ if (!sys_bclient && !sys_mclient) {
+ DPRINTF(2, ("receive: AM_NEWBCL drop: not a bclient/mclient\n"));
sys_restricted++;
return; /* not enabled */
}
@@ -1983,32 +2006,36 @@ receive(
return;
}
- /*
- * Basic mode checks:
- *
- * If there is no origin timestamp, it's either an initial packet
- * or we've already received a response to our query. Of course,
- * should 'aorg' be all-zero because this really was the original
- * transmit timestamp, we'll ignore this reply. There is a window
- * of one nanosecond once every 136 years' time where this is
- * possible. We currently ignore this situation, as a completely
- * zero timestamp is (quietly?) disallowed.
- *
- * Otherwise, check for bogus packet in basic mode.
- * If it is bogus, switch to interleaved mode and resynchronize,
- * but only after confirming the packet is not bogus in
- * symmetric interleaved mode.
- *
- * This could also mean somebody is forging packets claiming to
- * be from us, attempting to cause our server to KoD us.
- *
- * We have earlier asserted that hisstratum cannot be 0.
- * If hisstratum is STRATUM_UNSPEC, it means he's not sync'd.
- */
+ /*
+ * Basic mode checks:
+ *
+ * If there is no origin timestamp, it's either an initial
+ * packet or we've already received a response to our query.
+ * Of course, should 'aorg' be all-zero because this really
+ * was the original transmit timestamp, we'll ignore this
+ * reply. There is a window of one nanosecond once every
+ * 136 years' time where this is possible. We currently
+ * ignore this situation, as a completely zero timestamp
+ * is (quietly?) disallowed.
+ *
+ * Otherwise, check for bogus packet in basic mode.
+ * If it is bogus, switch to interleaved mode and
+ * resynchronize, but only after confirming the packet is
+ * not bogus in symmetric interleaved mode.
+ *
+ * This could also mean somebody is forging packets claiming
+ * to be from us, attempting to cause our server to KoD us.
+ *
+ * We have earlier asserted that hisstratum cannot be 0.
+ * If hisstratum is STRATUM_UNSPEC, it means he's not sync'd.
+ */
- /* XXX: FLAG_LOOPNONCE */
- DEBUG_INSIST(0 == (FLAG_LOOPNONCE & peer->flags));
+ /* XXX: FLAG_LOOPNONCE */
+ DEBUG_INSIST(0 == (FLAG_LOOPNONCE & peer->flags));
+ msyslog(LOG_INFO,
+ "receive: Got KoD %s from %s",
+ refid_str(pkt->refid, hisstratum), ntoa(&peer->srcadr));
} else if (peer->flip == 0) {
if (0) {
} else if (L_ISZERO(&p_org)) {
@@ -2235,9 +2262,17 @@ receive(
/*
* Check to see if this is a RATE Kiss Code
- * Currently this kiss code will accept whatever poll
+ * Currently this kiss code will accept whatever valid poll
* rate that the server sends
*/
+ if ( (NTP_MINPOLL > pkt->ppoll)
+ || (NTP_MAXPOLL < pkt->ppoll)
+ ) {
+ DPRINTF(2, ("RATEKISS: Invalid ppoll (%d) from %s\n",
+ pkt->ppoll, stoa(&rbufp->recv_srcadr)));
+ sys_badlength++;
+ return; /* invalid packet poll */
+ }
peer->ppoll = max(peer->minpoll, pkt->ppoll);
if (kissCode == RATEKISS) {
peer->selbroken++; /* Increment the KoD count */
@@ -2886,23 +2921,28 @@ clock_update(
* Clock exceeds panic threshold. Life as we know it ends.
*/
case -1:
+ msyslog(LOG_ERR, "Clock offset exceeds panic threshold.");
#ifdef HAVE_LIBSCF_H
/*
* For Solaris enter the maintenance mode.
*/
if ((fmri = getenv("SMF_FMRI")) != NULL) {
if (smf_maintain_instance(fmri, 0) < 0) {
- printf("smf_maintain_instance: %s\n",
- scf_strerror(scf_error()));
+ msyslog(LOG_ERR, "smf_maintain_instance: %s",
+ scf_strerror(scf_error()));
exit(1);
}
/*
* Sleep until SMF kills us.
*/
+ msyslog(LOG_ERR, "%s placed into maintenance. "
+ "Set system clock by hand before clearing.",
+ fmri);
for (;;)
pause();
}
#endif /* HAVE_LIBSCF_H */
+ msyslog(LOG_ERR, "Set system clock by hand.");
exit (-1);
/* not reached */
@@ -2947,7 +2987,8 @@ clock_update(
*/
#ifdef HAVE_WORKING_FORK
if (daemon_pipe[1] != -1) {
- write(daemon_pipe[1], "S\n", 2);
+ if (2 != write(daemon_pipe[1], "S\n", 2))
+ msyslog(LOG_ERR, "ntpd: daemon failed to notify parent!");
close(daemon_pipe[1]);
daemon_pipe[1] = -1;
DPRINTF(1, ("notified parent --wait-sync is done\n"));
@@ -3218,19 +3259,19 @@ peer_clear(
/*
* During initialization use the association count to spread out
- * the polls at one-second intervals. Passive associations'
- * first poll is delayed by the "discard minimum" to avoid rate
- * limiting. Other post-startup new or cleared associations
+ * the polls at one-second intervals. Unconfigured associations'
+ * first poll is delayed by the "discard minimum" plus 1 to avoid
+ * rate limiting. Other post-startup new or cleared associations
* randomize the first poll over the minimum poll interval to
* avoid implosion.
*/
peer->nextdate = peer->update = peer->outdate = current_time;
if (initializing) {
peer->nextdate += peer_associations;
- } else if (MODE_PASSIVE == peer->hmode) {
- peer->nextdate += ntp_minpkt;
+ } else if (!(FLAG_CONFIG & peer->flags)) {
+ peer->nextdate += ntp_minpkt + 1;
} else {
- peer->nextdate += ntp_random() % peer->minpoll;
+ peer->nextdate += ntp_random() % (1 << peer->minpoll);
}
#ifdef AUTOKEY
peer->refresh = current_time + (1 << NTP_REFRESH);
@@ -5210,6 +5251,7 @@ init_proto(void)
sys_survivors = 0;
sys_manycastserver = 0;
sys_bclient = 0;
+ sys_mclient = 0;
sys_bdelay = BDELAY_DEFAULT; /*[Bug 3031] delay cutoff */
sys_authenticate = 1;
sys_stattime = current_time;
@@ -5251,7 +5293,7 @@ proto_config(
case PROTO_BROADCLIENT: /* broadcast client (bclient) */
sys_bclient = (int)value;
- if (sys_bclient == 0)
+ if (!sys_bclient)
io_unsetbclient();
else
io_setbclient();
@@ -5361,7 +5403,7 @@ proto_config(
case PROTO_MULTICAST_ADD: /* add group address */
if (svalue != NULL)
io_multicast_add(svalue);
- sys_bclient = 1;
+ sys_mclient = 1;
break;
case PROTO_MULTICAST_DEL: /* delete group address */
diff --git a/contrib/ntp/ntpd/ntp_refclock.c b/contrib/ntp/ntpd/ntp_refclock.c
index 872f4a05263f..a16c980e5b09 100644
--- a/contrib/ntp/ntpd/ntp_refclock.c
+++ b/contrib/ntp/ntpd/ntp_refclock.c
@@ -10,6 +10,7 @@
#include "ntp_unixtime.h"
#include "ntp_tty.h"
#include "ntp_refclock.h"
+#include "ntp_clockdev.h"
#include "ntp_stdlib.h"
#include "ntp_assert.h"
#include "timespecops.h"
@@ -71,6 +72,8 @@ static int refclock_cmpl_fp (const void *, const void *);
static int refclock_sample (struct refclockproc *);
static int refclock_ioctl(int, u_int);
static void refclock_checkburst(struct peer *, struct refclockproc *);
+static int symBaud2numBaud(int symBaud);
+static int numBaud2symBaud(int numBaud);
/* circular buffer functions
*
@@ -583,7 +586,6 @@ refclock_sample(
{
size_t i, j, k, m, n;
double off[MAXSTAGE];
- double offset;
/*
* Copy the raw offsets and sort into ascending order. Don't do
@@ -601,12 +603,16 @@ refclock_sample(
/*
* Reject the furthest from the median of the samples until
* approximately 60 percent of the samples remain.
+ *
+ * [Bug 3672] The elimination is now based on the proper
+ * definition of the median. The true median is not calculated
+ * directly, though.
*/
i = 0; j = n;
m = n - (n * 4) / 10;
- while ((j - i) > m) {
- offset = off[(j + i) / 2];
- if (off[j - 1] - offset < offset - off[i])
+ while ((k = j - i) > m) {
+ k = (k - 1) >> 1;
+ if ((off[j - 1] - off[j - k - 1]) < (off[i + k] - off[i]))
i++; /* reject low end */
else
j--; /* reject high end */
@@ -796,6 +802,73 @@ refclock_gtraw(
return (bmax);
}
+/*
+ * refclock_fdwrite()
+ *
+ * Write data to a clock device. Does the necessary result checks and
+ * logging, and encapsulates OS dependencies.
+ */
+#ifdef SYS_WINNT
+extern int async_write(int fd, const void * buf, unsigned int len);
+#endif
+
+size_t
+refclock_fdwrite(
+ const struct peer * peer,
+ int fd,
+ const void * buf,
+ size_t len,
+ const char * what
+ )
+{
+ size_t nret, nout;
+ int nerr;
+
+ nout = (INT_MAX > len) ? len : INT_MAX;
+# ifdef SYS_WINNT
+ nret = (size_t)async_write(fd, buf, (unsigned int)nout);
+# else
+ nret = (size_t)write(fd, buf, nout);
+# endif
+ if (NULL != what) {
+ if (nret == FDWRITE_ERROR) {
+ nerr = errno;
+ msyslog(LOG_INFO,
+ "%s: write %s failed, fd=%d, %m",
+ refnumtoa(&peer->srcadr), what,
+ fd);
+ errno = nerr;
+ } else if (nret != len) {
+ nerr = errno;
+ msyslog(LOG_NOTICE,
+ "%s: %s shortened, fd=%d, wrote %zu of %zu bytes",
+ refnumtoa(&peer->srcadr), what,
+ fd, nret, len);
+ errno = nerr;
+ }
+ }
+ return nret;
+}
+
+size_t
+refclock_write(
+ const struct peer * peer,
+ const void * buf,
+ size_t len,
+ const char * what
+ )
+{
+ if ( ! (peer && peer->procptr)) {
+ if (NULL != what)
+ msyslog(LOG_INFO,
+ "%s: write %s failed, invalid clock peer",
+ refnumtoa(&peer->srcadr), what);
+ errno = EINVAL;
+ return FDWRITE_ERROR;
+ }
+ return refclock_fdwrite(peer, peer->procptr->io.fd,
+ buf, len, what);
+}
/*
* indicate_refclock_packet()
@@ -877,13 +950,15 @@ process_refclock_packet(
*/
int
refclock_open(
- const char *dev, /* device name pointer */
+ const sockaddr_u *srcadr,
+ const char *dev, /* device name pointer */
u_int speed, /* serial port speed (code) */
u_int lflags /* line discipline flags */
)
{
+ const char *cdev;
int fd;
- int omode;
+ int omode;
#ifdef O_NONBLOCK
char trash[128]; /* litter bin for old input data */
#endif
@@ -899,6 +974,9 @@ refclock_open(
omode |= O_NOCTTY;
#endif
+ if (NULL != (cdev = clockdev_lookup(srcadr, 0)))
+ dev = cdev;
+
fd = open(dev, omode, 0777);
/* refclock_open() long returned 0 on failure, avoid it. */
if (0 == fd) {
@@ -921,6 +999,9 @@ refclock_open(
close(fd);
return -1;
}
+ msyslog(LOG_NOTICE, "%s serial %s open at %d bps",
+ refnumtoa(srcadr), dev, symBaud2numBaud(speed));
+
#ifdef O_NONBLOCK
/*
* We want to make sure there is no pending trash in the input
@@ -1769,4 +1850,47 @@ refclock_format_lcode(
va_end(va);
}
+static const int baudTable[][2] = {
+ {B0, 0},
+ {B50, 50},
+ {B75, 75},
+ {B110, 110},
+ {B134, 134},
+ {B150, 150},
+ {B200, 200},
+ {B300, 300},
+ {B600, 600},
+ {B1200, 1200},
+ {B1800, 1800},
+ {B2400, 2400},
+ {B4800, 4800},
+ {B9600, 9600},
+ {B19200, 19200},
+ {B38400, 38400},
+# ifdef B57600
+ {B57600, 57600 },
+# endif
+# ifdef B115200
+ {B115200, 115200},
+# endif
+ {-1, -1}
+};
+
+
+static int symBaud2numBaud(int symBaud)
+{
+ int i;
+ for (i = 0; baudTable[i][1] >= 0; ++i)
+ if (baudTable[i][0] == symBaud)
+ break;
+ return baudTable[i][1];
+}
+static int numBaud2symBaud(int numBaud)
+{
+ int i;
+ for (i = 0; baudTable[i][1] >= 0; ++i)
+ if (baudTable[i][1] == numBaud)
+ break;
+ return baudTable[i][0];
+}
#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c
index e7997a3b9095..e61d014808de 100644
--- a/contrib/ntp/ntpd/ntp_request.c
+++ b/contrib/ntp/ntpd/ntp_request.c
@@ -1104,7 +1104,7 @@ sys_info(
is->flags = 0;
if (sys_authenticate)
is->flags |= INFO_FLAG_AUTHENTICATE;
- if (sys_bclient)
+ if (sys_bclient || sys_mclient)
is->flags |= INFO_FLAG_BCLIENT;
#ifdef REFCLOCK
if (cal_enable)
diff --git a/contrib/ntp/ntpd/ntp_util.c b/contrib/ntp/ntpd/ntp_util.c
index 11ca620172cd..62a997e43aad 100644
--- a/contrib/ntp/ntpd/ntp_util.c
+++ b/contrib/ntp/ntpd/ntp_util.c
@@ -63,6 +63,7 @@ char *stats_drift_file; /* frequency file name */
static char *stats_temp_file; /* temp frequency file name */
static double wander_resid; /* last frequency update */
double wander_threshold = 1e-7; /* initial frequency threshold */
+static unsigned int cmdargs_seen = 0; /* stat options seen from command line */
/*
* Statistics file stuff
@@ -327,6 +328,27 @@ write_stats(void)
/*
* stats_config - configure the stats operation
*/
+static int
+allow_config(
+ unsigned int option,
+ int/*BOOL*/ cmdopt)
+{
+ /* If an option was given on the command line, make sure it
+ * persists and is not later changed by a corresponding option
+ * from the config file. Done by simply remembering an option was
+ * already seen from the command line.
+ *
+ * BTW, if we ever define stats options beyond 31, this needs a
+ * fix. Until then, simply assume the shift will not overflow.
+ */
+ unsigned int mask = 1u << option;
+ int retv = cmdopt || !(cmdargs_seen & mask);
+ if (cmdopt)
+ cmdargs_seen |= mask;
+ return retv;
+}
+
+
void
stats_config(
int item,
@@ -341,9 +363,9 @@ stats_config(
l_fp now;
time_t ttnow;
#ifndef VMS
- const char temp_ext[] = ".TEMP";
+ static const char temp_ext[] = ".TEMP";
#else
- const char temp_ext[] = "-TEMP";
+ static const char temp_ext[] = "-TEMP";
#endif
/*
@@ -397,40 +419,58 @@ stats_config(
* Open and read frequency file.
*/
case STATS_FREQ_FILE:
- if (!value || (len = strlen(value)) == 0)
+ if (!allow_config(STATS_FREQ_FILE, optflag))
break;
-
- stats_drift_file = erealloc(stats_drift_file, len + 1);
- stats_temp_file = erealloc(stats_temp_file,
- len + sizeof(".TEMP"));
- memcpy(stats_drift_file, value, (size_t)(len+1));
- memcpy(stats_temp_file, value, (size_t)len);
- memcpy(stats_temp_file + len, temp_ext, sizeof(temp_ext));
-
+
+ if (!value || (len = strlen(value)) == 0)
+ {
+ free(stats_drift_file);
+ free(stats_temp_file);
+ stats_drift_file = stats_temp_file = NULL;
+ }
+ else
+ {
+ stats_drift_file = erealloc(stats_drift_file, len + 1);
+ stats_temp_file = erealloc(stats_temp_file,
+ len + sizeof(".TEMP"));
+ memcpy(stats_drift_file, value, (size_t)(len+1));
+ memcpy(stats_temp_file, value, (size_t)len);
+ memcpy(stats_temp_file + len, temp_ext, sizeof(temp_ext));
+ }
+
/*
* Open drift file and read frequency. If the file is
* missing or contains errors, tell the loop to reset.
*/
- if ((fp = fopen(stats_drift_file, "r")) == NULL)
- break;
-
- if (fscanf(fp, "%lf", &old_drift) != 1) {
+ if (NULL == stats_drift_file) {
+ loop_config(LOOP_NOFREQ, 0.0);
+ prev_drift_comp = 0.0;
+ } else if ((fp = fopen(stats_drift_file, "r")) == NULL) {
+ if (errno != ENOENT)
+ msyslog(LOG_WARNING,
+ "cannot read frequency file %s: %s",
+ stats_drift_file, strerror(errno));
+ } else if (fscanf(fp, "%lf", &old_drift) != 1) {
msyslog(LOG_ERR,
"format error frequency file %s",
stats_drift_file);
fclose(fp);
- break;
-
+ } else {
+ loop_config(LOOP_FREQ, old_drift);
+ prev_drift_comp = drift_comp;
+ msyslog(LOG_INFO,
+ "initial drift restored to %f",
+ old_drift);
+ fclose(fp);
}
- fclose(fp);
- loop_config(LOOP_FREQ, old_drift);
- prev_drift_comp = drift_comp;
break;
/*
* Specify statistics directory.
*/
case STATS_STATSDIR:
+ if (!allow_config(STATS_STATSDIR, optflag))
+ break;
/* - 1 since value may be missing the DIR_SEP. */
if (strlen(value) >= sizeof(statsdir) - 1) {
@@ -463,6 +503,9 @@ stats_config(
* Open pid file.
*/
case STATS_PID_FILE:
+ if (!allow_config(STATS_PID_FILE, optflag))
+ break;
+
if ((fp = fopen(value, "w")) == NULL) {
msyslog(LOG_ERR, "pid file %s: %m",
value);
@@ -700,6 +743,13 @@ record_raw_stats(
if (!stats_control)
return;
+ /*
+ * Mode 6 and mode 7 packets do not have the format of normal
+ * NTP packets and will log garbage. So don't. [Bug 3774]
+ */
+ if (MODE_CONTROL == mode || MODE_PRIVATE == mode)
+ return;
+
get_systime(&now);
filegen_setup(&rawstats, now.l_ui);
day = now.l_ui / 86400 + MJD_1900;
diff --git a/contrib/ntp/ntpd/ntpd-opts.c b/contrib/ntp/ntpd/ntpd-opts.c
index 42b2a7722cc1..646a304a8521 100644
--- a/contrib/ntp/ntpd/ntpd-opts.c
+++ b/contrib/ntp/ntpd/ntpd-opts.c
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:04 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:48:46 PM by AutoGen 5.18.16
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -40,10 +40,15 @@
#define OPTION_CODE_COMPILE 1
#include "ntpd-opts.h"
#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -74,9 +79,9 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpd options
*/
-static char const ntpd_opt_strs[3132] =
-/* 0 */ "ntpd 4.2.8p15\n"
- "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+static char const ntpd_opt_strs[3133] =
+/* 0 */ "ntpd 4.2.8p16\n"
+ "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -205,12 +210,12 @@ static char const ntpd_opt_strs[3132] =
/* 2901 */ "output version information and exit\0"
/* 2937 */ "version\0"
/* 2945 */ "NTPD\0"
-/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p15\n"
+/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p16\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
-/* 3082 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 3116 */ "\n\0"
-/* 3118 */ "ntpd 4.2.8p15";
+/* 3082 */ "https://bugs.ntp.org, bugs@ntp.org\0"
+/* 3117 */ "\n\0"
+/* 3119 */ "ntpd 4.2.8p16";
/**
* ipv4 option description with
@@ -1268,12 +1273,12 @@ static tOptDesc optDesc[OPTION_CT] = {
/** The ntpd program bug email address. */
#define zBugsAddr (ntpd_opt_strs+3082)
/** Clarification/explanation of what ntpd does. */
-#define zExplain (ntpd_opt_strs+3116)
+#define zExplain (ntpd_opt_strs+3117)
/** Extra detail explaining what ntpd does. */
#define zDetail (NULL)
/** The full version string for ntpd. */
-#define zFullVersion (ntpd_opt_strs+3118)
-/* extracted from optcode.tlib near line 364 */
+#define zFullVersion (ntpd_opt_strs+3119)
+/* extracted from optcode.tlib near line 342 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -1305,7 +1310,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
ex_code = NTPD_EXIT_SUCCESS;
optionUsage(&ntpdOptions, ex_code);
/* NOTREACHED */
- exit(1);
+ exit(NTPD_EXIT_FAILURE);
(void)opts;
(void)od;
}
@@ -1518,19 +1523,19 @@ static void bogus_function(void) {
extract the correct strings. These strings are actually referenced
by a field name in the ntpdOptions structure noted in the
comments below. The literal text is defined in ntpd_opt_strs.
-
+
NOTE: the strings below are segmented with respect to the source string
ntpd_opt_strs. The strings above are handed off for translation
at run time a paragraph at a time. Consequently, they are presented here
for translation a paragraph at a time.
-
+
ALSO: often the description for an option will reference another option
by name. These are set off with apostrophe quotes (I hope). Do not
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8p15\n\
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpd 4.2.8p16\n\
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1670,7 +1675,7 @@ implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.2.8p15\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p16\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1678,7 +1683,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.8p15"));
+ puts(_("ntpd 4.2.8p16"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
@@ -1688,234 +1693,230 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -1924,17 +1925,17 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -1952,28 +1953,28 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/ntpd/ntpd-opts.h b/contrib/ntp/ntpd/ntpd-opts.h
index 07cdc2e3e54b..dc9ac899e8ee 100644
--- a/contrib/ntp/ntpd/ntpd-opts.h
+++ b/contrib/ntp/ntpd/ntpd-opts.h
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:04 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:48:45 PM by AutoGen 5.18.16
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -45,6 +45,8 @@
#define AUTOOPTS_NTPD_OPTS_H_GUARD 1
#include "config.h"
#include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
/**
* Ensure that the library used for compiling this generated header is at
@@ -53,13 +55,19 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
/**
* Enumeration of each option type for ntpd
*/
@@ -106,9 +114,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.8p15"
+#define NTPD_VERSION "4.2.8p16"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8p15"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p16"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -457,6 +465,7 @@ static inline char* aoGetsText(char const* pz) {
# endif
#endif /* ENABLE_NLS */
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdman b/contrib/ntp/ntpd/ntpd.1ntpdman
index 461f37d43be8..1554bc89b840 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdman
+++ b/contrib/ntp/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpd 1ntpdman "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:39 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:42 PM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -979,7 +979,7 @@ RFC5908
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
@@ -995,7 +995,7 @@ mind.
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
Portions of this document came from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/ntpd/ntpd.1ntpdmdoc b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
index 60703324ea10..f28af3193e0b 100644
--- a/contrib/ntp/ntpd/ntpd.1ntpdmdoc
+++ b/contrib/ntp/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:30 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:29 PM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
@@ -900,7 +900,7 @@ the fancy features which consume the space were designed more with
a busy primary server, rather than a high stratum workstation in
mind.
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
Portions of this document came from FreeBSD.
.Pp
diff --git a/contrib/ntp/ntpd/ntpd.c b/contrib/ntp/ntpd/ntpd.c
index a5591de79ff5..6fd6ba476954 100644
--- a/contrib/ntp/ntpd/ntpd.c
+++ b/contrib/ntp/ntpd/ntpd.c
@@ -661,8 +661,7 @@ detach_from_terminal(
* Map user name/number to user ID
*/
static int
-map_user(
- )
+map_user(void)
{
char *endp;
@@ -892,6 +891,10 @@ ntpdmain(
msyslog(LOG_NOTICE, "corporation. Support and training for ntp-4 are");
msyslog(LOG_NOTICE, "available at https://www.nwtime.org/support");
msyslog(LOG_NOTICE, "----------------------------------------------------");
+#ifdef DEBUG
+ msyslog(LOG_NOTICE, "DEBUG behavior is enabled - a violation of any");
+ msyslog(LOG_NOTICE, "diagnostic assertion will cause %s to abort", progname);
+#endif
/*
* Install trap handlers to log errors and assertion failures.
@@ -1424,8 +1427,10 @@ int scmp_sc[] = {
#if defined(SYS_WINNT)
ntservice_isup();
#elif defined(HAVE_WORKING_FORK)
- if (daemon_pipe[1] != -1) {
- write(daemon_pipe[1], "R\n", 2);
+ if ((daemon_pipe[1] != -1) && (2 != write(daemon_pipe[1], "R\n", 2))) {
+ msyslog(LOG_ERR, "ntpd: daemon failed to notify parent!");
+ close(daemon_pipe[1]);
+ daemon_pipe[1] = -1;
}
#endif /* HAVE_WORKING_FORK */
diff --git a/contrib/ntp/ntpd/ntpd.html b/contrib/ntp/ntpd/ntpd.html
index f002faa2ac5e..9eff3bc81569 100644
--- a/contrib/ntp/ntpd/ntpd.html
+++ b/contrib/ntp/ntpd/ntpd.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ntpd: Network Time Protocol (NTP) Daemon User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,13 +41,11 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#ntpd-Description" accesskey="n" rel="next">ntpd Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="ntpd_003a-Network-Time-Protocol-_0028NTP_0029-Daemon-User-Manual"></a>
-<h1 class="top">ntpd: Network Time Protocol (NTP) Daemon User Manual</h1>
+<span id="ntpd_003a-Network-Time-Protocol-_0028NTP_0029-Daemon-User-Manual"></span><h1 class="top">ntpd: Network Time Protocol (NTP) Daemon User Manual</h1>
<p>The <code>ntpd</code> program is an operating system daemon that synchronizes the
system clock to remote NTP time servers or local reference clocks.
@@ -67,35 +56,33 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntpd</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntpd</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-Description" accesskey="1">ntpd Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Description" accesskey="1">ntpd Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="2">ntpd Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpd
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="2">ntpd Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpd
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
</table>
<hr>
-<a name="ntpd-Description"></a>
-<div class="header">
+<span id="ntpd-Description"></span><div class="header">
<p>
Next: <a href="#ntpd-Invocation" accesskey="n" rel="next">ntpd Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description"></span><h2 class="chapter">1 Description</h2>
<p>The <code>ntpd</code> program ordinarily requires
a configuration file described at &lsquo;ntp.conf&rsquo;.
@@ -119,22 +106,20 @@ If nothing is heard after a few minutes&rsquo; time,
the daemon times out and exits without setting the clock.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="1">ntpd Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Invocation" accesskey="1">Invoking ntpd</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntpd-Invocation"></a>
-<div class="header">
+<span id="ntpd-Invocation"></span><div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpd-Description" accesskey="p" rel="prev">ntpd Description</a>, Up: <a href="#ntpd-Description" accesskey="u" rel="up">ntpd Description</a> &nbsp; </p>
</div>
-<a name="Invoking-ntpd"></a>
-<h3 class="section">1.1 Invoking ntpd</h3>
-<a name="index-ntpd"></a>
-<a name="index-NTP-daemon-program"></a>
+<span id="Invoking-ntpd"></span><h3 class="section">1.1 Invoking ntpd</h3>
+<span id="index-ntpd"></span>
+<span id="index-NTP-daemon-program"></span>
@@ -212,91 +197,89 @@ using the <code>agtexi-cmd</code> template and the option descriptions for the <
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-usage" accesskey="1">ntpd usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpd help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-usage" accesskey="1">ntpd usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpd help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv4" accesskey="2">ntpd ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv4" accesskey="2">ntpd ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv6" accesskey="3">ntpd ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-ipv6" accesskey="3">ntpd ipv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-authreq" accesskey="4">ntpd authreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authreq option (-a)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-authreq" accesskey="4">ntpd authreq</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authreq option (-a)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-authnoreq" accesskey="5">ntpd authnoreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authnoreq option (-A)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-authnoreq" accesskey="5">ntpd authnoreq</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authnoreq option (-A)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-configfile" accesskey="6">ntpd configfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">configfile option (-c)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-configfile" accesskey="6">ntpd configfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">configfile option (-c)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-driftfile" accesskey="7">ntpd driftfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">driftfile option (-f)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-driftfile" accesskey="7">ntpd driftfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">driftfile option (-f)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-panicgate" accesskey="8">ntpd panicgate</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">panicgate option (-g)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-panicgate" accesskey="8">ntpd panicgate</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">panicgate option (-g)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-force_002dstep_002donce" accesskey="9">ntpd force-step-once</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">force-step-once option (-G)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-force_002dstep_002donce" accesskey="9">ntpd force-step-once</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">force-step-once option (-G)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-jaildir">ntpd jaildir</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">jaildir option (-i)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-jaildir">ntpd jaildir</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">jaildir option (-i)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-interface">ntpd interface</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interface option (-I)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-interface">ntpd interface</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interface option (-I)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-keyfile">ntpd keyfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">keyfile option (-k)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-keyfile">ntpd keyfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">keyfile option (-k)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-logfile">ntpd logfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">logfile option (-l)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-logfile">ntpd logfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">logfile option (-l)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-novirtualips">ntpd novirtualips</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">novirtualips option (-L)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-novirtualips">ntpd novirtualips</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">novirtualips option (-L)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">modifymmtimer option (-M)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-modifymmtimer">ntpd modifymmtimer</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">modifymmtimer option (-M)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-nice">ntpd nice</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">nice option (-N)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-nice">ntpd nice</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">nice option (-N)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-pidfile">ntpd pidfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pidfile option (-p)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-pidfile">ntpd pidfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pidfile option (-p)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-priority">ntpd priority</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">priority option (-P)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-priority">ntpd priority</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">priority option (-P)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-quit">ntpd quit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">quit option (-q)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-quit">ntpd quit</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">quit option (-q)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-propagationdelay">ntpd propagationdelay</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">propagationdelay option (-r)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-propagationdelay">ntpd propagationdelay</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">propagationdelay option (-r)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">saveconfigquit option
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-saveconfigquit">ntpd saveconfigquit</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">saveconfigquit option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-statsdir">ntpd statsdir</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">statsdir option (-s)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-statsdir">ntpd statsdir</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">statsdir option (-s)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-trustedkey">ntpd trustedkey</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">trustedkey option (-t)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-trustedkey">ntpd trustedkey</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">trustedkey option (-t)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-user">ntpd user</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">user option (-u)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-user">ntpd user</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">user option (-u)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-updateinterval">ntpd updateinterval</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">updateinterval option (-U)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-updateinterval">ntpd updateinterval</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">updateinterval option (-U)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-wait_002dsync">ntpd wait-sync</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wait-sync option (-w)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-wait_002dsync">ntpd wait-sync</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wait-sync option (-w)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-slew">ntpd slew</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">slew option (-x)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-slew">ntpd slew</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">slew option (-x)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-usepcc">ntpd usepcc</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">usepcc option
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-usepcc">ntpd usepcc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">usepcc option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-pccfreq">ntpd pccfreq</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pccfreq option
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-pccfreq">ntpd pccfreq</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pccfreq option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-mdns">ntpd mdns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mdns option (-m)
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-mdns">ntpd mdns</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mdns option (-m)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-config">ntpd config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpd
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-config">ntpd config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpd
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-exit-status">ntpd exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-exit-status">ntpd exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-Usage">ntpd Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Usage">ntpd Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-Files">ntpd Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Files">ntpd Files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-See-Also">ntpd See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-See-Also">ntpd See Also</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-Bugs">ntpd Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Bugs">ntpd Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpd-Notes">ntpd Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+<tr><td align="left" valign="top">&bull; <a href="#ntpd-Notes">ntpd Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
</td></tr>
</table>
<hr>
-<a name="ntpd-usage"></a>
-<div class="header">
+<span id="ntpd-usage"></span><div class="header">
<p>
Next: <a href="#ntpd-ipv4" accesskey="n" rel="next">ntpd ipv4</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ntpd-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.1.1 ntpd help/usage (<samp>--help</samp>)</h4>
-<a name="index-ntpd-help"></a>
+<span id="ntpd-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1.1 ntpd help/usage (<samp>--help</samp>)</h4>
+<span id="index-ntpd-help"></span>
<p>This is the automatically generated usage text for ntpd.
</p>
@@ -309,7 +292,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p15
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p16
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
@@ -377,18 +360,16 @@ hyphen and the flag character.
The following option preset mechanisms are supported:
- examining environment variables named NTPD_*
-Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+Please send bug reports to: &lt;https://bugs.ntp.org, bugs@ntp.org&gt;
</pre></div>
<hr>
-<a name="ntpd-ipv4"></a>
-<div class="header">
+<span id="ntpd-ipv4"></span><div class="header">
<p>
Next: <a href="#ntpd-ipv6" accesskey="n" rel="next">ntpd ipv6</a>, Previous: <a href="#ntpd-usage" accesskey="p" rel="prev">ntpd usage</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ipv4-option-_0028_002d4_0029"></a>
-<h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
-<a name="index-ntpd_002dipv4"></a>
+<span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
+<span id="index-ntpd_002dipv4"></span>
<p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
</p>
@@ -401,14 +382,12 @@ ipv6.
<p>Force DNS resolution of following host names on the command line
to the IPv4 namespace.
</p><hr>
-<a name="ntpd-ipv6"></a>
-<div class="header">
+<span id="ntpd-ipv6"></span><div class="header">
<p>
Next: <a href="#ntpd-authreq" accesskey="n" rel="next">ntpd authreq</a>, Previous: <a href="#ntpd-ipv4" accesskey="p" rel="prev">ntpd ipv4</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ipv6-option-_0028_002d6_0029"></a>
-<h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
-<a name="index-ntpd_002dipv6"></a>
+<span id="ipv6-option-_0028_002d6_0029"></span><h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
+<span id="index-ntpd_002dipv6"></span>
<p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
</p>
@@ -421,14 +400,12 @@ ipv4.
<p>Force DNS resolution of following host names on the command line
to the IPv6 namespace.
</p><hr>
-<a name="ntpd-authreq"></a>
-<div class="header">
+<span id="ntpd-authreq"></span><div class="header">
<p>
Next: <a href="#ntpd-authnoreq" accesskey="n" rel="next">ntpd authnoreq</a>, Previous: <a href="#ntpd-ipv6" accesskey="p" rel="prev">ntpd ipv6</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="authreq-option-_0028_002da_0029"></a>
-<h4 class="subsection">1.1.4 authreq option (-a)</h4>
-<a name="index-ntpd_002dauthreq"></a>
+<span id="authreq-option-_0028_002da_0029"></span><h4 class="subsection">1.1.4 authreq option (-a)</h4>
+<span id="index-ntpd_002dauthreq"></span>
<p>This is the &ldquo;require crypto authentication&rdquo; option.
</p>
@@ -442,14 +419,12 @@ authnoreq.
multicast client and symmetric passive associations.
This is the default.
</p><hr>
-<a name="ntpd-authnoreq"></a>
-<div class="header">
+<span id="ntpd-authnoreq"></span><div class="header">
<p>
Next: <a href="#ntpd-configfile" accesskey="n" rel="next">ntpd configfile</a>, Previous: <a href="#ntpd-authreq" accesskey="p" rel="prev">ntpd authreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="authnoreq-option-_0028_002dA_0029"></a>
-<h4 class="subsection">1.1.5 authnoreq option (-A)</h4>
-<a name="index-ntpd_002dauthnoreq"></a>
+<span id="authnoreq-option-_0028_002dA_0029"></span><h4 class="subsection">1.1.5 authnoreq option (-A)</h4>
+<span id="index-ntpd_002dauthnoreq"></span>
<p>This is the &ldquo;do not require crypto authentication&rdquo; option.
</p>
@@ -463,14 +438,12 @@ authreq.
multicast client and symmetric passive associations.
This is almost never a good idea.
</p><hr>
-<a name="ntpd-configfile"></a>
-<div class="header">
+<span id="ntpd-configfile"></span><div class="header">
<p>
Next: <a href="#ntpd-driftfile" accesskey="n" rel="next">ntpd driftfile</a>, Previous: <a href="#ntpd-authnoreq" accesskey="p" rel="prev">ntpd authnoreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="configfile-option-_0028_002dc_0029"></a>
-<h4 class="subsection">1.1.6 configfile option (-c)</h4>
-<a name="index-ntpd_002dconfigfile"></a>
+<span id="configfile-option-_0028_002dc_0029"></span><h4 class="subsection">1.1.6 configfile option (-c)</h4>
+<span id="index-ntpd_002dconfigfile"></span>
<p>This is the &ldquo;configuration file name&rdquo; option.
This option takes a string argument.
@@ -478,14 +451,12 @@ The name and path of the configuration file,
<samp>/etc/ntp.conf</samp>
by default.
</p><hr>
-<a name="ntpd-driftfile"></a>
-<div class="header">
+<span id="ntpd-driftfile"></span><div class="header">
<p>
Next: <a href="#ntpd-panicgate" accesskey="n" rel="next">ntpd panicgate</a>, Previous: <a href="#ntpd-configfile" accesskey="p" rel="prev">ntpd configfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="driftfile-option-_0028_002df_0029"></a>
-<h4 class="subsection">1.1.7 driftfile option (-f)</h4>
-<a name="index-ntpd_002ddriftfile"></a>
+<span id="driftfile-option-_0028_002df_0029"></span><h4 class="subsection">1.1.7 driftfile option (-f)</h4>
+<span id="index-ntpd_002ddriftfile"></span>
<p>This is the &ldquo;frequency drift file name&rdquo; option.
This option takes a string argument.
@@ -498,14 +469,12 @@ configuration specification in the
<samp>/etc/ntp.conf</samp>
file.
</p><hr>
-<a name="ntpd-panicgate"></a>
-<div class="header">
+<span id="ntpd-panicgate"></span><div class="header">
<p>
Next: <a href="#ntpd-force_002dstep_002donce" accesskey="n" rel="next">ntpd force-step-once</a>, Previous: <a href="#ntpd-driftfile" accesskey="p" rel="prev">ntpd driftfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="panicgate-option-_0028_002dg_0029"></a>
-<h4 class="subsection">1.1.8 panicgate option (-g)</h4>
-<a name="index-ntpd_002dpanicgate"></a>
+<span id="panicgate-option-_0028_002dg_0029"></span><h4 class="subsection">1.1.8 panicgate option (-g)</h4>
+<span id="index-ntpd_002dpanicgate"></span>
<p>This is the &ldquo;allow the first adjustment to be big&rdquo; option.
</p>
@@ -527,14 +496,12 @@ See the
<code>tinker</code>
configuration file directive for other options.
</p><hr>
-<a name="ntpd-force_002dstep_002donce"></a>
-<div class="header">
+<span id="ntpd-force_002dstep_002donce"></span><div class="header">
<p>
Next: <a href="#ntpd-jaildir" accesskey="n" rel="next">ntpd jaildir</a>, Previous: <a href="#ntpd-panicgate" accesskey="p" rel="prev">ntpd panicgate</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="force_002dstep_002donce-option-_0028_002dG_0029"></a>
-<h4 class="subsection">1.1.9 force-step-once option (-G)</h4>
-<a name="index-ntpd_002dforce_002dstep_002donce"></a>
+<span id="force_002dstep_002donce-option-_0028_002dG_0029"></span><h4 class="subsection">1.1.9 force-step-once option (-G)</h4>
+<span id="index-ntpd_002dforce_002dstep_002donce"></span>
<p>This is the &ldquo;step any initial offset correction.&rdquo; option.
Normally,
@@ -548,14 +515,12 @@ so this option must not be used if
applications requiring monotonic time are running.
See the <code>tinker</code> configuration file directive for other options.
</p><hr>
-<a name="ntpd-jaildir"></a>
-<div class="header">
+<span id="ntpd-jaildir"></span><div class="header">
<p>
Next: <a href="#ntpd-interface" accesskey="n" rel="next">ntpd interface</a>, Previous: <a href="#ntpd-force_002dstep_002donce" accesskey="p" rel="prev">ntpd force-step-once</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="jaildir-option-_0028_002di_0029"></a>
-<h4 class="subsection">1.1.10 jaildir option (-i)</h4>
-<a name="index-ntpd_002djaildir"></a>
+<span id="jaildir-option-_0028_002di_0029"></span><h4 class="subsection">1.1.10 jaildir option (-i)</h4>
+<span id="index-ntpd_002djaildir"></span>
<p>This is the &ldquo;jail directory&rdquo; option.
This option takes a string argument.
@@ -578,14 +543,12 @@ This option is supported under NetBSD (configure with
<code>--enable-clockctl</code>) or Linux (configure with
<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
</p><hr>
-<a name="ntpd-interface"></a>
-<div class="header">
+<span id="ntpd-interface"></span><div class="header">
<p>
Next: <a href="#ntpd-keyfile" accesskey="n" rel="next">ntpd keyfile</a>, Previous: <a href="#ntpd-jaildir" accesskey="p" rel="prev">ntpd jaildir</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="interface-option-_0028_002dI_0029"></a>
-<h4 class="subsection">1.1.11 interface option (-I)</h4>
-<a name="index-ntpd_002dinterface"></a>
+<span id="interface-option-_0028_002dI_0029"></span><h4 class="subsection">1.1.11 interface option (-I)</h4>
+<span id="index-ntpd_002dinterface"></span>
<p>This is the &ldquo;listen on an interface name or address&rdquo; option.
This option takes a string argument <samp>iface</samp>.
@@ -601,14 +564,12 @@ also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
<code>interface</code> command, which is more versatile.
</p><hr>
-<a name="ntpd-keyfile"></a>
-<div class="header">
+<span id="ntpd-keyfile"></span><div class="header">
<p>
Next: <a href="#ntpd-logfile" accesskey="n" rel="next">ntpd logfile</a>, Previous: <a href="#ntpd-interface" accesskey="p" rel="prev">ntpd interface</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="keyfile-option-_0028_002dk_0029"></a>
-<h4 class="subsection">1.1.12 keyfile option (-k)</h4>
-<a name="index-ntpd_002dkeyfile"></a>
+<span id="keyfile-option-_0028_002dk_0029"></span><h4 class="subsection">1.1.12 keyfile option (-k)</h4>
+<span id="index-ntpd_002dkeyfile"></span>
<p>This is the &ldquo;path to symmetric keys&rdquo; option.
This option takes a string argument.
@@ -619,14 +580,12 @@ This is the same operation as the
<code>keys</code> <kbd>keyfile</kbd>
configuration file directive.
</p><hr>
-<a name="ntpd-logfile"></a>
-<div class="header">
+<span id="ntpd-logfile"></span><div class="header">
<p>
Next: <a href="#ntpd-novirtualips" accesskey="n" rel="next">ntpd novirtualips</a>, Previous: <a href="#ntpd-keyfile" accesskey="p" rel="prev">ntpd keyfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="logfile-option-_0028_002dl_0029"></a>
-<h4 class="subsection">1.1.13 logfile option (-l)</h4>
-<a name="index-ntpd_002dlogfile"></a>
+<span id="logfile-option-_0028_002dl_0029"></span><h4 class="subsection">1.1.13 logfile option (-l)</h4>
+<span id="index-ntpd_002dlogfile"></span>
<p>This is the &ldquo;path to the log file&rdquo; option.
This option takes a string argument.
@@ -636,14 +595,12 @@ This is the same operation as the
<code>logfile</code> <kbd>logfile</kbd>
configuration file directive.
</p><hr>
-<a name="ntpd-novirtualips"></a>
-<div class="header">
+<span id="ntpd-novirtualips"></span><div class="header">
<p>
Next: <a href="#ntpd-modifymmtimer" accesskey="n" rel="next">ntpd modifymmtimer</a>, Previous: <a href="#ntpd-logfile" accesskey="p" rel="prev">ntpd logfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="novirtualips-option-_0028_002dL_0029"></a>
-<h4 class="subsection">1.1.14 novirtualips option (-L)</h4>
-<a name="index-ntpd_002dnovirtualips"></a>
+<span id="novirtualips-option-_0028_002dL_0029"></span><h4 class="subsection">1.1.14 novirtualips option (-L)</h4>
+<span id="index-ntpd_002dnovirtualips"></span>
<p>This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
Do not listen to virtual interfaces, defined as those with
@@ -651,14 +608,12 @@ names containing a colon. This option is deprecated. Please
consider using the configuration file <code>interface</code> command, which
is more versatile.
</p><hr>
-<a name="ntpd-modifymmtimer"></a>
-<div class="header">
+<span id="ntpd-modifymmtimer"></span><div class="header">
<p>
Next: <a href="#ntpd-nice" accesskey="n" rel="next">ntpd nice</a>, Previous: <a href="#ntpd-novirtualips" accesskey="p" rel="prev">ntpd novirtualips</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="modifymmtimer-option-_0028_002dM_0029"></a>
-<h4 class="subsection">1.1.15 modifymmtimer option (-M)</h4>
-<a name="index-ntpd_002dmodifymmtimer"></a>
+<span id="modifymmtimer-option-_0028_002dM_0029"></span><h4 class="subsection">1.1.15 modifymmtimer option (-M)</h4>
+<span id="index-ntpd_002dmodifymmtimer"></span>
<p>This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
</p>
@@ -671,28 +626,24 @@ Next: <a href="#ntpd-nice" accesskey="n" rel="next">ntpd nice</a>, Previous: <a
ensures the resolution does not change while ntpd is running,
avoiding timekeeping glitches associated with changes.
</p><hr>
-<a name="ntpd-nice"></a>
-<div class="header">
+<span id="ntpd-nice"></span><div class="header">
<p>
Next: <a href="#ntpd-pidfile" accesskey="n" rel="next">ntpd pidfile</a>, Previous: <a href="#ntpd-modifymmtimer" accesskey="p" rel="prev">ntpd modifymmtimer</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="nice-option-_0028_002dN_0029"></a>
-<h4 class="subsection">1.1.16 nice option (-N)</h4>
-<a name="index-ntpd_002dnice"></a>
+<span id="nice-option-_0028_002dN_0029"></span><h4 class="subsection">1.1.16 nice option (-N)</h4>
+<span id="index-ntpd_002dnice"></span>
<p>This is the &ldquo;run at high priority&rdquo; option.
To the extent permitted by the operating system, run
<code>ntpd</code>
at the highest priority.
</p><hr>
-<a name="ntpd-pidfile"></a>
-<div class="header">
+<span id="ntpd-pidfile"></span><div class="header">
<p>
Next: <a href="#ntpd-priority" accesskey="n" rel="next">ntpd priority</a>, Previous: <a href="#ntpd-nice" accesskey="p" rel="prev">ntpd nice</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="pidfile-option-_0028_002dp_0029"></a>
-<h4 class="subsection">1.1.17 pidfile option (-p)</h4>
-<a name="index-ntpd_002dpidfile"></a>
+<span id="pidfile-option-_0028_002dp_0029"></span><h4 class="subsection">1.1.17 pidfile option (-p)</h4>
+<span id="index-ntpd_002dpidfile"></span>
<p>This is the &ldquo;path to the pid file&rdquo; option.
This option takes a string argument.
@@ -703,14 +654,12 @@ This is the same operation as the
<code>pidfile</code> <kbd>pidfile</kbd>
configuration file directive.
</p><hr>
-<a name="ntpd-priority"></a>
-<div class="header">
+<span id="ntpd-priority"></span><div class="header">
<p>
Next: <a href="#ntpd-quit" accesskey="n" rel="next">ntpd quit</a>, Previous: <a href="#ntpd-pidfile" accesskey="p" rel="prev">ntpd pidfile</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="priority-option-_0028_002dP_0029"></a>
-<h4 class="subsection">1.1.18 priority option (-P)</h4>
-<a name="index-ntpd_002dpriority"></a>
+<span id="priority-option-_0028_002dP_0029"></span><h4 class="subsection">1.1.18 priority option (-P)</h4>
+<span id="index-ntpd_002dpriority"></span>
<p>This is the &ldquo;process priority&rdquo; option.
This option takes a number argument.
@@ -720,14 +669,12 @@ at the specified
<code>sched_setscheduler(SCHED_FIFO)</code>
priority.
</p><hr>
-<a name="ntpd-quit"></a>
-<div class="header">
+<span id="ntpd-quit"></span><div class="header">
<p>
Next: <a href="#ntpd-propagationdelay" accesskey="n" rel="next">ntpd propagationdelay</a>, Previous: <a href="#ntpd-priority" accesskey="p" rel="prev">ntpd priority</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="quit-option-_0028_002dq_0029"></a>
-<h4 class="subsection">1.1.19 quit option (-q)</h4>
-<a name="index-ntpd_002dquit"></a>
+<span id="quit-option-_0028_002dq_0029"></span><h4 class="subsection">1.1.19 quit option (-q)</h4>
+<span id="index-ntpd_002dquit"></span>
<p>This is the &ldquo;set the time and quit&rdquo; option.
</p>
@@ -749,27 +696,23 @@ and
options can be used with this option.
Note: The kernel time discipline is disabled with this option.
</p><hr>
-<a name="ntpd-propagationdelay"></a>
-<div class="header">
+<span id="ntpd-propagationdelay"></span><div class="header">
<p>
Next: <a href="#ntpd-saveconfigquit" accesskey="n" rel="next">ntpd saveconfigquit</a>, Previous: <a href="#ntpd-quit" accesskey="p" rel="prev">ntpd quit</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="propagationdelay-option-_0028_002dr_0029"></a>
-<h4 class="subsection">1.1.20 propagationdelay option (-r)</h4>
-<a name="index-ntpd_002dpropagationdelay"></a>
+<span id="propagationdelay-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.20 propagationdelay option (-r)</h4>
+<span id="index-ntpd_002dpropagationdelay"></span>
<p>This is the &ldquo;broadcast/propagation delay&rdquo; option.
This option takes a string argument.
Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
</p><hr>
-<a name="ntpd-saveconfigquit"></a>
-<div class="header">
+<span id="ntpd-saveconfigquit"></span><div class="header">
<p>
Next: <a href="#ntpd-statsdir" accesskey="n" rel="next">ntpd statsdir</a>, Previous: <a href="#ntpd-propagationdelay" accesskey="p" rel="prev">ntpd propagationdelay</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="saveconfigquit-option"></a>
-<h4 class="subsection">1.1.21 saveconfigquit option</h4>
-<a name="index-ntpd_002dsaveconfigquit"></a>
+<span id="saveconfigquit-option"></span><h4 class="subsection">1.1.21 saveconfigquit option</h4>
+<span id="index-ntpd_002dsaveconfigquit"></span>
<p>This is the &ldquo;save parsed configuration and quit&rdquo; option.
This option takes a string argument.
@@ -785,14 +728,12 @@ quit, wait-sync.
equivalent to the given filename and exit. This option was
designed for automated testing.
</p><hr>
-<a name="ntpd-statsdir"></a>
-<div class="header">
+<span id="ntpd-statsdir"></span><div class="header">
<p>
Next: <a href="#ntpd-trustedkey" accesskey="n" rel="next">ntpd trustedkey</a>, Previous: <a href="#ntpd-saveconfigquit" accesskey="p" rel="prev">ntpd saveconfigquit</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="statsdir-option-_0028_002ds_0029"></a>
-<h4 class="subsection">1.1.22 statsdir option (-s)</h4>
-<a name="index-ntpd_002dstatsdir"></a>
+<span id="statsdir-option-_0028_002ds_0029"></span><h4 class="subsection">1.1.22 statsdir option (-s)</h4>
+<span id="index-ntpd_002dstatsdir"></span>
<p>This is the &ldquo;statistics file location&rdquo; option.
This option takes a string argument.
@@ -801,14 +742,12 @@ This is the same operation as the
<code>statsdir</code> <kbd>statsdir</kbd>
configuration file directive.
</p><hr>
-<a name="ntpd-trustedkey"></a>
-<div class="header">
+<span id="ntpd-trustedkey"></span><div class="header">
<p>
Next: <a href="#ntpd-user" accesskey="n" rel="next">ntpd user</a>, Previous: <a href="#ntpd-statsdir" accesskey="p" rel="prev">ntpd statsdir</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="trustedkey-option-_0028_002dt_0029"></a>
-<h4 class="subsection">1.1.23 trustedkey option (-t)</h4>
-<a name="index-ntpd_002dtrustedkey"></a>
+<span id="trustedkey-option-_0028_002dt_0029"></span><h4 class="subsection">1.1.23 trustedkey option (-t)</h4>
+<span id="index-ntpd_002dtrustedkey"></span>
<p>This is the &ldquo;trusted key number&rdquo; option.
This option takes a string argument <samp>tkey</samp>.
@@ -820,14 +759,12 @@ This option takes a string argument <samp>tkey</samp>.
<p>Add the specified key number to the trusted key list.
</p><hr>
-<a name="ntpd-user"></a>
-<div class="header">
+<span id="ntpd-user"></span><div class="header">
<p>
Next: <a href="#ntpd-updateinterval" accesskey="n" rel="next">ntpd updateinterval</a>, Previous: <a href="#ntpd-trustedkey" accesskey="p" rel="prev">ntpd trustedkey</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="user-option-_0028_002du_0029"></a>
-<h4 class="subsection">1.1.24 user option (-u)</h4>
-<a name="index-ntpd_002duser"></a>
+<span id="user-option-_0028_002du_0029"></span><h4 class="subsection">1.1.24 user option (-u)</h4>
+<span id="index-ntpd_002duser"></span>
<p>This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
This option takes a string argument.
@@ -844,14 +781,12 @@ This option is supported under NetBSD (configure with
<code>--enable-clockctl</code>) or Linux (configure with
<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
</p><hr>
-<a name="ntpd-updateinterval"></a>
-<div class="header">
+<span id="ntpd-updateinterval"></span><div class="header">
<p>
Next: <a href="#ntpd-wait_002dsync" accesskey="n" rel="next">ntpd wait-sync</a>, Previous: <a href="#ntpd-user" accesskey="p" rel="prev">ntpd user</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="updateinterval-option-_0028_002dU_0029"></a>
-<h4 class="subsection">1.1.25 updateinterval option (-U)</h4>
-<a name="index-ntpd_002dupdateinterval"></a>
+<span id="updateinterval-option-_0028_002dU_0029"></span><h4 class="subsection">1.1.25 updateinterval option (-U)</h4>
+<span id="index-ntpd_002dupdateinterval"></span>
<p>This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
This option takes a number argument.
@@ -860,14 +795,12 @@ For systems with routing socket support the scans will be performed shortly afte
has been detected by the system.
Use 0 to disable scanning. 60 seconds is the minimum time between scans.
</p><hr>
-<a name="ntpd-wait_002dsync"></a>
-<div class="header">
+<span id="ntpd-wait_002dsync"></span><div class="header">
<p>
Next: <a href="#ntpd-slew" accesskey="n" rel="next">ntpd slew</a>, Previous: <a href="#ntpd-updateinterval" accesskey="p" rel="prev">ntpd updateinterval</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="wait_002dsync-option-_0028_002dw_0029"></a>
-<h4 class="subsection">1.1.26 wait-sync option (-w)</h4>
-<a name="index-ntpd_002dwait_002dsync"></a>
+<span id="wait_002dsync-option-_0028_002dw_0029"></span><h4 class="subsection">1.1.26 wait-sync option (-w)</h4>
+<span id="index-ntpd_002dwait_002dsync"></span>
<p>This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
This option takes a number argument.
@@ -888,14 +821,12 @@ otherwise it is <code>ETIMEDOUT</code>.
This provides the option for a script starting <code>ntpd</code> to easily
wait for the first set of the clock before proceeding.
</p><hr>
-<a name="ntpd-slew"></a>
-<div class="header">
+<span id="ntpd-slew"></span><div class="header">
<p>
Next: <a href="#ntpd-usepcc" accesskey="n" rel="next">ntpd usepcc</a>, Previous: <a href="#ntpd-wait_002dsync" accesskey="p" rel="prev">ntpd wait-sync</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="slew-option-_0028_002dx_0029"></a>
-<h4 class="subsection">1.1.27 slew option (-x)</h4>
-<a name="index-ntpd_002dslew"></a>
+<span id="slew-option-_0028_002dx_0029"></span><h4 class="subsection">1.1.27 slew option (-x)</h4>
+<span id="index-ntpd_002dslew"></span>
<p>This is the &ldquo;slew up to 600 seconds&rdquo; option.
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
@@ -912,14 +843,12 @@ See the
configuration file directive for other options.
Note: The kernel time discipline is disabled with this option.
</p><hr>
-<a name="ntpd-usepcc"></a>
-<div class="header">
+<span id="ntpd-usepcc"></span><div class="header">
<p>
Next: <a href="#ntpd-pccfreq" accesskey="n" rel="next">ntpd pccfreq</a>, Previous: <a href="#ntpd-slew" accesskey="p" rel="prev">ntpd slew</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="usepcc-option"></a>
-<h4 class="subsection">1.1.28 usepcc option</h4>
-<a name="index-ntpd_002dusepcc"></a>
+<span id="usepcc-option"></span><h4 class="subsection">1.1.28 usepcc option</h4>
+<span id="index-ntpd_002dusepcc"></span>
<p>This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
</p>
@@ -933,14 +862,12 @@ The CPU counter and <code>QueryPerformanceCounter</code> are compared, and if
they have the same frequency, the CPU counter (RDTSC on x86) is
used directly, saving the overhead of a system call.
</p><hr>
-<a name="ntpd-pccfreq"></a>
-<div class="header">
+<span id="ntpd-pccfreq"></span><div class="header">
<p>
Next: <a href="#ntpd-mdns" accesskey="n" rel="next">ntpd mdns</a>, Previous: <a href="#ntpd-usepcc" accesskey="p" rel="prev">ntpd usepcc</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="pccfreq-option"></a>
-<h4 class="subsection">1.1.29 pccfreq option</h4>
-<a name="index-ntpd_002dpccfreq"></a>
+<span id="pccfreq-option"></span><h4 class="subsection">1.1.29 pccfreq option</h4>
+<span id="index-ntpd_002dpccfreq"></span>
<p>This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
This option takes a string argument.
@@ -954,14 +881,12 @@ This option takes a string argument.
The CPU counter (RDTSC on x86) is used unconditionally with the
given frequency (in Hz).
</p><hr>
-<a name="ntpd-mdns"></a>
-<div class="header">
+<span id="ntpd-mdns"></span><div class="header">
<p>
Next: <a href="#ntpd-config" accesskey="n" rel="next">ntpd config</a>, Previous: <a href="#ntpd-pccfreq" accesskey="p" rel="prev">ntpd pccfreq</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="mdns-option-_0028_002dm_0029"></a>
-<h4 class="subsection">1.1.30 mdns option (-m)</h4>
-<a name="index-ntpd_002dmdns"></a>
+<span id="mdns-option-_0028_002dm_0029"></span><h4 class="subsection">1.1.30 mdns option (-m)</h4>
+<span id="index-ntpd_002dmdns"></span>
<p>This is the &ldquo;register with mdns as a ntp server&rdquo; option.
</p>
@@ -975,13 +900,11 @@ the server to be discovered via mDNS client lookup.
</p>
<hr>
-<a name="ntpd-config"></a>
-<div class="header">
+<span id="ntpd-config"></span><div class="header">
<p>
Next: <a href="#ntpd-exit-status" accesskey="n" rel="next">ntpd exit status</a>, Previous: <a href="#ntpd-mdns" accesskey="p" rel="prev">ntpd mdns</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="presetting_002fconfiguring-ntpd"></a>
-<h4 class="subsection">1.1.31 presetting/configuring ntpd</h4>
+<span id="presetting_002fconfiguring-ntpd"></span><h4 class="subsection">1.1.31 presetting/configuring ntpd</h4>
<p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from environment variables named <code>NTPD</code> and <code>NTPD_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
@@ -993,12 +916,11 @@ values are treated like option arguments.
<p>The command line options relating to configuration and/or usage help are:
</p>
-<a name="version-_0028_002d_0029"></a>
-<h4 class="subsubheading">version (-)</h4>
+<span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>
<p>Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
</p>
<dl compact="compact">
@@ -1014,13 +936,11 @@ Only the first letter of the argument is examined:
</dl>
<hr>
-<a name="ntpd-exit-status"></a>
-<div class="header">
+<span id="ntpd-exit-status"></span><div class="header">
<p>
Next: <a href="#ntpd-Usage" accesskey="n" rel="next">ntpd Usage</a>, Previous: <a href="#ntpd-config" accesskey="p" rel="prev">ntpd config</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ntpd-exit-status-1"></a>
-<h4 class="subsection">1.1.32 ntpd exit status</h4>
+<span id="ntpd-exit-status-1"></span><h4 class="subsection">1.1.32 ntpd exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
@@ -1032,54 +952,42 @@ Next: <a href="#ntpd-Usage" accesskey="n" rel="next">ntpd Usage</a>, Previous: <
</p></dd>
</dl>
<hr>
-<a name="ntpd-Usage"></a>
-<div class="header">
+<span id="ntpd-Usage"></span><div class="header">
<p>
Next: <a href="#ntpd-Files" accesskey="n" rel="next">ntpd Files</a>, Previous: <a href="#ntpd-exit-status" accesskey="p" rel="prev">ntpd exit status</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ntpd-Usage-1"></a>
-<h4 class="subsection">1.1.33 ntpd Usage</h4>
+<span id="ntpd-Usage-1"></span><h4 class="subsection">1.1.33 ntpd Usage</h4>
<hr>
-<a name="ntpd-Files"></a>
-<div class="header">
+<span id="ntpd-Files"></span><div class="header">
<p>
Next: <a href="#ntpd-See-Also" accesskey="n" rel="next">ntpd See Also</a>, Previous: <a href="#ntpd-Usage" accesskey="p" rel="prev">ntpd Usage</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ntpd-Files-1"></a>
-<h4 class="subsection">1.1.34 ntpd Files</h4>
+<span id="ntpd-Files-1"></span><h4 class="subsection">1.1.34 ntpd Files</h4>
<hr>
-<a name="ntpd-See-Also"></a>
-<div class="header">
+<span id="ntpd-See-Also"></span><div class="header">
<p>
Next: <a href="#ntpd-Bugs" accesskey="n" rel="next">ntpd Bugs</a>, Previous: <a href="#ntpd-Files" accesskey="p" rel="prev">ntpd Files</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ntpd-See-Also-1"></a>
-<h4 class="subsection">1.1.35 ntpd See Also</h4>
+<span id="ntpd-See-Also-1"></span><h4 class="subsection">1.1.35 ntpd See Also</h4>
<hr>
-<a name="ntpd-Bugs"></a>
-<div class="header">
+<span id="ntpd-Bugs"></span><div class="header">
<p>
Next: <a href="#ntpd-Notes" accesskey="n" rel="next">ntpd Notes</a>, Previous: <a href="#ntpd-See-Also" accesskey="p" rel="prev">ntpd See Also</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ntpd-Bugs-1"></a>
-<h4 class="subsection">1.1.36 ntpd Bugs</h4>
+<span id="ntpd-Bugs-1"></span><h4 class="subsection">1.1.36 ntpd Bugs</h4>
<hr>
-<a name="ntpd-Notes"></a>
-<div class="header">
+<span id="ntpd-Notes"></span><div class="header">
<p>
Previous: <a href="#ntpd-Bugs" accesskey="p" rel="prev">ntpd Bugs</a>, Up: <a href="#ntpd-Invocation" accesskey="u" rel="up">ntpd Invocation</a> &nbsp; </p>
</div>
-<a name="ntpd-Notes-1"></a>
-<h4 class="subsection">1.1.37 ntpd Notes</h4>
+<span id="ntpd-Notes-1"></span><h4 class="subsection">1.1.37 ntpd Notes</h4>
<hr>
-<a name="Usage"></a>
-<div class="header">
+<span id="Usage"></span><div class="header">
<p>
Previous: <a href="#ntpd-Invocation" accesskey="p" rel="prev">ntpd Invocation</a>, Up: <a href="#ntpd-Description" accesskey="u" rel="up">ntpd Description</a> &nbsp; </p>
</div>
-<a name="Usage-1"></a>
-<h3 class="section">1.2 Usage</h3>
+<span id="Usage-1"></span><h3 class="section">1.2 Usage</h3>
<table>
<thead><tr><th width="23%">What</th><th width="23%">Default</th><th width="5%">Flag</th><th width="15%">Option</th></tr></thead>
diff --git a/contrib/ntp/ntpd/ntpd.man.in b/contrib/ntp/ntpd/ntpd.man.in
index 00c567f508df..02b7737fbfed 100644
--- a/contrib/ntp/ntpd/ntpd.man.in
+++ b/contrib/ntp/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpd @NTPD_MS@ "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:39 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:42 PM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -979,7 +979,7 @@ RFC5908
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
@@ -995,7 +995,7 @@ mind.
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
Portions of this document came from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/ntpd/ntpd.mdoc.in b/contrib/ntp/ntpd/ntpd.mdoc.in
index 8eb547a438f6..2f97219ced96 100644
--- a/contrib/ntp/ntpd/ntpd.mdoc.in
+++ b/contrib/ntp/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:30 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:29 PM by AutoGen 5.18.16
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -886,7 +886,7 @@ A snapshot of this documentation is available in HTML format in
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
@@ -900,7 +900,7 @@ the fancy features which consume the space were designed more with
a busy primary server, rather than a high stratum workstation in
mind.
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
Portions of this document came from FreeBSD.
.Pp
diff --git a/contrib/ntp/ntpd/refclock_acts.c b/contrib/ntp/ntpd/refclock_acts.c
index f62cc466b25c..944ac764ccff 100644
--- a/contrib/ntp/ntpd/refclock_acts.c
+++ b/contrib/ntp/ntpd/refclock_acts.c
@@ -21,12 +21,6 @@
# include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */
-#ifdef SYS_WINNT
-#undef write /* ports/winnt/include/config.h: #define write _write */
-extern int async_write(int, const void *, unsigned int);
-#define write(fd, data, octets) async_write(fd, data, octets)
-#endif
-
/*
* This driver supports the US (NIST, USNO) and European (PTB, NPL,
* etc.) modem time services, as well as Spectracom GPS and WWVB
@@ -347,8 +341,7 @@ acts_receive(
*up->bufptr++ = *tptr;
if (*tptr == '*' || *tptr == '#') {
up->tstamp = pp->lastrec;
- if (write(pp->io.fd, tptr, 1) < 0)
- msyslog(LOG_ERR, "acts: write echo fails %m");
+ refclock_write(peer, tptr, 1, "data");
}
}
}
@@ -408,10 +401,10 @@ acts_message(
up->retry, sys_phone[up->retry]);
if (ioctl(pp->io.fd, TIOCMBIS, &dtr) < 0)
msyslog(LOG_ERR, "acts: ioctl(TIOCMBIS) failed: %m");
- if (write(pp->io.fd, sys_phone[up->retry],
- strlen(sys_phone[up->retry])) < 0)
- msyslog(LOG_ERR, "acts: write DIAL fails %m");
- write(pp->io.fd, "\r", 1);
+ refclock_write(peer, sys_phone[up->retry],
+ strlen(sys_phone[up->retry]),
+ "DIAL");
+ refclock_write(peer, "\r", 1, "CR");
up->retry++;
up->state = S_CONNECT;
up->timer = ANSWER;
@@ -467,7 +460,6 @@ acts_timeout(
struct actsunit *up;
struct refclockproc *pp;
int fd;
- int rc;
char device[20];
char lockfile[128], pidbuf[8];
@@ -513,7 +505,7 @@ acts_timeout(
*/
snprintf(device, sizeof(device), DEVICE,
up->unit);
- fd = refclock_open(device, SPEED232, LDISC_ACTS |
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_ACTS |
LDISC_RAW | LDISC_REMOTE);
if (fd < 0) {
msyslog(LOG_ERR, "acts: open fails %m");
@@ -534,8 +526,7 @@ acts_timeout(
* the modem business and send 'T' for Spectrabum.
*/
if (sys_phone[up->retry] == NULL) {
- if (write(pp->io.fd, "T", 1) < 0)
- msyslog(LOG_ERR, "acts: write T fails %m");
+ refclock_write(peer, "T", 1, "T");
up->state = S_MSG;
up->timer = TIMECODE;
return;
@@ -547,10 +538,9 @@ acts_timeout(
*/
mprintf_event(PEVNT_CLOCK, peer, "SETUP %s",
modem_setup);
- rc = write(pp->io.fd, modem_setup, strlen(modem_setup));
- if (rc < 0)
- msyslog(LOG_ERR, "acts: write SETUP fails %m");
- write(pp->io.fd, "\r", 1);
+ refclock_write(peer, modem_setup, strlen(modem_setup),
+ "SETUP");
+ refclock_write(peer, "\r", 1, "CR");
up->state = S_SETUP;
up->timer = SETUP;
return;
diff --git a/contrib/ntp/ntpd/refclock_arbiter.c b/contrib/ntp/ntpd/refclock_arbiter.c
index 738be508d586..7de613fa751e 100644
--- a/contrib/ntp/ntpd/refclock_arbiter.c
+++ b/contrib/ntp/ntpd/refclock_arbiter.c
@@ -17,12 +17,6 @@
#include <stdio.h>
#include <ctype.h>
-#ifdef SYS_WINNT
-extern int async_write(int, const void *, unsigned int);
-#undef write
-#define write(fd, data, octets) async_write(fd, data, octets)
-#endif
-
/*
* This driver supports the Arbiter 1088A/B Satellite Controlled Clock.
* The claimed accuracy of this clock is 100 ns relative to the PPS
@@ -163,7 +157,7 @@ arb_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_CLK);
if (fd <= 0)
return (0);
@@ -200,7 +194,7 @@ arb_start(
#ifdef DEBUG
if(debug) { printf("arbiter: mode = %d.\n", peer->MODE); }
#endif
- write(pp->io.fd, COMMAND_HALT_BCAST, 2);
+ refclock_write(peer, COMMAND_HALT_BCAST, 2, "HALT_BCAST");
return (1);
}
@@ -285,33 +279,34 @@ arb_receive(
*/
if (!strncmp(tbuf, "TQ", 2)) {
up->qualchar = tbuf[2];
- write(pp->io.fd, "SR", 2);
+ refclock_write(peer, "SR", 2, "SR");
return;
} else if (!strncmp(tbuf, "SR", 2)) {
strlcpy(up->status, tbuf + 2,
sizeof(up->status));
if (pp->sloppyclockflag & CLK_FLAG4)
- write(pp->io.fd, "LA", 2);
+ refclock_write(peer, "LA", 2, "LA");
else
- write(pp->io.fd, COMMAND_START_BCAST, 2);
+ refclock_write(peer, COMMAND_START_BCAST, 2,
+ COMMAND_START_BCAST);
return;
} else if (!strncmp(tbuf, "LA", 2)) {
strlcpy(up->latlon, tbuf + 2, sizeof(up->latlon));
- write(pp->io.fd, "LO", 2);
+ refclock_write(peer, "LO", 2, "LO");
return;
} else if (!strncmp(tbuf, "LO", 2)) {
strlcat(up->latlon, " ", sizeof(up->latlon));
strlcat(up->latlon, tbuf + 2, sizeof(up->latlon));
- write(pp->io.fd, "LH", 2);
+ refclock_write(peer, "LH", 2, "LH");
return;
} else if (!strncmp(tbuf, "LH", 2)) {
strlcat(up->latlon, " ", sizeof(up->latlon));
strlcat(up->latlon, tbuf + 2, sizeof(up->latlon));
- write(pp->io.fd, "DB", 2);
+ refclock_write(peer, "DB", 2, "DB");
return;
} else if (!strncmp(tbuf, "DB", 2)) {
@@ -322,7 +317,8 @@ arb_receive(
if (debug)
printf("arbiter: %s\n", up->latlon);
#endif
- write(pp->io.fd, COMMAND_START_BCAST, 2);
+ refclock_write(peer, COMMAND_START_BCAST, 2,
+ COMMAND_START_BCAST);
}
}
@@ -351,7 +347,7 @@ arb_receive(
&syncchar, &pp->year, &pp->day, &pp->hour,
&pp->minute, &pp->second) != 6) {
refclock_report(peer, CEVNT_BADREPLY);
- write(pp->io.fd, COMMAND_HALT_BCAST, 2);
+ refclock_write(peer, COMMAND_HALT_BCAST, 2, COMMAND_HALT_BCAST);
return;
}
@@ -401,13 +397,15 @@ arb_receive(
case 'F': /* clock failure */
pp->disp = MAXDISPERSE;
refclock_report(peer, CEVNT_FAULT);
- write(pp->io.fd, COMMAND_HALT_BCAST, 2);
+ refclock_write(peer, COMMAND_HALT_BCAST, 2,
+ COMMAND_HALT_BCAST);
return;
default:
pp->disp = MAXDISPERSE;
refclock_report(peer, CEVNT_BADREPLY);
- write(pp->io.fd, COMMAND_HALT_BCAST, 2);
+ refclock_write(peer, COMMAND_HALT_BCAST, 2,
+ COMMAND_HALT_BCAST);
return;
}
if (syncchar != ' ')
@@ -425,7 +423,7 @@ arb_receive(
refclock_receive(peer);
/* if (up->tcswitch >= MAXSTAGE) { */
- write(pp->io.fd, COMMAND_HALT_BCAST, 2);
+ refclock_write(peer, COMMAND_HALT_BCAST, 2, COMMAND_HALT_BCAST);
/* } */
}
@@ -454,7 +452,7 @@ arb_poll(
up = pp->unitptr;
pp->polls++;
up->tcswitch = 0;
- if (write(pp->io.fd, "TQ", 2) != 2)
+ if (refclock_write(peer, "TQ", 2, "TQ") != 2)
refclock_report(peer, CEVNT_FAULT);
/*
diff --git a/contrib/ntp/ntpd/refclock_arc.c b/contrib/ntp/ntpd/refclock_arc.c
index 7daae8d3a03a..d2dba54cb462 100644
--- a/contrib/ntp/ntpd/refclock_arc.c
+++ b/contrib/ntp/ntpd/refclock_arc.c
@@ -645,7 +645,7 @@ arc_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- temp_fd = refclock_open(device, SPEED, LDISC_CLK);
+ temp_fd = refclock_open(&peer->srcadr, device, SPEED, LDISC_CLK);
if (temp_fd <= 0)
return 0;
DPRINTF(1, ("arc: unit %d using tty_open().\n", unit));
diff --git a/contrib/ntp/ntpd/refclock_as2201.c b/contrib/ntp/ntpd/refclock_as2201.c
index 1acf9b208cfa..d71284173cbb 100644
--- a/contrib/ntp/ntpd/refclock_as2201.c
+++ b/contrib/ntp/ntpd/refclock_as2201.c
@@ -166,7 +166,7 @@ as2201_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(gpsdev, sizeof(gpsdev), DEVICE, unit);
- fd = refclock_open(gpsdev, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, gpsdev, SPEED232, LDISC_CLK);
if (fd <= 0)
return (0);
@@ -340,8 +340,9 @@ as2201_receive(
memcpy(up->lastptr, stat_command[up->index], octets);
up->lastptr += octets - 1;
*up->lastptr = '\0';
- (void)write(pp->io.fd, stat_command[up->index],
- strlen(stat_command[up->index]));
+ refclock_write(peer, stat_command[up->index],
+ strlen(stat_command[up->index]),
+ "command");
up->index++;
if (*stat_command[up->index] == '\0')
up->index = 0;
diff --git a/contrib/ntp/ntpd/refclock_chronolog.c b/contrib/ntp/ntpd/refclock_chronolog.c
index ee54b43a6126..1499ee4c81ed 100644
--- a/contrib/ntp/ntpd/refclock_chronolog.c
+++ b/contrib/ntp/ntpd/refclock_chronolog.c
@@ -109,7 +109,7 @@ chronolog_start(
if (debug)
printf ("starting Chronolog with device %s\n",device);
#endif
- fd = refclock_open(device, SPEED232, 0);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, 0);
if (fd <= 0)
return (0);
diff --git a/contrib/ntp/ntpd/refclock_chu.c b/contrib/ntp/ntpd/refclock_chu.c
index d745c816768d..3f43fea86a67 100644
--- a/contrib/ntp/ntpd/refclock_chu.c
+++ b/contrib/ntp/ntpd/refclock_chu.c
@@ -493,7 +493,7 @@ chu_start(
fd = fd_audio;
} else {
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_RAW);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_RAW);
}
#else /* HAVE_AUDIO */
@@ -501,7 +501,7 @@ chu_start(
* Open serial port in raw mode.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_RAW);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_RAW);
#endif /* HAVE_AUDIO */
if (fd < 0)
diff --git a/contrib/ntp/ntpd/refclock_dumbclock.c b/contrib/ntp/ntpd/refclock_dumbclock.c
index 89f0f4748413..3563847dac05 100644
--- a/contrib/ntp/ntpd/refclock_dumbclock.c
+++ b/contrib/ntp/ntpd/refclock_dumbclock.c
@@ -23,12 +23,6 @@
#include <stdio.h>
#include <ctype.h>
-#ifdef SYS_WINNT
-extern int async_write(int, const void *, unsigned int);
-#undef write
-#define write(fd, data, octets) async_write(fd, data, octets)
-#endif
-
/*
* This driver supports a generic dumb clock that only outputs hh:mm:ss,
* in local time, no less.
@@ -120,7 +114,7 @@ dumbclock_start(
if (debug)
printf ("starting Dumbclock with device %s\n",device);
#endif
- fd = refclock_open(device, SPEED232, 0);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, 0);
if (fd <= 0)
return (0);
@@ -370,7 +364,7 @@ dumbclock_poll(
pollchar = 'R';
else
pollchar = 'T';
- if (write(pp->io.fd, &pollchar, 1) != 1)
+ if (refclock_fdwrite(peer, pp->io.fd, &pollchar, 1) != 1)
refclock_report(peer, CEVNT_FAULT);
else
pp->polls++;
diff --git a/contrib/ntp/ntpd/refclock_fg.c b/contrib/ntp/ntpd/refclock_fg.c
index d5915da3b5e7..abcf43f9cb9e 100644
--- a/contrib/ntp/ntpd/refclock_fg.c
+++ b/contrib/ntp/ntpd/refclock_fg.c
@@ -107,7 +107,7 @@ fg_start(
DPRINTF(1, ("starting FG with device %s\n",device));
- fd = refclock_open(device, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_CLK);
if (fd <= 0)
return (0);
@@ -244,11 +244,11 @@ fg_receive(
}
/* Below I trying to find a correct reply in buffer.
- * Sometime GPS reply located in the beginnig of buffer,
+ * Sometime GPS reply located in the beginning of buffer,
* sometime you can find it with some offset.
*/
- bpt = (char *)rbufp->recv_space.X_recv_buffer;
+ bpt = (char *)rbufp->recv_buffer;
while (*bpt != '\x10')
bpt++;
diff --git a/contrib/ntp/ntpd/refclock_gpsdjson.c b/contrib/ntp/ntpd/refclock_gpsdjson.c
index 0cb2fc408abb..86d4c06d4d00 100644
--- a/contrib/ntp/ntpd/refclock_gpsdjson.c
+++ b/contrib/ntp/ntpd/refclock_gpsdjson.c
@@ -150,6 +150,7 @@ typedef unsigned long int json_uint;
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
#include "ntp_calendar.h"
+#include "ntp_clockdev.h"
#include "timespecops.h"
/* get operation modes from mode word.
@@ -193,7 +194,7 @@ typedef unsigned long int json_uint;
#define REFID "GPSD" /* reference id */
#define DESCRIPTION "GPSD JSON client clock" /* who we are */
-#define MAX_PDU_LEN 1600
+#define MAX_PDU_LEN 8192 /* multi-GNSS reports can be HUGE */
#define TICKOVER_LOW 10
#define TICKOVER_HIGH 120
#define LOGTHROTTLE 3600
@@ -369,7 +370,7 @@ static void gpsd_parse(peerT * const peer,
static BOOL convert_ascii_time(l_fp * fp, const char * gps_time);
static void save_ltc(clockprocT * const pp, const char * const tc);
static int syslogok(clockprocT * const pp, gpsd_unitT * const up);
-static void log_data(peerT *peer, const char *what,
+static void log_data(peerT *peer, int level, const char *what,
const char *buf, size_t len);
static int16_t clamped_precision(int rawprec);
@@ -502,8 +503,10 @@ gpsd_start(
clockprocT * const pp = peer->procptr;
gpsd_unitT * up;
gpsd_unitT ** uscan = &s_clock_units;
+ const char *tmpName;
- struct stat sb;
+ struct stat sb;
+ char * devname = NULL;
/* check if we can proceed at all or if init failed */
if ( ! gpsd_init_check())
@@ -531,13 +534,29 @@ gpsd_start(
* practicable, we will have to read the symlink, if
* any, so we can get the true device file.)
*/
- if (-1 == myasprintf(&up->device, "%s%u",
- s_dev_stem, up->unit)) {
+ tmpName = clockdev_lookup(&peer->srcadr, 0);
+ if (NULL != tmpName) {
+ up->device = estrdup(tmpName);
+ } else if (-1 == myasprintf(&up->device, "%s%u", s_dev_stem, up->unit)) {
msyslog(LOG_ERR, "%s: clock device name too long",
up->logname);
goto dev_fail;
}
- if (-1 == stat(up->device, &sb) || !S_ISCHR(sb.st_mode)) {
+ devname = up->device;
+ up->device = ntp_realpath(devname);
+ if (NULL == up->device) {
+ msyslog(LOG_ERR, "%s: '%s' has no absolute path",
+ up->logname, devname);
+ goto dev_fail;
+ }
+ free(devname);
+ devname = NULL;
+ if (-1 == lstat(up->device, &sb)) {
+ msyslog(LOG_ERR, "%s: '%s' not accessible",
+ up->logname, up->device);
+ goto dev_fail;
+ }
+ if (!S_ISCHR(sb.st_mode)) {
msyslog(LOG_ERR, "%s: '%s' is not a character device",
up->logname, up->device);
goto dev_fail;
@@ -585,7 +604,7 @@ gpsd_start(
dev_fail:
/* On failure, remove all UNIT ressources and declare defeat. */
-
+ free(devname);
INSIST (up);
if (!--up->refcount) {
*uscan = up->next_unit;
@@ -657,7 +676,7 @@ gpsd_receive(
char *pdst, *edst, ch;
/* log the data stream, if this is enabled */
- log_data(peer, "recv", (const char*)rbufp->recv_buffer,
+ log_data(peer, 3, "recv", (const char*)rbufp->recv_buffer,
(size_t)rbufp->recv_length);
@@ -672,7 +691,7 @@ gpsd_receive(
esrc = psrc + rbufp->recv_length;
pdst = up->buffer + up->buflen;
- edst = pdst + sizeof(up->buffer) - 1; /* for trailing NUL */
+ edst = up->buffer + sizeof(up->buffer) - 1; /* for trailing NUL */
while (psrc != esrc) {
ch = *psrc++;
@@ -835,7 +854,7 @@ timer_primary(
size_t rlen = strlen(s_req_version);
DPRINTF(2, ("%s: timer livecheck: '%s'\n",
up->logname, s_req_version));
- log_data(peer, "send", s_req_version, rlen);
+ log_data(peer, 2, "send", s_req_version, rlen);
rc = write(pp->io.fd, s_req_version, rlen);
(void)rc;
} else if (-1 != up->fdt) {
@@ -1507,7 +1526,7 @@ process_version(
/* The logon string is actually the ?WATCH command of GPSD,
* using JSON data and selecting the GPS device name we created
- * from our unit number. We have an old a newer version that
+ * from our unit number. We have an old and a newer version that
* request PPS (and TOFF) transmission.
*/
snprintf(up->buffer, sizeof(up->buffer),
@@ -1515,7 +1534,7 @@ process_version(
up->device, (up->pf_toff ? ",\"pps\":true" : ""));
buf = up->buffer;
len = strlen(buf);
- log_data(peer, "send", buf, len);
+ log_data(peer, 2, "send", buf, len);
if (len != write(pp->io.fd, buf, len) && (syslogok(pp, up))) {
/* Note: if the server fails to read our request, the
* resulting data timeout will take care of the
@@ -2172,6 +2191,7 @@ add_string(
static void
log_data(
peerT *peer,
+ int level,
const char *what,
const char *buf ,
size_t len )
@@ -2182,7 +2202,7 @@ log_data(
clockprocT * const pp = peer->procptr;
gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
- if (debug > 1) {
+ if (debug >= level) {
const char *sptr = buf;
const char *stop = buf + len;
char *dptr = s_lbuf;
@@ -2205,6 +2225,7 @@ log_data(
}
}
+
#else
NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK && CLOCK_GPSDJSON */
diff --git a/contrib/ntp/ntpd/refclock_heath.c b/contrib/ntp/ntpd/refclock_heath.c
index aed056c91497..e34fa6b93628 100644
--- a/contrib/ntp/ntpd/refclock_heath.c
+++ b/contrib/ntp/ntpd/refclock_heath.c
@@ -222,7 +222,7 @@ heath_start(
* Open serial port
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, speed[peer->ttl & 0x3],
+ fd = refclock_open(&peer->srcadr, device, speed[peer->ttl & 0x3],
LDISC_REMOTE);
if (fd <= 0)
return (0);
@@ -427,7 +427,7 @@ heath_poll(
if (ioctl(pp->io.fd, TIOCMBIC, (char *)&bits) < 0)
refclock_report(peer, CEVNT_FAULT);
get_systime(&pp->lastrec);
- if (write(pp->io.fd, "T", 1) != 1)
+ if (refclock_write(peer, "T", 1, "T") != 1)
refclock_report(peer, CEVNT_FAULT);
ioctl(pp->io.fd, TIOCMBIS, (char *)&bits);
if (pp->coderecv == pp->codeproc) {
diff --git a/contrib/ntp/ntpd/refclock_hopfser.c b/contrib/ntp/ntpd/refclock_hopfser.c
index dae8b3761779..e8e5ecefdc40 100644
--- a/contrib/ntp/ntpd/refclock_hopfser.c
+++ b/contrib/ntp/ntpd/refclock_hopfser.c
@@ -46,12 +46,6 @@
# include <sys/ioctl.h>
#endif
-#ifdef SYS_WINNT
-extern int async_write(int, const void *, unsigned int);
-#undef write
-#define write(fd, data, octets) async_write(fd, data, octets)
-#endif
-
/*
* clock definitions
*/
@@ -132,7 +126,7 @@ hopfserial_start (
/* LDISC_STD, LDISC_RAW
* Open serial port. Use CLK line discipline, if available.
*/
- fd = refclock_open(gpsdev, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, gpsdev, SPEED232, LDISC_CLK);
if (fd <= 0) {
#ifdef DEBUG
printf("hopfSerialClock(%d) start: open %s failed\n", unit, gpsdev);
diff --git a/contrib/ntp/ntpd/refclock_hpgps.c b/contrib/ntp/ntpd/refclock_hpgps.c
index 0b45fc74f2f1..fb7085a799e5 100644
--- a/contrib/ntp/ntpd/refclock_hpgps.c
+++ b/contrib/ntp/ntpd/refclock_hpgps.c
@@ -171,7 +171,7 @@ hpgps_start(
ldisc |= LDISC_7O1;
speed = SPEED232Z;
}
- fd = refclock_open(device, speed, ldisc);
+ fd = refclock_open(&peer->srcadr, device, speed, ldisc);
if (fd <= 0)
return (0);
/*
@@ -209,8 +209,8 @@ hpgps_start(
* and get the local timezone information
*/
up->linecnt = 1;
- if (write(pp->io.fd, "*IDN?\r:PTIME:TZONE?\r", 20) != 20)
- refclock_report(peer, CEVNT_FAULT);
+ if (refclock_write(peer, "*IDN?\r:PTIME:TZONE?\r", 20, NULL) != 20)
+ refclock_report(peer, CEVNT_FAULT);
return (1);
}
@@ -349,10 +349,10 @@ hpgps_receive(
if (strrchr(prompt,'E') > strrchr(prompt,'s')){
#ifdef DEBUG
if (debug)
- printf("hpgps: error indicated in prompt: %s\n", prompt);
+ printf("hpgps: error indicated in prompt: %s\n", prompt);
#endif
- if (write(pp->io.fd, "*CLS\r\r", 6) != 6)
- refclock_report(peer, CEVNT_FAULT);
+ if (refclock_write(peer, "*CLS\r\r", 6, NULL) != 6)
+ refclock_report(peer, CEVNT_FAULT);
}
/*
@@ -584,8 +584,8 @@ hpgps_receive(
*/
if (pp->sloppyclockflag & CLK_FLAG4){
up->linecnt = 22;
- if (write(pp->io.fd, ":SYSTEM:PRINT?\r", 15) != 15)
- refclock_report(peer, CEVNT_FAULT);
+ if (refclock_write(peer, ":SYSTEM:PRINT?\r", 15, NULL) != 15)
+ refclock_report(peer, CEVNT_FAULT);
}
}
@@ -614,7 +614,7 @@ hpgps_poll(
refclock_report(peer, CEVNT_TIMEOUT);
else
up->pollcnt--;
- if (write(pp->io.fd, ":PTIME:TCODE?\r", 14) != 14) {
+ if (refclock_write(peer, ":PTIME:TCODE?\r", 14, NULL) != 14) {
refclock_report(peer, CEVNT_FAULT);
}
else
diff --git a/contrib/ntp/ntpd/refclock_jjy.c b/contrib/ntp/ntpd/refclock_jjy.c
index 0b554fac6674..c4e1697bfdf7 100644
--- a/contrib/ntp/ntpd/refclock_jjy.c
+++ b/contrib/ntp/ntpd/refclock_jjy.c
@@ -532,7 +532,7 @@ jjy_start ( int unit, struct peer *peer )
}
/* Open the device */
- fd = refclock_open ( sDeviceName, up->linespeed, up->linediscipline ) ;
+ fd = refclock_open ( &peer->srcadr, sDeviceName, up->linespeed, up->linediscipline ) ;
if ( fd <= 0 ) {
free ( (void*) up ) ;
return RC_START_ERROR ;
diff --git a/contrib/ntp/ntpd/refclock_jupiter.c b/contrib/ntp/ntpd/refclock_jupiter.c
index 815786a37986..7db0198ec692 100644
--- a/contrib/ntp/ntpd/refclock_jupiter.c
+++ b/contrib/ntp/ntpd/refclock_jupiter.c
@@ -184,7 +184,7 @@ jupiter_start(
* Open serial port
*/
snprintf(gpsdev, sizeof(gpsdev), DEVICE, unit);
- fd = refclock_open(gpsdev, SPEED232, LDISC_RAW);
+ fd = refclock_open(&peer->srcadr, gpsdev, SPEED232, LDISC_RAW);
if (fd <= 0) {
jupiter_debug(peer, "jupiter_start", "open %s: %m",
gpsdev);
diff --git a/contrib/ntp/ntpd/refclock_leitch.c b/contrib/ntp/ntpd/refclock_leitch.c
index 69ffdc5ed564..4ed6902dd1be 100644
--- a/contrib/ntp/ntpd/refclock_leitch.c
+++ b/contrib/ntp/ntpd/refclock_leitch.c
@@ -242,7 +242,7 @@ leitch_start(
{
struct leitchunit *leitch;
int fd232;
- char leitchdev[20];
+ char leitchdev[32];
/*
* Check configuration info.
diff --git a/contrib/ntp/ntpd/refclock_mx4200.c b/contrib/ntp/ntpd/refclock_mx4200.c
index 6969e6a2deb1..11c17d069dd4 100644
--- a/contrib/ntp/ntpd/refclock_mx4200.c
+++ b/contrib/ntp/ntpd/refclock_mx4200.c
@@ -217,7 +217,7 @@ mx4200_start(
* Open serial port
*/
snprintf(gpsdev, sizeof(gpsdev), DEVICE, unit);
- fd = refclock_open(gpsdev, SPEED232, LDISC_PPS);
+ fd = refclock_open(&peer->srcadr, gpsdev, SPEED232, LDISC_PPS);
if (fd <= 0)
return 0;
diff --git a/contrib/ntp/ntpd/refclock_neoclock4x.c b/contrib/ntp/ntpd/refclock_neoclock4x.c
index 6fda0f0785be..a54381678310 100644
--- a/contrib/ntp/ntpd/refclock_neoclock4x.c
+++ b/contrib/ntp/ntpd/refclock_neoclock4x.c
@@ -178,7 +178,7 @@ neoclock4x_start(int unit,
/* LDISC_STD, LDISC_RAW
* Open serial port. Use CLK line discipline, if available.
*/
- fd = refclock_open(dev, B2400, LDISC_STD);
+ fd = refclock_open(&peer->srcadr, dev, B2400, LDISC_STD);
if(fd <= 0)
{
return (0);
diff --git a/contrib/ntp/ntpd/refclock_nmea.c b/contrib/ntp/ntpd/refclock_nmea.c
index 1d7997c6aaf9..131ccf641a56 100644
--- a/contrib/ntp/ntpd/refclock_nmea.c
+++ b/contrib/ntp/ntpd/refclock_nmea.c
@@ -93,6 +93,7 @@
#define NMEA_EXTLOG_MASK 0x00010000U
#define NMEA_QUIETPPS_MASK 0x00020000U
#define NMEA_DATETRUST_MASK 0x00040000U
+#define NMEA_IGNSTATUS_MASK 0x00080000U
#define NMEA_PROTO_IDLEN 4 /* tag name must be at least 4 chars */
#define NMEA_PROTO_MINLEN 6 /* min chars in sentence, excluding CS */
@@ -320,14 +321,7 @@ static int nmead_open (const char * device);
* support functions by defining NMEA_WRITE_SUPPORT to non-zero...
*/
#if NMEA_WRITE_SUPPORT
-
static void gps_send(int, const char *, struct peer *);
-# ifdef SYS_WINNT
-# undef write /* ports/winnt/include/config.h: #define write _write */
-extern int async_write(int, const void *, unsigned int);
-# define write(fd, data, octets) async_write(fd, data, octets)
-# endif /* SYS_WINNT */
-
#endif /* NMEA_WRITE_SUPPORT */
/*
@@ -367,45 +361,34 @@ nmea_start(
size_t devlen;
u_int32 rate;
int baudrate;
- const char * baudtext;
-
/* Get baudrate choice from mode byte bits 4/5/6 */
rate = (peer->ttl & NMEA_BAUDRATE_MASK) >> NMEA_BAUDRATE_SHIFT;
switch (rate) {
+ default:
case 0:
baudrate = SPEED232;
- baudtext = "4800";
break;
case 1:
baudrate = B9600;
- baudtext = "9600";
break;
case 2:
baudrate = B19200;
- baudtext = "19200";
break;
case 3:
baudrate = B38400;
- baudtext = "38400";
break;
# ifdef B57600
case 4:
baudrate = B57600;
- baudtext = "57600";
break;
# endif
# ifdef B115200
case 5:
baudrate = B115200;
- baudtext = "115200";
break;
# endif
- default:
- baudrate = SPEED232;
- baudtext = "4800 (fallback)";
- break;
}
/* Allocate and initialize unit structure */
@@ -436,14 +419,12 @@ nmea_start(
refnumtoa(&peer->srcadr));
return FALSE; /* buffer overflow */
}
- pp->io.fd = refclock_open(device, baudrate, LDISC_CLK);
+ pp->io.fd = refclock_open(&peer->srcadr, device, baudrate, LDISC_CLK);
if (0 >= pp->io.fd) {
pp->io.fd = nmead_open(device);
if (-1 == pp->io.fd)
return FALSE;
}
- LOGIF(CLOCKINFO, (LOG_NOTICE, "%s serial %s open at %s bps",
- refnumtoa(&peer->srcadr), device, baudtext));
/* succeed if this clock can be added */
return io_addclock(&pp->io) != 0;
@@ -472,8 +453,7 @@ nmea_shutdown(
# ifdef HAVE_PPSAPI
if (up->ppsapi_lit)
time_pps_destroy(up->atom.handle);
- if (up->ppsapi_tried && up->ppsapi_fd != pp->io.fd)
- close(up->ppsapi_fd);
+ ppsdev_close(pp->io.fd, up->ppsapi_fd);
# endif
free(up);
}
@@ -510,25 +490,33 @@ nmea_control(
* PPS control
*
* If /dev/gpspps$UNIT can be opened that will be used for
- * PPSAPI. Otherwise, the GPS serial device /dev/gps$UNIT
- * already opened is used for PPSAPI as well. (This might not
- * work, in which case the PPS API remains unavailable...)
+ * PPSAPI. On Linux, a PPS device mathing the TTY will be
+ * searched for and possibly created on the fly. Otherwise, the
+ * GPS serial device /dev/gps$UNIT already opened is used for
+ * PPSAPI as well. (This might not work, in which case the PPS
+ * API remains unavailable...)
*/
/* Light up the PPSAPI interface if not yet attempted. */
if ((CLK_FLAG1 & pp->sloppyclockflag) && !up->ppsapi_tried) {
+ const char *ppsname = device;
up->ppsapi_tried = TRUE;
+ /* get FD for the pps device; might be the tty itself! */
devlen = snprintf(device, sizeof(device), PPSDEV, unit);
- if (devlen < sizeof(device)) {
- up->ppsapi_fd = open(device, PPSOPENMODE,
- S_IRUSR | S_IWUSR);
- } else {
- up->ppsapi_fd = -1;
+ if (devlen >= sizeof(device)) {
msyslog(LOG_ERR, "%s PPS device name too long",
refnumtoa(&peer->srcadr));
+ ppsname = NULL;
}
- if (-1 == up->ppsapi_fd)
- up->ppsapi_fd = pp->io.fd;
+ up->ppsapi_fd = ppsdev_reopen(
+ &peer->srcadr,
+ pp->io.fd, up->ppsapi_fd,
+ ppsname, PPSOPENMODE, (S_IRUSR|S_IWUSR));
+ /* note 1: the pps fd might be the same as the tty fd
+ * note 2: the current PPS fd remains valid until
+ * - the clock is shut down
+ * - flag1 is set again after being cleared
+ */
if (refclock_ppsapi(up->ppsapi_fd, &up->atom)) {
/* use the PPS API for our own purposes now. */
up->ppsapi_lit = refclock_params(
@@ -540,9 +528,6 @@ nmea_control(
"%s set PPSAPI params fails",
refnumtoa(&peer->srcadr));
}
- /* note: the PPS I/O handle remains valid until
- * flag1 is cleared or the clock is shut down.
- */
} else {
msyslog(LOG_WARNING,
"%s flag1 1 but PPSAPI fails",
@@ -556,10 +541,7 @@ nmea_control(
if (up->ppsapi_lit)
time_pps_destroy(up->atom.handle);
up->atom.handle = 0;
- /* close/drop PPS fd */
- if (up->ppsapi_fd != pp->io.fd)
- close(up->ppsapi_fd);
- up->ppsapi_fd = -1;
+ /* do !!NOT!! close/drop PPS fd here! */
/* clear markers and peer items */
up->ppsapi_gate = FALSE;
@@ -875,6 +857,11 @@ nmea_procrec(
return;
}
+ /* ignore receiver status? [bug 3694] */
+ if (peer->ttl & NMEA_IGNSTATUS_MASK) { /* assume always good? */
+ pp->leap = LEAP_NOWARNING;
+ }
+
/* check clock sanity; [bug 2143] */
if (pp->leap == LEAP_NOTINSYNC) { /* no good status? */
checkres = CEVNT_PROP;
@@ -1215,7 +1202,7 @@ gps_send(
len - 2, cmd));
/* send out the whole stuff */
- if (write(fd, cmd, len) == -1)
+ if (refclock_fdwrite(peer, fd, cmd, len) != len)
refclock_report(peer, CEVNT_FAULT);
}
#endif /* NMEA_WRITE_SUPPORT */
diff --git a/contrib/ntp/ntpd/refclock_oncore.c b/contrib/ntp/ntpd/refclock_oncore.c
index 17c8cbf294ab..d41d54023348 100644
--- a/contrib/ntp/ntpd/refclock_oncore.c
+++ b/contrib/ntp/ntpd/refclock_oncore.c
@@ -684,7 +684,7 @@ oncore_start(
}
#endif /* !SYS_WINNT */
- fd1 = refclock_open(device1, SPEED, LDISC_RAW);
+ fd1 = refclock_open(&peer->srcadr, device1, SPEED, LDISC_RAW);
if (fd1 <= 0) {
oncore_log_f(instance, LOG_ERR, "Can't open fd1 (%s)",
device1);
@@ -955,7 +955,9 @@ oncore_init_shmem(
shmem_old_size = sbuf.st_size;
if (shmem_old_size != 0) {
shmem_old = emalloc((unsigned) sbuf.st_size);
- read(fd, shmem_old, shmem_old_size);
+ if (read(fd, shmem_old, shmem_old_size) != shmem_old_size)
+ oncore_log(instance, LOG_WARNING,
+ "ONCORE: truncated/failed read of SHMEM file");
}
close(fd);
}
@@ -3431,7 +3433,7 @@ oncore_check_leap_sec(
if (instance->saw_Gj < 0) { /* -1 DONT have Gj use Bj */
if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12))
oncore_sendmsg(instance, oncore_cmd_Bj, sizeof(oncore_cmd_Bj));
- oncore_sendmsg(instance, oncore_cmd_Bl, sizeof(oncore_cmd_Bl));
+ oncore_sendmsg(instance, oncore_cmd_Bl, sizeof(oncore_cmd_Bl));
return;
}
@@ -3537,7 +3539,8 @@ oncore_load_almanac(
if (!strncmp((char *) cp, "@@Cb", 4) &&
oncore_checksum_ok(cp, 33) &&
(*(cp+4) == 4 || *(cp+4) == 5)) {
- write(instance->ttyfd, cp, n);
+ refclock_fdwrite(instance->peer, instance->ttyfd,
+ cp, n, "data");
oncore_print_Cb(instance, cp);
}
}
@@ -3760,20 +3763,22 @@ oncore_sendmsg(
{
int fd;
u_char cs = 0;
+ const struct peer * peer;
- fd = instance->ttyfd;
+ fd = instance->ttyfd;
+ peer = instance->peer;
#ifdef ONCORE_VERBOSE_SENDMSG
if (debug > 4) {
oncore_log_f(instance, LOG_DEBUG, "ONCORE: Send @@%c%c %d",
ptr[0], ptr[1], (int)len);
}
#endif
- write(fd, "@@", (size_t) 2);
- write(fd, ptr, len);
+ refclock_fdwrite(peer, fd, "@@", (size_t)2, "data");
+ refclock_fdwrite(peer, fd, ptr, len, "data");
while (len--)
cs ^= *ptr++;
- write(fd, &cs, (size_t) 1);
- write(fd, "\r\n", (size_t) 2);
+ refclock_fdwrite(peer, fd, &cs, (size_t)1, "data");
+ refclock_fdwrite(peer, fd, "\r\n", (size_t)2, "data");
}
@@ -3874,7 +3879,7 @@ oncore_set_traim(
oncore_sendmsg(instance, oncore_cmd_Enx, sizeof(oncore_cmd_Enx));
else /* chan == 12 */
oncore_sendmsg(instance, oncore_cmd_Ge0, sizeof(oncore_cmd_Ge0));
- oncore_sendmsg(instance, oncore_cmd_Hn0, sizeof(oncore_cmd_Hn0));
+ oncore_sendmsg(instance, oncore_cmd_Hn0, sizeof(oncore_cmd_Hn0));
}
}
diff --git a/contrib/ntp/ntpd/refclock_palisade.c b/contrib/ntp/ntpd/refclock_palisade.c
index cb68255d05b0..a9fe2689575b 100644
--- a/contrib/ntp/ntpd/refclock_palisade.c
+++ b/contrib/ntp/ntpd/refclock_palisade.c
@@ -312,7 +312,7 @@ palisade_start (
* Open serial port.
*/
speed = (CLK_TYPE(peer) == CLK_COPERNICUS) ? SPEED232COP : SPEED232;
- fd = refclock_open(gpsdev, speed, LDISC_RAW);
+ fd = refclock_open(&peer->srcadr, gpsdev, speed, LDISC_RAW);
if (fd <= 0) {
#ifdef DEBUG
printf("Palisade(%d) start: open %s failed\n", unit, gpsdev);
@@ -1225,9 +1225,9 @@ palisade_poll (
return; /* using synchronous packet input */
if(up->type == CLK_PRAECIS) {
- if(write(peer->procptr->io.fd,"SPSTAT\r\n",8) < 0)
+ if (write(peer->procptr->io.fd,"SPSTAT\r\n",8) < 0) {
msyslog(LOG_ERR, "Palisade(%d) write: %m:",unit);
- else {
+ } else {
praecis_msg = 1;
return;
}
@@ -1249,20 +1249,53 @@ praecis_parse (
pp = peer->procptr;
- memcpy(buf+p,rbufp->recv_space.X_recv_buffer, rbufp->recv_length);
+ if (p + rbufp->recv_length >= sizeof buf) {
+ struct palisade_unit *up;
+ up = pp->unitptr;
+
+ /*
+ * We COULD see if there is a \r\n in the incoming
+ * buffer before it overflows, and then process the
+ * current line.
+ *
+ * Similarly, if we already have a hunk of data that
+ * we're now flushing, that will cause the line of
+ * data we're in the process of collecting to be garbage.
+ *
+ * Since we now check for this overflow and log when it
+ * happens, we're now in a better place to easily see
+ * what's going on and perhaps better choices can be made.
+ */
+
+ /* Do we need to log the size of the overflow? */
+ msyslog(LOG_ERR, "Palisade(%d) praecis_parse(): input buffer overflow",
+ up->unit);
+
+ p = 0;
+ praecis_msg = 0;
+
+ refclock_report(peer, CEVNT_BADREPLY);
+
+ return;
+ }
+
+ memcpy(buf+p, rbufp->recv_buffer, rbufp->recv_length);
p += rbufp->recv_length;
- if(buf[p-2] == '\r' && buf[p-1] == '\n') {
+ if ( p >= 2
+ && buf[p-2] == '\r'
+ && buf[p-1] == '\n') {
buf[p-2] = '\0';
record_clock_stats(&peer->srcadr, buf);
p = 0;
praecis_msg = 0;
- if (HW_poll(pp) < 0)
+ if (HW_poll(pp) < 0) {
refclock_report(peer, CEVNT_FAULT);
-
+ }
}
+ return;
}
static void
@@ -1407,7 +1440,10 @@ HW_poll (
/* Edge trigger */
if (up->type == CLK_ACUTIME)
- write (pp->io.fd, "", 1);
+ if (write (pp->io.fd, "", 1) != 1)
+ msyslog(LOG_WARNING,
+ "Palisade(%d) HW_poll: failed to send trigger: %m",
+ up->unit);
if (ioctl(pp->io.fd, TIOCMSET, &x) < 0) {
#ifdef DEBUG
diff --git a/contrib/ntp/ntpd/refclock_parse.c b/contrib/ntp/ntpd/refclock_parse.c
index 043bc8673c7e..a593987aebef 100644
--- a/contrib/ntp/ntpd/refclock_parse.c
+++ b/contrib/ntp/ntpd/refclock_parse.c
@@ -103,6 +103,7 @@
#include "timevalops.h" /* includes <sys/time.h> */
#include "ntp_control.h"
#include "ntp_string.h"
+#include "ntp_clockdev.h"
#include <stdio.h>
#include <ctype.h>
@@ -2992,6 +2993,7 @@ parse_start(
struct parseunit * parse;
char parsedev[sizeof(PARSEDEVICE)+20];
char parseppsdev[sizeof(PARSEPPSDEVICE)+20];
+ const char *altdev;
parsectl_t tmp_ctl;
u_int type;
@@ -3018,8 +3020,20 @@ parse_start(
/*
* Unit okay, attempt to open the device.
*/
- (void) snprintf(parsedev, sizeof(parsedev), PARSEDEVICE, unit);
- (void) snprintf(parseppsdev, sizeof(parsedev), PARSEPPSDEVICE, unit);
+
+ /* see if there's a configured alternative device name: */
+ altdev = clockdev_lookup(&peer->srcadr, 0);
+ if (altdev && (strlen(altdev) < sizeof(parsedev)))
+ strcpy(parsedev, altdev);
+ else
+ (void) snprintf(parsedev, sizeof(parsedev), PARSEDEVICE, unit);
+
+ /* likewise for a pps device: */
+ altdev = clockdev_lookup(&peer->srcadr, 1);
+ if (altdev && (strlen(altdev) < sizeof(parseppsdev)))
+ strcpy(parseppsdev, altdev);
+ else
+ (void) snprintf(parseppsdev, sizeof(parseppsdev), PARSEPPSDEVICE, unit);
#ifndef O_NOCTTY
#define O_NOCTTY 0
@@ -4285,7 +4299,7 @@ mk_utcinfo(
}
else
{
- snprintf( t, size, "UTC offset parameter: %is, no leap second announced.\n", dtls );
+ snprintf( t, size, "UTC offset parameter: %is, no leap second announced.", dtls );
}
}
diff --git a/contrib/ntp/ntpd/refclock_pst.c b/contrib/ntp/ntpd/refclock_pst.c
index 39be05138dde..1d3e1ffcfd6a 100644
--- a/contrib/ntp/ntpd/refclock_pst.c
+++ b/contrib/ntp/ntpd/refclock_pst.c
@@ -128,7 +128,7 @@ pst_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_CLK);
if (fd <= 0)
return (0);
diff --git a/contrib/ntp/ntpd/refclock_ripencc.c b/contrib/ntp/ntpd/refclock_ripencc.c
index 602ca9d6aa14..789029f8aad5 100644
--- a/contrib/ntp/ntpd/refclock_ripencc.c
+++ b/contrib/ntp/ntpd/refclock_ripencc.c
@@ -477,7 +477,7 @@ ripencc_start(int unit, struct peer *peer)
* Open serial port
*/
(void)snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_RAW);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_RAW);
if (fd <= 0) {
pp->io.fd = -1;
return (0);
diff --git a/contrib/ntp/ntpd/refclock_true.c b/contrib/ntp/ntpd/refclock_true.c
index 35901392da0e..78e6adb9acaa 100644
--- a/contrib/ntp/ntpd/refclock_true.c
+++ b/contrib/ntp/ntpd/refclock_true.c
@@ -20,12 +20,6 @@
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
-#ifdef SYS_WINNT
-extern int async_write(int, const void *, unsigned int);
-#undef write
-#define write(fd, data, octets) async_write(fd, data, octets)
-#endif
-
/* This should be an atom clock but those are very hard to build.
*
* The PCL720 from P C Labs has an Intel 8253 lookalike, as well as a bunch
@@ -281,7 +275,7 @@ true_start(
* Open serial port
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_CLK);
if (fd <= 0)
return 0;
@@ -640,7 +634,7 @@ true_send(
size_t len = strlen(cmd);
true_debug(peer, "Send '%s'\n", cmd);
- if (write(pp->io.fd, cmd, len) != (ssize_t)len)
+ if (refclock_write(peer, cmd, len, NULL) != (ssize_t)len)
refclock_report(peer, CEVNT_FAULT);
else
pp->polls++;
diff --git a/contrib/ntp/ntpd/refclock_ulink.c b/contrib/ntp/ntpd/refclock_ulink.c
index d8f24a506f50..60147adba219 100644
--- a/contrib/ntp/ntpd/refclock_ulink.c
+++ b/contrib/ntp/ntpd/refclock_ulink.c
@@ -126,7 +126,7 @@ ulink_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_CLK);
if (fd <= 0)
return (0);
diff --git a/contrib/ntp/ntpd/refclock_wwvb.c b/contrib/ntp/ntpd/refclock_wwvb.c
index 75897fcc550b..6aafc26f1408 100644
--- a/contrib/ntp/ntpd/refclock_wwvb.c
+++ b/contrib/ntp/ntpd/refclock_wwvb.c
@@ -189,7 +189,7 @@ wwvb_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_CLK);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_CLK);
if (fd <= 0)
return (0);
diff --git a/contrib/ntp/ntpd/refclock_zyfer.c b/contrib/ntp/ntpd/refclock_zyfer.c
index 8f9f0aad08dc..f77604868617 100644
--- a/contrib/ntp/ntpd/refclock_zyfer.c
+++ b/contrib/ntp/ntpd/refclock_zyfer.c
@@ -138,7 +138,7 @@ zyfer_start(
* Something like LDISC_ACTS that looked for ! would be nice...
*/
snprintf(device, sizeof(device), DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_RAW);
+ fd = refclock_open(&peer->srcadr, device, SPEED232, LDISC_RAW);
if (fd <= 0)
return (0);
diff --git a/contrib/ntp/ntpdate/Makefile.am b/contrib/ntp/ntpdate/Makefile.am
index 3abe27a5f89e..61180e07f586 100644
--- a/contrib/ntp/ntpdate/Makefile.am
+++ b/contrib/ntp/ntpdate/Makefile.am
@@ -1,7 +1,7 @@
NULL =
BUILT_SOURCES =
-CLEANFILES =
+DISTCLEANFILES =
bin_PROGRAMS = $(NTPDATE_DB)
libexec_PROGRAMS = $(NTPDATE_DL)
@@ -20,24 +20,20 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a
+LDADD = ../libntp/libntp.a
ntpdate_LDADD = $(LDADD) $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LIBOPTS_LDADD)
ntpdate_LDADD += $(LIBM) $(LDADD_NTP)
-DISTCLEANFILES= .version version.c stamp-v
+CLEANFILES = .version version.c
noinst_HEADERS= ntpdate.h
-$(PROGRAMS): $(LDADD)
+ntpdate_SOURCES = ntpdate.c
+nodist_ntpdate_SOURCES = version.c
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
-
include $(top_srcdir)/bincheck.mf
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/ntpdate/Makefile.in b/contrib/ntp/ntpdate/Makefile.in
index bed1ff11b978..b46352555475 100644
--- a/contrib/ntp/ntpdate/Makefile.in
+++ b/contrib/ntp/ntpdate/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -114,7 +114,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -134,6 +133,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -147,8 +147,9 @@ CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
"$(DESTDIR)$(sbindir)"
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
-ntpdate_SOURCES = ntpdate.c
-ntpdate_OBJECTS = ntpdate.$(OBJEXT)
+am_ntpdate_OBJECTS = ntpdate.$(OBJEXT)
+nodist_ntpdate_OBJECTS = version.$(OBJEXT)
+ntpdate_OBJECTS = $(am_ntpdate_OBJECTS) $(nodist_ntpdate_OBJECTS)
am__DEPENDENCIES_1 =
ntpdate_DEPENDENCIES = $(LDADD) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -171,7 +172,8 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/ntpdate.Po ./$(DEPDIR)/version.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -191,8 +193,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = ntpdate.c
-DIST_SOURCES = ntpdate.c
+SOURCES = $(ntpdate_SOURCES) $(nodist_ntpdate_SOURCES)
+DIST_SOURCES = $(ntpdate_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -216,11 +218,9 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
+ $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf \
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
- $(top_srcdir)/sntp/check-libntp.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -240,6 +240,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -249,6 +250,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -261,14 +264,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -479,6 +478,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -490,7 +490,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
BUILT_SOURCES = check-libntp .deps-ver
-CLEANFILES = check-libntp .deps-ver
+DISTCLEANFILES = $(DEPDIR)/deps-ver
bin_PROGRAMS = $(NTPDATE_DB)
libexec_PROGRAMS = $(NTPDATE_DL)
sbin_PROGRAMS = $(NTPDATE_DS)
@@ -499,20 +499,23 @@ AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a
+LDADD = ../libntp/libntp.a
ntpdate_LDADD = $(LDADD) $(LDADD_LIBNTP) $(PTHREAD_LIBS) \
$(LIBOPTS_LDADD) $(LIBM) $(LDADD_NTP)
-DISTCLEANFILES = .version version.c stamp-v
+CLEANFILES = .version version.c check-libntp .deps-ver
noinst_HEADERS = ntpdate.h
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+ntpdate_SOURCES = ntpdate.c
+nodist_ntpdate_SOURCES = version.c
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -529,10 +532,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -700,25 +703,35 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdate.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -780,8 +793,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -821,7 +836,8 @@ installdirs:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -859,7 +875,8 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/ntpdate.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -907,7 +924,8 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/ntpdate.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -927,9 +945,10 @@ ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
uninstall-sbinPROGRAMS
-.MAKE: all check install install-am install-exec-am install-strip
+.MAKE: all check install install-am install-exec install-exec-am \
+ install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic \
@@ -949,16 +968,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
.PRECIOUS: Makefile
-$(PROGRAMS): $(LDADD)
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
-
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
install-exec-hook:
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
@@ -974,17 +985,25 @@ install-exec-hook:
#
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1002,7 +1021,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1032,7 +1051,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/ntpdc/Makefile.am b/contrib/ntp/ntpdc/Makefile.am
index 30cfda046e12..8e0739dabc23 100644
--- a/contrib/ntp/ntpdc/Makefile.am
+++ b/contrib/ntp/ntpdc/Makefile.am
@@ -20,15 +20,27 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-ntpdc_LDADD = version.o $(LIBOPTS_LDADD)
+ntpdc_LDADD = $(LIBOPTS_LDADD)
ntpdc_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ntpdc_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
ntpdc_LDADD += $(LDADD_NTP)
# ntpdc-layout doesn't need any additional libraries at all
ntpdc_layout_LDADD=
-DISTCLEANFILES= .version version.c config.log $(man_MANS)
-CLEANFILES= check-layout layout.here nl.c ntpdc-layout
+DISTCLEANFILES = \
+ $(man_MANS) \
+ config.log \
+ $(NULL)
+
+CLEANFILES = \
+ check-layout \
+ layout.here \
+ nl.c \
+ ntpdc-layout \
+ .version \
+ version.c \
+ $(NULL)
+
noinst_HEADERS= ntpdc.h
ETAGS_ARGS= Makefile.am
EXTRA_DIST= \
@@ -83,12 +95,12 @@ $(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) ntpdc-opts.def
###
$(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
$(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+
@@ -97,7 +109,7 @@ $(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/man
###
$(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
$(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+
@@ -115,40 +127,36 @@ $(srcdir)/invoke-ntpdc.menu: $(srcdir)/invoke-ntpdc.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.menu $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true )
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
+nodist_ntpdc_SOURCES = version.c
ntpdc-layout.o: nl.c
layout.here: ntpdc-layout
- ./ntpdc-layout > $@
+ $(AM_V_at)./ntpdc-layout > $@
check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
- cmp $(srcdir)/layout.std layout.here && echo stamp > $@
+ $(AM_V_at)cmp $(srcdir)/layout.std layout.here && echo stamp > $@
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
-
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
- $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
+ $(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > $@
+
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/ntpdc/Makefile.in b/contrib/ntp/ntpdc/Makefile.in
index 5abda6033bd4..3864e523a4ea 100644
--- a/contrib/ntp/ntpdc/Makefile.in
+++ b/contrib/ntp/ntpdc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -115,7 +115,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -135,6 +134,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -151,10 +151,11 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am_ntpdc_OBJECTS = ntpdc.$(OBJEXT) ntpdc_ops.$(OBJEXT) \
ntpdc-opts.$(OBJEXT)
-ntpdc_OBJECTS = $(am_ntpdc_OBJECTS)
+nodist_ntpdc_OBJECTS = version.$(OBJEXT)
+ntpdc_OBJECTS = $(am_ntpdc_OBJECTS) $(nodist_ntpdc_OBJECTS)
am__DEPENDENCIES_1 =
-ntpdc_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) \
- ../libntp/libntp.a $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ntpdc_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -178,7 +179,10 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/ntpdc-layout.Po \
+ ./$(DEPDIR)/ntpdc-opts.Po ./$(DEPDIR)/ntpdc.Po \
+ ./$(DEPDIR)/ntpdc_ops.Po ./$(DEPDIR)/version.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -198,7 +202,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(ntpdc_SOURCES) ntpdc-layout.c
+SOURCES = $(ntpdc_SOURCES) $(nodist_ntpdc_SOURCES) ntpdc-layout.c
DIST_SOURCES = $(ntpdc_SOURCES) ntpdc-layout.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
@@ -255,12 +259,10 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/nl.pl.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf \
+ $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-scm-rev.mf \
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
- $(top_srcdir)/sntp/check-libntp.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -280,6 +282,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -289,6 +292,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -301,14 +306,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -519,6 +520,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -541,14 +543,13 @@ AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP) \
AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-ntpdc_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
- $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(EDITLINE_LIBS) \
- $(LDADD_NTP)
+ntpdc_LDADD = $(LIBOPTS_LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) \
+ $(LIBM) $(PTHREAD_LIBS) $(EDITLINE_LIBS) $(LDADD_NTP)
# ntpdc-layout doesn't need any additional libraries at all
ntpdc_layout_LDADD =
-DISTCLEANFILES = .version version.c config.log $(man_MANS)
-CLEANFILES = check-layout layout.here nl.c ntpdc-layout check-libopts \
- check-libntp .deps-ver
+DISTCLEANFILES = $(man_MANS) config.log $(NULL) $(DEPDIR)/deps-ver
+CLEANFILES = check-layout layout.here nl.c ntpdc-layout .version \
+ version.c $(NULL) check-libopts check-libntp .deps-ver
noinst_HEADERS = ntpdc.h
ETAGS_ARGS = Makefile.am
EXTRA_DIST = \
@@ -593,15 +594,17 @@ std_def_list = \
$(NULL)
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+nodist_ntpdc_SOURCES = version.c
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -618,10 +621,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -795,28 +798,38 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc-layout.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc-opts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc_ops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc-layout.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc-opts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc_ops.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -985,8 +998,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1026,7 +1041,8 @@ installdirs:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1064,7 +1080,11 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/ntpdc-layout.Po
+ -rm -f ./$(DEPDIR)/ntpdc-opts.Po
+ -rm -f ./$(DEPDIR)/ntpdc.Po
+ -rm -f ./$(DEPDIR)/ntpdc_ops.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1112,7 +1132,11 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/ntpdc-layout.Po
+ -rm -f ./$(DEPDIR)/ntpdc-opts.Po
+ -rm -f ./$(DEPDIR)/ntpdc.Po
+ -rm -f ./$(DEPDIR)/ntpdc_ops.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1134,9 +1158,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
uninstall-man: uninstall-man1 uninstall-man8
-.MAKE: all check install install-am install-exec-am install-strip
+.MAKE: all check install install-am install-exec install-exec-am \
+ install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic \
@@ -1164,12 +1189,12 @@ $(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) ntpdc-opts.def
###
$(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
$(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+
@@ -1178,7 +1203,7 @@ $(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/man
###
$(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
$(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+
@@ -1196,35 +1221,28 @@ $(srcdir)/invoke-ntpdc.menu: $(srcdir)/invoke-ntpdc.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.menu $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true )
ntpdc-layout.o: nl.c
layout.here: ntpdc-layout
- ./ntpdc-layout > $@
+ $(AM_V_at)./ntpdc-layout > $@
check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
- cmp $(srcdir)/layout.std layout.here && echo stamp > $@
-
-$(PROGRAMS): version.o
+ $(AM_V_at)cmp $(srcdir)/layout.std layout.here && echo stamp > $@
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
-
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
- $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
+ $(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > $@
install-exec-hook:
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
@@ -1246,17 +1264,25 @@ check-libopts: ../sntp/libopts/libopts.la
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1274,7 +1300,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1304,7 +1330,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/ntpdc/invoke-ntpdc.texi b/contrib/ntp/ntpdc/invoke-ntpdc.texi
index f37dfe572f70..62bc28ab1bf9 100644
--- a/contrib/ntp/ntpdc/invoke-ntpdc.texi
+++ b/contrib/ntp/ntpdc/invoke-ntpdc.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:20:45 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 02:49:52 PM by AutoGen 5.18.16
# From the definitions ntpdc-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -52,6 +52,7 @@ This software is released under the NTP license, <http://ntp.org/license>.
* ntpdc numeric:: numeric option (-n)
* ntpdc peers:: peers option (-p)
* ntpdc showpeers:: showpeers option (-s)
+* ntpdc unconnected:: unconnected option (-u)
* ntpdc config:: presetting/configuring ntpdc
* ntpdc exit status:: exit status
* ntpdc Usage:: Usage
@@ -76,7 +77,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p15
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p16
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
@@ -102,6 +103,7 @@ Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
- prohibits the option 'command'
-s no showpeers Show a list of the peers
- prohibits the option 'command'
+ -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows)
opt version output version information and exit
-? no help display extended usage information and exit
-! no more-help extended usage information passed thru pager
@@ -119,7 +121,7 @@ The following option preset mechanisms are supported:
- reading file ./.ntprc
- examining environment variables named NTPDC_*
-Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+Please send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4
@@ -243,6 +245,13 @@ command.
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command.
+@node ntpdc unconnected
+@subsection unconnected option (-u)
+@cindex ntpdc-unconnected
+
+This is the ``use unconnected udp to communicate with ntpd (default on windows)'' option.
+Open an unconnected UDP association to ntpd (the default
+on Windows).
@node ntpdc config
@@ -312,7 +321,7 @@ The command line options relating to configuration and/or usage help are:
Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
@table @samp
diff --git a/contrib/ntp/ntpdc/ntpdc-opts.c b/contrib/ntp/ntpdc/ntpdc-opts.c
index b5eda1138aaa..f2fde352b5a6 100644
--- a/contrib/ntp/ntpdc/ntpdc-opts.c
+++ b/contrib/ntp/ntpdc/ntpdc-opts.c
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:41 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:49:46 PM by AutoGen 5.18.16
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -40,10 +40,15 @@
#define OPTION_CODE_COMPILE 1
#include "ntpdc-opts.h"
#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -68,9 +73,9 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpdc options
*/
-static char const ntpdc_opt_strs[1914] =
-/* 0 */ "ntpdc 4.2.8p15\n"
- "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+static char const ntpdc_opt_strs[2005] =
+/* 0 */ "ntpdc 4.2.8p16\n"
+ "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -115,27 +120,30 @@ static char const ntpdc_opt_strs[1914] =
/* 1411 */ "Show a list of the peers\0"
/* 1436 */ "SHOWPEERS\0"
/* 1446 */ "showpeers\0"
-/* 1456 */ "display extended usage information and exit\0"
-/* 1500 */ "help\0"
-/* 1505 */ "extended usage information passed thru pager\0"
-/* 1550 */ "more-help\0"
-/* 1560 */ "output version information and exit\0"
-/* 1596 */ "version\0"
-/* 1604 */ "save the option state to a config file\0"
-/* 1643 */ "save-opts\0"
-/* 1653 */ "load options from a config file\0"
-/* 1685 */ "LOAD_OPTS\0"
-/* 1695 */ "no-load-opts\0"
-/* 1708 */ "no\0"
-/* 1711 */ "NTPDC\0"
-/* 1717 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p15\n"
+/* 1456 */ "Use unconnected UDP to communicate with ntpd (default on Windows)\0"
+/* 1522 */ "UNCONNECTED\0"
+/* 1534 */ "unconnected\0"
+/* 1546 */ "display extended usage information and exit\0"
+/* 1590 */ "help\0"
+/* 1595 */ "extended usage information passed thru pager\0"
+/* 1640 */ "more-help\0"
+/* 1650 */ "output version information and exit\0"
+/* 1686 */ "version\0"
+/* 1694 */ "save the option state to a config file\0"
+/* 1733 */ "save-opts\0"
+/* 1743 */ "load options from a config file\0"
+/* 1775 */ "LOAD_OPTS\0"
+/* 1785 */ "no-load-opts\0"
+/* 1798 */ "no\0"
+/* 1801 */ "NTPDC\0"
+/* 1807 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p16\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1848 */ "$HOME\0"
-/* 1854 */ ".\0"
-/* 1856 */ ".ntprc\0"
-/* 1863 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1897 */ "\n\0"
-/* 1899 */ "ntpdc 4.2.8p15";
+/* 1938 */ "$HOME\0"
+/* 1944 */ ".\0"
+/* 1946 */ ".ntprc\0"
+/* 1953 */ "https://bugs.ntp.org, bugs@ntp.org\0"
+/* 1988 */ "\n\0"
+/* 1990 */ "ntpdc 4.2.8p16";
/**
* ipv4 option description with
@@ -286,14 +294,26 @@ static int const aShowpeersCantList[] = {
/** Compiled in flag settings for the showpeers option */
#define SHOWPEERS_FLAGS (OPTST_DISABLED)
+/**
+ * unconnected option description:
+ */
+/** Descriptive text for the unconnected option */
+#define UNCONNECTED_DESC (ntpdc_opt_strs+1456)
+/** Upper-cased name for the unconnected option */
+#define UNCONNECTED_NAME (ntpdc_opt_strs+1522)
+/** Name string for the unconnected option */
+#define UNCONNECTED_name (ntpdc_opt_strs+1534)
+/** Compiled in flag settings for the unconnected option */
+#define UNCONNECTED_FLAGS (OPTST_DISABLED)
+
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpdc_opt_strs+1456)
-#define HELP_name (ntpdc_opt_strs+1500)
+#define HELP_DESC (ntpdc_opt_strs+1546)
+#define HELP_name (ntpdc_opt_strs+1590)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpdc_opt_strs+1505)
-#define MORE_HELP_name (ntpdc_opt_strs+1550)
+#define MORE_HELP_DESC (ntpdc_opt_strs+1595)
+#define MORE_HELP_name (ntpdc_opt_strs+1640)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -306,14 +326,14 @@ static int const aShowpeersCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpdc_opt_strs+1560)
-#define VER_name (ntpdc_opt_strs+1596)
-#define SAVE_OPTS_DESC (ntpdc_opt_strs+1604)
-#define SAVE_OPTS_name (ntpdc_opt_strs+1643)
-#define LOAD_OPTS_DESC (ntpdc_opt_strs+1653)
-#define LOAD_OPTS_NAME (ntpdc_opt_strs+1685)
-#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1695)
-#define LOAD_OPTS_pfx (ntpdc_opt_strs+1708)
+#define VER_DESC (ntpdc_opt_strs+1650)
+#define VER_name (ntpdc_opt_strs+1686)
+#define SAVE_OPTS_DESC (ntpdc_opt_strs+1694)
+#define SAVE_OPTS_name (ntpdc_opt_strs+1733)
+#define LOAD_OPTS_DESC (ntpdc_opt_strs+1743)
+#define LOAD_OPTS_NAME (ntpdc_opt_strs+1775)
+#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1785)
+#define LOAD_OPTS_pfx (ntpdc_opt_strs+1798)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -454,6 +474,18 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SHOWPEERS_DESC, SHOWPEERS_NAME, SHOWPEERS_name,
/* disablement strs */ NULL, NULL },
+ { /* entry idx, value */ 10, VALUE_OPT_UNCONNECTED,
+ /* equiv idx, value */ 10, VALUE_OPT_UNCONNECTED,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ UNCONNECTED_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --unconnected */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ UNCONNECTED_DESC, UNCONNECTED_NAME, UNCONNECTED_name,
+ /* disablement strs */ NULL, NULL },
+
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
/* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
@@ -522,25 +554,25 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpdc. */
-#define zPROGNAME (ntpdc_opt_strs+1711)
+#define zPROGNAME (ntpdc_opt_strs+1801)
/** Reference to the title line for ntpdc usage. */
-#define zUsageTitle (ntpdc_opt_strs+1717)
+#define zUsageTitle (ntpdc_opt_strs+1807)
/** ntpdc configuration file name. */
-#define zRcName (ntpdc_opt_strs+1856)
+#define zRcName (ntpdc_opt_strs+1946)
/** Directories to search for ntpdc config files. */
static char const * const apzHomeList[3] = {
- ntpdc_opt_strs+1848,
- ntpdc_opt_strs+1854,
+ ntpdc_opt_strs+1938,
+ ntpdc_opt_strs+1944,
NULL };
/** The ntpdc program bug email address. */
-#define zBugsAddr (ntpdc_opt_strs+1863)
+#define zBugsAddr (ntpdc_opt_strs+1953)
/** Clarification/explanation of what ntpdc does. */
-#define zExplain (ntpdc_opt_strs+1897)
+#define zExplain (ntpdc_opt_strs+1988)
/** Extra detail explaining what ntpdc does. */
#define zDetail (NULL)
/** The full version string for ntpdc. */
-#define zFullVersion (ntpdc_opt_strs+1899)
-/* extracted from optcode.tlib near line 364 */
+#define zFullVersion (ntpdc_opt_strs+1990)
+/* extracted from optcode.tlib near line 342 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -572,7 +604,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
ex_code = NTPDC_EXIT_SUCCESS;
optionUsage(&ntpdcOptions, ex_code);
/* NOTREACHED */
- exit(1);
+ exit(NTPDC_EXIT_FAILURE);
(void)opts;
(void)od;
}
@@ -661,7 +693,7 @@ tOptions ntpdcOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 15 /* full option count */, 10 /* user option count */,
+ 16 /* full option count */, 11 /* user option count */,
ntpdc_full_usage, ntpdc_short_usage,
NULL, NULL,
PKGDATADIR, ntpdc_packager_info
@@ -785,19 +817,19 @@ static void bogus_function(void) {
extract the correct strings. These strings are actually referenced
by a field name in the ntpdcOptions structure noted in the
comments below. The literal text is defined in ntpdc_opt_strs.
-
+
NOTE: the strings below are segmented with respect to the source string
ntpdc_opt_strs. The strings above are handed off for translation
at run time a paragraph at a time. Consequently, they are presented here
for translation a paragraph at a time.
-
+
ALSO: often the description for an option will reference another option
by name. These are set off with apostrophe quotes (I hope). Do not
translate option names.
*/
/* referenced via ntpdcOptions.pzCopyright */
- puts(_("ntpdc 4.2.8p15\n\
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpdc 4.2.8p16\n\
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -847,6 +879,9 @@ implied warranty.\n"));
puts(_("Show a list of the peers"));
/* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Use unconnected UDP to communicate with ntpd (default on Windows)"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
puts(_("display extended usage information and exit"));
/* referenced via ntpdcOptions.pOptDesc->pzText */
@@ -862,14 +897,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpdcOptions.pzUsageTitle */
- puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p15\n\
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p16\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */
- puts(_("ntpdc 4.2.8p15"));
+ puts(_("ntpdc 4.2.8p16"));
/* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
@@ -879,234 +914,230 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -1115,17 +1146,17 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -1143,28 +1174,28 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/ntpdc/ntpdc-opts.def b/contrib/ntp/ntpdc/ntpdc-opts.def
index df3350eb8a3c..62d086ee9cc9 100644
--- a/contrib/ntp/ntpdc/ntpdc-opts.def
+++ b/contrib/ntp/ntpdc/ntpdc-opts.def
@@ -104,6 +104,16 @@ flag = {
_EndOfDoc_;
};
+flag = {
+ name = unconnected;
+ value = u;
+ descrip = "Use unconnected UDP to communicate with ntpd (default on Windows)";
+ doc = <<- _EndOfDoc_
+ Open an unconnected UDP association to ntpd (the default
+ on Windows).
+ _EndOfDoc_;
+};
+
/* explain: Additional information whenever the usage routine is invoked */
explain = <<- _END_EXPLAIN
_END_EXPLAIN;
diff --git a/contrib/ntp/ntpdc/ntpdc-opts.h b/contrib/ntp/ntpdc/ntpdc-opts.h
index 9c7659e4735f..524b081703d4 100644
--- a/contrib/ntp/ntpdc/ntpdc-opts.h
+++ b/contrib/ntp/ntpdc/ntpdc-opts.h
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:41 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:49:46 PM by AutoGen 5.18.16
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -45,6 +45,8 @@
#define AUTOOPTS_NTPDC_OPTS_H_GUARD 1
#include "config.h"
#include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
/**
* Ensure that the library used for compiling this generated header is at
@@ -53,13 +55,19 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
/**
* Enumeration of each option type for ntpdc
*/
@@ -74,18 +82,19 @@ typedef enum {
INDEX_OPT_NUMERIC = 7,
INDEX_OPT_PEERS = 8,
INDEX_OPT_SHOWPEERS = 9,
- INDEX_OPT_VERSION = 10,
- INDEX_OPT_HELP = 11,
- INDEX_OPT_MORE_HELP = 12,
- INDEX_OPT_SAVE_OPTS = 13,
- INDEX_OPT_LOAD_OPTS = 14
+ INDEX_OPT_UNCONNECTED = 10,
+ INDEX_OPT_VERSION = 11,
+ INDEX_OPT_HELP = 12,
+ INDEX_OPT_MORE_HELP = 13,
+ INDEX_OPT_SAVE_OPTS = 14,
+ INDEX_OPT_LOAD_OPTS = 15
} teOptIndex;
/** count of all options for ntpdc */
-#define OPTION_CT 15
+#define OPTION_CT 16
/** ntpdc version */
-#define NTPDC_VERSION "4.2.8p15"
+#define NTPDC_VERSION "4.2.8p16"
/** Full ntpdc version text */
-#define NTPDC_FULL_VERSION "ntpdc 4.2.8p15"
+#define NTPDC_FULL_VERSION "ntpdc 4.2.8p16"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -178,6 +187,10 @@ typedef enum {
# warning undefining SHOWPEERS due to option name conflict
# undef SHOWPEERS
# endif
+# ifdef UNCONNECTED
+# warning undefining UNCONNECTED due to option name conflict
+# undef UNCONNECTED
+# endif
#else /* NO_OPTION_NAME_WARNINGS */
# undef IPV4
# undef IPV6
@@ -189,6 +202,7 @@ typedef enum {
# undef NUMERIC
# undef PEERS
# undef SHOWPEERS
+# undef UNCONNECTED
#endif /* NO_OPTION_NAME_WARNINGS */
/**
@@ -207,6 +221,7 @@ typedef enum {
#define VALUE_OPT_NUMERIC 'n'
#define VALUE_OPT_PEERS 'p'
#define VALUE_OPT_SHOWPEERS 's'
+#define VALUE_OPT_UNCONNECTED 'u'
/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
/** option flag (value) for more-help-value option */
@@ -286,6 +301,7 @@ static inline char* aoGetsText(char const* pz) {
# endif
#endif /* ENABLE_NLS */
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/ntpdc/ntpdc.1ntpdcman b/contrib/ntp/ntpdc/ntpdc.1ntpdcman
index 7ac601fa4dcb..446acb5fb53b 100644
--- a/contrib/ntp/ntpdc/ntpdc.1ntpdcman
+++ b/contrib/ntp/ntpdc/ntpdc.1ntpdcman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc 1ntpdcman "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpdc 1ntpdcman "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:47 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:54 PM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -132,6 +132,12 @@ command.
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command.
.TP
+.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[]
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
+.TP
.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
.TP
@@ -848,7 +854,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
@@ -868,7 +874,7 @@ Please report bugs to http://bugs.ntp.org .
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH "NOTES"
This manual page was \fIAutoGen\fP-erated from the \fBntpdc\fP
option definitions.
diff --git a/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc b/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
index 59bd61373cca..c750f834d99f 100644
--- a/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
+++ b/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPDC 1ntpdcmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:44 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:50 PM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -107,6 +107,11 @@ command.
.sp
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command.
+.It Fl u , Fl \-unconnected
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
.It Fl \&? , Fl \-help
Display usage information and exit.
.It Fl \&! , Fl \-more\-help
@@ -787,7 +792,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
@@ -803,7 +808,7 @@ this, the program is occasionally useful.
.Pp
Please report bugs to http://bugs.ntp.org .
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh "NOTES"
This manual page was \fIAutoGen\fP\-erated from the \fBntpdc\fP
option definitions.
diff --git a/contrib/ntp/ntpdc/ntpdc.c b/contrib/ntp/ntpdc/ntpdc.c
index 1274e841fb66..e39ddfea1b8f 100644
--- a/contrib/ntp/ntpdc/ntpdc.c
+++ b/contrib/ntp/ntpdc/ntpdc.c
@@ -453,8 +453,27 @@ openhost(
#endif
a_info = getaddrinfo(hname, service, &hints, &ai);
}
- /* Some older implementations don't like AI_ADDRCONFIG. */
- if (a_info == EAI_BADFLAGS) {
+ /*
+ * Some older implementations don't like AI_ADDRCONFIG.
+ * Some versions of Windows return WSANO_DATA when there is no
+ * global address and AI_ADDRCONFIG is used. AI_ADDRCONFIG
+ * is useful to short-circuit DNS lookups for IP protocols
+ * for which the host has no local addresses. Windows
+ * unfortunately instead interprets AI_ADDRCONFIG to relate
+ * to off-host connectivity and so fails lookup when
+ * localhost works.
+ * To further muddy matters, some versions of WS2tcpip.h
+ * comment out #define EAI_NODATA WSANODATA claiming it
+ * was removed from RFC 2553bis and mentioning a need to
+ * contact the authors to find out why, but "helpfully"
+ * #defines EAI_NODATA EAI_NONAME (== WSAHOST_NOT_FOUND)
+ * So we get more ugly platform-specific workarounds.
+ */
+ if (
+#if defined(WIN32)
+ WSANO_DATA == a_info || EAI_NONAME == a_info ||
+#endif
+ EAI_BADFLAGS == a_info) {
hints.ai_flags = AI_CANONNAME;
a_info = getaddrinfo(hname, service, &hints, &ai);
}
@@ -942,8 +961,7 @@ sendrequest(
reqsize = (reqsize + 3) & ~3;
} else
reqsize = req_pkt_size;
- ptstamp = (void *)((char *)&qpkt + reqsize);
- ptstamp--;
+ ptstamp = (void *)((char *)&qpkt + reqsize - sizeof *ptstamp);
get_systime(&ts);
L_ADD(&ts, &delay_time);
HTONL_FP(&ts, ptstamp);
diff --git a/contrib/ntp/ntpdc/ntpdc.html b/contrib/ntp/ntpdc/ntpdc.html
index a0b953d9176b..f036858d9c20 100644
--- a/contrib/ntp/ntpdc/ntpdc.html
+++ b/contrib/ntp/ntpdc/ntpdc.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ntpdc: NTPD Control User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,13 +41,11 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#ntpdc-Description" accesskey="n" rel="next">ntpdc Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="ntpdc_003a-NTPD-Control-User-Manual"></a>
-<h1 class="top">ntpdc: NTPD Control User Manual</h1>
+<span id="ntpdc_003a-NTPD-Control-User-Manual"></span><h1 class="top">ntpdc: NTPD Control User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>ntpdc</code> program,
that can be used to query a Network Time Protocol (NTP) server and
@@ -64,38 +53,36 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntpdc</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntpdc</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Description" accesskey="1">ntpdc Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Description" accesskey="1">ntpdc Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="2">ntpdc Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpdc
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="2">ntpdc Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpdc
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
</table>
<hr>
-<a name="ntpdc-Description"></a>
-<div class="header">
+<span id="ntpdc-Description"></span><div class="header">
<p>
Next: <a href="#ntpdc-Invocation" accesskey="n" rel="next">ntpdc Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description"></span><h2 class="chapter">1 Description</h2>
<p>By default, <code>ntpdc</code> writes the local data and time (i.e., not UTC) to the
standard output in the format:
@@ -112,22 +99,20 @@ the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="1">ntpdc Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="1">Invoking ntpdc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntpdc-Invocation"></a>
-<div class="header">
+<span id="ntpdc-Invocation"></span><div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpdc-Description" accesskey="p" rel="prev">ntpdc Description</a>, Up: <a href="#ntpdc-Description" accesskey="u" rel="up">ntpdc Description</a> &nbsp; </p>
</div>
-<a name="Invoking-ntpdc"></a>
-<h3 class="section">1.1 Invoking ntpdc</h3>
-<a name="index-ntpdc"></a>
-<a name="index-vendor_002dspecific-NTPD-control-program"></a>
+<span id="Invoking-ntpdc"></span><h3 class="section">1.1 Invoking ntpdc</h3>
+<span id="index-ntpdc"></span>
+<span id="index-vendor_002dspecific-NTPD-control-program"></span>
@@ -161,47 +146,47 @@ using the <code>agtexi-cmd</code> template and the option descriptions for the <
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-usage" accesskey="1">ntpdc usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpdc help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-usage" accesskey="1">ntpdc usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpdc help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv4" accesskey="2">ntpdc ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv4" accesskey="2">ntpdc ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv6" accesskey="3">ntpdc ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv6" accesskey="3">ntpdc ipv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-command" accesskey="4">ntpdc command</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">command option (-c)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-command" accesskey="4">ntpdc command</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">command option (-c)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-interactive" accesskey="5">ntpdc interactive</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interactive option (-i)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-interactive" accesskey="5">ntpdc interactive</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interactive option (-i)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-listpeers" accesskey="6">ntpdc listpeers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">listpeers option (-l)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-listpeers" accesskey="6">ntpdc listpeers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">listpeers option (-l)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-numeric" accesskey="7">ntpdc numeric</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-numeric" accesskey="7">ntpdc numeric</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-peers" accesskey="8">ntpdc peers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-peers" accesskey="8">ntpdc peers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-showpeers" accesskey="9">ntpdc showpeers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">showpeers option (-s)
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-showpeers" accesskey="9">ntpdc showpeers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">showpeers option (-s)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-config">ntpdc config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpdc
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-unconnected">ntpdc unconnected</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">unconnected option (-u)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-exit-status">ntpdc exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-config">ntpdc config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpdc
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Usage">ntpdc Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-exit-status">ntpdc exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-See-Also">ntpdc See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Usage">ntpdc Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Authors">ntpdc Authors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-See-Also">ntpdc See Also</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Bugs">ntpdc Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Authors">ntpdc Authors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Bugs">ntpdc Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
</td></tr>
</table>
<hr>
-<a name="ntpdc-usage"></a>
-<div class="header">
+<span id="ntpdc-usage"></span><div class="header">
<p>
Next: <a href="#ntpdc-ipv4" accesskey="n" rel="next">ntpdc ipv4</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ntpdc-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.1.1 ntpdc help/usage (<samp>--help</samp>)</h4>
-<a name="index-ntpdc-help"></a>
+<span id="ntpdc-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1.1 ntpdc help/usage (<samp>--help</samp>)</h4>
+<span id="index-ntpdc-help"></span>
<p>This is the automatically generated usage text for ntpdc.
</p>
@@ -214,7 +199,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p15
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p16
Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
@@ -240,6 +225,7 @@ Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]
- prohibits the option 'command'
-s no showpeers Show a list of the peers
- prohibits the option 'command'
+ -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows)
opt version output version information and exit
-? no help display extended usage information and exit
-! no more-help extended usage information passed thru pager
@@ -257,18 +243,16 @@ The following option preset mechanisms are supported:
- reading file ./.ntprc
- examining environment variables named NTPDC_*
-Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+Please send bug reports to: &lt;https://bugs.ntp.org, bugs@ntp.org&gt;
</pre></div>
<hr>
-<a name="ntpdc-ipv4"></a>
-<div class="header">
+<span id="ntpdc-ipv4"></span><div class="header">
<p>
Next: <a href="#ntpdc-ipv6" accesskey="n" rel="next">ntpdc ipv6</a>, Previous: <a href="#ntpdc-usage" accesskey="p" rel="prev">ntpdc usage</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ipv4-option-_0028_002d4_0029"></a>
-<h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
-<a name="index-ntpdc_002dipv4"></a>
+<span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
+<span id="index-ntpdc_002dipv4"></span>
<p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
</p>
@@ -281,14 +265,12 @@ ipv6.
<p>Force DNS resolution of following host names on the command line
to the IPv4 namespace.
</p><hr>
-<a name="ntpdc-ipv6"></a>
-<div class="header">
+<span id="ntpdc-ipv6"></span><div class="header">
<p>
Next: <a href="#ntpdc-command" accesskey="n" rel="next">ntpdc command</a>, Previous: <a href="#ntpdc-ipv4" accesskey="p" rel="prev">ntpdc ipv4</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ipv6-option-_0028_002d6_0029"></a>
-<h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
-<a name="index-ntpdc_002dipv6"></a>
+<span id="ipv6-option-_0028_002d6_0029"></span><h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
+<span id="index-ntpdc_002dipv6"></span>
<p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
</p>
@@ -301,14 +283,12 @@ ipv4.
<p>Force DNS resolution of following host names on the command line
to the IPv6 namespace.
</p><hr>
-<a name="ntpdc-command"></a>
-<div class="header">
+<span id="ntpdc-command"></span><div class="header">
<p>
Next: <a href="#ntpdc-interactive" accesskey="n" rel="next">ntpdc interactive</a>, Previous: <a href="#ntpdc-ipv6" accesskey="p" rel="prev">ntpdc ipv6</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="command-option-_0028_002dc_0029"></a>
-<h4 class="subsection">1.1.4 command option (-c)</h4>
-<a name="index-ntpdc_002dcommand"></a>
+<span id="command-option-_0028_002dc_0029"></span><h4 class="subsection">1.1.4 command option (-c)</h4>
+<span id="index-ntpdc_002dcommand"></span>
<p>This is the &ldquo;run a command and exit&rdquo; option.
This option takes a string argument <samp>cmd</samp>.
@@ -322,14 +302,12 @@ This option takes a string argument <samp>cmd</samp>.
and is added to the list of commands to be executed on the specified
host(s).
</p><hr>
-<a name="ntpdc-interactive"></a>
-<div class="header">
+<span id="ntpdc-interactive"></span><div class="header">
<p>
Next: <a href="#ntpdc-listpeers" accesskey="n" rel="next">ntpdc listpeers</a>, Previous: <a href="#ntpdc-command" accesskey="p" rel="prev">ntpdc command</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="interactive-option-_0028_002di_0029"></a>
-<h4 class="subsection">1.1.5 interactive option (-i)</h4>
-<a name="index-ntpdc_002dinteractive"></a>
+<span id="interactive-option-_0028_002di_0029"></span><h4 class="subsection">1.1.5 interactive option (-i)</h4>
+<span id="index-ntpdc_002dinteractive"></span>
<p>This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
</p>
@@ -342,14 +320,12 @@ command, listpeers, peers, showpeers.
<p>Force ntpq to operate in interactive mode. Prompts will be written
to the standard output and commands read from the standard input.
</p><hr>
-<a name="ntpdc-listpeers"></a>
-<div class="header">
+<span id="ntpdc-listpeers"></span><div class="header">
<p>
Next: <a href="#ntpdc-numeric" accesskey="n" rel="next">ntpdc numeric</a>, Previous: <a href="#ntpdc-interactive" accesskey="p" rel="prev">ntpdc interactive</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="listpeers-option-_0028_002dl_0029"></a>
-<h4 class="subsection">1.1.6 listpeers option (-l)</h4>
-<a name="index-ntpdc_002dlistpeers"></a>
+<span id="listpeers-option-_0028_002dl_0029"></span><h4 class="subsection">1.1.6 listpeers option (-l)</h4>
+<span id="index-ntpdc_002dlistpeers"></span>
<p>This is the &ldquo;print a list of the peers&rdquo; option.
</p>
@@ -362,27 +338,23 @@ command.
<p>Print a list of the peers known to the server as well as a summary of
their state. This is equivalent to the &rsquo;listpeers&rsquo; interactive command.
</p><hr>
-<a name="ntpdc-numeric"></a>
-<div class="header">
+<span id="ntpdc-numeric"></span><div class="header">
<p>
Next: <a href="#ntpdc-peers" accesskey="n" rel="next">ntpdc peers</a>, Previous: <a href="#ntpdc-listpeers" accesskey="p" rel="prev">ntpdc listpeers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="numeric-option-_0028_002dn_0029"></a>
-<h4 class="subsection">1.1.7 numeric option (-n)</h4>
-<a name="index-ntpdc_002dnumeric"></a>
+<span id="numeric-option-_0028_002dn_0029"></span><h4 class="subsection">1.1.7 numeric option (-n)</h4>
+<span id="index-ntpdc_002dnumeric"></span>
<p>This is the &ldquo;numeric host addresses&rdquo; option.
Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names.
</p><hr>
-<a name="ntpdc-peers"></a>
-<div class="header">
+<span id="ntpdc-peers"></span><div class="header">
<p>
Next: <a href="#ntpdc-showpeers" accesskey="n" rel="next">ntpdc showpeers</a>, Previous: <a href="#ntpdc-numeric" accesskey="p" rel="prev">ntpdc numeric</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="peers-option-_0028_002dp_0029"></a>
-<h4 class="subsection">1.1.8 peers option (-p)</h4>
-<a name="index-ntpdc_002dpeers"></a>
+<span id="peers-option-_0028_002dp_0029"></span><h4 class="subsection">1.1.8 peers option (-p)</h4>
+<span id="index-ntpdc_002dpeers"></span>
<p>This is the &ldquo;print a list of the peers&rdquo; option.
</p>
@@ -395,14 +367,12 @@ command.
<p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the &rsquo;peers&rsquo; interactive command.
</p><hr>
-<a name="ntpdc-showpeers"></a>
-<div class="header">
+<span id="ntpdc-showpeers"></span><div class="header">
<p>
-Next: <a href="#ntpdc-config" accesskey="n" rel="next">ntpdc config</a>, Previous: <a href="#ntpdc-peers" accesskey="p" rel="prev">ntpdc peers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
+Next: <a href="#ntpdc-unconnected" accesskey="n" rel="next">ntpdc unconnected</a>, Previous: <a href="#ntpdc-peers" accesskey="p" rel="prev">ntpdc peers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="showpeers-option-_0028_002ds_0029"></a>
-<h4 class="subsection">1.1.9 showpeers option (-s)</h4>
-<a name="index-ntpdc_002dshowpeers"></a>
+<span id="showpeers-option-_0028_002ds_0029"></span><h4 class="subsection">1.1.9 showpeers option (-s)</h4>
+<span id="index-ntpdc_002dshowpeers"></span>
<p>This is the &ldquo;show a list of the peers&rdquo; option.
</p>
@@ -414,16 +384,25 @@ command.
<p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the &rsquo;dmpeers&rsquo; interactive command.
+</p><hr>
+<span id="ntpdc-unconnected"></span><div class="header">
+<p>
+Next: <a href="#ntpdc-config" accesskey="n" rel="next">ntpdc config</a>, Previous: <a href="#ntpdc-showpeers" accesskey="p" rel="prev">ntpdc showpeers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
+</div>
+<span id="unconnected-option-_0028_002du_0029"></span><h4 class="subsection">1.1.10 unconnected option (-u)</h4>
+<span id="index-ntpdc_002dunconnected"></span>
+
+<p>This is the &ldquo;use unconnected udp to communicate with ntpd (default on windows)&rdquo; option.
+Open an unconnected UDP association to ntpd (the default
+on Windows).
</p>
<hr>
-<a name="ntpdc-config"></a>
-<div class="header">
+<span id="ntpdc-config"></span><div class="header">
<p>
-Next: <a href="#ntpdc-exit-status" accesskey="n" rel="next">ntpdc exit status</a>, Previous: <a href="#ntpdc-showpeers" accesskey="p" rel="prev">ntpdc showpeers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
+Next: <a href="#ntpdc-exit-status" accesskey="n" rel="next">ntpdc exit status</a>, Previous: <a href="#ntpdc-unconnected" accesskey="p" rel="prev">ntpdc unconnected</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="presetting_002fconfiguring-ntpdc"></a>
-<h4 class="subsection">1.1.10 presetting/configuring ntpdc</h4>
+<span id="presetting_002fconfiguring-ntpdc"></span><h4 class="subsection">1.1.11 presetting/configuring ntpdc</h4>
<p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from configuration (&quot;rc&quot; or &quot;ini&quot;) files, and values from environment variables named <code>NTPDC</code> and <code>NTPDC_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
@@ -479,12 +458,11 @@ the associated name/value pair list (see: optionFindValue).
</p>
<p>The command line options relating to configuration and/or usage help are:
</p>
-<a name="version-_0028_002d_0029"></a>
-<h4 class="subsubheading">version (-)</h4>
+<span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>
<p>Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
</p>
<dl compact="compact">
@@ -500,13 +478,11 @@ Only the first letter of the argument is examined:
</dl>
<hr>
-<a name="ntpdc-exit-status"></a>
-<div class="header">
+<span id="ntpdc-exit-status"></span><div class="header">
<p>
Next: <a href="#ntpdc-Usage" accesskey="n" rel="next">ntpdc Usage</a>, Previous: <a href="#ntpdc-config" accesskey="p" rel="prev">ntpdc config</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ntpdc-exit-status-1"></a>
-<h4 class="subsection">1.1.11 ntpdc exit status</h4>
+<span id="ntpdc-exit-status-1"></span><h4 class="subsection">1.1.12 ntpdc exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
@@ -525,46 +501,36 @@ it to autogen-users@lists.sourceforge.net. Thank you.
</p></dd>
</dl>
<hr>
-<a name="ntpdc-Usage"></a>
-<div class="header">
+<span id="ntpdc-Usage"></span><div class="header">
<p>
Next: <a href="#ntpdc-See-Also" accesskey="n" rel="next">ntpdc See Also</a>, Previous: <a href="#ntpdc-exit-status" accesskey="p" rel="prev">ntpdc exit status</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ntpdc-Usage-1"></a>
-<h4 class="subsection">1.1.12 ntpdc Usage</h4>
+<span id="ntpdc-Usage-1"></span><h4 class="subsection">1.1.13 ntpdc Usage</h4>
<hr>
-<a name="ntpdc-See-Also"></a>
-<div class="header">
+<span id="ntpdc-See-Also"></span><div class="header">
<p>
Next: <a href="#ntpdc-Authors" accesskey="n" rel="next">ntpdc Authors</a>, Previous: <a href="#ntpdc-Usage" accesskey="p" rel="prev">ntpdc Usage</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ntpdc-See-Also-1"></a>
-<h4 class="subsection">1.1.13 ntpdc See Also</h4>
+<span id="ntpdc-See-Also-1"></span><h4 class="subsection">1.1.14 ntpdc See Also</h4>
<hr>
-<a name="ntpdc-Authors"></a>
-<div class="header">
+<span id="ntpdc-Authors"></span><div class="header">
<p>
Next: <a href="#ntpdc-Bugs" accesskey="n" rel="next">ntpdc Bugs</a>, Previous: <a href="#ntpdc-See-Also" accesskey="p" rel="prev">ntpdc See Also</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ntpdc-Authors-1"></a>
-<h4 class="subsection">1.1.14 ntpdc Authors</h4>
+<span id="ntpdc-Authors-1"></span><h4 class="subsection">1.1.15 ntpdc Authors</h4>
<hr>
-<a name="ntpdc-Bugs"></a>
-<div class="header">
+<span id="ntpdc-Bugs"></span><div class="header">
<p>
Previous: <a href="#ntpdc-Authors" accesskey="p" rel="prev">ntpdc Authors</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div>
-<a name="ntpdc-Bugs-1"></a>
-<h4 class="subsection">1.1.15 ntpdc Bugs</h4>
+<span id="ntpdc-Bugs-1"></span><h4 class="subsection">1.1.16 ntpdc Bugs</h4>
<hr>
-<a name="Usage"></a>
-<div class="header">
+<span id="Usage"></span><div class="header">
<p>
Previous: <a href="#ntpdc-Invocation" accesskey="p" rel="prev">ntpdc Invocation</a>, Up: <a href="#ntpdc-Description" accesskey="u" rel="up">ntpdc Description</a> &nbsp; </p>
</div>
-<a name="Usage-1"></a>
-<h3 class="section">1.2 Usage</h3>
+<span id="Usage-1"></span><h3 class="section">1.2 Usage</h3>
<p>The simplest use of this program is as an unprivileged command to
check the current time, offset, and error in the local clock.
diff --git a/contrib/ntp/ntpdc/ntpdc.man.in b/contrib/ntp/ntpdc/ntpdc.man.in
index 43b9138b768b..cd518f7b1e8a 100644
--- a/contrib/ntp/ntpdc/ntpdc.man.in
+++ b/contrib/ntp/ntpdc/ntpdc.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc @NTPDC_MS@ "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpdc @NTPDC_MS@ "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:47 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:54 PM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -132,6 +132,12 @@ command.
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command.
.TP
+.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[]
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
+.TP
.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
.TP
@@ -848,7 +854,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
@@ -868,7 +874,7 @@ Please report bugs to http://bugs.ntp.org .
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH "NOTES"
This manual page was \fIAutoGen\fP-erated from the \fBntpdc\fP
option definitions.
diff --git a/contrib/ntp/ntpdc/ntpdc.mdoc.in b/contrib/ntp/ntpdc/ntpdc.mdoc.in
index 349af271d18f..87b5dba2bdf8 100644
--- a/contrib/ntp/ntpdc/ntpdc.mdoc.in
+++ b/contrib/ntp/ntpdc/ntpdc.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPDC @NTPDC_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:44 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:49:50 PM by AutoGen 5.18.16
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -107,6 +107,11 @@ command.
.sp
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command.
+.It Fl u , Fl \-unconnected
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
.It Fl \&? , Fl \-help
Display usage information and exit.
.It Fl \&! , Fl \-more\-help
@@ -787,7 +792,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
@@ -803,7 +808,7 @@ this, the program is occasionally useful.
.Pp
Please report bugs to http://bugs.ntp.org .
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh "NOTES"
This manual page was \fIAutoGen\fP\-erated from the \fBntpdc\fP
option definitions.
diff --git a/contrib/ntp/ntpq/Makefile.am b/contrib/ntp/ntpq/Makefile.am
index fefb31cd4514..97645c03bf84 100644
--- a/contrib/ntp/ntpq/Makefile.am
+++ b/contrib/ntp/ntpq/Makefile.am
@@ -17,7 +17,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-ntpq_LDADD = version.o $(LIBOPTS_LDADD)
+ntpq_LDADD = $(LIBOPTS_LDADD)
ntpq_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ntpq_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
ntpq_LDADD += $(LDADD_NTP)
@@ -30,9 +30,10 @@ libntpq_a_CFLAGS = $(AM_CFLAGS)
libntpq_a_CFLAGS += -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
libntpq_a_CPPFLAGS = $(AM_CPPFLAGS)
-CLEANFILES =
-DISTCLEANFILES = .version version.c config.log $(man_MANS)
-ETAGS_ARGS = Makefile.am
+CLEANFILES = .version version.c
+DISTCLEANFILES = config.log $(man_MANS)
+ETAGS_ARGS = Makefile.am
+
EXTRA_DIST = \
invoke-ntpq.menu \
invoke-ntpq.texi \
@@ -74,7 +75,9 @@ std_def_list = \
$(top_srcdir)/sntp/include/ntp.lic \
$(top_srcdir)/sntp/include/version.def \
$(NULL)
-ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
+
+ntpq_SOURCES = ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
+nodist_ntpq_SOURCES = version.c
libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c
@@ -82,12 +85,12 @@ $(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) ntpq-opts.def
###
$(srcdir)/ntpq.1ntpqman: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
$(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqman > $(srcdir)/ntpq.man.in+
@@ -96,7 +99,7 @@ $(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec
###
$(srcdir)/ntpq.1ntpqmdoc: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
$(srcdir)/ntpq.mdoc.in: $(srcdir)/ntpq.1ntpqmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqmdoc > $(srcdir)/ntpq.mdoc.in+
@@ -114,27 +117,20 @@ $(srcdir)/invoke-ntpq.menu: $(srcdir)/invoke-ntpq.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntpq.html: $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpq.html: $(srcdir)/invoke-ntpq.texi $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpq.html ntpq.texi || true )
###
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
-
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/check-libopts.mf
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/ntpq/Makefile.in b/contrib/ntp/ntpq/Makefile.in
index ac1af0df7af8..dd77e591e3d8 100644
--- a/contrib/ntp/ntpq/Makefile.in
+++ b/contrib/ntp/ntpq/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -116,7 +116,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -136,6 +135,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -146,6 +146,10 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
AM_V_AR = $(am__v_AR_@AM_V@)
@@ -157,15 +161,12 @@ libntpq_a_LIBADD =
am_libntpq_a_OBJECTS = libntpq_a-libntpq.$(OBJEXT) \
libntpq_a-libntpq_subs.$(OBJEXT)
libntpq_a_OBJECTS = $(am_libntpq_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
- "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
- "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
-PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am_ntpq_OBJECTS = ntpq.$(OBJEXT) ntpq-subs.$(OBJEXT) \
ntpq-opts.$(OBJEXT)
-ntpq_OBJECTS = $(am_ntpq_OBJECTS)
+nodist_ntpq_OBJECTS = version.$(OBJEXT)
+ntpq_OBJECTS = $(am_ntpq_OBJECTS) $(nodist_ntpq_OBJECTS)
am__DEPENDENCIES_1 =
-ntpq_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) ../libntp/libntp.a \
+ntpq_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libntp/libntp.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@@ -187,7 +188,11 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/libntpq_a-libntpq.Po \
+ ./$(DEPDIR)/libntpq_a-libntpq_subs.Po ./$(DEPDIR)/ntpq-opts.Po \
+ ./$(DEPDIR)/ntpq-subs.Po ./$(DEPDIR)/ntpq.Po \
+ ./$(DEPDIR)/version.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -207,7 +212,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(libntpq_a_SOURCES) $(ntpq_SOURCES)
+SOURCES = $(libntpq_a_SOURCES) $(ntpq_SOURCES) $(nodist_ntpq_SOURCES)
DIST_SOURCES = $(libntpq_a_SOURCES) $(ntpq_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
@@ -264,11 +269,10 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
- $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
+ $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -288,6 +292,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -297,6 +302,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -309,14 +316,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -527,6 +530,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -546,15 +550,15 @@ AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP) \
AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
-ntpq_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
- $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(EDITLINE_LIBS) \
- $(LDADD_NTP) $(NTP_HARD_LDFLAGS)
+ntpq_LDADD = $(LIBOPTS_LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) \
+ $(LIBM) $(PTHREAD_LIBS) $(EDITLINE_LIBS) $(LDADD_NTP) \
+ $(NTP_HARD_LDFLAGS)
noinst_HEADERS = ntpq.h
noinst_LIBRARIES = libntpq.a
libntpq_a_CFLAGS = $(AM_CFLAGS) -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
libntpq_a_CPPFLAGS = $(AM_CPPFLAGS)
-CLEANFILES = check-libopts check-libntp .deps-ver
-DISTCLEANFILES = .version version.c config.log $(man_MANS)
+CLEANFILES = .version version.c check-libopts check-libntp .deps-ver
+DISTCLEANFILES = config.log $(man_MANS) $(DEPDIR)/deps-ver
ETAGS_ARGS = Makefile.am
EXTRA_DIST = \
invoke-ntpq.menu \
@@ -597,16 +601,18 @@ std_def_list = \
$(NULL)
ntpq_SOURCES = ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
+nodist_ntpq_SOURCES = version.c
libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -623,10 +629,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -636,14 +642,6 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-libntpq.a: $(libntpq_a_OBJECTS) $(libntpq_a_DEPENDENCIES) $(EXTRA_libntpq_a_DEPENDENCIES)
- $(AM_V_at)-rm -f libntpq.a
- $(AM_V_AR)$(libntpq_a_AR) libntpq.a $(libntpq_a_OBJECTS) $(libntpq_a_LIBADD)
- $(AM_V_at)$(RANLIB) libntpq.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -792,6 +790,14 @@ clean-sbinPROGRAMS:
echo " rm -f" $$list; \
rm -f $$list
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+libntpq.a: $(libntpq_a_OBJECTS) $(libntpq_a_DEPENDENCIES) $(EXTRA_libntpq_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libntpq.a
+ $(AM_V_AR)$(libntpq_a_AR) libntpq.a $(libntpq_a_OBJECTS) $(libntpq_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libntpq.a
+
ntpq$(EXEEXT): $(ntpq_OBJECTS) $(ntpq_DEPENDENCIES) $(EXTRA_ntpq_DEPENDENCIES)
@rm -f ntpq$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ntpq_OBJECTS) $(ntpq_LDADD) $(LIBS)
@@ -802,29 +808,39 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntpq_a-libntpq.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntpq_a-libntpq_subs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq-opts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq-subs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntpq_a-libntpq.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntpq_a-libntpq_subs.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq-opts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq-subs.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -1021,8 +1037,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1055,14 +1073,15 @@ distdir: $(DISTFILES)
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS)
+all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(MANS) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1101,7 +1120,12 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libntpq_a-libntpq.Po
+ -rm -f ./$(DEPDIR)/libntpq_a-libntpq_subs.Po
+ -rm -f ./$(DEPDIR)/ntpq-opts.Po
+ -rm -f ./$(DEPDIR)/ntpq-subs.Po
+ -rm -f ./$(DEPDIR)/ntpq.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1149,7 +1173,12 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libntpq_a-libntpq.Po
+ -rm -f ./$(DEPDIR)/libntpq_a-libntpq_subs.Po
+ -rm -f ./$(DEPDIR)/ntpq-opts.Po
+ -rm -f ./$(DEPDIR)/ntpq-subs.Po
+ -rm -f ./$(DEPDIR)/ntpq.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1171,9 +1200,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
uninstall-man: uninstall-man1 uninstall-man8
-.MAKE: all check install install-am install-exec-am install-strip
+.MAKE: all check install install-am install-exec install-exec-am \
+ install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-noinstLIBRARIES clean-sbinPROGRAMS \
cscopelist-am ctags ctags-am distclean distclean-compile \
@@ -1202,12 +1232,12 @@ $(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) ntpq-opts.def
###
$(srcdir)/ntpq.1ntpqman: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
$(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqman > $(srcdir)/ntpq.man.in+
@@ -1216,7 +1246,7 @@ $(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec
###
$(srcdir)/ntpq.1ntpqmdoc: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
$(srcdir)/ntpq.mdoc.in: $(srcdir)/ntpq.1ntpqmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqmdoc > $(srcdir)/ntpq.mdoc.in+
@@ -1234,24 +1264,16 @@ $(srcdir)/invoke-ntpq.menu: $(srcdir)/invoke-ntpq.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntpq.html: $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpq.html: $(srcdir)/invoke-ntpq.texi $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpq.html ntpq.texi || true )
###
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
-
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
install-exec-hook:
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
@@ -1273,17 +1295,25 @@ check-libopts: ../sntp/libopts/libopts.la
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1301,7 +1331,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1331,7 +1361,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/ntpq/invoke-ntpq.texi b/contrib/ntp/ntpq/invoke-ntpq.texi
index 040575a44b70..dd2a0038912b 100644
--- a/contrib/ntp/ntpq/invoke-ntpq.texi
+++ b/contrib/ntp/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:20:55 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 02:50:06 PM by AutoGen 5.18.16
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -923,6 +923,7 @@ This software is released under the NTP license, <http://ntp.org/license>.
* ntpq old-rv:: old-rv option
* ntpq peers:: peers option (-p)
* ntpq refid:: refid option (-r)
+* ntpq unconnected:: unconnected option (-u)
* ntpq wide:: wide option (-w)
* ntpq config:: presetting/configuring ntpq
* ntpq exit status:: exit status
@@ -944,7 +945,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.8p15
+ntpq - standard NTP query program - Ver. 4.2.8p16
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 name resolution
@@ -966,6 +967,7 @@ Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
-p no peers Print a list of the peers
- prohibits the option 'interactive'
-r KWd refid Set default display type for S2+ refids
+ -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows)
-w no wide Display the full 'remote' value
opt version output version information and exit
-? no help display extended usage information and exit
@@ -987,7 +989,7 @@ The valid "refid" option keywords are:
hash ipv4
or an integer from 0 through 1
-Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+Please send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4
@@ -1112,9 +1114,17 @@ The available keywords are:
hash ipv4
@end example
-or their numeric equivalent.@end itemize
+or their numeric equivalent.
+@end itemize
Set the default display format for S2+ refids.
+@node ntpq unconnected
+@subsection unconnected option (-u)
+@cindex ntpq-unconnected
+
+This is the ``use unconnected udp to communicate with ntpd (default on windows)'' option.
+Open an unconnected UDP association to ntpd (the default
+on Windows).
@node ntpq wide
@subsection wide option (-w)
@cindex ntpq-wide
@@ -1192,7 +1202,7 @@ The command line options relating to configuration and/or usage help are:
Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
@table @samp
diff --git a/contrib/ntp/ntpq/ntpq-opts.c b/contrib/ntp/ntpq/ntpq-opts.c
index ca08c3f0cfd7..e6398fd724b4 100644
--- a/contrib/ntp/ntpq/ntpq-opts.c
+++ b/contrib/ntp/ntpq/ntpq-opts.c
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:48 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:49:56 PM by AutoGen 5.18.16
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpq program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -40,10 +40,15 @@
#define OPTION_CODE_COMPILE 1
#include "ntpq-opts.h"
#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -68,9 +73,9 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpq options
*/
-static char const ntpq_opt_strs[1977] =
-/* 0 */ "ntpq 4.2.8p15\n"
- "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+static char const ntpq_opt_strs[2068] =
+/* 0 */ "ntpq 4.2.8p16\n"
+ "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -116,30 +121,33 @@ static char const ntpq_opt_strs[1977] =
/* 1435 */ "Set default display type for S2+ refids\0"
/* 1475 */ "REFID\0"
/* 1481 */ "refid\0"
-/* 1487 */ "Display the full 'remote' value\0"
-/* 1519 */ "WIDE\0"
-/* 1524 */ "wide\0"
-/* 1529 */ "display extended usage information and exit\0"
-/* 1573 */ "help\0"
-/* 1578 */ "extended usage information passed thru pager\0"
-/* 1623 */ "more-help\0"
-/* 1633 */ "output version information and exit\0"
-/* 1669 */ "version\0"
-/* 1677 */ "save the option state to a config file\0"
-/* 1716 */ "save-opts\0"
-/* 1726 */ "load options from a config file\0"
-/* 1758 */ "LOAD_OPTS\0"
-/* 1768 */ "no-load-opts\0"
-/* 1781 */ "no\0"
-/* 1784 */ "NTPQ\0"
-/* 1789 */ "ntpq - standard NTP query program - Ver. 4.2.8p15\n"
+/* 1487 */ "Use unconnected UDP to communicate with ntpd (default on Windows)\0"
+/* 1553 */ "UNCONNECTED\0"
+/* 1565 */ "unconnected\0"
+/* 1577 */ "Display the full 'remote' value\0"
+/* 1609 */ "WIDE\0"
+/* 1614 */ "wide\0"
+/* 1619 */ "display extended usage information and exit\0"
+/* 1663 */ "help\0"
+/* 1668 */ "extended usage information passed thru pager\0"
+/* 1713 */ "more-help\0"
+/* 1723 */ "output version information and exit\0"
+/* 1759 */ "version\0"
+/* 1767 */ "save the option state to a config file\0"
+/* 1806 */ "save-opts\0"
+/* 1816 */ "load options from a config file\0"
+/* 1848 */ "LOAD_OPTS\0"
+/* 1858 */ "no-load-opts\0"
+/* 1871 */ "no\0"
+/* 1874 */ "NTPQ\0"
+/* 1879 */ "ntpq - standard NTP query program - Ver. 4.2.8p16\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1909 */ "$HOME\0"
-/* 1915 */ ".\0"
-/* 1917 */ ".ntprc\0"
-/* 1924 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1958 */ "ntpq 4.2.8p15\0"
-/* 1972 */ "hash";
+/* 1999 */ "$HOME\0"
+/* 2005 */ ".\0"
+/* 2007 */ ".ntprc\0"
+/* 2014 */ "https://bugs.ntp.org, bugs@ntp.org\0"
+/* 2049 */ "ntpq 4.2.8p16\0"
+/* 2063 */ "hash";
/**
* ipv4 option description with
@@ -284,25 +292,37 @@ static int const aPeersCantList[] = {
| OPTST_SET_ARGTYPE(OPARG_TYPE_ENUMERATION))
/**
+ * unconnected option description:
+ */
+/** Descriptive text for the unconnected option */
+#define UNCONNECTED_DESC (ntpq_opt_strs+1487)
+/** Upper-cased name for the unconnected option */
+#define UNCONNECTED_NAME (ntpq_opt_strs+1553)
+/** Name string for the unconnected option */
+#define UNCONNECTED_name (ntpq_opt_strs+1565)
+/** Compiled in flag settings for the unconnected option */
+#define UNCONNECTED_FLAGS (OPTST_DISABLED)
+
+/**
* wide option description:
*/
/** Descriptive text for the wide option */
-#define WIDE_DESC (ntpq_opt_strs+1487)
+#define WIDE_DESC (ntpq_opt_strs+1577)
/** Upper-cased name for the wide option */
-#define WIDE_NAME (ntpq_opt_strs+1519)
+#define WIDE_NAME (ntpq_opt_strs+1609)
/** Name string for the wide option */
-#define WIDE_name (ntpq_opt_strs+1524)
+#define WIDE_name (ntpq_opt_strs+1614)
/** Compiled in flag settings for the wide option */
#define WIDE_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpq_opt_strs+1529)
-#define HELP_name (ntpq_opt_strs+1573)
+#define HELP_DESC (ntpq_opt_strs+1619)
+#define HELP_name (ntpq_opt_strs+1663)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpq_opt_strs+1578)
-#define MORE_HELP_name (ntpq_opt_strs+1623)
+#define MORE_HELP_DESC (ntpq_opt_strs+1668)
+#define MORE_HELP_name (ntpq_opt_strs+1713)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -315,14 +335,14 @@ static int const aPeersCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpq_opt_strs+1633)
-#define VER_name (ntpq_opt_strs+1669)
-#define SAVE_OPTS_DESC (ntpq_opt_strs+1677)
-#define SAVE_OPTS_name (ntpq_opt_strs+1716)
-#define LOAD_OPTS_DESC (ntpq_opt_strs+1726)
-#define LOAD_OPTS_NAME (ntpq_opt_strs+1758)
-#define NO_LOAD_OPTS_name (ntpq_opt_strs+1768)
-#define LOAD_OPTS_pfx (ntpq_opt_strs+1781)
+#define VER_DESC (ntpq_opt_strs+1723)
+#define VER_name (ntpq_opt_strs+1759)
+#define SAVE_OPTS_DESC (ntpq_opt_strs+1767)
+#define SAVE_OPTS_name (ntpq_opt_strs+1806)
+#define LOAD_OPTS_DESC (ntpq_opt_strs+1816)
+#define LOAD_OPTS_NAME (ntpq_opt_strs+1848)
+#define NO_LOAD_OPTS_name (ntpq_opt_strs+1858)
+#define LOAD_OPTS_pfx (ntpq_opt_strs+1871)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -463,8 +483,20 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ REFID_DESC, REFID_NAME, REFID_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 10, VALUE_OPT_WIDE,
- /* equiv idx, value */ 10, VALUE_OPT_WIDE,
+ { /* entry idx, value */ 10, VALUE_OPT_UNCONNECTED,
+ /* equiv idx, value */ 10, VALUE_OPT_UNCONNECTED,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ UNCONNECTED_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --unconnected */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ UNCONNECTED_DESC, UNCONNECTED_NAME, UNCONNECTED_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 11, VALUE_OPT_WIDE,
+ /* equiv idx, value */ 11, VALUE_OPT_WIDE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ WIDE_FLAGS, 0,
@@ -543,25 +575,25 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpq. */
-#define zPROGNAME (ntpq_opt_strs+1784)
+#define zPROGNAME (ntpq_opt_strs+1874)
/** Reference to the title line for ntpq usage. */
-#define zUsageTitle (ntpq_opt_strs+1789)
+#define zUsageTitle (ntpq_opt_strs+1879)
/** ntpq configuration file name. */
-#define zRcName (ntpq_opt_strs+1917)
+#define zRcName (ntpq_opt_strs+2007)
/** Directories to search for ntpq config files. */
static char const * const apzHomeList[3] = {
- ntpq_opt_strs+1909,
- ntpq_opt_strs+1915,
+ ntpq_opt_strs+1999,
+ ntpq_opt_strs+2005,
NULL };
/** The ntpq program bug email address. */
-#define zBugsAddr (ntpq_opt_strs+1924)
+#define zBugsAddr (ntpq_opt_strs+2014)
/** Clarification/explanation of what ntpq does. */
#define zExplain (NULL)
/** Extra detail explaining what ntpq does. */
#define zDetail (NULL)
/** The full version string for ntpq. */
-#define zFullVersion (ntpq_opt_strs+1958)
-/* extracted from optcode.tlib near line 364 */
+#define zFullVersion (ntpq_opt_strs+2049)
+/* extracted from optcode.tlib near line 342 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -593,7 +625,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
ex_code = NTPQ_EXIT_SUCCESS;
optionUsage(&ntpqOptions, ex_code);
/* NOTREACHED */
- exit(1);
+ exit(NTPQ_EXIT_FAILURE);
(void)opts;
(void)od;
}
@@ -633,7 +665,7 @@ doOptRefid(tOptions* pOptions, tOptDesc* pOptDesc)
/* extracted from optmain.tlib near line 945 */
static char const * const names[2] = {
- ntpq_opt_strs+1972, ntpq_opt_strs+1041 };
+ ntpq_opt_strs+2063, ntpq_opt_strs+1041 };
if (pOptions <= OPTPROC_EMIT_LIMIT) {
(void) optionEnumerationVal(pOptions, pOptDesc, names, 2);
@@ -706,7 +738,7 @@ tOptions ntpqOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 16 /* full option count */, 11 /* user option count */,
+ 17 /* full option count */, 12 /* user option count */,
ntpq_full_usage, ntpq_short_usage,
NULL, NULL,
PKGDATADIR, ntpq_packager_info
@@ -830,19 +862,19 @@ static void bogus_function(void) {
extract the correct strings. These strings are actually referenced
by a field name in the ntpqOptions structure noted in the
comments below. The literal text is defined in ntpq_opt_strs.
-
+
NOTE: the strings below are segmented with respect to the source string
ntpq_opt_strs. The strings above are handed off for translation
at run time a paragraph at a time. Consequently, they are presented here
for translation a paragraph at a time.
-
+
ALSO: often the description for an option will reference another option
by name. These are set off with apostrophe quotes (I hope). Do not
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.8p15\n\
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpq 4.2.8p16\n\
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -892,6 +924,9 @@ implied warranty.\n"));
puts(_("Set default display type for S2+ refids"));
/* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Use unconnected UDP to communicate with ntpd (default on Windows)"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("Display the full 'remote' value"));
/* referenced via ntpqOptions.pOptDesc->pzText */
@@ -910,11 +945,11 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.2.8p15\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p16\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.8p15"));
+ puts(_("ntpq 4.2.8p16"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
@@ -924,234 +959,230 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -1160,17 +1191,17 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -1188,28 +1219,28 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/ntpq/ntpq-opts.def b/contrib/ntp/ntpq/ntpq-opts.def
index f34653d1281f..85655a9d66cc 100644
--- a/contrib/ntp/ntpq/ntpq-opts.def
+++ b/contrib/ntp/ntpq/ntpq-opts.def
@@ -112,6 +112,16 @@ flag = {
};
flag = {
+ name = unconnected;
+ value = u;
+ descrip = "Use unconnected UDP to communicate with ntpd (default on Windows)";
+ doc = <<- _EndOfDoc_
+ Open an unconnected UDP association to ntpd (the default
+ on Windows).
+ _EndOfDoc_;
+};
+
+flag = {
name = wide;
value = w;
descrip = "Display the full 'remote' value";
diff --git a/contrib/ntp/ntpq/ntpq-opts.h b/contrib/ntp/ntpq/ntpq-opts.h
index 9bc23b8f0eca..43637fd268cf 100644
--- a/contrib/ntp/ntpq/ntpq-opts.h
+++ b/contrib/ntp/ntpq/ntpq-opts.h
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:48 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:49:56 PM by AutoGen 5.18.16
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpq program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -45,6 +45,8 @@
#define AUTOOPTS_NTPQ_OPTS_H_GUARD 1
#include "config.h"
#include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
/**
* Ensure that the library used for compiling this generated header is at
@@ -53,13 +55,19 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
/**
* Enumeration of each option type for ntpq
*/
@@ -74,19 +82,20 @@ typedef enum {
INDEX_OPT_OLD_RV = 7,
INDEX_OPT_PEERS = 8,
INDEX_OPT_REFID = 9,
- INDEX_OPT_WIDE = 10,
- INDEX_OPT_VERSION = 11,
- INDEX_OPT_HELP = 12,
- INDEX_OPT_MORE_HELP = 13,
- INDEX_OPT_SAVE_OPTS = 14,
- INDEX_OPT_LOAD_OPTS = 15
+ INDEX_OPT_UNCONNECTED = 10,
+ INDEX_OPT_WIDE = 11,
+ INDEX_OPT_VERSION = 12,
+ INDEX_OPT_HELP = 13,
+ INDEX_OPT_MORE_HELP = 14,
+ INDEX_OPT_SAVE_OPTS = 15,
+ INDEX_OPT_LOAD_OPTS = 16
} teOptIndex;
/** count of all options for ntpq */
-#define OPTION_CT 16
+#define OPTION_CT 17
/** ntpq version */
-#define NTPQ_VERSION "4.2.8p15"
+#define NTPQ_VERSION "4.2.8p16"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.8p15"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p16"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -179,6 +188,10 @@ typedef enum {
# warning undefining REFID due to option name conflict
# undef REFID
# endif
+# ifdef UNCONNECTED
+# warning undefining UNCONNECTED due to option name conflict
+# undef UNCONNECTED
+# endif
# ifdef WIDE
# warning undefining WIDE due to option name conflict
# undef WIDE
@@ -194,6 +207,7 @@ typedef enum {
# undef OLD_RV
# undef PEERS
# undef REFID
+# undef UNCONNECTED
# undef WIDE
#endif /* NO_OPTION_NAME_WARNINGS */
@@ -219,6 +233,7 @@ typedef enum {
} te_Refid;
#define OPT_REFID_VAL2STR(_v) optionKeywordName(&DESC(REFID), (_v))
#define OPT_VALUE_REFID (DESC(REFID).optArg.argEnum)
+#define VALUE_OPT_UNCONNECTED 'u'
#define VALUE_OPT_WIDE 'w'
/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
@@ -299,6 +314,7 @@ static inline char* aoGetsText(char const* pz) {
# endif
#endif /* ENABLE_NLS */
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/ntpq/ntpq-subs.c b/contrib/ntp/ntpq/ntpq-subs.c
index 3020cc5c22a7..527be098b561 100644
--- a/contrib/ntp/ntpq/ntpq-subs.c
+++ b/contrib/ntp/ntpq/ntpq-subs.c
@@ -1186,6 +1186,7 @@ printassoc(
const char *condition = "";
const char *last_event;
char buf[128];
+ char numev[32];
if (numassoc == 0) {
(void) xprintf(fp, "No association ID's in list\n");
@@ -1335,8 +1336,25 @@ printassoc(
last_event = "clock_alarm";
break;
+ case PEVNT_AUTH:
+ last_event = "bad_auth";
+ break;
+
+ case PEVNT_POPCORN:
+ last_event = "popcorn";
+ break;
+
+ case PEVNT_XLEAVE:
+ last_event = "interleave";
+ break;
+
+ case PEVNT_XERR:
+ last_event = "xleave_err";
+ break;
+
default:
- last_event = "";
+ snprintf(numev, sizeof(numev), "<?%x?>", event);
+ last_event = numev;
break;
}
snprintf(buf, sizeof(buf),
@@ -2004,16 +2022,17 @@ dopeers(
if (!dogetassoc(fp))
return;
- for (u = 0; u < numhosts; u++) {
- if (getnetnum(chosts[u].name, &netnum, fullname, af)) {
- name_or_num = nntohost(&netnum);
- sl = strlen(name_or_num);
- maxhostlen = max(maxhostlen, sl);
+ if (numhosts > 1) {
+ for (u = 0; u < numhosts; u++) {
+ if (getnetnum(chosts[u].name, &netnum, fullname, af)) {
+ name_or_num = nntohost(&netnum);
+ sl = strlen(name_or_num);
+ maxhostlen = max(maxhostlen, sl);
+ }
}
- }
- if (numhosts > 1)
xprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
"server (local)");
+ }
xprintf(fp,
" remote refid st t when poll reach delay offset jitter\n");
if (numhosts > 1)
@@ -2058,16 +2077,17 @@ doapeers(
if (!dogetassoc(fp))
return;
- for (u = 0; u < numhosts; u++) {
- if (getnetnum(chosts[u].name, &netnum, fullname, af)) {
- name_or_num = nntohost(&netnum);
- sl = strlen(name_or_num);
- maxhostlen = max(maxhostlen, sl);
+ if (numhosts > 1) {
+ for (u = 0; u < numhosts; u++) {
+ if (getnetnum(chosts[u].name, &netnum, fullname, af)) {
+ name_or_num = nntohost(&netnum);
+ sl = strlen(name_or_num);
+ maxhostlen = max(maxhostlen, sl);
+ }
}
- }
- if (numhosts > 1)
xprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
"server (local)");
+ }
xprintf(fp,
" remote refid assid st t when poll reach delay offset jitter\n");
if (numhosts > 1)
@@ -2180,14 +2200,15 @@ doopeers(
if (!dogetassoc(fp))
return;
- for (i = 0; i < numhosts; ++i) {
- if (getnetnum(chosts[i].name, &netnum, fullname, af))
- if (strlen(fullname) > maxhostlen)
- maxhostlen = strlen(fullname);
+ if (numhosts > 1) {
+ for (i = 0; i < numhosts; ++i) {
+ if (getnetnum(chosts[i].name, &netnum, fullname, af)) {
+ maxhostlen = max(maxhostlen, strlen(fullname));
+ }
+ xprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
+ "server");
+ }
}
- if (numhosts > 1)
- xprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
- "server");
xprintf(fp,
" remote local st t when poll reach delay offset disp\n");
if (numhosts > 1)
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqman b/contrib/ntp/ntpq/ntpq.1ntpqman
index 4723f9ff29ed..79f7f4cbc06c 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqman
+++ b/contrib/ntp/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpq 1ntpqman "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:56 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:50:08 PM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1514,6 +1514,12 @@ for this option is:
.sp
Set the default display format for S2+ refids.
.TP
+.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[]
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
+.TP
.NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
Display the full 'remote' value.
.sp
@@ -1579,10 +1585,10 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH "NOTES"
This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
option definitions.
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqmdoc b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
index 4b21e393ed0a..9515506c71b5 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqmdoc
+++ b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:53 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:50:04 PM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -989,6 +989,11 @@ for this option is:
ipv4
.sp
Set the default display format for S2+ refids.
+.It Fl u , Fl \-unconnected
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
.It Fl w , Fl \-wide
Display the full 'remote' value.
.sp
@@ -1046,10 +1051,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh "NOTES"
This manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP
option definitions.
diff --git a/contrib/ntp/ntpq/ntpq.c b/contrib/ntp/ntpq/ntpq.c
index 0382c0f948d7..1a0e9b1a6867 100644
--- a/contrib/ntp/ntpq/ntpq.c
+++ b/contrib/ntp/ntpq/ntpq.c
@@ -17,6 +17,9 @@
#endif
#ifdef SYS_WINNT
# include <mswsock.h>
+# define PATH_DEVNULL "NUL:"
+#else
+# define PATH_DEVNULL "/dev/null"
#endif
#include <isc/net.h>
#include <isc/result.h>
@@ -236,13 +239,15 @@ static int assoccmp (const void *, const void *);
#ifndef BUILD_AS_LIB
static char *list_digest_names(void);
-static char *insert_cmac (char *list);
static void on_ctrlc (void);
static int my_easprintf (char**, const char *, ...) NTP_PRINTF(2, 3);
-# if defined(OPENSSL) && defined(HAVE_EVP_MD_DO_ALL_SORTED)
+#ifdef OPENSSL
+static char *insert_cmac (char *list);
+# ifdef HAVE_EVP_MD_DO_ALL_SORTED
static void list_md_fn (const EVP_MD *m, const char *from,
const char *to, void *arg);
-# endif /* defined(OPENSSL) && defined(HAVE_EVP_MD_DO_ALL_SORTED) */
+# endif /* HAVE_EVP_MD_DO_ALL_SORTED */
+#endif /* OPENSSL */
#endif /* !defined(BUILD_AS_LIB) */
@@ -397,8 +402,9 @@ u_int numassoc; /* number of cached associations */
* For commands typed on the command line (with the -c option)
*/
size_t numcmds = 0;
-const char *ccmds[MAXCMDS];
-#define ADDCMD(cp) if (numcmds < MAXCMDS) ccmds[numcmds++] = (cp)
+size_t defcmds = 0; /* Options on the command line are 'defined'! */
+char *ccmds[MAXCMDS];
+#define ADDCMD(cp) if (numcmds < MAXCMDS) ccmds[numcmds++] = estrdup(cp)
/*
* When multiple hosts are specified.
@@ -445,8 +451,11 @@ chost chosts[MAXHOSTS];
# define SETJMP(x) setjmp((x))
# define LONGJMP(x, v) longjmp((x),(v))
#endif
+
+#ifndef BUILD_AS_LIB
static JMP_BUF interrupt_buf;
static volatile int jump = 0;
+#endif
/*
* Points at file being currently printed into
@@ -613,7 +622,7 @@ ntpqmain(
}
}
- if (numcmds == 0 && interactive == 0
+ if (defcmds == 0 && interactive == 0
&& isatty(fileno(stdin)) && isatty(fileno(stderr))) {
interactive = 1;
}
@@ -624,10 +633,7 @@ ntpqmain(
push_ctrl_c_handler(abortcmd);
#endif /* SYS_WINNT */
- if (numcmds == 0) {
- (void) openhost(chosts[0].name, chosts[0].fam);
- getcmds();
- } else {
+ if (numcmds > 0) {
for (ihost = 0; ihost < numhosts; ihost++) {
if (openhost(chosts[ihost].name, chosts[ihost].fam)) {
if (ihost && current_output)
@@ -639,6 +645,14 @@ ntpqmain(
}
}
}
+ /* Release memory allocated in ADDCMD */
+ for (icmd = 0; icmd < numcmds; icmd++)
+ free(ccmds[icmd]);
+ }
+
+ if (defcmds == 0) { /* No command line commands, so go interactive */
+ (void) openhost(chosts[0].name, chosts[0].fam);
+ getcmds();
}
#ifdef SYS_WINNT
WSACleanup();
@@ -707,8 +721,27 @@ openhost(
a_info = getaddrinfo(hname, svc, &hints, &ai);
}
#ifdef AI_ADDRCONFIG
- /* Some older implementations don't like AI_ADDRCONFIG. */
- if (a_info == EAI_BADFLAGS) {
+ /*
+ * Some older implementations don't like AI_ADDRCONFIG.
+ * Some versions of Windows return WSANO_DATA when there is no
+ * global address and AI_ADDRCONFIG is used. AI_ADDRCONFIG
+ * is useful to short-circuit DNS lookups for IP protocols
+ * for which the host has no local addresses. Windows
+ * unfortunately instead interprets AI_ADDRCONFIG to relate
+ * to off-host connectivity and so fails lookup when
+ * localhost works.
+ * To further muddy matters, some versions of WS2tcpip.h
+ * comment out #define EAI_NODATA WSANODATA claiming it
+ * was removed from RFC 2553bis and mentioning a need to
+ * contact the authors to find out why, but "helpfully"
+ * #defines EAI_NODATA EAI_NONAME (== WSAHOST_NOT_FOUND)
+ * So we get more ugly platform-specific workarounds.
+ */
+ if (
+#if defined(WIN32)
+ WSANO_DATA == a_info || EAI_NONAME == a_info ||
+#endif
+ EAI_BADFLAGS == a_info) {
hints.ai_flags &= ~AI_ADDRCONFIG;
a_info = getaddrinfo(hname, svc, &hints, &ai);
}
@@ -845,10 +878,10 @@ dump_hex_printable(
rowlen = (len > 16) ? 16 : (int)len;
len -= rowlen;
-
+
do {
ch = *cdata++;
-
+
*xptr++ = s_xdig[ch >> 4 ];
*xptr++ = s_xdig[ch & 0x0F];
if (++xptr == lbuf + 3*8)
@@ -923,7 +956,7 @@ getresponse(
memset(offsets, 0, sizeof(offsets));
memset(counts , 0, sizeof(counts ));
-
+
/*
* This is pretty tricky. We may get between 1 and MAXFRAG packets
* back in response to the request. We peel the data out of
@@ -940,7 +973,7 @@ getresponse(
seenlastfrag = 0;
tobase = (uint32_t)time(NULL);
-
+
FD_ZERO(&fds);
/*
@@ -988,7 +1021,7 @@ getresponse(
* execute RMW cycle on 'n'
*/
}
-
+
if (n <= 0) {
/*
* Timed out. Return what we have
@@ -1256,7 +1289,7 @@ getresponse(
*/
memcpy((char *)pktdata + offset, &rpkt.u, count);
tobase = (uint32_t)time(NULL);
-
+
/*
* If we've seen the last fragment, look for holes in the sequence.
* If there aren't any, we're done.
@@ -1608,6 +1641,7 @@ docmd(
int ntok;
static int i;
struct xcmd *xcmd;
+ int executeonly = 0;
/*
* Tokenize the command line. If nothing on it, return.
@@ -1617,6 +1651,14 @@ docmd(
return;
/*
+ * If command prefixed by '~', then quiet output
+ */
+ if (*tokens[0] == '~') {
+ executeonly++;
+ tokens[0]++;
+ }
+
+ /*
* Find the appropriate command description.
*/
i = findcmd(tokens[0], builtins, opcmds, &xcmd);
@@ -1675,6 +1717,13 @@ docmd(
perror("");
return;
}
+ } else if (executeonly) { /* Redirect all output to null */
+ current_output = fopen(PATH_DEVNULL, "w");
+ if (current_output == NULL) {
+ (void) fprintf(stderr, "***Error redirecting output to /dev/null: ");
+ perror("");
+ return;
+ }
} else {
current_output = stdout;
}
@@ -2158,9 +2207,11 @@ rtdatetolfp(
if (cal.year < 100)
cal.year += 1900;
- lfp->l_ui = caltontp(&cal);
+ /* check for complaints from 'caltontp()'! */
lfp->l_uf = 0;
- return 1;
+ errno = 0;
+ lfp->l_ui = caltontp(&cal);
+ return (errno == 0);
}
@@ -2544,7 +2595,7 @@ showdrefid2str(void)
/*
- * drefid - display/change "display hash"
+ * drefid - display/change "display hash"
*/
static void
showdrefid(
@@ -3132,13 +3183,13 @@ static int/*BOOL*/ cp_uqchar(int ch)
/* predicate: allowed chars inside a value name */
static int/*BOOL*/ cp_namechar(int ch)
{
- return ch && (ch != ',' && ch != '=' && ch != '\r' && ch != '\n');
+ return ch && (ch != ',' && ch != '=' && ch != '\r' && ch != '\n');
}
/* predicate: characters *between* list items. We're relaxed here. */
static int/*BOOL*/ cp_ivspace(int ch)
{
- return (ch == ',' || (ch > 0 && ch <= ' '));
+ return (ch == ',' || (ch > 0 && ch <= ' '));
}
/* get current character (or NUL when on end) */
@@ -3172,16 +3223,16 @@ str_strip(
)
{
static const char empty[] = "";
-
+
if (*datap && len) {
const char * cpl = *datap;
const char * cpr = cpl + len;
-
+
while (cpl != cpr && *(const unsigned char*)cpl <= ' ')
++cpl;
while (cpl != cpr && *(const unsigned char*)(cpr - 1) <= ' ')
--cpr;
- *datap = cpl;
+ *datap = cpl;
len = (size_t)(cpr - cpl);
} else {
*datap = empty;
@@ -3198,21 +3249,21 @@ pf_error(
)
{
# ifndef BUILD_AS_LIB
-
+
FILE * ofp = (debug > 0) ? stdout : stderr;
size_t len = (size_t)(whend - where);
-
+
if (len > 50) /* *must* fit into an 'int'! */
len = 50;
fprintf(ofp, "nextvar: %s: '%.*s'\n",
what, (int)len, where);
-
+
# else /*defined(BUILD_AS_LIB)*/
UNUSED_ARG(what);
UNUSED_ARG(where);
UNUSED_ARG(whend);
-
+
# endif /*defined(BUILD_AS_LIB)*/
}
@@ -3228,7 +3279,7 @@ nextvar(
)
{
enum PState { sDone, sInit, sName, sValU, sValQ };
-
+
static char name[MAXVARLEN], value[MAXVALLEN];
const char *cp, *cpend;
@@ -3236,13 +3287,13 @@ nextvar(
size_t nlen, vlen;
int ch;
enum PState st;
-
+
cpend = *datap + *datalen;
again:
np = vp = NULL;
nlen = vlen = 0;
-
+
st = sInit;
ch = pf_getch(datap, cpend);
@@ -3261,7 +3312,7 @@ nextvar(
goto final_done;
}
break;
-
+
case sName: /* collect name */
while (cp_namechar(ch))
ch = pf_nextch(datap, cpend);
@@ -3276,7 +3327,7 @@ nextvar(
st = sDone;
}
break;
-
+
case sValU: /* collect unquoted part(s) of value */
while (cp_uqchar(ch))
ch = pf_nextch(datap, cpend);
@@ -3290,7 +3341,7 @@ nextvar(
st = sDone;
}
break;
-
+
case sValQ: /* collect quoted part(s) of value */
while (cp_qschar(ch))
ch = pf_nextch(datap, cpend);
@@ -3302,7 +3353,7 @@ nextvar(
goto final_done;
}
break;
-
+
default:
pf_error("state machine error, stop", *datap, cpend);
goto final_done;
@@ -3315,7 +3366,7 @@ nextvar(
*/
nlen = str_strip(&np, nlen);
vlen = str_strip(&vp, vlen);
-
+
if (nlen == 0) {
goto again;
}
@@ -3332,7 +3383,7 @@ nextvar(
memcpy(name, np, nlen);
name[nlen] = '\0';
*vname = name;
-
+
memcpy(value, vp, vlen);
value[vlen] = '\0';
*vvalue = value;
@@ -3541,7 +3592,7 @@ tstflags(
)
{
# if CBLEN < 10
-# error BLEN is too small -- increase!
+# error CBLEN is too small -- increase!
# endif
char *cp, *s;
@@ -3566,7 +3617,7 @@ tstflags(
cb -= l;
} else {
const char *sep;
-
+
sep = " ";
for (i = 0; i < COUNTOF(tstflagnames); i++) {
if (val & 0x1) {
@@ -3664,8 +3715,8 @@ cookedprint(
} else if (decodenetnum(value, &hval)) {
if (datatype == TYPE_CLOCK && IS_IPV4(&hval)) {
/*
- * Workaround to override numeric refid formats
- * for refclocks received from faulty nptd servers
+ * Workaround to override numeric refid formats
+ * for refclocks received from faulty nptd servers
* and output them as text.
*/
int i;
@@ -3682,7 +3733,7 @@ cookedprint(
output(fp, name, stoa(&hval));
} else {
char refid_buf[12];
- snprintf (refid_buf, sizeof(refid_buf),
+ snprintf (refid_buf, sizeof(refid_buf),
"0x%08x", ntohl(addr2refid(&hval)));
output(fp, name, refid_buf);
}
@@ -3819,7 +3870,7 @@ grow_assoc_cache(void)
if (0 == prior_sz) {
new_sz -= 4 * sizeof(void *);
}
- assoc_cache = erealloc_zero(assoc_cache, new_sz, prior_sz);
+ assoc_cache = erealloc_zero(assoc_cache, new_sz, prior_sz);
prior_sz = new_sz;
assoc_cache_slots = (u_int)(new_sz / sizeof(assoc_cache[0]));
}
@@ -3848,10 +3899,14 @@ ntpq_custom_opt_handler(
exit(1);
case 'c':
+ if ((pOptDesc->fOptState & OPTST_SET_MASK) == OPTST_DEFINED)
+ defcmds++;
ADDCMD(pOptDesc->pzLastArg);
break;
case 'p':
+ if ((pOptDesc->fOptState & OPTST_SET_MASK) == OPTST_DEFINED)
+ defcmds++;
ADDCMD("peers");
break;
}
@@ -3874,7 +3929,7 @@ ntpq_custom_opt_handler(
struct hstate {
char *list;
- const char **seen;
+ char const **seen;
int idx;
};
@@ -3887,7 +3942,7 @@ list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg)
const char *name, **seen;
struct hstate *hstate = arg;
const char *cp;
-
+
/* m is MD obj, from is name or alias, to is base name for alias */
if (!m || !from || to)
return; /* Ignore aliases */
@@ -3896,28 +3951,28 @@ list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg)
/* Keep this consistent with keytype_from_text() in ssl_init.c. */
if (EVP_MD_size(m) > (MAX_MAC_LEN - sizeof(keyid_t)))
return;
-
+
name = EVP_MD_name(m);
-
+
/* Lowercase names aren't accepted by keytype_from_text in ssl_init.c */
-
+
for (cp = name; *cp; cp++)
if (islower((unsigned char)*cp))
return;
len = (cp - name) + 1;
-
+
/* There are duplicates. Discard if name has been seen. */
-
+
for (seen = hstate->seen; *seen; seen++)
if (!strcmp(*seen, name))
return;
n = (seen - hstate->seen) + 2;
- hstate->seen = erealloc(hstate->seen, n * sizeof(*seen));
+ hstate->seen = erealloc((void *)hstate->seen, n * sizeof(*seen));
hstate->seen[n-2] = name;
hstate->seen[n-1] = NULL;
-
+
if (hstate->list != NULL)
len += strlen(hstate->list);
@@ -3931,11 +3986,11 @@ list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg)
} else {
hstate->list = (char *)erealloc(hstate->list, len);
}
-
+
sprintf(hstate->list + strlen(hstate->list), "%s%s",
((hstate->idx >= K_PER_LINE) ? K_NL_PFX_STR : K_DELIM_STR),
name);
-
+
if (hstate->idx >= K_PER_LINE)
hstate->idx = 1;
else
@@ -3955,7 +4010,7 @@ insert_cmac(char *list)
/* If list empty, we need to insert CMAC on new line */
insert = (!list || !*list);
-
+
if (insert) {
len = strlen(K_NL_PFX_STR) + strlen(CMAC);
list = (char *)erealloc(list, len + 1);
@@ -3964,41 +4019,41 @@ insert_cmac(char *list)
/* Check if CMAC already in list - future proofing */
const char *cmac_sn;
char *cmac_p;
-
+
cmac_sn = OBJ_nid2sn(NID_cmac);
cmac_p = list;
insert = cmac_sn != NULL && *cmac_sn != '\0';
-
+
/* CMAC in list if found, followed by nul char or ',' */
while (insert && NULL != (cmac_p = strstr(cmac_p, cmac_sn))) {
cmac_p += strlen(cmac_sn);
/* Still need to insert if not nul and not ',' */
insert = *cmac_p && ',' != *cmac_p;
}
-
+
/* Find proper insertion point */
if (insert) {
char *last_nl;
char *point;
char *delim;
int found;
-
+
/* Default to start if list empty */
found = 0;
delim = list;
len = strlen(list);
-
+
/* While new lines */
while (delim < list + len && *delim &&
!strncmp(K_NL_PFX_STR, delim, strlen(K_NL_PFX_STR))) {
point = delim + strlen(K_NL_PFX_STR);
-
+
/* While digest names on line */
while (point < list + len && *point) {
/* Another digest after on same or next line? */
delim = strstr( point, K_DELIM_STR);
last_nl = strstr( point, K_NL_PFX_STR);
-
+
/* No - end of list */
if (!delim && !last_nl) {
delim = list + len;
@@ -4007,13 +4062,13 @@ insert_cmac(char *list)
if (last_nl && (!delim || last_nl < delim)) {
delim = last_nl;
}
-
+
/* Found insertion point where CMAC before entry? */
if (strncmp(CMAC, point, delim - point) < 0) {
found = 1;
break;
}
-
+
if (delim < list + len && *delim &&
!strncmp(K_DELIM_STR, delim, strlen(K_DELIM_STR))) {
point += strlen(K_DELIM_STR);
@@ -4022,7 +4077,7 @@ insert_cmac(char *list)
}
} /* While digest names on line */
} /* While new lines */
-
+
/* If found in list */
if (found) {
/* insert cmac and delim */
@@ -4034,8 +4089,8 @@ insert_cmac(char *list)
/* move to handle src/dest overlap */
memmove(point + strlen(CMAC) + strlen(K_DELIM_STR),
point, strlen(point) + 1);
- strncpy(point, CMAC, strlen(CMAC));
- strncpy(point + strlen(CMAC), K_DELIM_STR, strlen(K_DELIM_STR));
+ memcpy(point, CMAC, strlen(CMAC));
+ memcpy(point + strlen(CMAC), K_DELIM_STR, strlen(K_DELIM_STR));
} else { /* End of list */
/* append delim and cmac */
len += strlen(K_DELIM_STR) + strlen(CMAC);
@@ -4058,21 +4113,21 @@ static char *
list_digest_names(void)
{
char *list = NULL;
-
+
#ifdef OPENSSL
# ifdef HAVE_EVP_MD_DO_ALL_SORTED
struct hstate hstate = { NULL, NULL, K_PER_LINE+1 };
-
+
/* replace calloc(1, sizeof(const char *)) */
- hstate.seen = (const char **)emalloc_zero(sizeof(const char *));
-
+ hstate.seen = emalloc_zero(sizeof(const char*));
+
INIT_SSL();
EVP_MD_do_all_sorted(list_md_fn, &hstate);
list = hstate.list;
- free(hstate.seen);
-
+ free((void *)hstate.seen);
+
list = insert_cmac(list); /* Insert CMAC into SSL digests list */
-
+
# else
list = (char *)emalloc(sizeof("md5, others (upgrade to OpenSSL-1.0 for full list)"));
strcpy(list, "md5, others (upgrade to OpenSSL-1.0 for full list)");
@@ -4081,7 +4136,7 @@ list_digest_names(void)
list = (char *)emalloc(sizeof("md5"));
strcpy(list, "md5");
#endif
-
+
return list;
}
#endif /* !defined(BUILD_AS_LIB) */
@@ -4103,7 +4158,7 @@ push_ctrl_c_handler(
ctrlc_stack_len = size + 1;
return TRUE;
}
- return FALSE;
+ return FALSE;
}
int/*BOOL*/
diff --git a/contrib/ntp/ntpq/ntpq.html b/contrib/ntp/ntpq/ntpq.html
index 7e1f7cad5fe7..38a674378f89 100644
--- a/contrib/ntp/ntpq/ntpq.html
+++ b/contrib/ntp/ntpq/ntpq.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ntpq: Network Time Protocol Query User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,60 +41,56 @@ ul.no-bullet {list-style: none}
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#ntpq-Description" accesskey="n" rel="next">ntpq Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="ntpq_003a-Network-Time-Protocol-Query-User-Manual"></a>
-<h1 class="top">ntpq: Network Time Protocol Query User Manual</h1>
+<span id="ntpq_003a-Network-Time-Protocol-Query-User-Manual"></span><h1 class="top">ntpq: Network Time Protocol Query User Manual</h1>
<p>The <code>ntpq</code> utility program is used to
monitor the operational status
and determine the performance of
<code>ntpd</code>, the NTP daemon.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntpq</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntpq</code>.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-Description" accesskey="1">ntpq Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-Description" accesskey="1">ntpq Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-Invocation" accesskey="2">ntpq Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpq
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-Invocation" accesskey="2">ntpq Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpq
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Internal-Commands" accesskey="4">Internal Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Internal-Commands" accesskey="4">Internal Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Control-Message-Commands" accesskey="5">Control Message Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Control-Message-Commands" accesskey="5">Control Message Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Status-Words-and-Kiss-Codes" accesskey="6">Status Words and Kiss Codes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Status-Words-and-Kiss-Codes" accesskey="6">Status Words and Kiss Codes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#System-Variables" accesskey="7">System Variables</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#System-Variables" accesskey="7">System Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Peer-Variables" accesskey="8">Peer Variables</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Peer-Variables" accesskey="8">Peer Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Clock-Variables" accesskey="9">Clock Variables</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Clock-Variables" accesskey="9">Clock Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntpq-Description"></a>
-<div class="header">
+<span id="ntpq-Description"></span><div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description"></span><h2 class="chapter">1 Description</h2>
<p>The <code>ntpq</code> utility program is used to monitor NTP daemon <code>ntpd</code> operations and determine performance.
It uses the standard NTP mode 6 control message formats defined in
@@ -122,34 +109,32 @@ The description on this page is for the NTPv4 variables.
<p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-Invocation" accesskey="1">ntpq Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-Invocation" accesskey="1">Invoking ntpq</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Internal-Commands" accesskey="3">Internal Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Internal-Commands" accesskey="3">Internal Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Control-Message-Commands" accesskey="4">Control Message Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Control-Message-Commands" accesskey="4">Control Message Commands</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Status-Words-and-Kiss-Codes" accesskey="5">Status Words and Kiss Codes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Status-Words-and-Kiss-Codes" accesskey="5">Status Words and Kiss Codes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#System-Variables" accesskey="6">System Variables</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#System-Variables" accesskey="6">System Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Peer-Variables" accesskey="7">Peer Variables</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Peer-Variables" accesskey="7">Peer Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Clock-Variables" accesskey="8">Clock Variables</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Clock-Variables" accesskey="8">Clock Variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntpq-Invocation"></a>
-<div class="header">
+<span id="ntpq-Invocation"></span><div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpq-Description" accesskey="p" rel="prev">ntpq Description</a>, Up: <a href="#ntpq-Description" accesskey="u" rel="up">ntpq Description</a> &nbsp; </p>
</div>
-<a name="Invoking-ntpq"></a>
-<h3 class="section">1.1 Invoking ntpq</h3>
-<a name="index-ntpq"></a>
-<a name="index-standard-NTP-query-program"></a>
+<span id="Invoking-ntpq"></span><h3 class="section">1.1 Invoking ntpq</h3>
+<span id="index-ntpq"></span>
+<span id="index-standard-NTP-query-program"></span>
<p>The
@@ -224,34 +209,35 @@ will attempt to read
interactive format commands from the standard input.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-usage" accesskey="1">ntpq usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-usage" accesskey="1">ntpq help/usage (<samp>--help</samp>)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv4" accesskey="2">ntpq ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv4" accesskey="2">ipv4 option (-4)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv6" accesskey="3">ntpq ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv6" accesskey="3">ipv6 option (-6)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-command" accesskey="4">ntpq command</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-command" accesskey="4">command option (-c)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-interactive" accesskey="5">ntpq interactive</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-interactive" accesskey="5">interactive option (-i)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-numeric" accesskey="6">ntpq numeric</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-numeric" accesskey="6">numeric option (-n)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-old_002drv" accesskey="7">ntpq old-rv</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-old_002drv" accesskey="7">old-rv option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-peers" accesskey="8">ntpq peers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-peers" accesskey="8">peers option (-p)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-refid" accesskey="9">ntpq refid</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-refid" accesskey="9">refid option (-r)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-wide">ntpq wide</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-unconnected">unconnected option (-u)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-config">ntpq config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-wide">wide option (-w)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-exit-status">ntpq exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-config">presetting/configuring ntpq</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-exit-status">ntpq exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
-<a name="Internal-Commands-1"></a>
-<h4 class="subsection">1.1.1 Internal Commands</h4>
+<span id="Internal-Commands-1"></span><h4 class="subsection">1.1.1 Internal Commands</h4>
<p>Interactive format commands consist of a keyword followed by zero
to four arguments.
@@ -472,8 +458,7 @@ program.
</p></dd>
</dl>
-<a name="Control-Message-Commands-1"></a>
-<h4 class="subsubsection">1.1.1.1 Control Message Commands</h4>
+<span id="Control-Message-Commands-1"></span><h4 class="subsubsection">1.1.1.1 Control Message Commands</h4>
<p>Association ids are used to identify system, peer and clock variables.
System variables are assigned an association id of zero and system name
space, while each association is assigned a nonzero association id and
@@ -900,8 +885,7 @@ Authentication is required.
</p></dd>
</dl>
-<a name="Status-Words-and-Kiss-Codes-1"></a>
-<h4 class="subsubsection">1.1.1.2 Status Words and Kiss Codes</h4>
+<span id="Status-Words-and-Kiss-Codes-1"></span><h4 class="subsubsection">1.1.1.2 Status Words and Kiss Codes</h4>
<p>The current state of the operating program is shown
in a set of status words
maintained by the system.
@@ -925,8 +909,7 @@ sent by the server to advise the client of an unusual condition.
They are now displayed, when appropriate,
in the reference identifier field in various billboards.
</p>
-<a name="System-Variables-1"></a>
-<h4 class="subsubsection">1.1.1.3 System Variables</h4>
+<span id="System-Variables-1"></span><h4 class="subsubsection">1.1.1.3 System Variables</h4>
<p>The following system variables appear in the
<code>readlist</code>
billboard.
@@ -1044,8 +1027,7 @@ depending on the particular Autokey dance:
<dd><p>NTP seconds when the certificate expires
</p></dd>
</dl>
-<a name="Peer-Variables-1"></a>
-<h4 class="subsubsection">1.1.1.4 Peer Variables</h4>
+<span id="Peer-Variables-1"></span><h4 class="subsubsection">1.1.1.4 Peer Variables</h4>
<p>The following peer variables appear in the
<code>readlist</code>
billboard for each association.
@@ -1190,8 +1172,7 @@ additional peer variables are displayed, including the following:
</p></dd>
</dl>
-<a name="Clock-Variables-1"></a>
-<h4 class="subsubsection">1.1.1.5 Clock Variables</h4>
+<span id="Clock-Variables-1"></span><h4 class="subsubsection">1.1.1.5 Clock Variables</h4>
<p>The following clock variables appear in the
<code>clocklist</code>
billboard for each association with a reference clock.
@@ -1246,41 +1227,41 @@ using the <code>agtexi-cmd</code> template and the option descriptions for the <
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-usage" accesskey="1">ntpq usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpq help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-usage" accesskey="1">ntpq usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpq help/usage (<samp>--help</samp>)
+</td></tr>
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv4" accesskey="2">ntpq ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv4" accesskey="2">ntpq ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv6" accesskey="3">ntpq ipv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-ipv6" accesskey="3">ntpq ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-command" accesskey="4">ntpq command</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">command option (-c)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-command" accesskey="4">ntpq command</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">command option (-c)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-interactive" accesskey="5">ntpq interactive</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interactive option (-i)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-interactive" accesskey="5">ntpq interactive</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interactive option (-i)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-numeric" accesskey="6">ntpq numeric</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-numeric" accesskey="6">ntpq numeric</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-old_002drv" accesskey="7">ntpq old-rv</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">old-rv option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-old_002drv" accesskey="7">ntpq old-rv</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">old-rv option
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-peers" accesskey="8">ntpq peers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-peers" accesskey="8">ntpq peers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-refid" accesskey="9">ntpq refid</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">refid option (-r)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-refid" accesskey="9">ntpq refid</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">refid option (-r)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-unconnected">ntpq unconnected</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">unconnected option (-u)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-wide">ntpq wide</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wide option (-w)
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-wide">ntpq wide</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wide option (-w)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-config">ntpq config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpq
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-config">ntpq config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpq
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpq-exit-status">ntpq exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#ntpq-exit-status">ntpq exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
</table>
<hr>
-<a name="ntpq-usage"></a>
-<div class="header">
+<span id="ntpq-usage"></span><div class="header">
<p>
Next: <a href="#ntpq-ipv4" accesskey="n" rel="next">ntpq ipv4</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="ntpq-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.1.2 ntpq help/usage (<samp>--help</samp>)</h4>
-<a name="index-ntpq-help"></a>
+<span id="ntpq-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1.2 ntpq help/usage (<samp>--help</samp>)</h4>
+<span id="index-ntpq-help"></span>
<p>This is the automatically generated usage text for ntpq.
</p>
@@ -1293,7 +1274,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p14
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p16
Usage: ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 name resolution
@@ -1315,6 +1296,7 @@ Usage: ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
-p no peers Print a list of the peers
- prohibits the option 'interactive'
-r KWd refid Set default display type for S2+ refids
+ -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows)
-w no wide Display the full 'remote' value
opt version output version information and exit
-? no help display extended usage information and exit
@@ -1336,18 +1318,16 @@ The valid &quot;refid&quot; option keywords are:
hash ipv4
or an integer from 0 through 1
-Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+Please send bug reports to: &lt;https://bugs.ntp.org, bugs@ntp.org&gt;
</pre></div>
<hr>
-<a name="ntpq-ipv4"></a>
-<div class="header">
+<span id="ntpq-ipv4"></span><div class="header">
<p>
Next: <a href="#ntpq-ipv6" accesskey="n" rel="next">ntpq ipv6</a>, Previous: <a href="#ntpq-usage" accesskey="p" rel="prev">ntpq usage</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="ipv4-option-_0028_002d4_0029"></a>
-<h4 class="subsection">1.1.3 ipv4 option (-4)</h4>
-<a name="index-ntpq_002dipv4"></a>
+<span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.1.3 ipv4 option (-4)</h4>
+<span id="index-ntpq_002dipv4"></span>
<p>This is the &ldquo;force ipv4 name resolution&rdquo; option.
</p>
@@ -1360,14 +1340,12 @@ ipv6.
<p>Force resolution of following host names on the command line
to the IPv4 namespace.
</p><hr>
-<a name="ntpq-ipv6"></a>
-<div class="header">
+<span id="ntpq-ipv6"></span><div class="header">
<p>
Next: <a href="#ntpq-command" accesskey="n" rel="next">ntpq command</a>, Previous: <a href="#ntpq-ipv4" accesskey="p" rel="prev">ntpq ipv4</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="ipv6-option-_0028_002d6_0029"></a>
-<h4 class="subsection">1.1.4 ipv6 option (-6)</h4>
-<a name="index-ntpq_002dipv6"></a>
+<span id="ipv6-option-_0028_002d6_0029"></span><h4 class="subsection">1.1.4 ipv6 option (-6)</h4>
+<span id="index-ntpq_002dipv6"></span>
<p>This is the &ldquo;force ipv6 name resolution&rdquo; option.
</p>
@@ -1380,14 +1358,12 @@ ipv4.
<p>Force resolution of following host names on the command line
to the IPv6 namespace.
</p><hr>
-<a name="ntpq-command"></a>
-<div class="header">
+<span id="ntpq-command"></span><div class="header">
<p>
Next: <a href="#ntpq-interactive" accesskey="n" rel="next">ntpq interactive</a>, Previous: <a href="#ntpq-ipv6" accesskey="p" rel="prev">ntpq ipv6</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="command-option-_0028_002dc_0029"></a>
-<h4 class="subsection">1.1.5 command option (-c)</h4>
-<a name="index-ntpq_002dcommand"></a>
+<span id="command-option-_0028_002dc_0029"></span><h4 class="subsection">1.1.5 command option (-c)</h4>
+<span id="index-ntpq_002dcommand"></span>
<p>This is the &ldquo;run a command and exit&rdquo; option.
This option takes a string argument <samp>cmd</samp>.
@@ -1401,14 +1377,12 @@ This option takes a string argument <samp>cmd</samp>.
and is added to the list of commands to be executed on the specified
host(s).
</p><hr>
-<a name="ntpq-interactive"></a>
-<div class="header">
+<span id="ntpq-interactive"></span><div class="header">
<p>
Next: <a href="#ntpq-numeric" accesskey="n" rel="next">ntpq numeric</a>, Previous: <a href="#ntpq-command" accesskey="p" rel="prev">ntpq command</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="interactive-option-_0028_002di_0029"></a>
-<h4 class="subsection">1.1.6 interactive option (-i)</h4>
-<a name="index-ntpq_002dinteractive"></a>
+<span id="interactive-option-_0028_002di_0029"></span><h4 class="subsection">1.1.6 interactive option (-i)</h4>
+<span id="index-ntpq_002dinteractive"></span>
<p>This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
</p>
@@ -1422,27 +1396,23 @@ command, peers.
Prompts will be written to the standard output and
commands read from the standard input.
</p><hr>
-<a name="ntpq-numeric"></a>
-<div class="header">
+<span id="ntpq-numeric"></span><div class="header">
<p>
Next: <a href="#ntpq-old_002drv" accesskey="n" rel="next">ntpq old-rv</a>, Previous: <a href="#ntpq-interactive" accesskey="p" rel="prev">ntpq interactive</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="numeric-option-_0028_002dn_0029"></a>
-<h4 class="subsection">1.1.7 numeric option (-n)</h4>
-<a name="index-ntpq_002dnumeric"></a>
+<span id="numeric-option-_0028_002dn_0029"></span><h4 class="subsection">1.1.7 numeric option (-n)</h4>
+<span id="index-ntpq_002dnumeric"></span>
<p>This is the &ldquo;numeric host addresses&rdquo; option.
Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names.
</p><hr>
-<a name="ntpq-old_002drv"></a>
-<div class="header">
+<span id="ntpq-old_002drv"></span><div class="header">
<p>
Next: <a href="#ntpq-peers" accesskey="n" rel="next">ntpq peers</a>, Previous: <a href="#ntpq-numeric" accesskey="p" rel="prev">ntpq numeric</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="old_002drv-option"></a>
-<h4 class="subsection">1.1.8 old-rv option</h4>
-<a name="index-ntpq_002dold_002drv"></a>
+<span id="old_002drv-option"></span><h4 class="subsection">1.1.8 old-rv option</h4>
+<span id="index-ntpq_002dold_002drv"></span>
<p>This is the &ldquo;always output status line with readvar&rdquo; option.
By default, <code>ntpq</code> now suppresses the <code>associd=...</code>
@@ -1455,14 +1425,12 @@ Using an environment variable to
preset this option in a script will enable both older and
newer <code>ntpq</code> to behave identically in this regard.
</p><hr>
-<a name="ntpq-peers"></a>
-<div class="header">
+<span id="ntpq-peers"></span><div class="header">
<p>
Next: <a href="#ntpq-refid" accesskey="n" rel="next">ntpq refid</a>, Previous: <a href="#ntpq-old_002drv" accesskey="p" rel="prev">ntpq old-rv</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="peers-option-_0028_002dp_0029"></a>
-<h4 class="subsection">1.1.9 peers option (-p)</h4>
-<a name="index-ntpq_002dpeers"></a>
+<span id="peers-option-_0028_002dp_0029"></span><h4 class="subsection">1.1.9 peers option (-p)</h4>
+<span id="index-ntpq_002dpeers"></span>
<p>This is the &ldquo;print a list of the peers&rdquo; option.
</p>
@@ -1475,14 +1443,12 @@ interactive.
<p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the &rsquo;peers&rsquo; interactive command.
</p><hr>
-<a name="ntpq-refid"></a>
-<div class="header">
+<span id="ntpq-refid"></span><div class="header">
<p>
-Next: <a href="#ntpq-wide" accesskey="n" rel="next">ntpq wide</a>, Previous: <a href="#ntpq-peers" accesskey="p" rel="prev">ntpq peers</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
+Next: <a href="#ntpq-unconnected" accesskey="n" rel="next">ntpq unconnected</a>, Previous: <a href="#ntpq-peers" accesskey="p" rel="prev">ntpq peers</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="refid-option-_0028_002dr_0029"></a>
-<h4 class="subsection">1.1.10 refid option (-r)</h4>
-<a name="index-ntpq_002drefid"></a>
+<span id="refid-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.10 refid option (-r)</h4>
+<span id="index-ntpq_002drefid"></span>
<p>This is the &ldquo;set default display type for s2+ refids&rdquo; option.
This option takes a keyword argument.
@@ -1496,18 +1462,28 @@ The available keywords are:
<pre class="example"> hash ipv4
</pre></div>
-<p>or their numeric equivalent.</p></li></ul>
+<p>or their numeric equivalent.
+</p></li></ul>
<p>Set the default display format for S2+ refids.
</p><hr>
-<a name="ntpq-wide"></a>
-<div class="header">
+<span id="ntpq-unconnected"></span><div class="header">
+<p>
+Next: <a href="#ntpq-wide" accesskey="n" rel="next">ntpq wide</a>, Previous: <a href="#ntpq-refid" accesskey="p" rel="prev">ntpq refid</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
+</div>
+<span id="unconnected-option-_0028_002du_0029"></span><h4 class="subsection">1.1.11 unconnected option (-u)</h4>
+<span id="index-ntpq_002dunconnected"></span>
+
+<p>This is the &ldquo;use unconnected udp to communicate with ntpd (default on windows)&rdquo; option.
+Open an unconnected UDP association to ntpd (the default
+on Windows).
+</p><hr>
+<span id="ntpq-wide"></span><div class="header">
<p>
-Next: <a href="#ntpq-config" accesskey="n" rel="next">ntpq config</a>, Previous: <a href="#ntpq-refid" accesskey="p" rel="prev">ntpq refid</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
+Next: <a href="#ntpq-config" accesskey="n" rel="next">ntpq config</a>, Previous: <a href="#ntpq-unconnected" accesskey="p" rel="prev">ntpq unconnected</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="wide-option-_0028_002dw_0029"></a>
-<h4 class="subsection">1.1.11 wide option (-w)</h4>
-<a name="index-ntpq_002dwide"></a>
+<span id="wide-option-_0028_002dw_0029"></span><h4 class="subsection">1.1.12 wide option (-w)</h4>
+<span id="index-ntpq_002dwide"></span>
<p>This is the &ldquo;display the full &rsquo;remote&rsquo; value&rdquo; option.
Display the full value of the &rsquo;remote&rsquo; value. If this requires
@@ -1516,13 +1492,11 @@ and continue the data display properly indented on the next line.
</p>
<hr>
-<a name="ntpq-config"></a>
-<div class="header">
+<span id="ntpq-config"></span><div class="header">
<p>
Next: <a href="#ntpq-exit-status" accesskey="n" rel="next">ntpq exit status</a>, Previous: <a href="#ntpq-wide" accesskey="p" rel="prev">ntpq wide</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="presetting_002fconfiguring-ntpq"></a>
-<h4 class="subsection">1.1.12 presetting/configuring ntpq</h4>
+<span id="presetting_002fconfiguring-ntpq"></span><h4 class="subsection">1.1.13 presetting/configuring ntpq</h4>
<p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from configuration (&quot;rc&quot; or &quot;ini&quot;) files, and values from environment variables named <code>NTPQ</code> and <code>NTPQ_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
@@ -1578,12 +1552,11 @@ the associated name/value pair list (see: optionFindValue).
</p>
<p>The command line options relating to configuration and/or usage help are:
</p>
-<a name="version-_0028_002d_0029"></a>
-<h4 class="subsubheading">version (-)</h4>
+<span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>
<p>Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
</p>
<dl compact="compact">
@@ -1599,13 +1572,11 @@ Only the first letter of the argument is examined:
</dl>
<hr>
-<a name="ntpq-exit-status"></a>
-<div class="header">
+<span id="ntpq-exit-status"></span><div class="header">
<p>
Previous: <a href="#ntpq-config" accesskey="p" rel="prev">ntpq config</a>, Up: <a href="#ntpq-Invocation" accesskey="u" rel="up">ntpq Invocation</a> &nbsp; </p>
</div>
-<a name="ntpq-exit-status-1"></a>
-<h4 class="subsection">1.1.13 ntpq exit status</h4>
+<span id="ntpq-exit-status-1"></span><h4 class="subsection">1.1.14 ntpq exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
@@ -1625,13 +1596,11 @@ it to autogen-users@lists.sourceforge.net. Thank you.
</dl>
<hr>
-<a name="Usage"></a>
-<div class="header">
+<span id="Usage"></span><div class="header">
<p>
Next: <a href="#Internal-Commands" accesskey="n" rel="next">Internal Commands</a>, Previous: <a href="#ntpq-Description" accesskey="p" rel="prev">ntpq Description</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Usage-1"></a>
-<h3 class="section">1.2 Usage</h3>
+<span id="Usage-1"></span><h3 class="section">1.2 Usage</h3>
<table>
<thead><tr><th width="23%">What</th><th width="23%">Default</th><th width="5%">Flag</th><th width="15%">Option</th></tr></thead>
@@ -1646,23 +1615,21 @@ Next: <a href="#Internal-Commands" accesskey="n" rel="next">Internal Commands</a
</table>
<hr>
-<a name="Internal-Commands"></a>
-<div class="header">
+<span id="Internal-Commands"></span><div class="header">
<p>
Next: <a href="#Control-Message-Commands" accesskey="n" rel="next">Control Message Commands</a>, Previous: <a href="#Usage" accesskey="p" rel="prev">Usage</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Internal-Commands-2"></a>
-<h3 class="section">1.3 Internal Commands</h3>
+<span id="Internal-Commands-2"></span><h3 class="section">1.3 Internal Commands</h3>
<p>Interactive format commands consist of a keyword followed by zero to four arguments. Only enough characters of the full keyword to uniquely identify the command need be typed. The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <code>&gt;</code>, followed by a file name, to the command line. A number of interactive format commands are executed entirely within the <code>ntpq</code> program itself and do not result in NTP mode-6 requests being sent to a server. These are described following.
</p>
<dl compact="compact">
-<dt><code><a name="help"></a><code>? [</code><kbd>command_keyword</kbd><code>]</code></code></dt>
+<dt><code><span id="help"></span><code>? [</code><kbd>command_keyword</kbd><code>]</code></code></dt>
<dt><code><code>help [</code><kbd>command_keyword</kbd><code>]</code></code></dt>
<dd><p>A <code>?</code> by itself will print a list of all the command keywords known to <code>ntpq</code>. A <code>?</code> followed by a command keyword will print function and usage information about the command.
</p>
</dd>
-<dt><code><a name="addvars"></a>&gt;<code>addvars <kbd>name</kbd> [ = <kbd>value</kbd>] [...]</code></code></dt>
+<dt><code><span id="addvars"></span>&gt;<code>addvars <kbd>name</kbd> [ = <kbd>value</kbd>] [...]</code></code></dt>
<dt><code><code>rmvars <kbd>name</kbd> [...]</code></code></dt>
<dt><code><code>clearvars</code>&lt;/dt&gt;</code></dt>
<dd><p>The arguments to these commands consist of a list of items of the form
@@ -1680,37 +1647,37 @@ from the list,
while the <code>clearlist</code> command removes all variables from the list.
</p>
</dd>
-<dt><code><a name="cooked"></a><code>cooked</code></code></dt>
+<dt><code><span id="cooked"></span><code>cooked</code></code></dt>
<dd><p>Display server messages in prettyprint format.
</p>
</dd>
-<dt><code><a name="debug"></a><code>debug more | less | off</code></code></dt>
+<dt><code><span id="debug"></span><code>debug more | less | off</code></code></dt>
<dd><p>Turns internal query program debugging on and off.
</p>
</dd>
-<dt><code><a name="delay"></a><code>delay <kbd>milliseconds</kbd></code></code></dt>
+<dt><code><span id="delay"></span><code>delay <kbd>milliseconds</kbd></code></code></dt>
<dd><p>Specify a time interval to be added to timestamps included in requests which require authentication. This is used to enable (unreliable) server reconfiguration over long delay network paths or between machines whose clocks are unsynchronized. Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete.
</p>
</dd>
-<dt><code><a name="host"></a><code>host <kbd>name</kbd></code></code></dt>
+<dt><code><span id="host"></span><code>host <kbd>name</kbd></code></code></dt>
<dd><p>Set the host to which future queries will be sent.
The name may be either a DNS name or a numeric address.
</p>
</dd>
-<dt><code><a name="hostnames"></a><code>hostnames [yes | no]</code></code></dt>
+<dt><code><span id="hostnames"></span><code>hostnames [yes | no]</code></code></dt>
<dd><p>If <code>yes</code> is specified, host names are printed in information displays.
If <code>no</code> is specified, numeric addresses are printed instead.
The default is <code>yes</code>,
unless modified using the command line <code>-n</code> switch.
</p>
</dd>
-<dt><code><a name="keyid"></a><code>keyid <kbd>keyid</kbd></code></code></dt>
+<dt><code><span id="keyid"></span><code>keyid <kbd>keyid</kbd></code></code></dt>
<dd><p>This command specifies the key number to be used
to authenticate configuration requests.
This must correspond to a key ID configured in <code>ntp.conf</code> for this purpose.
</p>
</dd>
-<dt><code><a name="keytype"></a><code>keytype</code></code></dt>
+<dt><code><span id="keytype"></span><code>keytype</code></code></dt>
<dd><p>Specify the digest algorithm to use for authenticated requests,
with default <code>MD5</code>.
If the OpenSSL library is installed,
@@ -1718,27 +1685,27 @@ digest can be be any message digest algorithm supported by the library.
The current selections are: <code>AES128CMAC</code>, <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
</p>
</dd>
-<dt><code><a name="ntpversion"></a><code>ntpversion 1 | 2 | 3 | 4</code></code></dt>
+<dt><code><span id="ntpversion"></span><code>ntpversion 1 | 2 | 3 | 4</code></code></dt>
<dd><p>Sets the NTP version number which <code>ntpq</code> claims in packets.
Defaults to 2.
Note that mode-6 control messages (and modes, for that matter)
didn&rsquo;t exist in NTP version 1.
</p>
</dd>
-<dt><code><a name="passwd"></a><code>passwd</code></code></dt>
+<dt><code><span id="passwd"></span><code>passwd</code></code></dt>
<dd><p>This command prompts for a password to authenticate requests.
The password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose.
</p>
</dd>
-<dt><code><a name="quit"></a><code>quit</code></code></dt>
+<dt><code><span id="quit"></span><code>quit</code></code></dt>
<dd><p>Exit <code>ntpq</code>.
</p>
</dd>
-<dt><code><a name="raw"></a><code>raw</code></code></dt>
+<dt><code><span id="raw"></span><code>raw</code></code></dt>
<dd><p>Display server messages as received and without reformatting.
</p>
</dd>
-<dt><code><a name="timeout"></a><code>timeout <kbd>milliseconds</kbd></code></code></dt>
+<dt><code><span id="timeout"></span><code>timeout <kbd>milliseconds</kbd></code></code></dt>
<dd><p>Specify a timeout period for responses to server queries.
The default is about 5000 milliseconds.
Note that since <code>ntpq</code> retries each query once after a timeout
@@ -1748,13 +1715,11 @@ the total waiting time for a timeout will be twice the timeout value set.
</dl>
<hr>
-<a name="Control-Message-Commands"></a>
-<div class="header">
+<span id="Control-Message-Commands"></span><div class="header">
<p>
Next: <a href="#Status-Words-and-Kiss-Codes" accesskey="n" rel="next">Status Words and Kiss Codes</a>, Previous: <a href="#Internal-Commands" accesskey="p" rel="prev">Internal Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Control-Message-Commands-2"></a>
-<h3 class="section">1.4 Control Message Commands</h3>
+<span id="Control-Message-Commands-2"></span><h3 class="section">1.4 Control Message Commands</h3>
<p>Association IDs are used to identify system, peer and clock variables.
System variables are assigned an association ID of zero and system name space,
@@ -1766,7 +1731,7 @@ which sends a series of messages,
and the <code>mreadlist</code> and <code>mreadvar</code> commands,
which iterate over a range of associations.
</p>
-<a name="as"></a><dl compact="compact">
+<span id="as"></span><dl compact="compact">
<dt><code><code>associations</code></code></dt>
<dd><p>Display a list of mobilized associations in the form:
<br>
@@ -1787,12 +1752,12 @@ event count (see the <code>count</code> field of the <a href="decode.html#peer">
</table>
</dd>
-<dt><code><a name="cv"></a>clockvar <kbd>assocID</kbd> [<kbd>name</kbd> [ = <kbd>value</kbd> [...]] [...]]</code></dt>
+<dt><code><span id="cv"></span>clockvar <kbd>assocID</kbd> [<kbd>name</kbd> [ = <kbd>value</kbd> [...]] [...]]</code></dt>
<dt><code>cv <kbd>assocID</kbd> [<kbd>name</kbd> [ = <kbd>value</kbd> [...] ][...]]</code></dt>
<dd><p>Display a list of &lsquo;clock variables&rsquo; for those associations supporting a reference clock.
</p>
</dd>
-<dt><code><a name="g_t_003aconfig"></a>:config [...]</code></dt>
+<dt><code><span id="g_t_003aconfig"></span>:config [...]</code></dt>
<dd><p>Send the remainder of the command line, including whitespace, to the server
as a run-time configuration command in the same format
as the configuration file.
@@ -1800,39 +1765,39 @@ This command is experimental until further notice and clarification.
Authentication is of course required.
</p>
</dd>
-<dt><code><a name="config_002dfrom_002dfile"></a>config-from-file <kbd>filename</kbd></code></dt>
+<dt><code><span id="config_002dfrom_002dfile"></span>config-from-file <kbd>filename</kbd></code></dt>
<dd><p>Send the each line of <kbd>filename</kbd> to the server as
run-time configuration commands in the same format as the configuration file.
This command is experimental until further notice and clarification.
Authentication is required.
</p>
</dd>
-<dt><code><a name="ifstats"></a>ifstats</code></dt>
+<dt><code><span id="ifstats"></span>ifstats</code></dt>
<dd><p>Display statistics for each local network address.
Authentication is required.
</p>
</dd>
-<dt><code><a name="iostats"></a>iostats</code></dt>
+<dt><code><span id="iostats"></span>iostats</code></dt>
<dd><p>Display network and reference clock I/O statistics.
</p>
</dd>
-<dt><code><a name="kerninfo"></a>kerninfo</code></dt>
+<dt><code><span id="kerninfo"></span>kerninfo</code></dt>
<dd><p>Display kernel loop and PPS statistics.
As with other ntpq output, times are in milliseconds.
The precision value displayed is in milliseconds as well,
unlike the precision system variable.
</p>
</dd>
-<dt><code><a name="lassoc"></a>lassociations</code></dt>
+<dt><code><span id="lassoc"></span>lassociations</code></dt>
<dd><p>Perform the same function as the associations command,
except display mobilized and unmobilized associations.
</p>
</dd>
-<dt><code><a name="monstats"></a>monstats</code></dt>
+<dt><code><span id="monstats"></span>monstats</code></dt>
<dd><p>Display monitor facility statistics.
</p>
</dd>
-<dt><code><a name="mrulist"></a>mrulist [limited | kod | mincount=<kbd>count</kbd> | laddr=<kbd>localaddr</kbd> | sort=<kbd>sortorder</kbd> | resany=<kbd>hexmask</kbd> | resall=<kbd>hexmask</kbd>]</code></dt>
+<dt><code><span id="mrulist"></span>mrulist [limited | kod | mincount=<kbd>count</kbd> | laddr=<kbd>localaddr</kbd> | sort=<kbd>sortorder</kbd> | resany=<kbd>hexmask</kbd> | resall=<kbd>hexmask</kbd>]</code></dt>
<dd><p>Obtain and print traffic counts collected and maintained by
the monitor facility.
With the exception of <code>sort=<kbd>sortorder</kbd></code>,
@@ -1874,20 +1839,20 @@ could not be verified in parentheses.</td></tr>
</table>
</dd>
-<dt><code><a name="mreadvar"></a><code>mreadvar <kbd>assocID</kbd> <kbd>assocID</kbd> [ <kbd>variable_name</kbd> [ = <kbd>value</kbd>[ ... ]</code></code></dt>
-<dt><code><a name="mrv"></a><code>mrv <kbd>assocID</kbd> <kbd>assocID</kbd> [ <kbd>variable_name</kbd> [ = <kbd>value</kbd>[ ... ]</code></code></dt>
+<dt><code><span id="mreadvar"></span><code>mreadvar <kbd>assocID</kbd> <kbd>assocID</kbd> [ <kbd>variable_name</kbd> [ = <kbd>value</kbd>[ ... ]</code></code></dt>
+<dt><code><span id="mrv"></span><code>mrv <kbd>assocID</kbd> <kbd>assocID</kbd> [ <kbd>variable_name</kbd> [ = <kbd>value</kbd>[ ... ]</code></code></dt>
<dd><p>Perform the same function as the <code>readvar</code> command,
except for a range of association IDs.
This range is determined from the association list cached by
the most recent <code>associations</code> command.
</p>
</dd>
-<dt><code><a name="passoc"></a><code>passociations</code></code></dt>
+<dt><code><span id="passoc"></span><code>passociations</code></code></dt>
<dd><p>Perform the same function as the <code>associations command</code>, except that
it uses previously stored data rather than making a new query.
</p>
</dd>
-<dt><code><a name="pe"></a><code>peers</code></code></dt>
+<dt><code><span id="pe"></span><code>peers</code></code></dt>
<dd><p>Display a list of peers in the form:
<br>
<code>[tally]remote refid st t when pool reach delay offset jitter</code>
@@ -1915,7 +1880,7 @@ of the <a href="decode.html#peer">peer status word</a>.</td></tr>
</table>
</dd>
-<dt><code><a name="rv"></a>readvar <kbd>assocID</kbd> <kbd>name</kbd> [ = <kbd>value</kbd> ] [,...]</code></dt>
+<dt><code><span id="rv"></span>readvar <kbd>assocID</kbd> <kbd>name</kbd> [ = <kbd>value</kbd> ] [,...]</code></dt>
<dt><code>rv <kbd>assocID</kbd> [ <kbd>name</kbd> ] [,...]</code></dt>
<dd><p>Display the specified variables.
If <code><kbd>assocID</kbd></code> is zero,
@@ -1933,7 +1898,7 @@ where YYYY is the year, MM the month of year, DD the day of month and
TTTT the time of day.
</p>
</dd>
-<dt><code><a name="saveconfig"></a><code>saveconfig <kbd>filename</kbd></code></code></dt>
+<dt><code><span id="saveconfig"></span><code>saveconfig <kbd>filename</kbd></code></code></dt>
<dd><p>Write the current configuration, including any runtime modifications
given with <code>:config</code> or <code>config-from-file</code>,
to the ntpd host&rsquo;s file <kbd>filename</kbd>.
@@ -1947,7 +1912,7 @@ The filename used is stored in system variable <code>savedconfig</code>.
Authentication is required.
</p>
</dd>
-<dt><code><a name="writevar"></a>writevar <kbd>assocID</kbd> <kbd>name</kbd> = <kbd>value</kbd> [,...]</code></dt>
+<dt><code><span id="writevar"></span>writevar <kbd>assocID</kbd> <kbd>name</kbd> = <kbd>value</kbd> [,...]</code></dt>
<dd><p>Write the specified variables.
If the <code><kbd>assocID</kbd></code> is zero, the variables are from the
&lsquo;system variables&rsquo; name space, otherwise they are from the
@@ -1956,24 +1921,22 @@ The <code><kbd>assocID</kbd></code> is required,
as the same name can occur in both spaces.
</p>
</dd>
-<dt><code><a name="sysinfo"></a><code>sysinfo</code></code></dt>
+<dt><code><span id="sysinfo"></span><code>sysinfo</code></code></dt>
<dd><p>Display operational summary.
</p>
</dd>
-<dt><code><a name="sysstats"></a><code>sysstats</code></code></dt>
+<dt><code><span id="sysstats"></span><code>sysstats</code></code></dt>
<dd><p>Print statistics counters maintained in the protocol module.
</p>
</dd>
</dl>
<hr>
-<a name="Status-Words-and-Kiss-Codes"></a>
-<div class="header">
+<span id="Status-Words-and-Kiss-Codes"></span><div class="header">
<p>
Next: <a href="#System-Variables" accesskey="n" rel="next">System Variables</a>, Previous: <a href="#Control-Message-Commands" accesskey="p" rel="prev">Control Message Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Status-Words-and-Kiss-Codes-2"></a>
-<h3 class="section">1.5 Status Words and Kiss Codes</h3>
+<span id="Status-Words-and-Kiss-Codes-2"></span><h3 class="section">1.5 Status Words and Kiss Codes</h3>
<p>The current state of the operating program is shown
in a set of status words maintained by the system
@@ -1994,13 +1957,11 @@ They are now displayed, when appropriate,
in the reference identifier field in various billboards.
</p>
<hr>
-<a name="System-Variables"></a>
-<div class="header">
+<span id="System-Variables"></span><div class="header">
<p>
Next: <a href="#Peer-Variables" accesskey="n" rel="next">Peer Variables</a>, Previous: <a href="#Status-Words-and-Kiss-Codes" accesskey="p" rel="prev">Status Words and Kiss Codes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="System-Variables-2"></a>
-<h3 class="section">1.6 System Variables</h3>
+<span id="System-Variables-2"></span><h3 class="section">1.6 System Variables</h3>
<p>The following system variables appear in the <code>rv</code> billboard.
Not all variables are displayed in some configurations.
@@ -2056,13 +2017,11 @@ following, depending on the particular Autokey dance:
</table>
<hr>
-<a name="Peer-Variables"></a>
-<div class="header">
+<span id="Peer-Variables"></span><div class="header">
<p>
Next: <a href="#Clock-Variables" accesskey="n" rel="next">Clock Variables</a>, Previous: <a href="#System-Variables" accesskey="p" rel="prev">System Variables</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Peer-Variables-2"></a>
-<h3 class="section">1.7 Peer Variables</h3>
+<span id="Peer-Variables-2"></span><h3 class="section">1.7 Peer Variables</h3>
<p>The following peer variables appear in the <code>rv</code> billboard
for each association.
@@ -2072,12 +2031,8 @@ Not all variables are displayed in some configurations.
<thead><tr><th width="10%">Variable</th><th width="20%">Description</th></tr></thead>
<tr><td width="10%"><code>associd</code></td><td width="20%">association ID</td></tr>
<tr><td width="10%"><code>status</code></td><td width="20%"><a href="decode.html#peer">peer status word</a></td></tr>
-<tr><td width="10%"><code>srcadr</code>
-<p><code>srcport</code>
-</p></td><td width="20%">source (remote) IP address and port</td></tr>
-<tr><td width="10%"><code>dstadr</code>
-<p><code>dstport</code>
-</p></td><td width="20%">destination (local) IP address and port</td></tr>
+<tr><td width="10%"><code>srcadr</code></td><td width="20%">source (remote) IP address and port</td></tr>
+<tr><td width="10%"><code>dstadr</code></td><td width="20%">destination (local) IP address and port</td></tr>
<tr><td width="10%"><code>leap</code></td><td width="20%">leap indicator (0-3)</td></tr>
<tr><td width="10%"><code>stratum</code></td><td width="20%">stratum (0-15)</td></tr>
<tr><td width="10%"><code>precision</code></td><td width="20%">precision (log(2) s)</td></tr>
@@ -2124,13 +2079,11 @@ additional peer variables are displayed, including the following:
</table>
<hr>
-<a name="Clock-Variables"></a>
-<div class="header">
+<span id="Clock-Variables"></span><div class="header">
<p>
Previous: <a href="#Peer-Variables" accesskey="p" rel="prev">Peer Variables</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Clock-Variables-2"></a>
-<h3 class="section">1.8 Clock Variables</h3>
+<span id="Clock-Variables-2"></span><h3 class="section">1.8 Clock Variables</h3>
<p>The following clock variables appear in the <code>cv</code> billboard for each association with a reference clock. Not all variables are displayed in some configurations.
</p>
diff --git a/contrib/ntp/ntpq/ntpq.man.in b/contrib/ntp/ntpq/ntpq.man.in
index f14c575aef86..d5e8932d116c 100644
--- a/contrib/ntp/ntpq/ntpq.man.in
+++ b/contrib/ntp/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpq @NTPQ_MS@ "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:56 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:50:08 PM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1514,6 +1514,12 @@ for this option is:
.sp
Set the default display format for S2+ refids.
.TP
+.NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[]
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
+.TP
.NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
Display the full 'remote' value.
.sp
@@ -1579,10 +1585,10 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH "NOTES"
This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
option definitions.
diff --git a/contrib/ntp/ntpq/ntpq.mdoc.in b/contrib/ntp/ntpq/ntpq.mdoc.in
index 45c7a5301fbc..26070bd9a46d 100644
--- a/contrib/ntp/ntpq/ntpq.mdoc.in
+++ b/contrib/ntp/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:53 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:50:04 PM by AutoGen 5.18.16
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -989,6 +989,11 @@ for this option is:
ipv4
.sp
Set the default display format for S2+ refids.
+.It Fl u , Fl \-unconnected
+Use unconnected UDP to communicate with ntpd (default on Windows).
+.sp
+Open an unconnected UDP association to ntpd (the default
+on Windows).
.It Fl w , Fl \-wide
Display the full 'remote' value.
.sp
@@ -1046,10 +1051,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh "NOTES"
This manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP
option definitions.
diff --git a/contrib/ntp/ntpsnmpd/Makefile.am b/contrib/ntp/ntpsnmpd/Makefile.am
index e63098cd349f..5729bb85cd46 100644
--- a/contrib/ntp/ntpsnmpd/Makefile.am
+++ b/contrib/ntp/ntpsnmpd/Makefile.am
@@ -75,12 +75,12 @@ $(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) ntpsnmpd-opts.def
###
$(srcdir)/ntpsnmpd.1ntpsnmpdman: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
$(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdman > $(srcdir)/ntpsnmpd.man.in+
@@ -89,7 +89,7 @@ $(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/sc
###
$(srcdir)/ntpsnmpd.1ntpsnmpdmdoc: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
$(srcdir)/ntpsnmpd.mdoc.in: $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc > $(srcdir)/ntpsnmpd.mdoc.in+
@@ -107,14 +107,14 @@ $(srcdir)/invoke-ntpsnmpd.menu: $(srcdir)/invoke-ntpsnmpd.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpsnmpd.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntpsnmpd.html: $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpsnmpd.html: $(srcdir)/invoke-ntpsnmpd.texi $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpsnmpd.html ntpsnmpd.texi || true )
include $(top_srcdir)/bincheck.mf
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/ntpsnmpd/Makefile.in b/contrib/ntp/ntpsnmpd/Makefile.in
index 5cd0dd2bf85f..329d255cd277 100644
--- a/contrib/ntp/ntpsnmpd/Makefile.in
+++ b/contrib/ntp/ntpsnmpd/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -114,7 +114,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -134,6 +133,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -174,7 +174,10 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/netsnmp_daemonize.Po \
+ ./$(DEPDIR)/ntpSnmpSubagentObject.Po \
+ ./$(DEPDIR)/ntpsnmpd-opts.Po ./$(DEPDIR)/ntpsnmpd.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -250,11 +253,9 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
- $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
+ $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -274,6 +275,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -283,6 +285,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -295,14 +299,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -513,6 +513,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -554,7 +555,7 @@ EXTRA_DIST = \
BUILT_SOURCES = ntpsnmpd-opts.c ntpsnmpd-opts.h check-libntp \
check-libopts .deps-ver
CLEANFILES = check-libntp check-libopts .deps-ver
-DISTCLEANFILES = config.log $(man_MANS)
+DISTCLEANFILES = config.log $(man_MANS) $(DEPDIR)/deps-ver
html_DATA = \
$(srcdir)/ntpsnmpd.html \
$(NULL)
@@ -581,15 +582,16 @@ std_def_list = \
$(top_srcdir)/sntp/include/version.def \
$(NULL)
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -606,10 +608,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -777,28 +779,37 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netsnmp_daemonize.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpSnmpSubagentObject.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpsnmpd-opts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpsnmpd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netsnmp_daemonize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpSnmpSubagentObject.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpsnmpd-opts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpsnmpd.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -967,8 +978,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1008,7 +1021,8 @@ installdirs:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1046,7 +1060,10 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/netsnmp_daemonize.Po
+ -rm -f ./$(DEPDIR)/ntpSnmpSubagentObject.Po
+ -rm -f ./$(DEPDIR)/ntpsnmpd-opts.Po
+ -rm -f ./$(DEPDIR)/ntpsnmpd.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1094,7 +1111,10 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/netsnmp_daemonize.Po
+ -rm -f ./$(DEPDIR)/ntpSnmpSubagentObject.Po
+ -rm -f ./$(DEPDIR)/ntpsnmpd-opts.Po
+ -rm -f ./$(DEPDIR)/ntpsnmpd.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1116,9 +1136,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
uninstall-man: uninstall-man1 uninstall-man8
-.MAKE: all check install install-am install-exec-am install-strip
+.MAKE: all check install install-am install-exec install-exec-am \
+ install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic \
@@ -1146,12 +1167,12 @@ $(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) ntpsnmpd-opts.def
###
$(srcdir)/ntpsnmpd.1ntpsnmpdman: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
$(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdman > $(srcdir)/ntpsnmpd.man.in+
@@ -1160,7 +1181,7 @@ $(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/sc
###
$(srcdir)/ntpsnmpd.1ntpsnmpdmdoc: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
$(srcdir)/ntpsnmpd.mdoc.in: $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc > $(srcdir)/ntpsnmpd.mdoc.in+
@@ -1178,10 +1199,10 @@ $(srcdir)/invoke-ntpsnmpd.menu: $(srcdir)/invoke-ntpsnmpd.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpsnmpd.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntpsnmpd.html: $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpsnmpd.html: $(srcdir)/invoke-ntpsnmpd.texi $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpsnmpd.html ntpsnmpd.texi || true )
install-exec-hook:
@@ -1198,10 +1219,11 @@ install-exec-hook:
#
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
check-libopts: ../sntp/libopts/libopts.la
@echo stamp > $@
@@ -1212,9 +1234,9 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1232,7 +1254,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1262,7 +1284,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi b/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
index ad4376d69a7c..a01a9f2310d5 100644
--- a/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
+++ b/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:00 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:02:43 PM by AutoGen 5.18.16
# From the definitions ntpsnmpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -47,7 +47,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p13
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p16
Usage: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-n no nofork Do not fork
@@ -70,7 +70,7 @@ The following option preset mechanisms are supported:
- reading file ./.ntprc
- examining environment variables named NTPSNMPD_*
-Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+Please send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4
@@ -153,7 +153,7 @@ The command line options relating to configuration and/or usage help are:
Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
@table @samp
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
index 8716879a1251..c95e2bbf29f2 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:57 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:50:10 PM by AutoGen 5.18.16
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpsnmpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -40,10 +40,15 @@
#define OPTION_CODE_COMPILE 1
#include "ntpsnmpd-opts.h"
#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -60,9 +65,9 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpsnmpd options
*/
-static char const ntpsnmpd_opt_strs[1613] =
-/* 0 */ "ntpsnmpd 4.2.8p15\n"
- "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+static char const ntpsnmpd_opt_strs[1614] =
+/* 0 */ "ntpsnmpd 4.2.8p16\n"
+ "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -101,14 +106,14 @@ static char const ntpsnmpd_opt_strs[1613] =
/* 1415 */ "no-load-opts\0"
/* 1428 */ "no\0"
/* 1431 */ "NTPSNMPD\0"
-/* 1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p15\n"
+/* 1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p16\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 1544 */ "$HOME\0"
/* 1550 */ ".\0"
/* 1552 */ ".ntprc\0"
-/* 1559 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1593 */ "\n\0"
-/* 1595 */ "ntpsnmpd 4.2.8p15";
+/* 1559 */ "https://bugs.ntp.org, bugs@ntp.org\0"
+/* 1594 */ "\n\0"
+/* 1596 */ "ntpsnmpd 4.2.8p16";
/**
* nofork option description:
@@ -314,12 +319,12 @@ static char const * const apzHomeList[3] = {
/** The ntpsnmpd program bug email address. */
#define zBugsAddr (ntpsnmpd_opt_strs+1559)
/** Clarification/explanation of what ntpsnmpd does. */
-#define zExplain (ntpsnmpd_opt_strs+1593)
+#define zExplain (ntpsnmpd_opt_strs+1594)
/** Extra detail explaining what ntpsnmpd does. */
#define zDetail (NULL)
/** The full version string for ntpsnmpd. */
-#define zFullVersion (ntpsnmpd_opt_strs+1595)
-/* extracted from optcode.tlib near line 364 */
+#define zFullVersion (ntpsnmpd_opt_strs+1596)
+/* extracted from optcode.tlib near line 342 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -351,7 +356,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
ex_code = NTPSNMPD_EXIT_SUCCESS;
optionUsage(&ntpsnmpdOptions, ex_code);
/* NOTREACHED */
- exit(1);
+ exit(NTPSNMPD_EXIT_FAILURE);
(void)opts;
(void)od;
}
@@ -543,19 +548,19 @@ static void bogus_function(void) {
extract the correct strings. These strings are actually referenced
by a field name in the ntpsnmpdOptions structure noted in the
comments below. The literal text is defined in ntpsnmpd_opt_strs.
-
+
NOTE: the strings below are segmented with respect to the source string
ntpsnmpd_opt_strs. The strings above are handed off for translation
at run time a paragraph at a time. Consequently, they are presented here
for translation a paragraph at a time.
-
+
ALSO: often the description for an option will reference another option
by name. These are set off with apostrophe quotes (I hope). Do not
translate option names.
*/
/* referenced via ntpsnmpdOptions.pzCopyright */
- puts(_("ntpsnmpd 4.2.8p15\n\
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntpsnmpd 4.2.8p16\n\
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -599,14 +604,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpsnmpdOptions.pzUsageTitle */
- puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p15\n\
+ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p16\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntpsnmpdOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpsnmpdOptions.pzFullVersion */
- puts(_("ntpsnmpd 4.2.8p15"));
+ puts(_("ntpsnmpd 4.2.8p16"));
/* referenced via ntpsnmpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
@@ -616,234 +621,230 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -852,17 +853,17 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -880,28 +881,28 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
index 0921e356e5e6..360948a3be66 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed June 23, 2020 at 02:20:57 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:50:10 PM by AutoGen 5.18.16
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntpsnmpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -45,6 +45,8 @@
#define AUTOOPTS_NTPSNMPD_OPTS_H_GUARD 1
#include "config.h"
#include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
/**
* Ensure that the library used for compiling this generated header is at
@@ -53,13 +55,19 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
/**
* Enumeration of each option type for ntpsnmpd
*/
@@ -76,9 +84,9 @@ typedef enum {
/** count of all options for ntpsnmpd */
#define OPTION_CT 8
/** ntpsnmpd version */
-#define NTPSNMPD_VERSION "4.2.8p15"
+#define NTPSNMPD_VERSION "4.2.8p16"
/** Full ntpsnmpd version text */
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p15"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p16"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -235,6 +243,7 @@ static inline char* aoGetsText(char const* pz) {
# endif
#endif /* ENABLE_NLS */
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
index a3353c4c3e28..47d048b7967e 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd 1ntpsnmpdman "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpsnmpd 1ntpsnmpdman "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:01 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:16:36 PM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -138,10 +138,10 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Heiko Gerstung"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
The following objects are currently supported:
.sp \n(Ppu
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
index f92b97ec6fc0..33df8211c178 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:59 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:50:11 PM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -110,10 +110,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
.An "Heiko Gerstung"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
The following objects are currently supported:
.Pp
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.c b/contrib/ntp/ntpsnmpd/ntpsnmpd.c
index d96ad3af453b..f2534ba552ba 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.c
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.c
@@ -67,7 +67,7 @@ main (int argc, char **argv) {
snmp_enable_stderrlog();
/* Become Subagent */
- netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);
+ netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);
/* go into background mode, if requested */
if (background && netsnmp_daemonize(1, !use_syslog))
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.html b/contrib/ntp/ntpsnmpd/ntpsnmpd.html
index 0be532d656e6..141d1e249e81 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.html
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ntpsnmpd: Network Time Protocol SNMP Daemon User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,62 +41,56 @@ ul.no-bullet {list-style: none}
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#ntpsnmpd-Description" accesskey="n" rel="next">ntpsnmpd Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="ntpsnmpd_003a-Network-Time-Protocol-Query-User-Manual"></a>
-<h1 class="top">ntpsnmpd: Network Time Protocol Query User Manual</h1>
+<span id="ntpsnmpd_003a-Network-Time-Protocol-Query-User-Manual"></span><h1 class="top">ntpsnmpd: Network Time Protocol Query User Manual</h1>
<p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
operations and determine performance. It uses the standard NTP mode 6 control
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntpsnmpd</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntpsnmpd</code>.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpsnmpd-Description" accesskey="1">ntpsnmpd Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; <a href="#ntpsnmpd-Description" accesskey="1">ntpsnmpd Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; ntpsnmpd Invocation:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpsnmpd
+<tr><td align="left" valign="top">&bull; ntpsnmpd Invocation</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpsnmpd
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
</table>
<hr>
-<a name="ntpsnmpd-Description"></a>
-<div class="header">
+<span id="ntpsnmpd-Description"></span><div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description"></span><h2 class="chapter">1 Description</h2>
<p>The <code>ntpsnmpd</code> utility program provides an SNMP MIB agent for <code>ntpd</code>.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="1">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="1">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="Usage"></a>
-<div class="header">
+<span id="Usage"></span><div class="header">
<p>
Previous: <a href="#ntpsnmpd-Description" accesskey="p" rel="prev">ntpsnmpd Description</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Usage-1"></a>
-<h3 class="section">1.1 Usage</h3>
+<span id="Usage-1"></span><h3 class="section">1.1 Usage</h3>
<p>(what should we say here?)
</p><hr>
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in b/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
index f79b58428e1e..06bfdbb3dd48 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd @NTPSNMPD_MS@ "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH ntpsnmpd @NTPSNMPD_MS@ "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:01 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:16:36 PM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -138,10 +138,10 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Heiko Gerstung"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
The following objects are currently supported:
.sp \n(Ppu
diff --git a/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in b/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
index 899e4c36994e..242092f566e7 100644
--- a/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
+++ b/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:20:59 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:50:11 PM by AutoGen 5.18.16
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -110,10 +110,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
.An "Heiko Gerstung"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
The following objects are currently supported:
.Pp
diff --git a/contrib/ntp/packageinfo.sh b/contrib/ntp/packageinfo.sh
index bab605d54002..c07441837e24 100644
--- a/contrib/ntp/packageinfo.sh
+++ b/contrib/ntp/packageinfo.sh
@@ -83,7 +83,7 @@ CLTAG=NTP_4_2_0
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=15
+point=16
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
diff --git a/contrib/ntp/parseutil/Makefile.in b/contrib/ntp/parseutil/Makefile.in
index 4bb0e5cf1204..66d6f695d8dc 100644
--- a/contrib/ntp/parseutil/Makefile.in
+++ b/contrib/ntp/parseutil/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -168,7 +168,8 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/dcfd.Po ./$(DEPDIR)/testdcf.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -212,8 +213,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
$(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
@@ -235,6 +234,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -244,6 +244,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -256,14 +258,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -474,6 +472,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -492,10 +491,11 @@ AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ETAGS_ARGS = Makefile.am
-DISTCLEANFILES = $(EXTRA_PROGRAMS)
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+DISTCLEANFILES = $(EXTRA_PROGRAMS) $(DEPDIR)/deps-ver
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -518,8 +518,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
@@ -555,26 +555,35 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcfd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdcf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcfd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdcf.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -636,8 +645,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -675,7 +686,8 @@ all-am: Makefile $(PROGRAMS)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -713,7 +725,8 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/dcfd.Po
+ -rm -f ./$(DEPDIR)/testdcf.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -759,7 +772,8 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/dcfd.Po
+ -rm -f ./$(DEPDIR)/testdcf.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -778,21 +792,22 @@ ps-am:
uninstall-am:
-.MAKE: all check check-am install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
- clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
- ctags ctags-am distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags tags-am uninstall uninstall-am
+.MAKE: all check check-am install install-am install-exec \
+ install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \
+ check-local clean clean-generic clean-libtool \
+ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
@@ -805,9 +820,9 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -825,7 +840,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -855,7 +870,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/parseutil/dcfd.c b/contrib/ntp/parseutil/dcfd.c
index 0823f8ec9748..9fe0bf1d394b 100644
--- a/contrib/ntp/parseutil/dcfd.c
+++ b/contrib/ntp/parseutil/dcfd.c
@@ -989,7 +989,8 @@ read_drift(
{
int idrift = 0, fdrift = 0;
- fscanf(df, "%4d.%03d", &idrift, &fdrift);
+ if (2 != fscanf(df, "%4d.%03d", &idrift, &fdrift))
+ LPRINTF("read_drift: trouble reading drift file");
fclose(df);
LPRINTF("read_drift: %d.%03d ppm ", idrift, fdrift);
@@ -1172,7 +1173,10 @@ detach(
)
{
# ifdef HAVE_DAEMON
- daemon(0, 0);
+ if (daemon(0, 0)) {
+ fprintf(stderr, "'daemon()' fails: %d(%s)\n",
+ errno, strerror(errno));
+ }
# else /* not HAVE_DAEMON */
if (fork())
exit(0);
diff --git a/contrib/ntp/ports/winnt/vs2015/mkver.props b/contrib/ntp/ports/winnt/vs2015/mkver.props
new file mode 100644
index 000000000000..ed91b5cd51b1
--- /dev/null
+++ b/contrib/ntp/ports/winnt/vs2015/mkver.props
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\sntp\scm-rev" Condition="exists('..\..\..\..\sntp\scm-rev')">
+ <Message>Copying scm-rev from distribution...</Message>
+ <Command>call ..\..\scripts\mkver.bat -U scm-rev</Command>
+ <Outputs>scm-rev</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\.bk\SCCS\ChangeSet,s" Condition="exists('..\..\..\..\.bk\SCCS\ChangeSet,s')">
+ <Message>Generating scm-rev from bk...</Message>
+ <Command>call ..\..\scripts\mkver.bat -G scm-rev</Command>
+ <Outputs>scm-rev</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="scm-rev">
+ <Message>Using NT Shell Script to generate version.c</Message>
+ <Command>call ..\..\scripts\mkver.bat -S scm-rev -P $(ProjectName)</Command>
+ <Inputs>.version;scm-rev;..\..\..\..\packageinfo.sh</Inputs>
+ <Outputs>version.c</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/contrib/ntp/scripts/Makefile.am b/contrib/ntp/scripts/Makefile.am
index 2664bef4def8..b74c8916e680 100644
--- a/contrib/ntp/scripts/Makefile.am
+++ b/contrib/ntp/scripts/Makefile.am
@@ -87,12 +87,12 @@ OPTTPL = $(std_def_list)
plot_summary: $(srcdir)/plot_summary-opts
$(srcdir)/plot_summary-opts: plot_summary-opts.def $(OPTTPL)
- $(run_ag) plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) plot_summary-opts.def
### Nroff
$(srcdir)/plot_summary.1plot_summaryman: $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
$(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summaryman > $(srcdir)/plot_summary.man.in+
@@ -101,7 +101,7 @@ $(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_src
### Mdoc
$(srcdir)/plot_summary.1plot_summarymdoc: $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
$(srcdir)/plot_summary.mdoc.in: $(srcdir)/plot_summary.1plot_summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summarymdoc > $(srcdir)/plot_summary.mdoc.in+
@@ -119,7 +119,7 @@ $(srcdir)/invoke-plot_summary.menu: $(srcdir)/invoke-plot_summary.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-plot_summary.texi: plot_summary-opts $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
@@ -133,12 +133,12 @@ $(srcdir)/plot_summary.html: $(srcdir)/invoke-plot_summary.menu $(srcdir)/invoke
summary: $(srcdir)/summary-opts
$(srcdir)/summary-opts: summary-opts.def $(OPTTPL)
- $(run_ag) summary-opts.def
+ $(AM_V_GEN)$(run_ag) summary-opts.def
### Nroff
$(srcdir)/summary.1summaryman: $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
$(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summaryman > $(srcdir)/summary.man.in+
@@ -147,7 +147,7 @@ $(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scrip
### Mdoc
$(srcdir)/summary.1summarymdoc: $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
$(srcdir)/summary.mdoc.in: $(srcdir)/summary.1summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summarymdoc > $(srcdir)/summary.mdoc.in+
@@ -165,11 +165,11 @@ $(srcdir)/invoke-summary.menu: $(srcdir)/invoke-summary.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-summary.texi: summary-opts $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/summary.html: $(srcdir)/invoke-summary.menu $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/summary.html: $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o summary.html summary.texi || true )
diff --git a/contrib/ntp/scripts/Makefile.in b/contrib/ntp/scripts/Makefile.in
index 1725b151bb64..026185093d03 100644
--- a/contrib/ntp/scripts/Makefile.in
+++ b/contrib/ntp/scripts/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -206,7 +206,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
+ distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -224,8 +224,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ntpver.in \
$(srcdir)/plot_summary.in $(srcdir)/summary.in README
@@ -272,6 +270,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -281,6 +280,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -293,14 +294,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -511,6 +508,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -621,8 +619,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -826,8 +824,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1014,12 +1014,12 @@ install-data-local: install-html
plot_summary: $(srcdir)/plot_summary-opts
$(srcdir)/plot_summary-opts: plot_summary-opts.def $(OPTTPL)
- $(run_ag) plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) plot_summary-opts.def
### Nroff
$(srcdir)/plot_summary.1plot_summaryman: $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
$(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summaryman > $(srcdir)/plot_summary.man.in+
@@ -1028,7 +1028,7 @@ $(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_src
### Mdoc
$(srcdir)/plot_summary.1plot_summarymdoc: $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
$(srcdir)/plot_summary.mdoc.in: $(srcdir)/plot_summary.1plot_summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summarymdoc > $(srcdir)/plot_summary.mdoc.in+
@@ -1046,7 +1046,7 @@ $(srcdir)/invoke-plot_summary.menu: $(srcdir)/invoke-plot_summary.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-plot_summary.texi: plot_summary-opts $(srcdir)/plot_summary-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
@@ -1057,12 +1057,12 @@ $(srcdir)/plot_summary.html: $(srcdir)/invoke-plot_summary.menu $(srcdir)/invoke
summary: $(srcdir)/summary-opts
$(srcdir)/summary-opts: summary-opts.def $(OPTTPL)
- $(run_ag) summary-opts.def
+ $(AM_V_GEN)$(run_ag) summary-opts.def
### Nroff
$(srcdir)/summary.1summaryman: $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
$(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summaryman > $(srcdir)/summary.man.in+
@@ -1071,7 +1071,7 @@ $(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scrip
### Mdoc
$(srcdir)/summary.1summarymdoc: $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
$(srcdir)/summary.mdoc.in: $(srcdir)/summary.1summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summarymdoc > $(srcdir)/summary.mdoc.in+
@@ -1089,12 +1089,12 @@ $(srcdir)/invoke-summary.menu: $(srcdir)/invoke-summary.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-summary.texi: summary-opts $(srcdir)/summary-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/summary.html: $(srcdir)/invoke-summary.menu $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/summary.html: $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o summary.html summary.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/scripts/build/Makefile.in b/contrib/ntp/scripts/build/Makefile.in
index 44718a830ff9..51446d9bf3cc 100644
--- a/contrib/ntp/scripts/build/Makefile.in
+++ b/contrib/ntp/scripts/build/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -128,6 +127,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -178,6 +178,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -187,6 +188,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -199,14 +202,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -417,6 +416,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -463,8 +463,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -491,8 +491,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/scripts/calc_tickadj/Makefile.am b/contrib/ntp/scripts/calc_tickadj/Makefile.am
index 473b6e343c65..a89cf21f1f7b 100644
--- a/contrib/ntp/scripts/calc_tickadj/Makefile.am
+++ b/contrib/ntp/scripts/calc_tickadj/Makefile.am
@@ -65,12 +65,12 @@ BUILT_SOURCES = $(noinst_DATA)
calc_tickadj: $(srcdir)/calc_tickadj-opts
$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
- $(run_ag) calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) calc_tickadj-opts.def
### Nroff
$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
@@ -79,7 +79,7 @@ $(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_src
### Mdoc
$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
@@ -97,10 +97,10 @@ $(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
+$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
diff --git a/contrib/ntp/scripts/calc_tickadj/Makefile.in b/contrib/ntp/scripts/calc_tickadj/Makefile.in
index 106f368af795..f4dc33b2209c 100644
--- a/contrib/ntp/scripts/calc_tickadj/Makefile.in
+++ b/contrib/ntp/scripts/calc_tickadj/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -130,6 +129,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -214,6 +214,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -223,6 +224,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -235,14 +238,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -453,6 +452,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -539,8 +539,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -756,8 +756,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -797,7 +799,8 @@ installdirs:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -898,7 +901,7 @@ uninstall-am: uninstall-binSCRIPTS uninstall-libexecSCRIPTS \
uninstall-man: uninstall-man1 uninstall-man8
-.MAKE: all check install install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
@@ -922,12 +925,12 @@ uninstall-man: uninstall-man1 uninstall-man8
calc_tickadj: $(srcdir)/calc_tickadj-opts
$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
- $(run_ag) calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) calc_tickadj-opts.def
### Nroff
$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
@@ -936,7 +939,7 @@ $(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_src
### Mdoc
$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
@@ -954,12 +957,12 @@ $(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
+$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts b/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts
index 6def9fb03a67..d768ee501be1 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (calc_tickadj-opts)
#
-# It has been AutoGen-ed April 5, 2019 at 01:12:39 AM by AutoGen 5.18.5
+# It has been AutoGen-ed March 5, 2023 at 02:05:18 AM by AutoGen 5.18.16
# From the definitions calc_tickadj-opts.def
# and the template file perlopt
@@ -39,7 +39,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.8p13
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.8p15
USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-d, --drift-file=str Ntp drift file to use
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
index 691a06cf9196..fed967e5137d 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:27 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:21 PM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
index 1ee73c1a212e..ce5185e0daf3 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:28 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:14:57 PM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
index a29110e9ede1..15fb970e08b1 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>calc_tickadj User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -49,44 +40,40 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="calc_005ftickadj-User_0027s-Manual"></a>
-<h1 class="top">calc_tickadj User&rsquo;s Manual</h1>
+<span id="calc_005ftickadj-User_0027s-Manual"></span><h1 class="top">calc_tickadj User&rsquo;s Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>calc_tickadj</code> program.
-This document applies to version 4.2.8p15 of <code>calc_tickadj</code>.
+This document applies to version 4.2.8p16 of <code>calc_tickadj</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Invoking-calc_005ftickadj" href="#toc-Invoking-calc_005ftickadj">1 Invoking calc_tickadj</a></li>
+<li><a id="stoc-Invoking-calc_005ftickadj" href="#toc-Invoking-calc_005ftickadj">1 Invoking calc_tickadj</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; calc_tickadj Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; calc_tickadj Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-Invocation" accesskey="2">calc_tickadj Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking calc_tickadj
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-Invocation" accesskey="2">calc_tickadj Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking calc_tickadj
</td></tr>
</table>
<hr>
-<a name="calc_005ftickadj-Invocation"></a>
-<div class="header">
+<span id="calc_005ftickadj-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Invoking-calc_005ftickadj"></a>
-<h2 class="chapter">1 Invoking calc_tickadj</h2>
-<a name="index-calc_005ftickadj"></a>
-<a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e"></a>
+<span id="Invoking-calc_005ftickadj"></span><h2 class="chapter">1 Invoking calc_tickadj</h2>
+<span id="index-calc_005ftickadj"></span>
+<span id="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e"></span>
<p>The <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal
tick value. Generally, ntpd can do better job if the drift value is the
@@ -118,25 +105,23 @@ current tick manually on command line.
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-usage" accesskey="1">calc_tickadj usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">calc_tickadj help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-usage" accesskey="1">calc_tickadj usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">calc_tickadj help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-drift_002dfile" accesskey="2">calc_tickadj drift-file</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">drift-file option (-d)
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-drift_002dfile" accesskey="2">calc_tickadj drift-file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">drift-file option (-d)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-tick" accesskey="3">calc_tickadj tick</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">tick option (-t)
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-tick" accesskey="3">calc_tickadj tick</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">tick option (-t)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-exit-status" accesskey="4">calc_tickadj exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-exit-status" accesskey="4">calc_tickadj exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
</table>
<hr>
-<a name="calc_005ftickadj-usage"></a>
-<div class="header">
+<span id="calc_005ftickadj-usage"></span><div class="header">
<p>
Next: <a href="#calc_005ftickadj-drift_002dfile" accesskey="n" rel="next">calc_tickadj drift-file</a>, Up: <a href="#calc_005ftickadj-Invocation" accesskey="u" rel="up">calc_tickadj Invocation</a> &nbsp; </p>
</div>
-<a name="calc_005ftickadj-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h3 class="section">1.1 calc_tickadj help/usage (<samp>--help</samp>)</h3>
-<a name="index-calc_005ftickadj-help"></a>
+<span id="calc_005ftickadj-help_002fusage-_0028_002d_002dhelp_0029"></span><h3 class="section">1.1 calc_tickadj help/usage (<samp>--help</samp>)</h3>
+<span id="index-calc_005ftickadj-help"></span>
<p>This is the automatically generated usage text for calc_tickadj.
</p>
@@ -149,7 +134,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">calc_tickadj - Calculates &quot;optimal&quot; value for tick given ntp drift file. - Ver. 4.2.8p13
+<pre class="example">calc_tickadj - Calculates &quot;optimal&quot; value for tick given ntp drift file. - Ver. 4.2.8p15
USAGE: calc_tickadj [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
-d, --drift-file=str Ntp drift file to use
@@ -162,48 +147,42 @@ hyphen and the flag character.
</pre></div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-drift_002dfile" accesskey="1">calc_tickadj drift-file</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-drift_002dfile" accesskey="1">drift-file option (-d)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-tick" accesskey="2">calc_tickadj tick</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-tick" accesskey="2">tick option (-t)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-exit-status" accesskey="3">calc_tickadj exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#calc_005ftickadj-exit-status" accesskey="3">calc_tickadj exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="calc_005ftickadj-drift_002dfile"></a>
-<div class="header">
+<span id="calc_005ftickadj-drift_002dfile"></span><div class="header">
<p>
Next: <a href="#calc_005ftickadj-tick" accesskey="n" rel="next">calc_tickadj tick</a>, Previous: <a href="#calc_005ftickadj-usage" accesskey="p" rel="prev">calc_tickadj usage</a>, Up: <a href="#calc_005ftickadj-usage" accesskey="u" rel="up">calc_tickadj usage</a> &nbsp; </p>
</div>
-<a name="drift_002dfile-option-_0028_002dd_0029"></a>
-<h4 class="subsection">1.1.1 drift-file option (-d)</h4>
-<a name="index-calc_005ftickadj_002ddrift_002dfile"></a>
+<span id="drift_002dfile-option-_0028_002dd_0029"></span><h4 class="subsection">1.1.1 drift-file option (-d)</h4>
+<span id="index-calc_005ftickadj_002ddrift_002dfile"></span>
<p>This is the &ldquo;ntp drift file to use&rdquo; option.
This option takes a string argument.
Use the specified drift file for calculations
</p><hr>
-<a name="calc_005ftickadj-tick"></a>
-<div class="header">
+<span id="calc_005ftickadj-tick"></span><div class="header">
<p>
Next: <a href="#calc_005ftickadj-exit-status" accesskey="n" rel="next">calc_tickadj exit status</a>, Previous: <a href="#calc_005ftickadj-drift_002dfile" accesskey="p" rel="prev">calc_tickadj drift-file</a>, Up: <a href="#calc_005ftickadj-usage" accesskey="u" rel="up">calc_tickadj usage</a> &nbsp; </p>
</div>
-<a name="tick-option-_0028_002dt_0029"></a>
-<h4 class="subsection">1.1.2 tick option (-t)</h4>
-<a name="index-calc_005ftickadj_002dtick"></a>
+<span id="tick-option-_0028_002dt_0029"></span><h4 class="subsection">1.1.2 tick option (-t)</h4>
+<span id="index-calc_005ftickadj_002dtick"></span>
<p>This is the &ldquo;tick value of this host&rdquo; option.
This option takes a number argument.
The current tick which to adjustment will be calculated
</p><hr>
-<a name="calc_005ftickadj-exit-status"></a>
-<div class="header">
+<span id="calc_005ftickadj-exit-status"></span><div class="header">
<p>
Previous: <a href="#calc_005ftickadj-tick" accesskey="p" rel="prev">calc_tickadj tick</a>, Up: <a href="#calc_005ftickadj-usage" accesskey="u" rel="up">calc_tickadj usage</a> &nbsp; </p>
</div>
-<a name="calc_005ftickadj-exit-status-1"></a>
-<h4 class="subsection">1.1.3 calc_tickadj exit status</h4>
+<span id="calc_005ftickadj-exit-status-1"></span><h4 class="subsection">1.1.3 calc_tickadj exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
index 691a06cf9196..fed967e5137d 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:27 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:21 PM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
index 1ee73c1a212e..ce5185e0daf3 100644
--- a/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
+++ b/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:28 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:14:57 PM by AutoGen 5.18.16
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi b/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
index 14ede3c6ab59..5b64a0512487 100644
--- a/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
+++ b/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:29 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:04:23 PM by AutoGen 5.18.16
# From the definitions calc_tickadj-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -63,7 +63,7 @@ with a status code of 0.
@exampleindent 0
@example
-calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.8p13
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.8p15
USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
-d, --drift-file=str Ntp drift file to use
diff --git a/contrib/ntp/scripts/invoke-plot_summary.texi b/contrib/ntp/scripts/invoke-plot_summary.texi
index bbaa8cd979e1..30b54985877d 100644
--- a/contrib/ntp/scripts/invoke-plot_summary.texi
+++ b/contrib/ntp/scripts/invoke-plot_summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:46 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:04:36 PM by AutoGen 5.18.16
# From the definitions plot_summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -41,7 +41,7 @@ with a status code of 0.
@exampleindent 0
@example
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p15
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p16
USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Where the summary files are
diff --git a/contrib/ntp/scripts/invoke-summary.texi b/contrib/ntp/scripts/invoke-summary.texi
index cc80112a0c2c..7994844cfe5d 100644
--- a/contrib/ntp/scripts/invoke-summary.texi
+++ b/contrib/ntp/scripts/invoke-summary.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:50 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:04:40 PM by AutoGen 5.18.16
# From the definitions summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -42,7 +42,7 @@ with a status code of 0.
@exampleindent 0
@example
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p15
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p16
USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/lib/Makefile.in b/contrib/ntp/scripts/lib/Makefile.in
index e2750d21034c..90d82539d476 100644
--- a/contrib/ntp/scripts/lib/Makefile.in
+++ b/contrib/ntp/scripts/lib/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -108,7 +108,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -128,6 +127,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -205,6 +205,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -214,6 +215,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -226,14 +229,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -444,6 +443,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -476,8 +476,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -524,8 +524,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/scripts/ntp-wait/Makefile.am b/contrib/ntp/scripts/ntp-wait/Makefile.am
index b819329ead9e..d1814e20c333 100644
--- a/contrib/ntp/scripts/ntp-wait/Makefile.am
+++ b/contrib/ntp/scripts/ntp-wait/Makefile.am
@@ -55,12 +55,12 @@ noinst_DATA = \
ntp-wait: $(srcdir)/ntp-wait-opts
$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) ntp-wait-opts.def
### Nroff
$(srcdir)/ntp-wait.1ntp-waitman: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
$(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitman > $(srcdir)/ntp-wait.man.in+
@@ -69,7 +69,7 @@ $(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/sc
### Mdoc
$(srcdir)/ntp-wait.1ntp-waitmdoc: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
$(srcdir)/ntp-wait.mdoc.in: $(srcdir)/ntp-wait.1ntp-waitmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitmdoc > $(srcdir)/ntp-wait.mdoc.in+
@@ -87,10 +87,10 @@ $(srcdir)/invoke-ntp-wait.menu: $(srcdir)/invoke-ntp-wait.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp-wait.texi: ntp-wait-opts $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.menu $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntp-wait.html ntp-wait.texi || true )
diff --git a/contrib/ntp/scripts/ntp-wait/Makefile.in b/contrib/ntp/scripts/ntp-wait/Makefile.in
index 5977c52c61b4..9aa6ee7afb34 100644
--- a/contrib/ntp/scripts/ntp-wait/Makefile.in
+++ b/contrib/ntp/scripts/ntp-wait/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -213,6 +213,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -222,6 +223,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -234,14 +237,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -452,6 +451,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -531,8 +531,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -769,8 +769,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -932,12 +934,12 @@ uninstall-man: uninstall-man1 uninstall-man8
ntp-wait: $(srcdir)/ntp-wait-opts
$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) ntp-wait-opts.def
### Nroff
$(srcdir)/ntp-wait.1ntp-waitman: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
$(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitman > $(srcdir)/ntp-wait.man.in+
@@ -946,7 +948,7 @@ $(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/sc
### Mdoc
$(srcdir)/ntp-wait.1ntp-waitmdoc: $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
$(srcdir)/ntp-wait.mdoc.in: $(srcdir)/ntp-wait.1ntp-waitmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitmdoc > $(srcdir)/ntp-wait.mdoc.in+
@@ -964,12 +966,12 @@ $(srcdir)/invoke-ntp-wait.menu: $(srcdir)/invoke-ntp-wait.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntp-wait.texi: ntp-wait-opts $(srcdir)/ntp-wait-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.menu $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntp-wait.html ntp-wait.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi b/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
index 3a0f61f79a8a..cfeef3275b84 100644
--- a/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
+++ b/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:32 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 07:15:00 PM by AutoGen 5.18.16
# From the definitions ntp-wait-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -61,7 +61,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p15
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p16
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait-opts b/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
index 125e5920349f..45418bd38d99 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:30 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 07:14:58 PM by AutoGen 5.18.16
# From the definitions ntp-wait-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p15
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p16
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-n, --tries=num Number of times to check ntpd
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
index 930f56067857..a8b161e8df6b 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait 1ntp-waitman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntp-wait 1ntp-waitman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:33 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:25 PM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
index 882ec9bd6811..6953f46384d5 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_WAIT 1ntp-waitmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:30 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:14:59 PM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.html b/contrib/ntp/scripts/ntp-wait/ntp-wait.html
index 0b0862df6a25..d5e16aff4474 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.html
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ntp-wait User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,8 +41,7 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
@@ -68,34 +58,32 @@ until the system&rsquo;s time has stabilized and synchronized,
and only then start any applicaitons (like database servers) that require
accurate and stable time.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntp-wait</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntp-wait</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
-<li><a name="stoc-Invoking-ntp_002dwait" href="#toc-Invoking-ntp_002dwait">1 Invoking ntp-wait</a></li>
+<li><a id="stoc-Invoking-ntp_002dwait" href="#toc-Invoking-ntp_002dwait">1 Invoking ntp-wait</a></li>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; ntp-wait Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; ntp-wait Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Invocation" accesskey="2">ntp-wait Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntp-wait
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Invocation" accesskey="2">ntp-wait Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntp-wait
</td></tr>
</table>
<hr>
-<a name="ntp_002dwait-Invocation"></a>
-<div class="header">
+<span id="ntp_002dwait-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Invoking-ntp_002dwait"></a>
-<h3 class="section">1 Invoking ntp-wait</h3>
-<a name="index-ntp_002dwait"></a>
-<a name="index-Wait-for-ntpd-to-stabilize-the-system-clock"></a>
+<span id="Invoking-ntp_002dwait"></span><h3 class="section">1 Invoking ntp-wait</h3>
+<span id="index-ntp_002dwait"></span>
+<span id="index-Wait-for-ntpd-to-stabilize-the-system-clock"></span>
@@ -122,31 +110,29 @@ has set the time.
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-wait</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-usage" accesskey="1">ntp-wait usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntp-wait help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-usage" accesskey="1">ntp-wait usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntp-wait help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-tries" accesskey="2">ntp-wait tries</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">tries option (-n)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-tries" accesskey="2">ntp-wait tries</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">tries option (-n)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-sleep" accesskey="3">ntp-wait sleep</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sleep option (-s)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-sleep" accesskey="3">ntp-wait sleep</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sleep option (-s)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-verbose" accesskey="4">ntp-wait verbose</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">verbose option (-v)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-verbose" accesskey="4">ntp-wait verbose</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">verbose option (-v)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-exit-status" accesskey="5">ntp-wait exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-exit-status" accesskey="5">ntp-wait exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Authors" accesskey="6">ntp-wait Authors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Authors" accesskey="6">ntp-wait Authors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Notes" accesskey="7">ntp-wait Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dwait-Notes" accesskey="7">ntp-wait Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
</td></tr>
</table>
<hr>
-<a name="ntp_002dwait-usage"></a>
-<div class="header">
+<span id="ntp_002dwait-usage"></span><div class="header">
<p>
Next: <a href="#ntp_002dwait-tries" accesskey="n" rel="next">ntp-wait tries</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dwait-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.1 ntp-wait help/usage (<samp>--help</samp>)</h4>
-<a name="index-ntp_002dwait-help"></a>
+<span id="ntp_002dwait-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1 ntp-wait help/usage (<samp>--help</samp>)</h4>
+<span id="index-ntp_002dwait-help"></span>
<p>This is the automatically generated usage text for ntp-wait.
</p>
@@ -159,7 +145,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p15
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8p16
USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
-n, --tries=num Number of times to check ntpd
@@ -173,54 +159,46 @@ hyphen and the flag character.
</pre></div>
<hr>
-<a name="ntp_002dwait-tries"></a>
-<div class="header">
+<span id="ntp_002dwait-tries"></span><div class="header">
<p>
Next: <a href="#ntp_002dwait-sleep" accesskey="n" rel="next">ntp-wait sleep</a>, Previous: <a href="#ntp_002dwait-usage" accesskey="p" rel="prev">ntp-wait usage</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
</div>
-<a name="tries-option-_0028_002dn_0029"></a>
-<h4 class="subsection">1.2 tries option (-n)</h4>
-<a name="index-ntp_002dwait_002dtries"></a>
+<span id="tries-option-_0028_002dn_0029"></span><h4 class="subsection">1.2 tries option (-n)</h4>
+<span id="index-ntp_002dwait_002dtries"></span>
<p>This is the &ldquo;number of times to check ntpd&rdquo; option.
This option takes a number argument.
The maximum number of times we will check <code>ntpd</code> to see if
it has been able to synchronize and stabilize the system clock.
</p><hr>
-<a name="ntp_002dwait-sleep"></a>
-<div class="header">
+<span id="ntp_002dwait-sleep"></span><div class="header">
<p>
Next: <a href="#ntp_002dwait-verbose" accesskey="n" rel="next">ntp-wait verbose</a>, Previous: <a href="#ntp_002dwait-tries" accesskey="p" rel="prev">ntp-wait tries</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
</div>
-<a name="sleep-option-_0028_002ds_0029"></a>
-<h4 class="subsection">1.3 sleep option (-s)</h4>
-<a name="index-ntp_002dwait_002dsleep"></a>
+<span id="sleep-option-_0028_002ds_0029"></span><h4 class="subsection">1.3 sleep option (-s)</h4>
+<span id="index-ntp_002dwait_002dsleep"></span>
<p>This is the &ldquo;how long to sleep between tries&rdquo; option.
This option takes a number argument <samp>secs-between-tries</samp>.
We will sleep for <samp>secs-between-tries</samp> after each query
of <code>ntpd</code> that returns &quot;the time is not yet stable&quot;.
</p><hr>
-<a name="ntp_002dwait-verbose"></a>
-<div class="header">
+<span id="ntp_002dwait-verbose"></span><div class="header">
<p>
Next: <a href="#ntp_002dwait-exit-status" accesskey="n" rel="next">ntp-wait exit status</a>, Previous: <a href="#ntp_002dwait-sleep" accesskey="p" rel="prev">ntp-wait sleep</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
</div>
-<a name="verbose-option-_0028_002dv_0029"></a>
-<h4 class="subsection">1.4 verbose option (-v)</h4>
-<a name="index-ntp_002dwait_002dverbose"></a>
+<span id="verbose-option-_0028_002dv_0029"></span><h4 class="subsection">1.4 verbose option (-v)</h4>
+<span id="index-ntp_002dwait_002dverbose"></span>
<p>This is the &ldquo;be verbose&rdquo; option.
By default, <code>ntp-wait</code> is silent.
With this option, <code>ntp-wait</code> will provide status information.
</p><hr>
-<a name="ntp_002dwait-exit-status"></a>
-<div class="header">
+<span id="ntp_002dwait-exit-status"></span><div class="header">
<p>
Next: <a href="#ntp_002dwait-Authors" accesskey="n" rel="next">ntp-wait Authors</a>, Previous: <a href="#ntp_002dwait-verbose" accesskey="p" rel="prev">ntp-wait verbose</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dwait-exit-status-1"></a>
-<h4 class="subsection">1.5 ntp-wait exit status</h4>
+<span id="ntp_002dwait-exit-status-1"></span><h4 class="subsection">1.5 ntp-wait exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
@@ -232,21 +210,17 @@ Next: <a href="#ntp_002dwait-Authors" accesskey="n" rel="next">ntp-wait Authors<
</p></dd>
</dl>
<hr>
-<a name="ntp_002dwait-Authors"></a>
-<div class="header">
+<span id="ntp_002dwait-Authors"></span><div class="header">
<p>
Next: <a href="#ntp_002dwait-Notes" accesskey="n" rel="next">ntp-wait Notes</a>, Previous: <a href="#ntp_002dwait-exit-status" accesskey="p" rel="prev">ntp-wait exit status</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dwait-Authors-1"></a>
-<h4 class="subsection">1.6 ntp-wait Authors</h4>
+<span id="ntp_002dwait-Authors-1"></span><h4 class="subsection">1.6 ntp-wait Authors</h4>
<hr>
-<a name="ntp_002dwait-Notes"></a>
-<div class="header">
+<span id="ntp_002dwait-Notes"></span><div class="header">
<p>
Previous: <a href="#ntp_002dwait-Authors" accesskey="p" rel="prev">ntp-wait Authors</a>, Up: <a href="#ntp_002dwait-Invocation" accesskey="u" rel="up">ntp-wait Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dwait-Notes-1"></a>
-<h4 class="subsection">1.7 ntp-wait Notes</h4>
+<span id="ntp_002dwait-Notes-1"></span><h4 class="subsection">1.7 ntp-wait Notes</h4>
<hr>
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in b/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
index 0fdf23a7b964..49b543ada260 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait @NTP_WAIT_MS@ "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntp-wait @NTP_WAIT_MS@ "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:33 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:25 PM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in b/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
index 27b572f3ac60..9403f4c78750 100644
--- a/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
+++ b/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:30 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:14:59 PM by AutoGen 5.18.16
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntpsweep/Makefile.am b/contrib/ntp/scripts/ntpsweep/Makefile.am
index 7ecc23bd5abd..69231d9a48dc 100644
--- a/contrib/ntp/scripts/ntpsweep/Makefile.am
+++ b/contrib/ntp/scripts/ntpsweep/Makefile.am
@@ -61,12 +61,12 @@ noinst_DATA = \
ntpsweep: $(srcdir)/ntpsweep-opts
$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(std_def_list)
- $(run_ag) ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) ntpsweep-opts.def
### Nroff
$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
@@ -75,7 +75,7 @@ $(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mans
### Mdoc
$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
@@ -93,10 +93,10 @@ $(srcdir)/invoke-ntpsweep.menu: invoke-ntpsweep.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/ntpsweep.html: invoke-ntpsweep.menu invoke-ntpsweep.texi ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpsweep.html: $(srcdir)/invoke-ntpsweep.texi $(srcdir)/ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpsweep.html ntpsweep.texi || true )
diff --git a/contrib/ntp/scripts/ntpsweep/Makefile.in b/contrib/ntp/scripts/ntpsweep/Makefile.in
index 6db2194d98bb..027f0847ecdf 100644
--- a/contrib/ntp/scripts/ntpsweep/Makefile.in
+++ b/contrib/ntp/scripts/ntpsweep/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -214,6 +214,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -223,6 +224,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -235,14 +238,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -453,6 +452,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -536,8 +536,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -774,8 +774,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -938,12 +940,12 @@ uninstall-man: uninstall-man1 uninstall-man8
ntpsweep: $(srcdir)/ntpsweep-opts
$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(std_def_list)
- $(run_ag) ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) ntpsweep-opts.def
### Nroff
$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
@@ -952,7 +954,7 @@ $(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mans
### Mdoc
$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
@@ -970,12 +972,12 @@ $(srcdir)/invoke-ntpsweep.menu: invoke-ntpsweep.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/ntpsweep.html: invoke-ntpsweep.menu invoke-ntpsweep.texi ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntpsweep.html: $(srcdir)/invoke-ntpsweep.texi $(srcdir)/ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpsweep.html ntpsweep.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi b/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
index f75dd010c98a..732930c99c63 100644
--- a/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
+++ b/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:34 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:04:26 PM by AutoGen 5.18.16
# From the definitions ntpsweep-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -45,7 +45,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p15
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p16
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep-opts b/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
index 2c243e7ec5e2..de933c8845c8 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:34 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 07:15:02 PM by AutoGen 5.18.16
# From the definitions ntpsweep-opts.def
# and the template file perlopt
@@ -43,7 +43,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p15
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p16
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
index 9f9fca1ddbf8..c1ff4d749f9f 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntpsweep 1ntpsweepman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:37 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:29 PM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
index 72550bcc3eb7..8e1376da62ae 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:36 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:28 PM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.html b/contrib/ntp/scripts/ntpsweep/ntpsweep.html
index 5a2cd11539aa..8615b6bd08e5 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.html
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ntpsweep User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,8 +41,7 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
@@ -59,34 +49,32 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<p>This document describes the use of the NTP Project&rsquo;s <code>ntpsweep</code> program.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntpsweep</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntpsweep</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
-<li><a name="stoc-Invoking-ntpsweep" href="#toc-Invoking-ntpsweep">1 Invoking ntpsweep</a></li>
+<li><a id="stoc-Invoking-ntpsweep" href="#toc-Invoking-ntpsweep">1 Invoking ntpsweep</a></li>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; ntpsweep Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; ntpsweep Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-Invocation" accesskey="2">ntpsweep Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpsweep
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-Invocation" accesskey="2">ntpsweep Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpsweep
</td></tr>
</table>
<hr>
-<a name="ntpsweep-Invocation"></a>
-<div class="header">
+<span id="ntpsweep-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Invoking-ntpsweep"></a>
-<h3 class="section">1 Invoking ntpsweep</h3>
-<a name="index-ntpsweep"></a>
-<a name="index-Print-various-informations-about-given-ntp-servers"></a>
+<span id="Invoking-ntpsweep"></span><h3 class="section">1 Invoking ntpsweep</h3>
+<span id="index-ntpsweep"></span>
+<span id="index-Print-various-informations-about-given-ntp-servers"></span>
<p><code>ntpsweep</code>
prints per host the NTP stratum level, the clock offset in seconds, the daemon
@@ -97,31 +85,29 @@ all peers.
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpsweep</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-usage" accesskey="1">ntpsweep usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpsweep help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-usage" accesskey="1">ntpsweep usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpsweep help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-host_002dlist" accesskey="2">ntpsweep host-list</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host-list option (-l)
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-host_002dlist" accesskey="2">ntpsweep host-list</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host-list option (-l)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-peers" accesskey="3">ntpsweep peers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-peers" accesskey="3">ntpsweep peers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-maxlevel" accesskey="4">ntpsweep maxlevel</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">maxlevel option (-m)
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-maxlevel" accesskey="4">ntpsweep maxlevel</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">maxlevel option (-m)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-strip" accesskey="5">ntpsweep strip</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">strip option (-s)
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-strip" accesskey="5">ntpsweep strip</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">strip option (-s)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-host" accesskey="6">ntpsweep host</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host option (-h)
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-host" accesskey="6">ntpsweep host</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host option (-h)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-exit-status" accesskey="7">ntpsweep exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#ntpsweep-exit-status" accesskey="7">ntpsweep exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
</table>
<hr>
-<a name="ntpsweep-usage"></a>
-<div class="header">
+<span id="ntpsweep-usage"></span><div class="header">
<p>
Next: <a href="#ntpsweep-host_002dlist" accesskey="n" rel="next">ntpsweep host-list</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
</div>
-<a name="ntpsweep-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.1 ntpsweep help/usage (<samp>--help</samp>)</h4>
-<a name="index-ntpsweep-help"></a>
+<span id="ntpsweep-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1 ntpsweep help/usage (<samp>--help</samp>)</h4>
+<span id="index-ntpsweep-help"></span>
<p>This is the automatically generated usage text for ntpsweep.
</p>
@@ -134,7 +120,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p15
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8p16
USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
-l, --host-list=str Host to execute actions on
@@ -150,14 +136,12 @@ hyphen and the flag character.
</pre></div>
<hr>
-<a name="ntpsweep-host_002dlist"></a>
-<div class="header">
+<span id="ntpsweep-host_002dlist"></span><div class="header">
<p>
Next: <a href="#ntpsweep-peers" accesskey="n" rel="next">ntpsweep peers</a>, Previous: <a href="#ntpsweep-usage" accesskey="p" rel="prev">ntpsweep usage</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
</div>
-<a name="host_002dlist-option-_0028_002dl_0029"></a>
-<h4 class="subsection">1.2 host-list option (-l)</h4>
-<a name="index-ntpsweep_002dhost_002dlist"></a>
+<span id="host_002dlist-option-_0028_002dl_0029"></span><h4 class="subsection">1.2 host-list option (-l)</h4>
+<span id="index-ntpsweep_002dhost_002dlist"></span>
<p>This is the &ldquo;host to execute actions on&rdquo; option.
This option takes a string argument.
@@ -170,52 +154,44 @@ This option takes a string argument.
<p>Use this option to specify the host on which this script operates.
May appear multiple times.
</p><hr>
-<a name="ntpsweep-peers"></a>
-<div class="header">
+<span id="ntpsweep-peers"></span><div class="header">
<p>
Next: <a href="#ntpsweep-maxlevel" accesskey="n" rel="next">ntpsweep maxlevel</a>, Previous: <a href="#ntpsweep-host_002dlist" accesskey="p" rel="prev">ntpsweep host-list</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
</div>
-<a name="peers-option-_0028_002dp_0029"></a>
-<h4 class="subsection">1.3 peers option (-p)</h4>
-<a name="index-ntpsweep_002dpeers"></a>
+<span id="peers-option-_0028_002dp_0029"></span><h4 class="subsection">1.3 peers option (-p)</h4>
+<span id="index-ntpsweep_002dpeers"></span>
<p>This is the &ldquo;recursively list all peers a host synchronizes to&rdquo; option.
This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p><hr>
-<a name="ntpsweep-maxlevel"></a>
-<div class="header">
+<span id="ntpsweep-maxlevel"></span><div class="header">
<p>
Next: <a href="#ntpsweep-strip" accesskey="n" rel="next">ntpsweep strip</a>, Previous: <a href="#ntpsweep-peers" accesskey="p" rel="prev">ntpsweep peers</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
</div>
-<a name="maxlevel-option-_0028_002dm_0029"></a>
-<h4 class="subsection">1.4 maxlevel option (-m)</h4>
-<a name="index-ntpsweep_002dmaxlevel"></a>
+<span id="maxlevel-option-_0028_002dm_0029"></span><h4 class="subsection">1.4 maxlevel option (-m)</h4>
+<span id="index-ntpsweep_002dmaxlevel"></span>
<p>This is the &ldquo;traverse peers up to this level (4 is a reasonable number)&rdquo; option.
This option takes a number argument.
This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p><hr>
-<a name="ntpsweep-strip"></a>
-<div class="header">
+<span id="ntpsweep-strip"></span><div class="header">
<p>
Next: <a href="#ntpsweep-host" accesskey="n" rel="next">ntpsweep host</a>, Previous: <a href="#ntpsweep-maxlevel" accesskey="p" rel="prev">ntpsweep maxlevel</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
</div>
-<a name="strip-option-_0028_002ds_0029"></a>
-<h4 class="subsection">1.5 strip option (-s)</h4>
-<a name="index-ntpsweep_002dstrip"></a>
+<span id="strip-option-_0028_002ds_0029"></span><h4 class="subsection">1.5 strip option (-s)</h4>
+<span id="index-ntpsweep_002dstrip"></span>
<p>This is the &ldquo;strip this string from hostnames&rdquo; option.
This option takes a string argument.
This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p><hr>
-<a name="ntpsweep-host"></a>
-<div class="header">
+<span id="ntpsweep-host"></span><div class="header">
<p>
Next: <a href="#ntpsweep-exit-status" accesskey="n" rel="next">ntpsweep exit status</a>, Previous: <a href="#ntpsweep-strip" accesskey="p" rel="prev">ntpsweep strip</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
</div>
-<a name="host-option-_0028_002dh_0029"></a>
-<h4 class="subsection">1.6 host option (-h)</h4>
-<a name="index-ntpsweep_002dhost"></a>
+<span id="host-option-_0028_002dh_0029"></span><h4 class="subsection">1.6 host option (-h)</h4>
+<span id="index-ntpsweep_002dhost"></span>
<p>This is the &ldquo;specify a single host&rdquo; option.
This option takes a string argument.
@@ -223,13 +199,11 @@ This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p>
<p><strong>NOTE</strong><strong>: THIS OPTION IS DEPRECATED</strong>
</p><hr>
-<a name="ntpsweep-exit-status"></a>
-<div class="header">
+<span id="ntpsweep-exit-status"></span><div class="header">
<p>
Previous: <a href="#ntpsweep-host" accesskey="p" rel="prev">ntpsweep host</a>, Up: <a href="#ntpsweep-Invocation" accesskey="u" rel="up">ntpsweep Invocation</a> &nbsp; </p>
</div>
-<a name="ntpsweep-exit-status-1"></a>
-<h4 class="subsection">1.7 ntpsweep exit status</h4>
+<span id="ntpsweep-exit-status-1"></span><h4 class="subsection">1.7 ntpsweep exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
index 9f9fca1ddbf8..c1ff4d749f9f 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntpsweep 1ntpsweepman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:37 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:29 PM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in b/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
index 72550bcc3eb7..8e1376da62ae 100644
--- a/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
+++ b/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPSWEEP 1ntpsweepmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:36 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:28 PM by AutoGen 5.18.16
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntptrace/Makefile.am b/contrib/ntp/scripts/ntptrace/Makefile.am
index 19300e8cb880..be9ef5726124 100644
--- a/contrib/ntp/scripts/ntptrace/Makefile.am
+++ b/contrib/ntp/scripts/ntptrace/Makefile.am
@@ -54,12 +54,12 @@ noinst_DATA = \
ntptrace: $(srcdir)/ntptrace-opts
$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) ntptrace-opts.def
### Nroff
$(srcdir)/ntptrace.1ntptraceman: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
$(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptraceman > $(srcdir)/ntptrace.man.in+
@@ -68,7 +68,7 @@ $(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/sc
### Mdoc
$(srcdir)/ntptrace.1ntptracemdoc: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
$(srcdir)/ntptrace.mdoc.in: $(srcdir)/ntptrace.1ntptracemdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptracemdoc > $(srcdir)/ntptrace.mdoc.in+
@@ -86,10 +86,10 @@ $(srcdir)/invoke-ntptrace.menu: $(srcdir)/invoke-ntptrace.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntptrace.texi: ntptrace-opts $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.menu $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntptrace.html ntptrace.texi || true )
diff --git a/contrib/ntp/scripts/ntptrace/Makefile.in b/contrib/ntp/scripts/ntptrace/Makefile.in
index 9d87e0e8a103..df8e287aa48d 100644
--- a/contrib/ntp/scripts/ntptrace/Makefile.in
+++ b/contrib/ntp/scripts/ntptrace/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -213,6 +213,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -222,6 +223,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -234,14 +237,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -452,6 +451,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -530,8 +530,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -768,8 +768,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -931,12 +933,12 @@ uninstall-man: uninstall-man1 uninstall-man8
ntptrace: $(srcdir)/ntptrace-opts
$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) ntptrace-opts.def
### Nroff
$(srcdir)/ntptrace.1ntptraceman: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
$(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptraceman > $(srcdir)/ntptrace.man.in+
@@ -945,7 +947,7 @@ $(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/sc
### Mdoc
$(srcdir)/ntptrace.1ntptracemdoc: $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
$(srcdir)/ntptrace.mdoc.in: $(srcdir)/ntptrace.1ntptracemdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptracemdoc > $(srcdir)/ntptrace.mdoc.in+
@@ -963,12 +965,12 @@ $(srcdir)/invoke-ntptrace.menu: $(srcdir)/invoke-ntptrace.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-ntptrace.texi: ntptrace-opts $(srcdir)/ntptrace-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.menu $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntptrace.html ntptrace.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi b/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
index 11b73e91e49f..0beb1d3f2223 100644
--- a/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
+++ b/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:39 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 07:15:04 PM by AutoGen 5.18.16
# From the definitions ntptrace-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -62,7 +62,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p15
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p16
USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace-opts b/contrib/ntp/scripts/ntptrace/ntptrace-opts
index 8ab36622e9ee..19b166d50013 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace-opts
+++ b/contrib/ntp/scripts/ntptrace/ntptrace-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:38 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 07:15:03 PM by AutoGen 5.18.16
# From the definitions ntptrace-opts.def
# and the template file perlopt
@@ -40,7 +40,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntptrace - Trace peers of an NTP server - Ver. 4.2.8p15
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8p16
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
index 56dc6b2189a2..12ea969f1c85 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace 1ntptraceman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntptrace 1ntptraceman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:41 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:31 PM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
index 62ae7b1078b1..90443c861517 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPTRACE 1ntptracemdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:38 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:15:03 PM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.html b/contrib/ntp/scripts/ntptrace/ntptrace.html
index 4b48abcf2470..a837ae498723 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.html
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ntptrace User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,44 +41,40 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="Simple-Network-Time-Protocol-User-Manual"></a>
-<h1 class="top">Simple Network Time Protocol User Manual</h1>
+<span id="Simple-Network-Time-Protocol-User-Manual"></span><h1 class="top">Simple Network Time Protocol User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>ntptrace</code> program.
-This document applies to version 4.2.8p15 of <code>ntptrace</code>.
+This document applies to version 4.2.8p16 of <code>ntptrace</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Invoking-ntptrace" href="#toc-Invoking-ntptrace">1 Invoking ntptrace</a></li>
+<li><a id="stoc-Invoking-ntptrace" href="#toc-Invoking-ntptrace">1 Invoking ntptrace</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; ntptrace Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; ntptrace Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-Invocation" accesskey="2">ntptrace Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntptrace
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-Invocation" accesskey="2">ntptrace Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntptrace
</td></tr>
</table>
<hr>
-<a name="ntptrace-Invocation"></a>
-<div class="header">
+<span id="ntptrace-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Invoking-ntptrace"></a>
-<h2 class="chapter">1 Invoking ntptrace</h2>
-<a name="index-ntptrace"></a>
-<a name="index-Trace-peers-of-an-NTP-server"></a>
+<span id="Invoking-ntptrace"></span><h2 class="chapter">1 Invoking ntptrace</h2>
+<span id="index-ntptrace"></span>
+<span id="index-Trace-peers-of-an-NTP-server"></span>
<p><code>ntptrace</code> is a perl script that uses the ntpq utility program to follow
the chain of NTP servers from a given host back to the primary time source. For
@@ -117,27 +104,25 @@ defined in RFC-1305.
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-usage" accesskey="1">ntptrace usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntptrace help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-usage" accesskey="1">ntptrace usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntptrace help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-numeric" accesskey="2">ntptrace numeric</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-numeric" accesskey="2">ntptrace numeric</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-max_002dhosts" accesskey="3">ntptrace max-hosts</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">max-hosts option (-m)
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-max_002dhosts" accesskey="3">ntptrace max-hosts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">max-hosts option (-m)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-host" accesskey="4">ntptrace host</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host option (-r)
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-host" accesskey="4">ntptrace host</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host option (-r)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-exit-status" accesskey="5">ntptrace exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-exit-status" accesskey="5">ntptrace exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
</table>
<hr>
-<a name="ntptrace-usage"></a>
-<div class="header">
+<span id="ntptrace-usage"></span><div class="header">
<p>
Next: <a href="#ntptrace-numeric" accesskey="n" rel="next">ntptrace numeric</a>, Up: <a href="#ntptrace-Invocation" accesskey="u" rel="up">ntptrace Invocation</a> &nbsp; </p>
</div>
-<a name="ntptrace-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h3 class="section">1.1 ntptrace help/usage (<samp>--help</samp>)</h3>
-<a name="index-ntptrace-help"></a>
+<span id="ntptrace-help_002fusage-_0028_002d_002dhelp_0029"></span><h3 class="section">1.1 ntptrace help/usage (<samp>--help</samp>)</h3>
+<span id="index-ntptrace-help"></span>
<p>This is the automatically generated usage text for ntptrace.
</p>
@@ -150,7 +135,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p15
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8p16
USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
@@ -164,63 +149,55 @@ hyphen and the flag character.
</pre></div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-numeric" accesskey="1">ntptrace numeric</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-numeric" accesskey="1">numeric option (-n)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-max_002dhosts" accesskey="2">ntptrace max-hosts</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-max_002dhosts" accesskey="2">max-hosts option (-m)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-host" accesskey="3">ntptrace host</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-host" accesskey="3">host option (-r)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntptrace-exit-status" accesskey="4">ntptrace exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntptrace-exit-status" accesskey="4">ntptrace exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="ntptrace-numeric"></a>
-<div class="header">
+<span id="ntptrace-numeric"></span><div class="header">
<p>
Next: <a href="#ntptrace-max_002dhosts" accesskey="n" rel="next">ntptrace max-hosts</a>, Previous: <a href="#ntptrace-usage" accesskey="p" rel="prev">ntptrace usage</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
</div>
-<a name="numeric-option-_0028_002dn_0029"></a>
-<h4 class="subsection">1.1.1 numeric option (-n)</h4>
-<a name="index-ntptrace_002dnumeric"></a>
+<span id="numeric-option-_0028_002dn_0029"></span><h4 class="subsection">1.1.1 numeric option (-n)</h4>
+<span id="index-ntptrace_002dnumeric"></span>
<p>This is the &ldquo;print ip addresses instead of hostnames&rdquo; option.
Output hosts as dotted-quad numeric format rather than converting to
the canonical host names.
</p><hr>
-<a name="ntptrace-max_002dhosts"></a>
-<div class="header">
+<span id="ntptrace-max_002dhosts"></span><div class="header">
<p>
Next: <a href="#ntptrace-host" accesskey="n" rel="next">ntptrace host</a>, Previous: <a href="#ntptrace-numeric" accesskey="p" rel="prev">ntptrace numeric</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
</div>
-<a name="max_002dhosts-option-_0028_002dm_0029"></a>
-<h4 class="subsection">1.1.2 max-hosts option (-m)</h4>
-<a name="index-ntptrace_002dmax_002dhosts"></a>
+<span id="max_002dhosts-option-_0028_002dm_0029"></span><h4 class="subsection">1.1.2 max-hosts option (-m)</h4>
+<span id="index-ntptrace_002dmax_002dhosts"></span>
<p>This is the &ldquo;maximum number of peers to trace&rdquo; option.
This option takes a number argument.
This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p><hr>
-<a name="ntptrace-host"></a>
-<div class="header">
+<span id="ntptrace-host"></span><div class="header">
<p>
Next: <a href="#ntptrace-exit-status" accesskey="n" rel="next">ntptrace exit status</a>, Previous: <a href="#ntptrace-max_002dhosts" accesskey="p" rel="prev">ntptrace max-hosts</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
</div>
-<a name="host-option-_0028_002dr_0029"></a>
-<h4 class="subsection">1.1.3 host option (-r)</h4>
-<a name="index-ntptrace_002dhost"></a>
+<span id="host-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.3 host option (-r)</h4>
+<span id="index-ntptrace_002dhost"></span>
<p>This is the &ldquo;single remote host&rdquo; option.
This option takes a string argument.
This option has no &lsquo;<samp>doc</samp>&rsquo; documentation.
</p><hr>
-<a name="ntptrace-exit-status"></a>
-<div class="header">
+<span id="ntptrace-exit-status"></span><div class="header">
<p>
Previous: <a href="#ntptrace-host" accesskey="p" rel="prev">ntptrace host</a>, Up: <a href="#ntptrace-usage" accesskey="u" rel="up">ntptrace usage</a> &nbsp; </p>
</div>
-<a name="ntptrace-exit-status-1"></a>
-<h4 class="subsection">1.1.4 ntptrace exit status</h4>
+<span id="ntptrace-exit-status-1"></span><h4 class="subsection">1.1.4 ntptrace exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.man.in b/contrib/ntp/scripts/ntptrace/ntptrace.man.in
index 3686ffd61ff2..a87d865a4b72 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.man.in
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace @NTPTRACE_MS@ "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntptrace @NTPTRACE_MS@ "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:41 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:31 PM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in b/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
index 47bac3124f41..125b951187c2 100644
--- a/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
+++ b/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTPTRACE @NTPTRACE_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:38 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:15:03 PM by AutoGen 5.18.16
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/plot_summary-opts b/contrib/ntp/scripts/plot_summary-opts
index 4f5f5755bf43..e451204d66b9 100644
--- a/contrib/ntp/scripts/plot_summary-opts
+++ b/contrib/ntp/scripts/plot_summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:46 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 07:15:08 PM by AutoGen 5.18.16
# From the definitions plot_summary-opts.def
# and the template file perlopt
@@ -46,7 +46,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-plot_summary - plot statistics generated by summary script - Ver. 4.2.8p15
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8p16
USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Where the summary files are
diff --git a/contrib/ntp/scripts/plot_summary.1plot_summaryman b/contrib/ntp/scripts/plot_summary.1plot_summaryman
index 366b14d88d6b..26a2f8dfc523 100644
--- a/contrib/ntp/scripts/plot_summary.1plot_summaryman
+++ b/contrib/ntp/scripts/plot_summary.1plot_summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH plot_summary 1plot_summaryman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:47 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:37 PM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/plot_summary.1plot_summarymdoc b/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
index 144b95a839cd..1fb81452eb34 100644
--- a/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
+++ b/contrib/ntp/scripts/plot_summary.1plot_summarymdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:48 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:39 PM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/plot_summary.html b/contrib/ntp/scripts/plot_summary.html
index d1a6b76e1fc3..c6ac597463a9 100644
--- a/contrib/ntp/scripts/plot_summary.html
+++ b/contrib/ntp/scripts/plot_summary.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Plot_summary User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,75 +41,69 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="Plot_005fsummary-User-Manual"></a>
-<h1 class="top">Plot_summary User Manual</h1>
+<span id="Plot_005fsummary-User-Manual"></span><h1 class="top">Plot_summary User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>plot_summary</code> program.
-This document applies to version 4.2.8p15 of <code>plot_summary</code>.
+This document applies to version 4.2.8p16 of <code>plot_summary</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Invoking-plot_005fsummary" href="#toc-Invoking-plot_005fsummary">1 Invoking plot_summary</a></li>
+<li><a id="stoc-Invoking-plot_005fsummary" href="#toc-Invoking-plot_005fsummary">1 Invoking plot_summary</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; plot_summary Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; plot_summary Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-Invocation" accesskey="2">plot_summary Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking plot_summary
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-Invocation" accesskey="2">plot_summary Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking plot_summary
</td></tr>
</table>
<hr>
-<a name="plot_005fsummary-Invocation"></a>
-<div class="header">
+<span id="plot_005fsummary-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Invoking-plot_005fsummary"></a>
-<h2 class="chapter">1 Invoking plot_summary</h2>
-<a name="index-plot_005fsummary"></a>
-<a name="index-plot-statistics-generated-by-summary-script"></a>
+<span id="Invoking-plot_005fsummary"></span><h2 class="chapter">1 Invoking plot_summary</h2>
+<span id="index-plot_005fsummary"></span>
+<span id="index-plot-statistics-generated-by-summary-script"></span>
<p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>plot_summary</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-usage" accesskey="1">plot_summary usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">plot_summary help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-usage" accesskey="1">plot_summary usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">plot_summary help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-directory" accesskey="2">plot_summary directory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">directory option
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-directory" accesskey="2">plot_summary directory</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">directory option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-identifier" accesskey="3">plot_summary identifier</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">identifier option
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-identifier" accesskey="3">plot_summary identifier</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">identifier option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-peer" accesskey="4">plot_summary peer</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peer option
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-peer" accesskey="4">plot_summary peer</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peer option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-plot_002dterm" accesskey="5">plot_summary plot-term</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">plot-term option
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-plot_002dterm" accesskey="5">plot_summary plot-term</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">plot-term option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-output_002dfile" accesskey="6">plot_summary output-file</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">output-file option
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-output_002dfile" accesskey="6">plot_summary output-file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">output-file option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-exit-status" accesskey="7">plot_summary exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-exit-status" accesskey="7">plot_summary exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
</table>
<hr>
-<a name="plot_005fsummary-usage"></a>
-<div class="header">
+<span id="plot_005fsummary-usage"></span><div class="header">
<p>
Next: <a href="#plot_005fsummary-directory" accesskey="n" rel="next">plot_summary directory</a>, Up: <a href="#plot_005fsummary-Invocation" accesskey="u" rel="up">plot_summary Invocation</a> &nbsp; </p>
</div>
-<a name="plot_005fsummary-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h3 class="section">1.1 plot_summary help/usage (<samp>--help</samp>)</h3>
-<a name="index-plot_005fsummary-help"></a>
+<span id="plot_005fsummary-help_002fusage-_0028_002d_002dhelp_0029"></span><h3 class="section">1.1 plot_summary help/usage (<samp>--help</samp>)</h3>
+<span id="index-plot_005fsummary-help"></span>
<p>This is the automatically generated usage text for plot_summary.
</p>
@@ -131,7 +116,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p15
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8p16
USAGE: plot_summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Where the summary files are
@@ -150,57 +135,51 @@ hyphen and the flag character.
</pre></div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-directory" accesskey="1">plot_summary directory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-directory" accesskey="1">directory option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-identifier" accesskey="2">plot_summary identifier</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-identifier" accesskey="2">identifier option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-peer" accesskey="3">plot_summary peer</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-peer" accesskey="3">peer option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-plot_002dterm" accesskey="4">plot_summary plot-term</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-plot_002dterm" accesskey="4">plot-term option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-output_002dfile" accesskey="5">plot_summary output-file</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-output_002dfile" accesskey="5">output-file option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-exit-status" accesskey="6">plot_summary exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#plot_005fsummary-exit-status" accesskey="6">plot_summary exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="plot_005fsummary-directory"></a>
-<div class="header">
+<span id="plot_005fsummary-directory"></span><div class="header">
<p>
Next: <a href="#plot_005fsummary-identifier" accesskey="n" rel="next">plot_summary identifier</a>, Previous: <a href="#plot_005fsummary-usage" accesskey="p" rel="prev">plot_summary usage</a>, Up: <a href="#plot_005fsummary-usage" accesskey="u" rel="up">plot_summary usage</a> &nbsp; </p>
</div>
-<a name="directory-option"></a>
-<h4 class="subsection">1.1.1 directory option</h4>
-<a name="index-plot_005fsummary_002ddirectory"></a>
+<span id="directory-option"></span><h4 class="subsection">1.1.1 directory option</h4>
+<span id="index-plot_005fsummary_002ddirectory"></span>
<p>This is the &ldquo;where the summary files are&rdquo; option.
This option takes a string argument.
The directory where the <code>plot_summary</code> will search for the
*_summary files generated by <code>summary</code> script.
</p><hr>
-<a name="plot_005fsummary-identifier"></a>
-<div class="header">
+<span id="plot_005fsummary-identifier"></span><div class="header">
<p>
Next: <a href="#plot_005fsummary-peer" accesskey="n" rel="next">plot_summary peer</a>, Previous: <a href="#plot_005fsummary-directory" accesskey="p" rel="prev">plot_summary directory</a>, Up: <a href="#plot_005fsummary-usage" accesskey="u" rel="up">plot_summary usage</a> &nbsp; </p>
</div>
-<a name="identifier-option"></a>
-<h4 class="subsection">1.1.2 identifier option</h4>
-<a name="index-plot_005fsummary_002didentifier"></a>
+<span id="identifier-option"></span><h4 class="subsection">1.1.2 identifier option</h4>
+<span id="index-plot_005fsummary_002didentifier"></span>
<p>This is the &ldquo;origin of the data&rdquo; option.
This option takes a string argument.
Where does the plotted data come from, default to string &quot;host&quot; plus
current hostname
</p><hr>
-<a name="plot_005fsummary-peer"></a>
-<div class="header">
+<span id="plot_005fsummary-peer"></span><div class="header">
<p>
Next: <a href="#plot_005fsummary-plot_002dterm" accesskey="n" rel="next">plot_summary plot-term</a>, Previous: <a href="#plot_005fsummary-identifier" accesskey="p" rel="prev">plot_summary identifier</a>, Up: <a href="#plot_005fsummary-usage" accesskey="u" rel="up">plot_summary usage</a> &nbsp; </p>
</div>
-<a name="peer-option"></a>
-<h4 class="subsection">1.1.3 peer option</h4>
-<a name="index-plot_005fsummary_002dpeer"></a>
+<span id="peer-option"></span><h4 class="subsection">1.1.3 peer option</h4>
+<span id="index-plot_005fsummary_002dpeer"></span>
<p>This is the &ldquo;peers to generate plots for&rdquo; option.
This option takes a string argument.
@@ -213,14 +192,12 @@ This option takes a string argument.
<p>By default the peer_summary plots are not generated. Use this option to
specify list of peers if you want to generate plots for them.
</p><hr>
-<a name="plot_005fsummary-plot_002dterm"></a>
-<div class="header">
+<span id="plot_005fsummary-plot_002dterm"></span><div class="header">
<p>
Next: <a href="#plot_005fsummary-output_002dfile" accesskey="n" rel="next">plot_summary output-file</a>, Previous: <a href="#plot_005fsummary-peer" accesskey="p" rel="prev">plot_summary peer</a>, Up: <a href="#plot_005fsummary-usage" accesskey="u" rel="up">plot_summary usage</a> &nbsp; </p>
</div>
-<a name="plot_002dterm-option"></a>
-<h4 class="subsection">1.1.4 plot-term option</h4>
-<a name="index-plot_005fsummary_002dplot_002dterm"></a>
+<span id="plot_002dterm-option"></span><h4 class="subsection">1.1.4 plot-term option</h4>
+<span id="index-plot_005fsummary_002dplot_002dterm"></span>
<p>This is the &ldquo;gnuplot terminal&rdquo; option.
This option takes a string argument.
@@ -229,26 +206,22 @@ This option takes a string argument.
<code>dumb</code> is it&rsquo;s not&rsquo;. See output from (gnuplot -e &quot;set
terminal&quot;) for the list of available options.
</p><hr>
-<a name="plot_005fsummary-output_002dfile"></a>
-<div class="header">
+<span id="plot_005fsummary-output_002dfile"></span><div class="header">
<p>
Next: <a href="#plot_005fsummary-exit-status" accesskey="n" rel="next">plot_summary exit status</a>, Previous: <a href="#plot_005fsummary-plot_002dterm" accesskey="p" rel="prev">plot_summary plot-term</a>, Up: <a href="#plot_005fsummary-usage" accesskey="u" rel="up">plot_summary usage</a> &nbsp; </p>
</div>
-<a name="output_002dfile-option"></a>
-<h4 class="subsection">1.1.5 output-file option</h4>
-<a name="index-plot_005fsummary_002doutput_002dfile"></a>
+<span id="output_002dfile-option"></span><h4 class="subsection">1.1.5 output-file option</h4>
+<span id="index-plot_005fsummary_002doutput_002dfile"></span>
<p>This is the &ldquo;output file&rdquo; option.
This option takes a str argument.
Output file for <code>gnuplot</code>, default to stdout.
</p><hr>
-<a name="plot_005fsummary-exit-status"></a>
-<div class="header">
+<span id="plot_005fsummary-exit-status"></span><div class="header">
<p>
Previous: <a href="#plot_005fsummary-output_002dfile" accesskey="p" rel="prev">plot_summary output-file</a>, Up: <a href="#plot_005fsummary-usage" accesskey="u" rel="up">plot_summary usage</a> &nbsp; </p>
</div>
-<a name="plot_005fsummary-exit-status-1"></a>
-<h4 class="subsection">1.1.6 plot_summary exit status</h4>
+<span id="plot_005fsummary-exit-status-1"></span><h4 class="subsection">1.1.6 plot_summary exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
diff --git a/contrib/ntp/scripts/plot_summary.man.in b/contrib/ntp/scripts/plot_summary.man.in
index 366b14d88d6b..26a2f8dfc523 100644
--- a/contrib/ntp/scripts/plot_summary.man.in
+++ b/contrib/ntp/scripts/plot_summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH plot_summary 1plot_summaryman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:47 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:37 PM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/plot_summary.mdoc.in b/contrib/ntp/scripts/plot_summary.mdoc.in
index 144b95a839cd..1fb81452eb34 100644
--- a/contrib/ntp/scripts/plot_summary.mdoc.in
+++ b/contrib/ntp/scripts/plot_summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:48 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:39 PM by AutoGen 5.18.16
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/summary-opts b/contrib/ntp/scripts/summary-opts
index 0fc894eb209e..f5d962227e6d 100644
--- a/contrib/ntp/scripts/summary-opts
+++ b/contrib/ntp/scripts/summary-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (summary-opts)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:46 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 07:15:08 PM by AutoGen 5.18.16
# From the definitions summary-opts.def
# and the template file perlopt
@@ -44,7 +44,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-summary - compute various stastics from NTP stat files - Ver. 4.2.8p15
+summary - compute various stastics from NTP stat files - Ver. 4.2.8p16
USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Directory containing stat files
diff --git a/contrib/ntp/scripts/summary.1summaryman b/contrib/ntp/scripts/summary.1summaryman
index d91e6f9015f0..bc68596f2e45 100644
--- a/contrib/ntp/scripts/summary.1summaryman
+++ b/contrib/ntp/scripts/summary.1summaryman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH summary 1summaryman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:51 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:42 PM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/summary.1summarymdoc b/contrib/ntp/scripts/summary.1summarymdoc
index 4759a2abbe78..9817ab6dc8f0 100644
--- a/contrib/ntp/scripts/summary.1summarymdoc
+++ b/contrib/ntp/scripts/summary.1summarymdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:52 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:43 PM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/summary.html b/contrib/ntp/scripts/summary.html
index 455d711628e3..6d77556cdb1d 100644
--- a/contrib/ntp/scripts/summary.html
+++ b/contrib/ntp/scripts/summary.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Summary User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,44 +41,40 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="Summary-User-Manual"></a>
-<h1 class="top">Summary User Manual</h1>
+<span id="Summary-User-Manual"></span><h1 class="top">Summary User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>summary</code> program.
-This document applies to version 4.2.8p15 of <code>summary</code>.
+This document applies to version 4.2.8p16 of <code>summary</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Invoking-summary" href="#toc-Invoking-summary">1 Invoking summary</a></li>
+<li><a id="stoc-Invoking-summary" href="#toc-Invoking-summary">1 Invoking summary</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; summary Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; summary Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-Invocation" accesskey="2">summary Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking summary
+<tr><td align="left" valign="top">&bull; <a href="#summary-Invocation" accesskey="2">summary Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking summary
</td></tr>
</table>
<hr>
-<a name="summary-Invocation"></a>
-<div class="header">
+<span id="summary-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Invoking-summary"></a>
-<h2 class="chapter">1 Invoking summary</h2>
-<a name="index-summary"></a>
-<a name="index-compute-various-stastics-from-NTP-stat-files"></a>
+<span id="Invoking-summary"></span><h2 class="chapter">1 Invoking summary</h2>
+<span id="index-summary"></span>
+<span id="index-compute-various-stastics-from-NTP-stat-files"></span>
@@ -96,29 +83,27 @@ Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>summary</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#summary-usage" accesskey="1">summary usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">summary help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#summary-usage" accesskey="1">summary usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">summary help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-directory" accesskey="2">summary directory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">directory option
+<tr><td align="left" valign="top">&bull; <a href="#summary-directory" accesskey="2">summary directory</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">directory option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-end_002ddate" accesskey="3">summary end-date</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">end-date option
+<tr><td align="left" valign="top">&bull; <a href="#summary-end_002ddate" accesskey="3">summary end-date</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">end-date option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-output_002ddirectory" accesskey="4">summary output-directory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">output-directory option
+<tr><td align="left" valign="top">&bull; <a href="#summary-output_002ddirectory" accesskey="4">summary output-directory</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">output-directory option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-start_002ddate" accesskey="5">summary start-date</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">start-date option
+<tr><td align="left" valign="top">&bull; <a href="#summary-start_002ddate" accesskey="5">summary start-date</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">start-date option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-exit-status" accesskey="6">summary exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#summary-exit-status" accesskey="6">summary exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
</table>
<hr>
-<a name="summary-usage"></a>
-<div class="header">
+<span id="summary-usage"></span><div class="header">
<p>
Next: <a href="#summary-directory" accesskey="n" rel="next">summary directory</a>, Up: <a href="#summary-Invocation" accesskey="u" rel="up">summary Invocation</a> &nbsp; </p>
</div>
-<a name="summary-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h3 class="section">1.1 summary help/usage (<samp>--help</samp>)</h3>
-<a name="index-summary-help"></a>
+<span id="summary-help_002fusage-_0028_002d_002dhelp_0029"></span><h3 class="section">1.1 summary help/usage (<samp>--help</samp>)</h3>
+<span id="index-summary-help"></span>
<p>This is the automatically generated usage text for summary.
</p>
@@ -131,7 +116,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p15
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8p16
USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
--directory=str Directory containing stat files
@@ -148,41 +133,37 @@ hyphen and the flag character.
</pre></div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#summary-directory" accesskey="1">summary directory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#summary-directory" accesskey="1">directory option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-end_002ddate" accesskey="2">summary end-date</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#summary-end_002ddate" accesskey="2">end-date option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-output_002ddirectory" accesskey="3">summary output-directory</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#summary-output_002ddirectory" accesskey="3">output-directory option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-start_002ddate" accesskey="4">summary start-date</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#summary-start_002ddate" accesskey="4">start-date option</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#summary-exit-status" accesskey="5">summary exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#summary-exit-status" accesskey="5">summary exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="summary-directory"></a>
-<div class="header">
+<span id="summary-directory"></span><div class="header">
<p>
Next: <a href="#summary-end_002ddate" accesskey="n" rel="next">summary end-date</a>, Previous: <a href="#summary-usage" accesskey="p" rel="prev">summary usage</a>, Up: <a href="#summary-usage" accesskey="u" rel="up">summary usage</a> &nbsp; </p>
</div>
-<a name="directory-option"></a>
-<h4 class="subsection">1.1.1 directory option</h4>
-<a name="index-summary_002ddirectory"></a>
+<span id="directory-option"></span><h4 class="subsection">1.1.1 directory option</h4>
+<span id="index-summary_002ddirectory"></span>
<p>This is the &ldquo;directory containing stat files&rdquo; option.
This option takes a string argument.
The directory where <code>ntpd</code> will search for .stat files generated
by <code>ntpd</code>.
</p><hr>
-<a name="summary-end_002ddate"></a>
-<div class="header">
+<span id="summary-end_002ddate"></span><div class="header">
<p>
Next: <a href="#summary-output_002ddirectory" accesskey="n" rel="next">summary output-directory</a>, Previous: <a href="#summary-directory" accesskey="p" rel="prev">summary directory</a>, Up: <a href="#summary-usage" accesskey="u" rel="up">summary usage</a> &nbsp; </p>
</div>
-<a name="end_002ddate-option"></a>
-<h4 class="subsection">1.1.2 end-date option</h4>
-<a name="index-summary_002dend_002ddate"></a>
+<span id="end_002ddate-option"></span><h4 class="subsection">1.1.2 end-date option</h4>
+<span id="index-summary_002dend_002ddate"></span>
<p>This is the &ldquo;end date&rdquo; option.
This option takes a number argument.
@@ -190,40 +171,34 @@ This option takes a number argument.
option. Defaults to today minus one day (Use <code>date -u +%Y%m%d</code>)
to get the timestamp.
</p><hr>
-<a name="summary-output_002ddirectory"></a>
-<div class="header">
+<span id="summary-output_002ddirectory"></span><div class="header">
<p>
Next: <a href="#summary-start_002ddate" accesskey="n" rel="next">summary start-date</a>, Previous: <a href="#summary-end_002ddate" accesskey="p" rel="prev">summary end-date</a>, Up: <a href="#summary-usage" accesskey="u" rel="up">summary usage</a> &nbsp; </p>
</div>
-<a name="output_002ddirectory-option"></a>
-<h4 class="subsection">1.1.3 output-directory option</h4>
-<a name="index-summary_002doutput_002ddirectory"></a>
+<span id="output_002ddirectory-option"></span><h4 class="subsection">1.1.3 output-directory option</h4>
+<span id="index-summary_002doutput_002ddirectory"></span>
<p>This is the &ldquo;output directory&rdquo; option.
This option takes a str argument.
The output directory <code>summary</code> will write all output files to.
</p><hr>
-<a name="summary-start_002ddate"></a>
-<div class="header">
+<span id="summary-start_002ddate"></span><div class="header">
<p>
Next: <a href="#summary-exit-status" accesskey="n" rel="next">summary exit status</a>, Previous: <a href="#summary-output_002ddirectory" accesskey="p" rel="prev">summary output-directory</a>, Up: <a href="#summary-usage" accesskey="u" rel="up">summary usage</a> &nbsp; </p>
</div>
-<a name="start_002ddate-option"></a>
-<h4 class="subsection">1.1.4 start-date option</h4>
-<a name="index-summary_002dstart_002ddate"></a>
+<span id="start_002ddate-option"></span><h4 class="subsection">1.1.4 start-date option</h4>
+<span id="index-summary_002dstart_002ddate"></span>
<p>This is the &ldquo;start date&rdquo; option.
This option takes a num argument.
Process all files with the date suffix more or equal to value of
this option. Defaults to 197000101.
</p><hr>
-<a name="summary-exit-status"></a>
-<div class="header">
+<span id="summary-exit-status"></span><div class="header">
<p>
Previous: <a href="#summary-start_002ddate" accesskey="p" rel="prev">summary start-date</a>, Up: <a href="#summary-usage" accesskey="u" rel="up">summary usage</a> &nbsp; </p>
</div>
-<a name="summary-exit-status-1"></a>
-<h4 class="subsection">1.1.5 summary exit status</h4>
+<span id="summary-exit-status-1"></span><h4 class="subsection">1.1.5 summary exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
diff --git a/contrib/ntp/scripts/summary.man.in b/contrib/ntp/scripts/summary.man.in
index d91e6f9015f0..bc68596f2e45 100644
--- a/contrib/ntp/scripts/summary.man.in
+++ b/contrib/ntp/scripts/summary.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH summary 1summaryman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:51 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:42 PM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/summary.mdoc.in b/contrib/ntp/scripts/summary.mdoc.in
index 4759a2abbe78..9817ab6dc8f0 100644
--- a/contrib/ntp/scripts/summary.mdoc.in
+++ b/contrib/ntp/scripts/summary.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt SUMMARY 1summarymdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:52 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:43 PM by AutoGen 5.18.16
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/update-leap/Makefile.am b/contrib/ntp/scripts/update-leap/Makefile.am
index 9b5829a0b33c..8c21a75bd87c 100644
--- a/contrib/ntp/scripts/update-leap/Makefile.am
+++ b/contrib/ntp/scripts/update-leap/Makefile.am
@@ -57,12 +57,12 @@ $(srcdir)/update-leap: $(srcdir)/update-leap-opts
@: do-nothing action to avoid default SCCS get
$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list)
- $(run_ag) update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) update-leap-opts.def
### Man
$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+
@@ -71,7 +71,7 @@ $(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir
### Mdoc
$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+
@@ -89,10 +89,10 @@ $(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/update-leap.html: $(srcdir)/invoke-update-leap.texi $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.texi || true )
diff --git a/contrib/ntp/scripts/update-leap/Makefile.in b/contrib/ntp/scripts/update-leap/Makefile.in
index 3302eee29609..19f20fe16902 100644
--- a/contrib/ntp/scripts/update-leap/Makefile.in
+++ b/contrib/ntp/scripts/update-leap/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -109,7 +109,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -129,6 +128,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -214,6 +214,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -223,6 +224,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -235,14 +238,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -453,6 +452,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -532,8 +532,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -770,8 +770,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -934,12 +936,12 @@ $(srcdir)/update-leap: $(srcdir)/update-leap-opts
@: do-nothing action to avoid default SCCS get
$(srcdir)/update-leap-opts: update-leap-opts.def $(std_def_list)
- $(run_ag) update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) update-leap-opts.def
### Man
$(srcdir)/update-leap.1update-leapman: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1update-leapman -Tagman-cmd.tpl update-leap-opts.def
$(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapman > $(srcdir)/update-leap.man.in+
@@ -948,7 +950,7 @@ $(srcdir)/update-leap.man.in: $(srcdir)/update-leap.1update-leapman $(top_srcdir
### Mdoc
$(srcdir)/update-leap.1update-leapmdoc: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1update-leapmdoc -Tagmdoc-cmd.tpl update-leap-opts.def
$(srcdir)/update-leap.mdoc.in: $(srcdir)/update-leap.1update-leapmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/update-leap.1update-leapmdoc > $(srcdir)/update-leap.mdoc.in+
@@ -966,12 +968,12 @@ $(srcdir)/invoke-update-leap.menu: $(srcdir)/invoke-update-leap.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-update-leap.texi: $(srcdir)/update-leap-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section update-leap-opts.def
$(top_srcdir)/scripts/build/check--help $@
### HTML
-$(srcdir)/update-leap.html: $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/update-leap.html: $(srcdir)/invoke-update-leap.texi $(srcdir)/update-leap.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o update-leap.html update-leap.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/ntp/scripts/update-leap/invoke-update-leap.texi b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
index 5b74cbf35ade..d4d92d951da3 100644
--- a/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
+++ b/contrib/ntp/scripts/update-leap/invoke-update-leap.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:43 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:04:32 PM by AutoGen 5.18.16
# From the definitions update-leap-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
diff --git a/contrib/ntp/scripts/update-leap/update-leap-opts b/contrib/ntp/scripts/update-leap/update-leap-opts
index b0dae49eef44..a29dd1155c48 100644
--- a/contrib/ntp/scripts/update-leap/update-leap-opts
+++ b/contrib/ntp/scripts/update-leap/update-leap-opts
@@ -1,6 +1,6 @@
# EDIT THIS FILE WITH CAUTION (update-leap-opts)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:46 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:04:36 PM by AutoGen 5.18.16
# From the definitions update-leap-opts.def
# and the template file perlopt
@@ -46,7 +46,7 @@ sub processOptions {
'help|?', 'more-help'));
$usage = <<'USAGE';
-update-leap - leap-seconds file manager/updater - Ver. 4.2.8p15
+update-leap - leap-seconds file manager/updater - Ver. 4.2.8p16
USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-s, --source-url=str The URL of the master copy of the leapseconds file
diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapman b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
index cebca7f66452..7feccfafcbe8 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
+++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH update-leap 1update-leapman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:45 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:34 PM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
index ab83b9ea98d1..ba971fe17a0a 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
+++ b/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:42 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:15:06 PM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.html b/contrib/ntp/scripts/update-leap/update-leap.html
index b8e12c1f8f96..8ebc3294a313 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.html
+++ b/contrib/ntp/scripts/update-leap/update-leap.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>update-leap User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,8 +41,7 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
@@ -59,34 +49,32 @@ Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href
<p>This document describes the use of the NTP Project&rsquo;s <code>update-leap</code> program.
</p>
-<p>This document applies to version 4.2.8p15 of <code>update-leap</code>.
+<p>This document applies to version 4.2.8p16 of <code>update-leap</code>.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
-<li><a name="stoc-Invoking-update_002dleap" href="#toc-Invoking-update_002dleap">1 Invoking update-leap</a></li>
+<li><a id="stoc-Invoking-update_002dleap" href="#toc-Invoking-update_002dleap">1 Invoking update-leap</a></li>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; update-leap Description:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; update-leap Description</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-Invocation" accesskey="2">update-leap Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking update-leap
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-Invocation" accesskey="2">update-leap Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking update-leap
</td></tr>
</table>
<hr>
-<a name="update_002dleap-Invocation"></a>
-<div class="header">
+<span id="update_002dleap-Invocation"></span><div class="header">
<p>
Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Invoking-update_002dleap"></a>
-<h3 class="section">1 Invoking update-leap</h3>
-<a name="index-update_002dleap"></a>
-<a name="index-leap_002dseconds-file-manager_002fupdater"></a>
+<span id="Invoking-update_002dleap"></span><h3 class="section">1 Invoking update-leap</h3>
+<span id="index-update_002dleap"></span>
+<span id="index-leap_002dseconds-file-manager_002fupdater"></span>
@@ -119,37 +107,35 @@ This script depends on$REQUIREDCMDS
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-usage" accesskey="1">update-leap usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">update-leap help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-usage" accesskey="1">update-leap usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">update-leap help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-source_002durl" accesskey="2">update-leap source-url</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">source-url option (-s)
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-source_002durl" accesskey="2">update-leap source-url</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">source-url option (-s)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-ipv4" accesskey="3">update-leap ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-ipv4" accesskey="3">update-leap ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-destination" accesskey="4">update-leap destination</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">destination option (-d)
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-destination" accesskey="4">update-leap destination</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">destination option (-d)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-expiration" accesskey="5">update-leap expiration</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">expiration option (-e)
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-expiration" accesskey="5">update-leap expiration</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">expiration option (-e)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-ntp_002dconf_002dfile" accesskey="6">update-leap ntp-conf-file</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntp-conf-file option (-f)
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-ntp_002dconf_002dfile" accesskey="6">update-leap ntp-conf-file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntp-conf-file option (-f)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-force_002dupdate" accesskey="7">update-leap force-update</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">force-update option (-F)
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-force_002dupdate" accesskey="7">update-leap force-update</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">force-update option (-F)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-exit-status" accesskey="8">update-leap exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-exit-status" accesskey="8">update-leap exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-Usage" accesskey="9">update-leap Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-Usage" accesskey="9">update-leap Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-Authors">update-leap Authors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
+<tr><td align="left" valign="top">&bull; <a href="#update_002dleap-Authors">update-leap Authors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
</td></tr>
</table>
<hr>
-<a name="update_002dleap-usage"></a>
-<div class="header">
+<span id="update_002dleap-usage"></span><div class="header">
<p>
Next: <a href="#update_002dleap-source_002durl" accesskey="n" rel="next">update-leap source-url</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="update_002dleap-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.1 update-leap help/usage (<samp>--help</samp>)</h4>
-<a name="index-update_002dleap-help"></a>
+<span id="update_002dleap-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1 update-leap help/usage (<samp>--help</samp>)</h4>
+<span id="index-update_002dleap-help"></span>
<p>This is the automatically generated usage text for update-leap.
</p>
@@ -241,28 +227,24 @@ Version: 1.004
</pre></div>
<hr>
-<a name="update_002dleap-source_002durl"></a>
-<div class="header">
+<span id="update_002dleap-source_002durl"></span><div class="header">
<p>
Next: <a href="#update_002dleap-ipv4" accesskey="n" rel="next">update-leap ipv4</a>, Previous: <a href="#update_002dleap-usage" accesskey="p" rel="prev">update-leap usage</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="source_002durl-option-_0028_002ds_0029"></a>
-<h4 class="subsection">1.2 source-url option (-s)</h4>
-<a name="index-update_002dleap_002dsource_002durl"></a>
+<span id="source_002durl-option-_0028_002ds_0029"></span><h4 class="subsection">1.2 source-url option (-s)</h4>
+<span id="index-update_002dleap_002dsource_002durl"></span>
<p>This is the &ldquo;the url of the master copy of the leapseconds file&rdquo; option.
This option takes a string argument.
Specify the URL of the master copy to download
$LEAPSRC
</p><hr>
-<a name="update_002dleap-ipv4"></a>
-<div class="header">
+<span id="update_002dleap-ipv4"></span><div class="header">
<p>
Next: <a href="#update_002dleap-destination" accesskey="n" rel="next">update-leap destination</a>, Previous: <a href="#update_002dleap-source_002durl" accesskey="p" rel="prev">update-leap source-url</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="ipv4-option-_0028_002d4_0029"></a>
-<h4 class="subsection">1.3 ipv4 option (-4)</h4>
-<a name="index-update_002dleap_002dipv4"></a>
+<span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.3 ipv4 option (-4)</h4>
+<span id="index-update_002dleap_002dipv4"></span>
<p>This is the &ldquo;use only ipv4 addresses for dns name resolution&rdquo; option.
</p>
@@ -298,28 +280,24 @@ ipv6.
doc = &lt;&lt;- _EndOfDoc_
Prefer IPv4 or IPv6 (as specified) addresses, but use either.
</p><hr>
-<a name="update_002dleap-destination"></a>
-<div class="header">
+<span id="update_002dleap-destination"></span><div class="header">
<p>
Next: <a href="#update_002dleap-expiration" accesskey="n" rel="next">update-leap expiration</a>, Previous: <a href="#update_002dleap-ipv4" accesskey="p" rel="prev">update-leap ipv4</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="destination-option-_0028_002dd_0029"></a>
-<h4 class="subsection">1.4 destination option (-d)</h4>
-<a name="index-update_002dleap_002ddestination"></a>
+<span id="destination-option-_0028_002dd_0029"></span><h4 class="subsection">1.4 destination option (-d)</h4>
+<span id="index-update_002dleap_002ddestination"></span>
<p>This is the &ldquo;filename on the local system&rdquo; option.
This option takes a string argument <samp>float</samp>.
The name to use to store the leapfile on the local system.
$LEAPFILE
</p><hr>
-<a name="update_002dleap-expiration"></a>
-<div class="header">
+<span id="update_002dleap-expiration"></span><div class="header">
<p>
Next: <a href="#update_002dleap-ntp_002dconf_002dfile" accesskey="n" rel="next">update-leap ntp-conf-file</a>, Previous: <a href="#update_002dleap-destination" accesskey="p" rel="prev">update-leap destination</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="expiration-option-_0028_002de_0029"></a>
-<h4 class="subsection">1.5 expiration option (-e)</h4>
-<a name="index-update_002dleap_002dexpiration"></a>
+<span id="expiration-option-_0028_002de_0029"></span><h4 class="subsection">1.5 expiration option (-e)</h4>
+<span id="index-update_002dleap_002dexpiration"></span>
<p>This is the &ldquo;refresh the leapfile this long before it expires&rdquo; option.
This option takes a string argument.
@@ -328,14 +306,12 @@ Units are required, e.g. &quot;-e 60 days&quot; Note that larger values
imply more frequent refreshes.
&quot;$PREFETCH&quot;
</p><hr>
-<a name="update_002dleap-ntp_002dconf_002dfile"></a>
-<div class="header">
+<span id="update_002dleap-ntp_002dconf_002dfile"></span><div class="header">
<p>
Next: <a href="#update_002dleap-force_002dupdate" accesskey="n" rel="next">update-leap force-update</a>, Previous: <a href="#update_002dleap-expiration" accesskey="p" rel="prev">update-leap expiration</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dconf_002dfile-option-_0028_002df_0029"></a>
-<h4 class="subsection">1.6 ntp-conf-file option (-f)</h4>
-<a name="index-update_002dleap_002dntp_002dconf_002dfile"></a>
+<span id="ntp_002dconf_002dfile-option-_0028_002df_0029"></span><h4 class="subsection">1.6 ntp-conf-file option (-f)</h4>
+<span id="index-update_002dleap_002dntp_002dconf_002dfile"></span>
<p>This is the &ldquo;location of the ntp.conf file&rdquo; option.
This option takes a string argument.
@@ -343,25 +319,21 @@ Specify location of ntp.conf (used to make sure leapfile directive is
present and to default leapfile)
/etc/ntp.conf
</p><hr>
-<a name="update_002dleap-force_002dupdate"></a>
-<div class="header">
+<span id="update_002dleap-force_002dupdate"></span><div class="header">
<p>
Next: <a href="#update_002dleap-exit-status" accesskey="n" rel="next">update-leap exit status</a>, Previous: <a href="#update_002dleap-ntp_002dconf_002dfile" accesskey="p" rel="prev">update-leap ntp-conf-file</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="force_002dupdate-option-_0028_002dF_0029"></a>
-<h4 class="subsection">1.7 force-update option (-F)</h4>
-<a name="index-update_002dleap_002dforce_002dupdate"></a>
+<span id="force_002dupdate-option-_0028_002dF_0029"></span><h4 class="subsection">1.7 force-update option (-F)</h4>
+<span id="index-update_002dleap_002dforce_002dupdate"></span>
<p>This is the &ldquo;force update of the leapfile&rdquo; option.
Force update even if current file is OK and not close to expiring.
</p><hr>
-<a name="update_002dleap-exit-status"></a>
-<div class="header">
+<span id="update_002dleap-exit-status"></span><div class="header">
<p>
Next: <a href="#update_002dleap-Usage" accesskey="n" rel="next">update-leap Usage</a>, Previous: <a href="#update_002dleap-force_002dupdate" accesskey="p" rel="prev">update-leap force-update</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="update_002dleap-exit-status-1"></a>
-<h4 class="subsection">1.8 update-leap exit status</h4>
+<span id="update_002dleap-exit-status-1"></span><h4 class="subsection">1.8 update-leap exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
@@ -373,21 +345,17 @@ Next: <a href="#update_002dleap-Usage" accesskey="n" rel="next">update-leap Usag
</p></dd>
</dl>
<hr>
-<a name="update_002dleap-Usage"></a>
-<div class="header">
+<span id="update_002dleap-Usage"></span><div class="header">
<p>
Next: <a href="#update_002dleap-Authors" accesskey="n" rel="next">update-leap Authors</a>, Previous: <a href="#update_002dleap-exit-status" accesskey="p" rel="prev">update-leap exit status</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="update_002dleap-Usage-1"></a>
-<h4 class="subsection">1.9 update-leap Usage</h4>
+<span id="update_002dleap-Usage-1"></span><h4 class="subsection">1.9 update-leap Usage</h4>
<hr>
-<a name="update_002dleap-Authors"></a>
-<div class="header">
+<span id="update_002dleap-Authors"></span><div class="header">
<p>
Previous: <a href="#update_002dleap-Usage" accesskey="p" rel="prev">update-leap Usage</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> &nbsp; </p>
</div>
-<a name="update_002dleap-Authors-1"></a>
-<h4 class="subsection">1.10 update-leap Authors</h4>
+<span id="update_002dleap-Authors-1"></span><h4 class="subsection">1.10 update-leap Authors</h4>
<hr>
diff --git a/contrib/ntp/scripts/update-leap/update-leap.man.in b/contrib/ntp/scripts/update-leap/update-leap.man.in
index cebca7f66452..7feccfafcbe8 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.man.in
+++ b/contrib/ntp/scripts/update-leap/update-leap.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH update-leap 1update-leapman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:45 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 08:04:34 PM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.mdoc.in b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
index ab83b9ea98d1..ba971fe17a0a 100644
--- a/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
+++ b/contrib/ntp/scripts/update-leap/update-leap.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:42 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:15:06 PM by AutoGen 5.18.16
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
diff --git a/contrib/ntp/scripts/update-leap/update-leap.sh b/contrib/ntp/scripts/update-leap/update-leap.sh
index 2dab4eca3224..2dab4eca3224 100755..100644
--- a/contrib/ntp/scripts/update-leap/update-leap.sh
+++ b/contrib/ntp/scripts/update-leap/update-leap.sh
diff --git a/contrib/ntp/sntp/COPYRIGHT b/contrib/ntp/sntp/COPYRIGHT
index 628ee6cc48d3..013202c0fb09 100644
--- a/contrib/ntp/sntp/COPYRIGHT
+++ b/contrib/ntp/sntp/COPYRIGHT
@@ -3,7 +3,7 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 4-Feb-2020 23:47 UTC
+ Last update: 2-Mar-2023 05:21 UTC
__________________________________________________________________
The following copyright notice applies to all files collectively called
@@ -28,11 +28,11 @@ This file is automatically generated from html/copyright.html
* *
***********************************************************************
- Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin
- Burnicki is:
+ Content starting in 2011 from Harlan Stenn, Juergen Perlinger, Dave
+ Hart, Danny Mayer, Martin Burnicki, and possibly others is:
***********************************************************************
* *
-* Copyright (c) Network Time Foundation 2011-2020 *
+* Copyright (c) Network Time Foundation 2011-2023 *
* *
* All Rights Reserved *
* *
@@ -85,73 +85,75 @@ This file is automatically generated from html/copyright.html
13. [14]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
14. [15]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and help
with target configuration
- 15. [16]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
+ 15. [16]Philippe De Muyter <phdm@macqel.be> Wharton reference clock
+ driver, sysV68 and AIX modifications.
+ 16. [17]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port.
- 16. [17]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
- 17. [18]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux port
- 18. [19]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
+ 17. [18]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
+ 18. [19]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux port
+ 19. [20]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
NTP Version 2 as specified in RFC-1119
- 19. [20]John Hay <jhay@icomtek.csir.co.za> IPv6 support and testing
- 20. [21]Dave Hart <davehart@davehart.com> General maintenance, Windows
- port interpolation rewrite
- 21. [22]Claas Hilbrecht <neoclock4x@linum.com> NeoClock4X clock driver
- 22. [23]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
- 23. [24]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
- 24. [25]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
- 25. [26]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
+ 20. [21]John Hay <jhay@icomtek.csir.co.za> IPv6 support and testing
+ 21. [22]Dave Hart <davehart@gmail.com> General maintenance, IPv6
+ cleanup, Windows PPSAPI
+ 22. [23]Claas Hilbrecht <neoclock4x@linum.com> NeoClock4X clock driver
+ 23. [24]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
+ 24. [25]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
+ 25. [26]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
+ 26. [27]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
overhaul
- 26. [27]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
- [28]<H.Lambermont@chello.nl> ntpsweep
- 27. [29]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
+ 27. [28]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
+ [29]<H.Lambermont@chello.nl> ntpsweep
+ 28. [30]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
author)
- 28. [30]Frank Kardel [31]<kardel (at) ntp (dot) org> PARSE <GENERIC>
+ 29. [31]Frank Kardel [32]<kardel (at) ntp (dot) org> PARSE <GENERIC>
(driver 14 reference clocks), STREAMS modules for PARSE, support
scripts, syslog cleanup, dynamic interface handling
- 29. [32]Johannes Maximilian Kuehn <kuehn@ntp.org> Rewrote sntp to
+ 30. [33]Johannes Maximilian Kuehn <kuehn@ntp.org> Rewrote sntp to
comply with NTPv4 specification, ntpq saveconfig
- 30. [33]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
+ 31. [34]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications
- 31. [34]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
- 32. [35]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
+ 32. [35]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
+ 33. [36]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
GPS clock driver
- 33. [36]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
- 34. [37]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
- 35. [38]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
+ 34. [37]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
+ 35. [38]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
+ 36. [39]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305
- 36. [39]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
+ 37. [40]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
Maintenance
- 37. [40]David L. Mills <mills@udel.edu> Version 4 foundation, precision
+ 38. [41]David L. Mills <mills@udel.edu> Version 4 foundation, precision
kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, 22, 36
- 38. [41]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
- 39. [42]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
- 40. [43]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
- 41. [44]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
- 42. [45]Derek Mulcahy <derek@toybox.demon.co.uk> and [46]Damon
+ 39. [42]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
+ 40. [43]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
+ 41. [44]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
+ 42. [45]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
+ 43. [46]Derek Mulcahy <derek@toybox.demon.co.uk> and [47]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver
- 43. [47]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
+ 44. [48]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
maintenance
- 44. [48]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
+ 45. [49]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling
- 45. [49]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
- 46. [50]Wilfredo Sánchez <wsanchez@apple.com> added support for NetInfo
- 47. [51]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
- 48. [52]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
+ 46. [50]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
+ 47. [51]Wilfredo Sánchez <wsanchez@apple.com> added support for NetInfo
+ 48. [52]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
+ 49. [53]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
- 49. [53]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
- 50. [54]Michael Shields <shields@tembel.org> USNO clock driver
- 51. [55]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock driver
- 52. [56]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
+ 50. [54]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
+ 51. [55]Michael Shields <shields@tembel.org> USNO clock driver
+ 52. [56]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock driver
+ 53. [57]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
- 53. [57]Kenneth Stone <ken@sdd.hp.com> HP-UX port
- 54. [58]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast support
- 55. [59]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock driver
- 56. [60]Brian Utterback <brian.utterback@oracle.com> General codebase,
+ 54. [58]Kenneth Stone <ken@sdd.hp.com> HP-UX port
+ 55. [59]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast support
+ 56. [60]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock driver
+ 57. [61]Brian Utterback <brian.utterback@oracle.com> General codebase,
Solaris issues
- 57. [61]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
+ 58. [62]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
(libseccomp) support
- 58. [62]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
+ 59. [63]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver
- 59. [63]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
+ 60. [64]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD
__________________________________________________________________
@@ -172,51 +174,52 @@ References
13. mailto:%20reg@dwf.com
14. mailto:%20clift@ml.csiro.au
15. mailto:%20casey@csc.co.za
- 16. mailto:%20Sven_Dietrich@trimble.COM
- 17. mailto:%20dundas@salt.jpl.nasa.gov
- 18. mailto:%20duwe@immd4.informatik.uni-erlangen.de
- 19. mailto:%20dennis@mrbill.canet.ca
- 20. mailto:%20jhay@icomtek.csir.co.za
- 21. mailto:%20davehart@davehart.com
- 22. mailto:%20neoclock4x@linum.com
- 23. mailto:%20glenn@herald.usask.ca
- 24. mailto:%20iglesias@uci.edu
- 25. mailto:%20jagubox.gsfc.nasa.gov
- 26. mailto:%20jbj@chatham.usdesign.com
- 27. mailto:%20Hans.Lambermont@nl.origin-it.com
- 28. mailto:H.Lambermont@chello.nl
- 29. mailto:%20phk@FreeBSD.ORG
- 30. http://www4.informatik.uni-erlangen.de/%7ekardel
- 31. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org
- 32. mailto:kuehn@ntp.org
- 33. mailto:%20jones@hermes.chpc.utexas.edu
- 34. mailto:%20dkatz@cisco.com
- 35. mailto:%20leres@ee.lbl.gov
- 36. mailto:%20lindholm@ucs.ubc.ca
- 37. mailto:%20louie@ni.umd.edu
- 38. mailto:%20thorinn@diku.dk
- 39. mailto:%20mayer@ntp.org
- 40. mailto:%20mills@udel.edu
- 41. mailto:%20moeller@gwdgv1.dnet.gwdg.de
- 42. mailto:%20mogul@pa.dec.com
- 43. mailto:%20tmoore@fievel.daytonoh.ncr.com
- 44. mailto:%20kamal@whence.com
- 45. mailto:%20derek@toybox.demon.co.uk
- 46. mailto:%20d@hd.org
- 47. mailto:%20neal@ntp.org
- 48. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
- 49. mailto:%20dirce@zk3.dec.com
- 50. mailto:%20wsanchez@apple.com
- 51. mailto:%20mrapple@quack.kfu.com
- 52. mailto:%20jack@innovativeinternet.com
- 53. mailto:%20schnitz@unipress.com
- 54. mailto:%20shields@tembel.org
- 55. mailto:%20pebbles.jpl.nasa.gov
- 56. mailto:%20harlan@pfcs.com
- 57. mailto:%20ken@sdd.hp.com
- 58. mailto:%20ajit@ee.udel.edu
- 59. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
- 60. mailto:%20brian.utterback@oracle.com
- 61. mailto:%20loganaden@gmail.com
- 62. mailto:%20vixie@vix.com
- 63. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
+ 16. mailto:%20phdm@macqel.be
+ 17. mailto:%20Sven_Dietrich@trimble.COM
+ 18. mailto:%20dundas@salt.jpl.nasa.gov
+ 19. mailto:%20duwe@immd4.informatik.uni-erlangen.de
+ 20. mailto:%20dennis@mrbill.canet.ca
+ 21. mailto:%20jhay@icomtek.csir.co.za
+ 22. mailto:%20davehart@gmail.com
+ 23. mailto:%20neoclock4x@linum.com
+ 24. mailto:%20glenn@herald.usask.ca
+ 25. mailto:%20iglesias@uci.edu
+ 26. mailto:%20jagubox.gsfc.nasa.gov
+ 27. mailto:%20jbj@chatham.usdesign.com
+ 28. mailto:%20Hans.Lambermont@nl.origin-it.com
+ 29. mailto:H.Lambermont@chello.nl
+ 30. mailto:%20phk@FreeBSD.ORG
+ 31. http://www4.informatik.uni-erlangen.de/%7ekardel
+ 32. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org
+ 33. mailto:kuehn@ntp.org
+ 34. mailto:%20jones@hermes.chpc.utexas.edu
+ 35. mailto:%20dkatz@cisco.com
+ 36. mailto:%20leres@ee.lbl.gov
+ 37. mailto:%20lindholm@ucs.ubc.ca
+ 38. mailto:%20louie@ni.umd.edu
+ 39. mailto:%20thorinn@diku.dk
+ 40. mailto:%20mayer@ntp.org
+ 41. mailto:%20mills@udel.edu
+ 42. mailto:%20moeller@gwdgv1.dnet.gwdg.de
+ 43. mailto:%20mogul@pa.dec.com
+ 44. mailto:%20tmoore@fievel.daytonoh.ncr.com
+ 45. mailto:%20kamal@whence.com
+ 46. mailto:%20derek@toybox.demon.co.uk
+ 47. mailto:%20d@hd.org
+ 48. mailto:%20neal@ntp.org
+ 49. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
+ 50. mailto:%20dirce@zk3.dec.com
+ 51. mailto:%20wsanchez@apple.com
+ 52. mailto:%20mrapple@quack.kfu.com
+ 53. mailto:%20jack@innovativeinternet.com
+ 54. mailto:%20schnitz@unipress.com
+ 55. mailto:%20shields@tembel.org
+ 56. mailto:%20pebbles.jpl.nasa.gov
+ 57. mailto:%20harlan@pfcs.com
+ 58. mailto:%20ken@sdd.hp.com
+ 59. mailto:%20ajit@ee.udel.edu
+ 60. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
+ 61. mailto:%20brian.utterback@oracle.com
+ 62. mailto:%20loganaden@gmail.com
+ 63. mailto:%20vixie@vix.com
+ 64. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
diff --git a/contrib/ntp/sntp/Makefile.am b/contrib/ntp/sntp/Makefile.am
index 7deca5a0fede..8f9d1f612534 100644
--- a/contrib/ntp/sntp/Makefile.am
+++ b/contrib/ntp/sntp/Makefile.am
@@ -16,8 +16,7 @@ AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(LDFLAGS_NTP)
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
-LDADD = version.o
-LDADD += libsntp.a
+LDADD = libsntp.a
LDADD += $(LIBOPTS_LDADD)
LDADD += $(LDADD_LIBEVENT)
LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
@@ -69,8 +68,12 @@ libsntp_a_SOURCES = \
utilities.c \
$(NULL)
-sntp_SOURCES = \
- sntp.c \
+sntp_SOURCES = \
+ sntp.c \
+ $(NULL)
+
+nodist_sntp_SOURCES = \
+ version.c \
$(NULL)
noinst_HEADERS = \
@@ -85,8 +88,6 @@ noinst_HEADERS = \
$(NULL)
DISTCLEANFILES = \
- .version \
- version.c \
config.log \
$(man_MANS) \
$(NULL)
@@ -118,15 +119,15 @@ BUILT_SOURCES = \
libtool \
$(srcdir)/sntp-opts.c \
$(srcdir)/sntp-opts.h \
- check-scm-rev \
$(srcdir)/include/version.def \
$(srcdir)/m4/version.m4 \
$(srcdir)/include/version.texi \
$(NULL)
CLEANFILES = \
- built-sources-only \
check-COPYRIGHT-submake \
+ .version \
+ version.c \
$(NULL)
man1_MANS=
@@ -151,23 +152,16 @@ noinst_DATA= \
install-data-local: install-html
FRC:
- @: do-nothing action to prevent default SCCS get
- @: FRC "force" depends on nothing and is not a file, so is
- @: always out-of-date causing targets which depend on it to
- @: similarly always be outdated causing their rules to fire
- @: each time they or a dependent is built.
-
-$(PROGRAMS): version.o
+ @: FRC "force" depends on nothing and is not a file, so is always
+ @: out-of-date causing targets which depend on it to also be
+ @: outdated so their rules to fire each time they are built.
## We probably need something about libevent, too
## That is probably not possible since LDADD_LIBEVENT may be
## non-file "-levent_core".
-version.c: $(sntp_OBJECTS) ../libntp/libntp.a Makefile $(srcdir)/scm-rev
- env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
-
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(srcdir)/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
check-autogen-version.def: FRC
@cd $(srcdir) \
@@ -190,11 +184,11 @@ built-sources-only: $(BUILT_SOURCES)
check-scm-rev: $(srcdir)/scm-rev
@: do-nothing
-$(srcdir)/scm-rev:
- -bk root $(srcdir) >/dev/null 2>&1 && \
- cd $(srcdir)/.. && \
- x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
- y=`cat sntp/scm-rev 2>/dev/null` || true && \
+$(srcdir)/scm-rev: FRC
+ $(AM_V_at)-bk root $(srcdir) >/dev/null 2>&1 && \
+ cd $(srcdir)/.. && \
+ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
+ y=`cat sntp/scm-rev 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > sntp/scm-rev ;; esac
$(srcdir)/m4/version.m4: $(srcdir)/../packageinfo.sh
@@ -230,12 +224,12 @@ $(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) sntp-opts.def
+ $(AM_V_GEN)$(run_ag) sntp-opts.def
###
$(srcdir)/sntp.1sntpman: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
$(srcdir)/sntp.man.in: $(srcdir)/sntp.1sntpman $(srcdir)/scripts/mansec2subst.sed
sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpman > $(srcdir)/sntp.man.in+
@@ -244,7 +238,7 @@ $(srcdir)/sntp.man.in: $(srcdir)/sntp.1sntpman $(srcdir)/scripts/mansec2subst.se
###
$(srcdir)/sntp.1sntpmdoc: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
$(srcdir)/sntp.mdoc.in: $(srcdir)/sntp.1sntpmdoc $(srcdir)/scripts/mansec2subst.sed
sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpmdoc > $(srcdir)/sntp.mdoc.in+
@@ -262,10 +256,10 @@ $(srcdir)/invoke-sntp.menu: $(srcdir)/invoke-sntp.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-sntp.texi: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
$(top_srcdir)/../scripts/build/check--help $@
-$(srcdir)/sntp.html: $(srcdir)/invoke-sntp.menu $(srcdir)/invoke-sntp.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
+$(srcdir)/sntp.html: $(srcdir)/invoke-sntp.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o sntp.html sntp.texi || true )
libtool: $(LIBTOOL_DEPS)
diff --git a/contrib/ntp/sntp/Makefile.in b/contrib/ntp/sntp/Makefile.in
index 3b5156cbf60b..02af2211d10a 100644
--- a/contrib/ntp/sntp/Makefile.in
+++ b/contrib/ntp/sntp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -138,6 +138,10 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
AM_V_AR = $(am__v_AR_@AM_V@)
@@ -151,15 +155,12 @@ am_libsntp_a_OBJECTS = crypto.$(OBJEXT) kod_management.$(OBJEXT) \
log.$(OBJEXT) main.$(OBJEXT) networking.$(OBJEXT) \
sntp-opts.$(OBJEXT) utilities.$(OBJEXT) $(am__objects_1)
libsntp_a_OBJECTS = $(am_libsntp_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
- "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
- "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
-PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am_sntp_OBJECTS = sntp.$(OBJEXT) $(am__objects_1)
-sntp_OBJECTS = $(am_sntp_OBJECTS)
+nodist_sntp_OBJECTS = version.$(OBJEXT) $(am__objects_1)
+sntp_OBJECTS = $(am_sntp_OBJECTS) $(nodist_sntp_OBJECTS)
sntp_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
-sntp_DEPENDENCIES = version.o libsntp.a $(am__DEPENDENCIES_1) \
+sntp_DEPENDENCIES = libsntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
@@ -181,7 +182,12 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/crypto.Po \
+ ./$(DEPDIR)/kod_management.Po ./$(DEPDIR)/log.Po \
+ ./$(DEPDIR)/main.Po ./$(DEPDIR)/networking.Po \
+ ./$(DEPDIR)/sntp-opts.Po ./$(DEPDIR)/sntp.Po \
+ ./$(DEPDIR)/utilities.Po ./$(DEPDIR)/version.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -201,7 +207,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(libsntp_a_SOURCES) $(sntp_SOURCES)
+SOURCES = $(libsntp_a_SOURCES) $(sntp_SOURCES) $(nodist_sntp_SOURCES)
DIST_SOURCES = $(libsntp_a_SOURCES) $(sntp_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
@@ -256,9 +262,9 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- cscope distdir dist dist-all distcheck
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
- $(LISP)config.h.in
+ cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+ config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@@ -275,9 +281,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
DIST_SUBDIRS = include scripts unity libevent libopts tests
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf \
@@ -334,6 +337,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -355,6 +360,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -362,6 +368,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -373,6 +381,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@@ -558,6 +567,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -573,7 +583,7 @@ AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(SNTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_LIBEVENT) \
$(CPPFLAGS_NTP) $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
-LDADD = version.o libsntp.a $(LIBOPTS_LDADD) $(LDADD_LIBEVENT) \
+LDADD = libsntp.a $(LIBOPTS_LDADD) $(LDADD_LIBEVENT) \
../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) \
$(LDADD_NTP)
run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
@@ -606,7 +616,11 @@ libsntp_a_SOURCES = \
$(NULL)
sntp_SOURCES = \
- sntp.c \
+ sntp.c \
+ $(NULL)
+
+nodist_sntp_SOURCES = \
+ version.c \
$(NULL)
noinst_HEADERS = \
@@ -620,13 +634,7 @@ noinst_HEADERS = \
utilities.h \
$(NULL)
-DISTCLEANFILES = \
- .version \
- version.c \
- config.log \
- $(man_MANS) \
- $(NULL)
-
+DISTCLEANFILES = config.log $(man_MANS) $(NULL) $(DEPDIR)/deps-ver
EXTRA_DIST = \
$(srcdir)/COPYRIGHT \
ag-tpl \
@@ -650,11 +658,10 @@ EXTRA_DIST = \
$(NULL)
BUILT_SOURCES = $(srcdir)/COPYRIGHT libtool $(srcdir)/sntp-opts.c \
- $(srcdir)/sntp-opts.h check-scm-rev \
- $(srcdir)/include/version.def $(srcdir)/m4/version.m4 \
- $(srcdir)/include/version.texi $(NULL) check-libntp \
- check-libopts .deps-ver
-CLEANFILES = built-sources-only check-COPYRIGHT-submake $(NULL) \
+ $(srcdir)/sntp-opts.h $(srcdir)/include/version.def \
+ $(srcdir)/m4/version.m4 $(srcdir)/include/version.texi $(NULL) \
+ check-libntp check-libopts .deps-ver
+CLEANFILES = check-COPYRIGHT-submake .version version.c $(NULL) \
check-libntp check-libopts .deps-ver
man1_MANS =
man8_MANS =
@@ -671,9 +678,9 @@ noinst_DATA = \
$(NULL)
SNTP_INCS = -I$(top_srcdir)/../include \
- -I$(top_srcdir)/../lib/isc/include \
- -I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/../lib/isc/unix/include
+ -I$(top_srcdir)/../libntp/lib/isc/include \
+ -I$(top_srcdir)/../libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/../libntp/lib/isc/unix/include
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -700,8 +707,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
@@ -728,14 +735,6 @@ $(srcdir)/config.h.in: $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-libsntp.a: $(libsntp_a_OBJECTS) $(libsntp_a_DEPENDENCIES) $(EXTRA_libsntp_a_DEPENDENCIES)
- $(AM_V_at)-rm -f libsntp.a
- $(AM_V_AR)$(libsntp_a_AR) libsntp.a $(libsntp_a_OBJECTS) $(libsntp_a_LIBADD)
- $(AM_V_at)$(RANLIB) libsntp.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -884,6 +883,14 @@ clean-sbinPROGRAMS:
echo " rm -f" $$list; \
rm -f $$list
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+libsntp.a: $(libsntp_a_OBJECTS) $(libsntp_a_DEPENDENCIES) $(EXTRA_libsntp_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libsntp.a
+ $(AM_V_AR)$(libsntp_a_AR) libsntp.a $(libsntp_a_OBJECTS) $(libsntp_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libsntp.a
+
sntp$(EXEEXT): $(sntp_OBJECTS) $(sntp_DEPENDENCIES) $(EXTRA_sntp_DEPENDENCIES)
@rm -f sntp$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(sntp_OBJECTS) $(sntp_LDADD) $(LIBS)
@@ -894,32 +901,42 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kod_management.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networking.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sntp-opts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sntp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kod_management.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networking.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sntp-opts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sntp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -1145,8 +1162,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1226,6 +1245,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@@ -1268,6 +1291,8 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@@ -1283,7 +1308,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -1337,7 +1362,7 @@ distcleancheck: distclean
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \
+all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(MANS) $(DATA) $(HEADERS) \
config.h
installdirs: installdirs-recursive
installdirs-am:
@@ -1346,7 +1371,8 @@ installdirs-am:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
@@ -1386,7 +1412,15 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/crypto.Po
+ -rm -f ./$(DEPDIR)/kod_management.Po
+ -rm -f ./$(DEPDIR)/log.Po
+ -rm -f ./$(DEPDIR)/main.Po
+ -rm -f ./$(DEPDIR)/networking.Po
+ -rm -f ./$(DEPDIR)/sntp-opts.Po
+ -rm -f ./$(DEPDIR)/sntp.Po
+ -rm -f ./$(DEPDIR)/utilities.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
@@ -1436,7 +1470,15 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/crypto.Po
+ -rm -f ./$(DEPDIR)/kod_management.Po
+ -rm -f ./$(DEPDIR)/log.Po
+ -rm -f ./$(DEPDIR)/main.Po
+ -rm -f ./$(DEPDIR)/networking.Po
+ -rm -f ./$(DEPDIR)/sntp-opts.Po
+ -rm -f ./$(DEPDIR)/sntp.Po
+ -rm -f ./$(DEPDIR)/utilities.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1459,14 +1501,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
uninstall-man: uninstall-man1 uninstall-man8
.MAKE: $(am__recursive_targets) all check install install-am \
- install-exec-am install-strip
+ install-exec install-exec-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
- am--refresh check check-am clean clean-binPROGRAMS \
- clean-cscope clean-generic clean-libexecPROGRAMS clean-libtool \
- clean-noinstLIBRARIES clean-sbinPROGRAMS cscope cscopelist-am \
- ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \
- dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+ am--depfiles am--refresh check check-am clean \
+ clean-binPROGRAMS clean-cscope clean-generic \
+ clean-libexecPROGRAMS clean-libtool clean-noinstLIBRARIES \
+ clean-sbinPROGRAMS cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+ dist-xz dist-zip dist-zstd distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
@@ -1490,19 +1533,12 @@ uninstall-man: uninstall-man1 uninstall-man8
install-data-local: install-html
FRC:
- @: do-nothing action to prevent default SCCS get
- @: FRC "force" depends on nothing and is not a file, so is
- @: always out-of-date causing targets which depend on it to
- @: similarly always be outdated causing their rules to fire
- @: each time they or a dependent is built.
-
-$(PROGRAMS): version.o
-
-version.c: $(sntp_OBJECTS) ../libntp/libntp.a Makefile $(srcdir)/scm-rev
- env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
+ @: FRC "force" depends on nothing and is not a file, so is always
+ @: out-of-date causing targets which depend on it to also be
+ @: outdated so their rules to fire each time they are built.
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(srcdir)/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
check-autogen-version.def: FRC
@cd $(srcdir) \
@@ -1522,11 +1558,11 @@ built-sources-only: $(BUILT_SOURCES)
check-scm-rev: $(srcdir)/scm-rev
@: do-nothing
-$(srcdir)/scm-rev:
- -bk root $(srcdir) >/dev/null 2>&1 && \
- cd $(srcdir)/.. && \
- x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
- y=`cat sntp/scm-rev 2>/dev/null` || true && \
+$(srcdir)/scm-rev: FRC
+ $(AM_V_at)-bk root $(srcdir) >/dev/null 2>&1 && \
+ cd $(srcdir)/.. && \
+ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
+ y=`cat sntp/scm-rev 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > sntp/scm-rev ;; esac
$(srcdir)/m4/version.m4: $(srcdir)/../packageinfo.sh
@@ -1562,12 +1598,12 @@ $(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) sntp-opts.def
+ $(AM_V_GEN)$(run_ag) sntp-opts.def
###
$(srcdir)/sntp.1sntpman: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
$(srcdir)/sntp.man.in: $(srcdir)/sntp.1sntpman $(srcdir)/scripts/mansec2subst.sed
sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpman > $(srcdir)/sntp.man.in+
@@ -1576,7 +1612,7 @@ $(srcdir)/sntp.man.in: $(srcdir)/sntp.1sntpman $(srcdir)/scripts/mansec2subst.se
###
$(srcdir)/sntp.1sntpmdoc: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
$(srcdir)/sntp.mdoc.in: $(srcdir)/sntp.1sntpmdoc $(srcdir)/scripts/mansec2subst.sed
sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpmdoc > $(srcdir)/sntp.mdoc.in+
@@ -1594,10 +1630,10 @@ $(srcdir)/invoke-sntp.menu: $(srcdir)/invoke-sntp.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
$(srcdir)/invoke-sntp.texi: $(srcdir)/sntp-opts.def $(std_def_list)
- $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
+ $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
$(top_srcdir)/../scripts/build/check--help $@
-$(srcdir)/sntp.html: $(srcdir)/invoke-sntp.menu $(srcdir)/invoke-sntp.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
+$(srcdir)/sntp.html: $(srcdir)/invoke-sntp.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o sntp.html sntp.texi || true )
libtool: $(LIBTOOL_DEPS)
@@ -1631,10 +1667,11 @@ install-exec-hook:
#
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/../libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/../libntp/libntp.a:
+ cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
check-libopts: libopts/libopts.la
@echo stamp > $@
@@ -1645,9 +1682,9 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1665,7 +1702,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1695,7 +1732,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/sntp/aclocal.m4 b/contrib/ntp/sntp/aclocal.m4
index a22e4e1d7e95..3bc30c477a33 100644
--- a/contrib/ntp/sntp/aclocal.m4
+++ b/contrib/ntp/sntp/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,127 +14,13 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.61, and can be faster
-# than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
-# defined. In this case you can treat 'long long int' like 'long int'.
-
-AC_DEFUN([AC_TYPE_LONG_LONG_INT],
-[
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
- AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
- [ac_cv_type_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
- if test $ac_cv_type_long_long_int = yes; then
- dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
- dnl If cross compiling, assume the bug is not important, since
- dnl nobody cross compiles for this platform as far as we know.
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[@%:@include <limits.h>
- @%:@ifndef LLONG_MAX
- @%:@ define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- @%:@ define LLONG_MAX (HALF - 1 + HALF)
- @%:@endif]],
- [[long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;]])],
- [],
- [ac_cv_type_long_long_int=no],
- [:])
- fi
- fi])
- if test $ac_cv_type_long_long_int = yes; then
- AC_DEFINE([HAVE_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type 'long long int'.])
- fi
-])
-
-# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.61, and can be faster
-# than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'unsigned long long int' exists but is only 32 bits
-# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
-# will not be defined. In this case you can treat 'unsigned long long int'
-# like 'unsigned long int'.
-
-AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
-[
- AC_CACHE_CHECK([for unsigned long long int],
- [ac_cv_type_unsigned_long_long_int],
- [ac_cv_type_unsigned_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- AC_LINK_IFELSE(
- [_AC_TYPE_LONG_LONG_SNIPPET],
- [],
- [ac_cv_type_unsigned_long_long_int=no])
- fi])
- if test $ac_cv_type_unsigned_long_long_int = yes; then
- AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type 'unsigned long long int'.])
- fi
-])
-
-# Expands to a C program that can be used to test for simultaneous support
-# of 'long long' and 'unsigned long long'. We don't want to say that
-# 'long long' is available if 'unsigned long long' is not, or vice versa,
-# because too many programs rely on the symmetry between signed and unsigned
-# integer types (excluding 'bool').
-AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
-[
- AC_LANG_PROGRAM(
- [[/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;]],
- [[/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));]])
-])
-
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -146,10 +32,10 @@ AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.15.1], [],
+m4_if([$1], [1.16.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -165,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -232,7 +118,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -284,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -315,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -506,13 +392,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -520,49 +405,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "$am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -571,18 +450,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -610,6 +488,10 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -646,7 +528,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
- m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@@ -669,8 +551,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
@@ -698,6 +580,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
@@ -737,7 +633,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -779,7 +675,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -800,7 +696,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -821,7 +717,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -829,49 +725,42 @@ AC_SUBST([am__leading_dot])])
# AM_MAKE_INCLUDE()
# -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -892,12 +781,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
@@ -910,7 +794,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -939,7 +823,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -986,7 +870,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1005,7 +889,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1086,7 +970,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1146,7 +1030,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1174,7 +1058,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1193,7 +1077,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2017 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/contrib/ntp/sntp/check-libntp.mf b/contrib/ntp/sntp/check-libntp.mf
index d38796857fec..649f605a8d07 100644
--- a/contrib/ntp/sntp/check-libntp.mf
+++ b/contrib/ntp/sntp/check-libntp.mf
@@ -1,14 +1,15 @@
## check-libntp.mf - automake fragment
##
-## tests/libntp/Makefile.am
-## sntp/tests/Makefile.am
-## The above files have adaptations of this for deeper nesting.
+## ../check-libntp.mf
+## The above file has a version of this for the non-sntp portion
+## of the NTP package.
BUILT_SOURCES += check-libntp
CLEANFILES += check-libntp
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/../libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/../libntp/libntp.a:
+ cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
diff --git a/contrib/ntp/sntp/check-libsntp.mf b/contrib/ntp/sntp/check-libsntp.mf
new file mode 100644
index 000000000000..d05a3d02fd07
--- /dev/null
+++ b/contrib/ntp/sntp/check-libsntp.mf
@@ -0,0 +1,13 @@
+##
+## check-libsntp.mf - automake fragment
+##
+
+BUILT_SOURCES += check-libsntp
+CLEANFILES += check-libsntp
+
+check-libsntp: $(top_builddir)/sntp/libsntp.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/sntp/libsntp.a:
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
+
diff --git a/contrib/ntp/sntp/check-libunity.mf b/contrib/ntp/sntp/check-libunity.mf
new file mode 100644
index 000000000000..bf5ec3bde1ed
--- /dev/null
+++ b/contrib/ntp/sntp/check-libunity.mf
@@ -0,0 +1,15 @@
+## check-libunity.mf - automake fragment
+##
+## ../check-libunity.mf
+## The above file has a version of this for the non-sntp
+## part of the ntp tree.
+
+BUILT_SOURCES += check-libunity
+CLEANFILES += check-libunity
+
+check-libunity: $(top_builddir)/unity/libunity.a
+ @: avoid default SCCS get by some make implementations
+
+$(top_builddir)/unity/libunity.a:
+ cd $(top_builddir)/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+
diff --git a/contrib/ntp/sntp/config.h.in b/contrib/ntp/sntp/config.h.in
index 84a8cb9e5f1c..a4a15b82fcf1 100644
--- a/contrib/ntp/sntp/config.h.in
+++ b/contrib/ntp/sntp/config.h.in
@@ -6,12 +6,7 @@
/* why not HAVE_P_S? */
#undef CALL_PTHREAD_SETCONCURRENCY
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
+/* Define to 1 if using 'alloca.c'. */
#undef C_ALLOCA
/* Enable debugging code? */
@@ -41,11 +36,10 @@
/* What is getsockname()'s socklen type? */
#undef GETSOCKNAME_SOCKLEN_TYPE
-/* Define to 1 if you have `alloca', as a function or macro. */
+/* Define to 1 if you have 'alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
+/* Define to 1 if <alloca.h> works. */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <arpa/nameser.h> header file. */
@@ -194,7 +188,7 @@
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
-/* Define to 1 if the system has the type 'long long int'. */
+/* Define to 1 if the system has the type `long long int'. */
#undef HAVE_LONG_LONG_INT
/* if you have SunOS LWP package */
@@ -218,6 +212,9 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
+
/* Define to 1 if you have the `mmap' function. */
#undef HAVE_MMAP
@@ -404,6 +401,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -416,7 +416,7 @@
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
-/* Define to 1 if you have the `strerror_r' function. */
+/* Define if you have `strerror_r'. */
#undef HAVE_STRERROR_R
/* Define this if strftime() works */
@@ -592,7 +592,7 @@
/* deviant sigwait? */
#undef HAVE_UNIXWARE_SIGWAIT
-/* Define to 1 if the system has the type 'unsigned long long int'. */
+/* Define to 1 if the system has the type `unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
/* Define to 1 if you have the <utime.h> header file. */
@@ -819,7 +819,9 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Define to 1 if strerror_r returns char *. */
@@ -837,7 +839,8 @@
/* enable thread safety */
#undef THREAD_SAFE
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
+ macro is obsolete. */
#undef TIME_WITH_SYS_TIME
/* Provide a typedef for uintptr_t? */
@@ -856,21 +859,87 @@ typedef unsigned int uintptr_t;
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
-/* Enable threading extensions on Solaris. */
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+/* Enable X/Open extensions. Define to 500 only if necessary
+ to make mbstate_t available. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
#endif
@@ -904,16 +973,6 @@ typedef unsigned int uintptr_t;
# endif
#endif
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
/* enable thread safety */
#undef _REENTRANT
@@ -929,7 +988,8 @@ typedef unsigned int uintptr_t;
/* Are we _special_? */
#undef __APPLE_USE_RFC_3542
-/* Define to 1 if type `char' is unsigned and you are not using gcc. */
+/* Define to 1 if type `char' is unsigned and your compiler does not
+ predefine this macro. */
#ifndef __CHAR_UNSIGNED__
# undef __CHAR_UNSIGNED__
#endif
@@ -950,7 +1010,7 @@ typedef unsigned int uintptr_t;
not define. */
#undef intmax_t
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
#undef pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
diff --git a/contrib/ntp/sntp/configure b/contrib/ntp/sntp/configure
index a2e3d0fba9f7..e531e554001e 100755
--- a/contrib/ntp/sntp/configure
+++ b/contrib/ntp/sntp/configure
@@ -1,11 +1,12 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sntp 4.2.8p15.
+# Generated by GNU Autoconf 2.71 for sntp 4.2.8p16.
#
-# Report bugs to <http://bugs.ntp.org./>.
+# Report bugs to <https://bugs.ntp.org/>.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -16,14 +17,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -33,46 +36,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -96,8 +92,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -109,30 +109,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
@@ -154,20 +134,22 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -187,12 +169,15 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
@@ -207,30 +192,38 @@ test \$(( 1 + 1 )) = 2 || exit 1
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
|| test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -238,14 +231,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -263,19 +263,20 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: http://bugs.ntp.org./ about your system, including any
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
+$0: https://bugs.ntp.org/ about your system, including any
$0: error possibly output before this message. Then install
$0: a modern shell, or manually run the script under such a
$0: shell if you do have one."
@@ -302,6 +303,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -319,6 +321,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -333,7 +343,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -342,7 +352,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -381,12 +391,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -398,18 +409,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -421,9 +441,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -450,7 +470,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -494,7 +514,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -508,6 +528,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -521,6 +545,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -590,48 +621,44 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sntp'
PACKAGE_TARNAME='sntp'
-PACKAGE_VERSION='4.2.8p15'
-PACKAGE_STRING='sntp 4.2.8p15'
-PACKAGE_BUGREPORT='http://bugs.ntp.org./'
-PACKAGE_URL='http://www.ntp.org./'
+PACKAGE_VERSION='4.2.8p16'
+PACKAGE_STRING='sntp 4.2.8p16'
+PACKAGE_BUGREPORT='https://bugs.ntp.org/'
+PACKAGE_URL='https://www.ntp.org/'
# Factoring default headers for most tests.
ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_header_list=
+ac_header_c_list=
+ac_func_c_list=
enable_option_checking=no
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
@@ -797,6 +824,7 @@ LDFLAGS_NTP
LDADD_NTP
CPPFLAGS_NTP
CFLAGS_NTP
+CC_NOFORMAT
EGREP
GREP
CPP
@@ -807,7 +835,6 @@ am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
-am__quote
am__include
DEPDIR
OBJEXT
@@ -829,6 +856,9 @@ AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
+CSCOPE
+ETAGS
+CTAGS
am__untar
am__tar
AMTAR
@@ -871,6 +901,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -889,7 +920,8 @@ PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -984,6 +1016,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1013,8 +1046,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -1055,9 +1086,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1081,9 +1112,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1236,6 +1267,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1285,9 +1325,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1301,9 +1341,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1347,9 +1387,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1365,7 +1405,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1373,7 +1413,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1429,7 +1469,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1486,7 +1526,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sntp 4.2.8p15 to adapt to many kinds of systems.
+\`configure' configures sntp 4.2.8p16 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1526,6 +1566,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1556,7 +1597,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sntp 4.2.8p15:";;
+ short | recursive ) echo "Configuration of sntp 4.2.8p16:";;
esac
cat <<\_ACEOF
@@ -1643,8 +1684,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <http://bugs.ntp.org./>.
-sntp home page: <http://www.ntp.org./>.
+Report bugs to <https://bugs.ntp.org/>.
+sntp home page: <https://www.ntp.org/>.
_ACEOF
ac_status=$?
fi
@@ -1660,9 +1701,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1690,7 +1731,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1698,7 +1740,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1707,10 +1749,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sntp configure 4.2.8p15
-generated by GNU Autoconf 2.69
+sntp configure 4.2.8p16
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1727,14 +1769,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1742,14 +1784,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1759,6 +1802,39 @@ fi
} # ac_fn_c_try_compile
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1771,7 +1847,7 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1779,14 +1855,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1796,184 +1873,20 @@ fi
} # ac_fn_c_try_cpp
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------------ ##
-## Report this to http://bugs.ntp.org./ ##
-## ------------------------------------ ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1981,17 +1894,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -2006,6 +1920,49 @@ fi
} # ac_fn_c_try_link
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -2013,17 +1970,18 @@ fi
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -2031,12 +1989,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -2044,18 +2003,19 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
eval "$3=yes"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -2066,11 +2026,12 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -2078,16 +2039,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ which can conflict with char $2 (); below. */
+#include <limits.h>
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -2105,47 +2059,51 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
@@ -2159,19 +2117,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_decl
+} # ac_fn_check_decl
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
@@ -2187,7 +2148,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
@@ -2197,14 +2158,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=0 ac_mid=0
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2214,9 +2176,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid; break
-else
+else $as_nop
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -2224,14 +2187,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
@@ -2241,14 +2204,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=-1 ac_mid=-1
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
@@ -2258,9 +2222,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=$ac_mid; break
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -2268,14 +2233,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
ac_lo= ac_hi=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
@@ -2283,7 +2248,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2293,12 +2258,13 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
@@ -2308,12 +2274,12 @@ esac
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.val", "w");
@@ -2341,9 +2307,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
+else $as_nop
ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -2363,16 +2330,17 @@ rm -f conftest.val
ac_fn_c_check_member ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
@@ -2381,14 +2349,15 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
@@ -2397,29 +2366,50 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
eval "$4=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$4
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sntp $as_me 4.2.8p15, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by sntp $as_me 4.2.8p16, which was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -2452,8 +2442,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -2488,7 +2482,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2523,11 +2517,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -2538,8 +2534,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -2563,7 +2559,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -2571,14 +2567,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -2586,15 +2582,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -2602,8 +2598,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2617,63 +2613,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2683,20 +2664,442 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
-as_fn_append ac_header_list " stdarg.h"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
+as_fn_append ac_func_c_list " fork HAVE_FORK"
+as_fn_append ac_func_c_list " vfork HAVE_VFORK"
+as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
+as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H"
+as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="ltmain.sh ar-lib compile config.guess config.sub missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/libevent/build-aux"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2707,12 +3110,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -2721,24 +3124,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2748,11 +3151,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2766,34 +3170,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_aux_dir=
-for ac_dir in libevent/build-aux "$srcdir"/libevent/build-aux; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in libevent/build-aux \"$srcdir\"/libevent/build-aux" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -2903,15 +3279,15 @@ sntp_configure_cache_version=20120806
for c_varname in $c_varname_list
do
- { eval $c_varname=; unset $c_varname; }
+ { eval $c_varname=; unset $c_varname;}
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
-$as_echo "$as_me: $cache_file saved by another version, ignored." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: configure script cache version: $sntp_configure_cache_version" >&5
-$as_echo "$as_me: configure script cache version: $sntp_configure_cache_version" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
-$as_echo "$as_me: $cache_file version: $c_version" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
+printf "%s\n" "$as_me: $cache_file saved by another version, ignored." >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: configure script cache version: $sntp_configure_cache_version" >&5
+printf "%s\n" "$as_me: configure script cache version: $sntp_configure_cache_version" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
+printf "%s\n" "$as_me: $cache_file version: $c_version" >&6;}
{ c_varname=; unset c_varname;}
{ c_varname_list=; unset c_varname_list;}
{ c_version=; unset c_version;}
@@ -2927,9 +3303,11 @@ $as_echo "$as_me: $cache_file version: $c_version" >&6;}
NTP_CACHEVERSION_PARENT='sntp' ; export NTP_CACHEVERSION_PARENT
-am__api_version='1.15'
+am__api_version='1.16'
-# Find a good install program. We prefer a C program (faster),
+
+
+ # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
@@ -2943,20 +3321,25 @@ am__api_version='1.15'
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -2966,13 +3349,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -2980,12 +3363,12 @@ case $as_dir/ in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -3001,7 +3384,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3011,8 +3394,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -3022,8 +3405,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -3077,8 +3460,8 @@ else
as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
@@ -3097,26 +3480,23 @@ test "$program_suffix" != NONE &&
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
am_missing_run="$MISSING "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh+set}" != xset; then
@@ -3136,11 +3516,12 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -3148,11 +3529,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3163,11 +3548,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3176,11 +3561,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -3188,11 +3574,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3203,11 +3593,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -3215,8 +3605,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -3228,25 +3618,31 @@ fi
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
esac
done
@@ -3257,7 +3653,7 @@ IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
+ if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3267,18 +3663,19 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
@@ -3286,11 +3683,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3301,24 +3702,25 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -n "$AWK" && break
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@@ -3334,12 +3736,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -3353,7 +3755,8 @@ fi
rmdir .tst 2>/dev/null
# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
enableval=$enable_silent_rules;
fi
@@ -3363,12 +3766,13 @@ case $enable_silent_rules in # (((
*) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3380,8 +3784,8 @@ else
am_cv_make_support_nested_variables=no
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -3413,17 +3817,13 @@ fi
# Define the identity of the package.
PACKAGE='sntp'
- VERSION='4.2.8p15'
+ VERSION='4.2.8p16'
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
# Some tools Automake needs.
@@ -3443,8 +3843,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
# We need awk for the "check" target (and possibly the TAP driver). The
@@ -3463,6 +3863,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+
+
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
@@ -3495,7 +3909,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -3508,7 +3922,8 @@ fi
# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
enableval=$enable_silent_rules;
fi
@@ -3518,12 +3933,13 @@ case $enable_silent_rules in # (((
*) AM_DEFAULT_VERBOSITY=0;;
esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3535,8 +3951,8 @@ else
am_cv_make_support_nested_variables=no
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -3547,26 +3963,29 @@ fi
AM_BACKSLASH='\'
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
@@ -3585,21 +4004,22 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
@@ -3619,59 +4039,67 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-cat >>confdefs.h <<_ACEOF
-#define STR_SYSTEM "$host"
-_ACEOF
+printf "%s\n" "#define STR_SYSTEM \"$host\"" >>confdefs.h
ac_config_headers="$ac_config_headers config.h"
+
+
+
+
+
+
+
+
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
+if test ${enable_dependency_tracking+y}
+then :
enableval=$enable_dependency_tracking;
fi
@@ -3712,11 +4140,12 @@ if test -n "$ac_tool_prefix"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3724,11 +4153,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3739,11 +4172,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3756,11 +4189,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -3768,11 +4202,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3783,11 +4221,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3799,8 +4237,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3808,23 +4246,23 @@ esac
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -3834,7 +4272,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -3842,7 +4280,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3854,9 +4292,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -3877,11 +4315,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -3898,7 +4337,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -3914,44 +4353,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -3965,15 +4406,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -3982,7 +4423,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -3994,8 +4435,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -4003,10 +4444,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -4014,39 +4455,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4060,11 +4502,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -4073,31 +4516,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -4107,29 +4551,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -4138,57 +4586,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -4203,94 +4654,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -4299,21 +4800,23 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_ext=c
+
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4341,8 +4844,8 @@ _ACEOF
rm -f core conftest*
unset am_i
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
@@ -4360,11 +4863,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
@@ -4471,8 +4975,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -4489,45 +4993,212 @@ fi
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_should_define__xopen_source=no
+ if test $ac_cv_header_wchar_h = yes
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
+
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+ if test $ac_cv_header_minix_config_h = yes
+then :
+ MINIX=yes
+ printf "%s\n" "#define _MINIX 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else $as_nop
+ MINIX=
+fi
+ if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+ if test $ac_cv_should_define__xopen_source = yes
+then :
+ printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+fi
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -4539,10 +5210,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -4552,7 +5224,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -4564,29 +5237,24 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -4598,10 +5266,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -4611,11 +5280,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -4627,11 +5297,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
@@ -4639,10 +5310,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
@@ -4651,13 +5327,13 @@ case `"$ac_path_GREP" --version 2>&1` in
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4685,16 +5361,17 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
@@ -4705,10 +5382,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
@@ -4717,13 +5399,13 @@ case `"$ac_path_EGREP" --version 2>&1` in
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4752,493 +5434,11 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
- MINIX=yes
-else
- MINIX=
-fi
-
-
- if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# define __EXTENSIONS__ 1
- $ac_includes_default
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_safe_to_define___extensions__=yes
-else
- ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
- test $ac_cv_safe_to_define___extensions__ = yes &&
- $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
- $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
-
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
-
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
-
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
-
- const char *str;
- int number;
- float fnumber;
-
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
-
-int
-main ()
-{
-
- // Check bool.
- _Bool success = false;
-
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
-
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
-
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
-
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
-
- ni.number = 58;
-
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
-
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
-
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c99=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-else
- ac_cv_prog_cc_stdc=no
-fi
-
-fi
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
-$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if ${ac_cv_prog_cc_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;; #(
- '') :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
-$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
-esac
@@ -5248,11 +5448,12 @@ esac
# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
if test $ac_cv_c_compiler_gnu = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
-if ${ac_cv_prog_gcc_traditional+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+printf %s "checking whether $CC needs -traditional... " >&6; }
+if test ${ac_cv_prog_gcc_traditional+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_pattern="Autoconf.*'x'"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5260,12 +5461,13 @@ else
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
-else
+else $as_nop
ac_cv_prog_gcc_traditional=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $ac_cv_prog_gcc_traditional = no; then
@@ -5275,15 +5477,16 @@ rm -f conftest*
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
fi
-rm -f conftest*
+rm -rf conftest*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
@@ -5291,6 +5494,7 @@ fi
+CC_NOFORMAT=
CFLAGS_NTP=
CPPFLAGS_NTP=
LDADD_NTP=
@@ -5300,59 +5504,63 @@ LDFLAGS_NTP=
+
case "$ac_cv_prog_cc_c89" in
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
version 4.2.5 and higher." >&5
-$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+printf "%s\n" "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
version 4.2.5 and higher." >&2;}
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
-$as_echo_n "checking if $CC can handle #warning... " >&6; }
-if ${ntp_cv_cpp_warning+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
+printf %s "checking if $CC can handle #warning... " >&6; }
+if test ${ntp_cv_cpp_warning+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#warning foo
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_cpp_warning=yes
-else
+else $as_nop
ntp_cv_cpp_warning=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
-$as_echo "$ntp_cv_cpp_warning" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
+printf "%s\n" "$ntp_cv_cpp_warning" >&6; }
case "$ntp_cv_cpp_warning" in
no)
-$as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
+printf "%s\n" "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
-$as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
-if ${ntp_cv_cc_attribute+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
+printf %s "checking if $CC supports __attribute__((...))... " >&6; }
+if test ${ntp_cv_cc_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
void foo(void) __attribute__((__noreturn__));
@@ -5360,21 +5568,22 @@ void foo(void) __attribute__((__noreturn__));
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_cc_attribute=yes
-else
+else $as_nop
ntp_cv_cc_attribute=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
-$as_echo "$ntp_cv_cc_attribute" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
+printf "%s\n" "$ntp_cv_cc_attribute" >&6; }
case "$ntp_cv_cc_attribute" in
yes)
-$as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
+printf "%s\n" "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
esac
@@ -5382,79 +5591,130 @@ esac
case "$GCC" in
yes)
SAVED_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wstrict-overflow"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
-$as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
-if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ CFLAGS="$SAVED_CFLAGS -Wstrict-overflow"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
+printf %s "checking if $CC can handle -Wstrict-overflow... " >&6; }
+if test ${ntp_cv_gcc_Wstrict_overflow+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_gcc_Wstrict_overflow=yes
-else
+else $as_nop
ntp_cv_gcc_Wstrict_overflow=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
-$as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
+printf "%s\n" "$ntp_cv_gcc_Wstrict_overflow" >&6; }
#
# $ntp_cv_gcc_Wstrict_overflow is tested later to add the
# flag to CFLAGS.
#
CFLAGS="$SAVED_CFLAGS -Winit-self"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
-$as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
-if ${ntp_cv_gcc_Winit_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
+printf %s "checking if $CC can handle -Winit-self... " >&6; }
+if test ${ntp_cv_gcc_Winit_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_gcc_Winit_self=yes
-else
+else $as_nop
ntp_cv_gcc_Winit_self=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
+printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
+ #
+ # libopts specifically builds a string with embedded NULs.
+ # This causes a bunch of distracting warnings due to -Wformat.
+ # Let's see if we can figure out how to disable these.
+ #
+ CFLAGS="$SAVED_CFLAGS -Wno-format"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format" >&5
+printf %s "checking if $CC can handle -Wno-format... " >&6; }
+if test ${ntp_cv_gcc_Wno_format+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ntp_cv_gcc_Wno_format=yes
+else $as_nop
+ ntp_cv_gcc_Wno_format=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
-$as_echo "$ntp_cv_gcc_Winit_self" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
+printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
+
+ case "$ntp_cv_gcc_Wno_format" in
+ yes)
+ CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
+ ;;
+ no)
+ ;;
+ esac
+
CFLAGS="$SAVED_CFLAGS"
{ SAVED_CFLAGS=; unset SAVED_CFLAGS;}
#
# $ntp_cv_gcc_Winit_self is tested later to add the
# flag to CFLAGS_NTP.
#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
-$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
-if ${ntp_cv_gc_sections_runs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
+printf %s "checking if linker supports omitting unused code and data... " >&6; }
+if test ${ntp_cv_gc_sections_runs+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
origCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wl,--gc-sections"
@@ -5465,7 +5725,7 @@ else
#include <stdio.h>
int
-main ()
+main (void)
{
FILE * fpC;
@@ -5494,7 +5754,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
ntp_cv_gc_sections_runs=no
@@ -5503,19 +5764,19 @@ if ac_fn_c_try_link "$LINENO"; then :
./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
fi
-else
+else $as_nop
ntp_cv_gc_sections_runs=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$origCFLAGS"
{ origCFLAGS=; unset origCFLAGS;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
-$as_echo "$ntp_cv_gc_sections_runs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
+printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
case "$ntp_cv_gc_sections_runs" in
yes)
LDADD_LIBNTP="-Wl,--gc-sections"
@@ -5549,8 +5810,8 @@ $as_echo "$ntp_cv_gc_sections_runs" >&6; }
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
-$as_echo_n "checking additional compiler flags... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
+printf %s "checking additional compiler flags... " >&6; }
# allow ntp_os_cflags to be preset to skip this stuff
case "${ntp_os_cflags+set}" in
set)
@@ -5647,12 +5908,12 @@ $as_echo_n "checking additional compiler flags... " >&6; }
ntp_os_cflags_msg="$ntp_os_cflags"
esac
CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
-$as_echo "$ntp_os_cflags_msg" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
+printf "%s\n" "$ntp_os_cflags_msg" >&6; }
{ ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
###
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
-$as_echo_n "checking additional linker flags... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
+printf %s "checking additional linker flags... " >&6; }
# HMS: The following might still need tweaking
# allow ntp_os_ldflags to be preset to skip this stuff
case "${ntp_os_ldflags+set}" in
@@ -5679,16 +5940,17 @@ $as_echo_n "checking additional linker flags... " >&6; }
ntp_os_ldflags_msg="$ntp_os_ldflags"
esac
LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
-$as_echo "$ntp_os_ldflags_msg" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
+printf "%s\n" "$ntp_os_ldflags_msg" >&6; }
{ ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+printf %s "checking whether byte ordering is bigendian... " >&6; }
+if test ${ac_cv_c_bigendian+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_bigendian=unknown
# See if we're dealing with a universal compiler.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5699,7 +5961,8 @@ else
typedef int dummy;
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
# Check for potential -arch flags. It is not universal unless
# there are at least two -arch flags with different values.
@@ -5723,7 +5986,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
done
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
# See if sys/param.h defines the BYTE_ORDER macro.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5732,7 +5995,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include <sys/param.h>
int
-main ()
+main (void)
{
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
@@ -5744,7 +6007,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
# It does; now see whether it defined to BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5752,7 +6016,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
#include <sys/param.h>
int
-main ()
+main (void)
{
#if BYTE_ORDER != BIG_ENDIAN
not big endian
@@ -5762,14 +6026,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_bigendian=yes
-else
+else $as_nop
ac_cv_c_bigendian=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test $ac_cv_c_bigendian = unknown; then
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
@@ -5778,7 +6043,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include <limits.h>
int
-main ()
+main (void)
{
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
bogus endian macros
@@ -5788,14 +6053,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
# It does; now see whether it defined to _BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
int
-main ()
+main (void)
{
#ifndef _BIG_ENDIAN
not big endian
@@ -5805,31 +6071,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_bigendian=yes
-else
+else $as_nop
ac_cv_c_bigendian=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
if test $ac_cv_c_bigendian = unknown; then
# Compile a test program.
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
# Try to guess by grepping values from an object file.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-short int ascii_mm[] =
+unsigned short int ascii_mm[] =
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
- short int ascii_ii[] =
+ unsigned short int ascii_ii[] =
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
int use_ascii (int i) {
return ascii_mm[i] + ascii_ii[i];
}
- short int ebcdic_ii[] =
+ unsigned short int ebcdic_ii[] =
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
- short int ebcdic_mm[] =
+ unsigned short int ebcdic_mm[] =
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
int use_ebcdic (int i) {
return ebcdic_mm[i] + ebcdic_ii[i];
@@ -5837,14 +6105,15 @@ short int ascii_mm[] =
extern int foo;
int
-main ()
+main (void)
{
return use_ascii (foo) == use_ebcdic (foo);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
ac_cv_c_bigendian=yes
fi
@@ -5857,13 +6126,13 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
fi
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
/* Are we little or big endian? From Harbison&Steele. */
@@ -5879,9 +6148,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_c_bigendian=no
-else
+else $as_nop
ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -5890,17 +6160,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+printf "%s\n" "$ac_cv_c_bigendian" >&6; }
case $ac_cv_c_bigendian in #(
yes)
- $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+ printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
;; #(
no)
;; #(
universal)
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
;; #(
*)
@@ -5908,16 +6178,17 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
-if ${ac_cv_c_volatile+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+printf %s "checking for working volatile... " >&6; }
+if test ${ac_cv_c_volatile+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
volatile int x;
@@ -5927,18 +6198,19 @@ return !x && !y;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_volatile=yes
-else
+else $as_nop
ac_cv_c_volatile=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
-$as_echo "$ac_cv_c_volatile" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+printf "%s\n" "$ac_cv_c_volatile" >&6; }
if test $ac_cv_c_volatile = no; then
-$as_echo "#define volatile /**/" >>confdefs.h
+printf "%s\n" "#define volatile /**/" >>confdefs.h
fi
@@ -5947,40 +6219,36 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -5992,10 +6260,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -6005,7 +6274,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -6017,29 +6287,24 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -6051,10 +6316,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -6064,11 +6330,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -6083,14 +6350,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
-$as_echo_n "checking for compile/link hardening flags... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
+printf %s "checking for compile/link hardening flags... " >&6; }
# Check whether --with-hardenfile was given.
-if test "${with_hardenfile+set}" = set; then :
+if test ${with_hardenfile+y}
+then :
withval=$with_hardenfile;
-else
+else $as_nop
with_hardenfile=no
fi
@@ -6112,13 +6380,13 @@ fi
case "$GENHARDFLAG" in
OK)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
-$as_echo "in file $GENHARDFLAGFILE" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
+printf "%s\n" "in file $GENHARDFLAGFILE" >&6; }
rm genHardFlags.err genHardFlags.i
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
-$as_echo "failed." >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
+printf "%s\n" "failed." >&6; }
as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
;;
esac
@@ -6131,14 +6399,15 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
-$as_echo_n "checking for install dir and man conventions... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
+printf %s "checking for install dir and man conventions... " >&6; }
# Check whether --with-locfile was given.
-if test "${with_locfile+set}" = set; then :
+if test ${with_locfile+y}
+then :
withval=$with_locfile;
-else
+else $as_nop
with_locfile=no
fi
@@ -6160,13 +6429,13 @@ fi
case "$GENLOCINFO" in
OK)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
-$as_echo "in file $GENLOCINFOFILE" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
+printf "%s\n" "in file $GENLOCINFOFILE" >&6; }
rm genLocInfo.err genLocInfo.i
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
-$as_echo "failed." >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
+printf "%s\n" "failed." >&6; }
as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
;;
esac
@@ -6280,16 +6549,18 @@ fi
-if test -n "$ac_tool_prefix"; then
+
+ if test -n "$ac_tool_prefix"; then
for ac_prog in ar lib "link -lib"
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
@@ -6297,11 +6568,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6312,11 +6587,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6329,11 +6604,12 @@ if test -z "$AR"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
@@ -6341,11 +6617,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6356,11 +6636,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6372,8 +6652,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
@@ -6382,11 +6662,12 @@ fi
: ${AR=ar}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
-$as_echo_n "checking the archiver ($AR) interface... " >&6; }
-if ${am_cv_ar_interface+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+printf %s "checking the archiver ($AR) interface... " >&6; }
+if test ${am_cv_ar_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6398,12 +6679,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
/* end confdefs.h. */
int some_variable = 0;
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
(eval $am_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test "$ac_status" -eq 0; then
am_cv_ar_interface=ar
@@ -6412,7 +6694,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
(eval $am_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test "$ac_status" -eq 0; then
am_cv_ar_interface=lib
@@ -6423,7 +6705,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
rm -f conftest.lib libconftest.a
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6431,8 +6713,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
-$as_echo "$am_cv_ar_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+printf "%s\n" "$am_cv_ar_interface" >&6; }
case $am_cv_ar_interface in
ar)
@@ -6454,7 +6736,6 @@ esac
-
# Expose a cross-compilation indicator to makefiles
if test $build != $host; then
NTP_CROSSCOMPILE_TRUE=
@@ -6466,11 +6747,12 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
@@ -6484,10 +6766,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
@@ -6496,13 +6783,13 @@ case `"$ac_path_SED" --version 2>&1` in
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -6530,8 +6817,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
SED="$ac_cv_path_SED"
rm -f conftest.sed
@@ -6548,11 +6835,12 @@ Xsed="$SED -e 1s/^X//"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
then ac_cv_path_FGREP="$GREP -F"
else
@@ -6563,10 +6851,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in fgrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
@@ -6575,13 +6868,13 @@ case `"$ac_path_FGREP" --version 2>&1` in
ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
+ printf "%s\n" 'FGREP' >> "conftest.nl"
"$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -6610,8 +6903,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
FGREP="$ac_cv_path_FGREP"
@@ -6637,8 +6930,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -6664,12 +6957,12 @@ func_echo_all ()
}
case $ECHO in
- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
+ printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+ print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
esac
@@ -6685,33 +6978,164 @@ esac
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-else
+ ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
+if test "x$ac_cv_type_pid_t" = xyes
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if defined _WIN64 && !defined __CYGWIN__
+ LLP64
+ #endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_pid_type='int'
+else $as_nop
+ ac_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
+
fi
+
+
+ac_func=
+for ac_item in $ac_func_c_list
+do
+ if test $ac_func; then
+ ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
+ if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
+ echo "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_func=
+ else
+ ac_func=$ac_item
+ fi
+done
+
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
+
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
+
+fi
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strerror_r" = xyes
+then :
+ ac_have_decl=1
+else $as_nop
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
+
# Check whether --enable-c99-snprintf was given.
-if test "${enable_c99_snprintf+set}" = set; then :
+if test ${enable_c99_snprintf+y}
+then :
enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
-else
+else $as_nop
force_c99_snprintf=no
fi
@@ -6727,99 +7151,89 @@ fi
- for ac_header in $ac_header_list
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if ${ac_cv_type_unsigned_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+printf %s "checking for unsigned long long int... " >&6; }
+if test ${ac_cv_type_unsigned_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_type_unsigned_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ case $ac_prog_cc_stdc in
+ no | c89) ;;
+ *)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
+ ? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
+ ? 1 : -1)];
int i = 63;
int
-main ()
+main (void)
{
/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-else
+else $as_nop
ac_cv_type_unsigned_long_long_int=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext;;
+ esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
if test $ac_cv_type_unsigned_long_long_int = yes; then
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
-if test "x$ac_cv_func_vsnprintf" = xyes; then :
+if test "x$ac_cv_func_vsnprintf" = xyes
+then :
hw_cv_func_vsnprintf=yes
-else
+else $as_nop
hw_cv_func_vsnprintf=no
fi
- if test "$hw_cv_func_vsnprintf" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
-$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
-if ${hw_cv_func_vsnprintf_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ if test "$hw_cv_func_vsnprintf" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
+printf %s "checking whether vsnprintf is C99 compliant... " >&6; }
+if test ${hw_cv_func_vsnprintf_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
hw_cv_func_vsnprintf_c99=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if HAVE_STDARG_H
@@ -6836,7 +7250,7 @@ else
return result;
}
int
-main ()
+main (void)
{
char buf[43];
if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
@@ -6847,9 +7261,10 @@ char buf[43];
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
hw_cv_func_vsnprintf_c99=yes
-else
+else $as_nop
hw_cv_func_vsnprintf_c99=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -6857,72 +7272,86 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
-$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
+printf "%s\n" "$hw_cv_func_vsnprintf_c99" >&6; }
+else $as_nop
hw_cv_func_vsnprintf_c99=no
fi
-$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
-$as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
- if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
+printf %s "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
+ if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no
+then :
hw_use_rpl_vsnprintf=yes
-else
+else $as_nop
hw_use_rpl_vsnprintf=no
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
-$as_echo "$hw_use_rpl_vsnprintf" >&6; }
- if test "$hw_use_rpl_vsnprintf" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
+printf "%s\n" "$hw_use_rpl_vsnprintf" >&6; }
+ if test "$hw_use_rpl_vsnprintf" = yes
+then :
-$as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
- if test ${hw_nodef_vsnprintf=no} = no; then :
+ if test ${hw_nodef_vsnprintf=no} = no
+then :
-$as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
+printf "%s\n" "#define vsnprintf rpl_vsnprintf" >>confdefs.h
fi
- for ac_header in inttypes.h locale.h stddef.h stdint.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
+if test "x$ac_cv_header_locale_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
+if test "x$ac_cv_header_stddef_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
+
+fi
ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
"
-if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
fi
ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
"
-if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
+if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
-$as_echo_n "checking for long double... " >&6; }
-if ${ac_cv_type_long_double+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
+printf %s "checking for long double... " >&6; }
+if test ${ac_cv_type_long_double+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test "$GCC" = yes; then
ac_cv_type_long_double=yes
else
@@ -6932,7 +7361,7 @@ else
not support it. */
long double foo = 0.0L;
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
sizeof (double) <= sizeof (long double))];
@@ -6943,165 +7372,173 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_type_long_double=yes
-else
+else $as_nop
ac_cv_type_long_double=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
-$as_echo "$ac_cv_type_long_double" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
+printf "%s\n" "$ac_cv_type_long_double" >&6; }
if test $ac_cv_type_long_double = yes; then
-$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if ${ac_cv_type_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+printf %s "checking for long long int... " >&6; }
+if test ${ac_cv_type_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_type_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
- if test $ac_cv_type_long_long_int = yes; then
- if test "$cross_compiling" = yes; then :
+ case $ac_prog_cc_stdc in
+ no | c89) ;;
+ *)
+ ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+ if test $ac_cv_type_long_long_int = yes; then
+ if test "$cross_compiling" = yes
+then :
:
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
- #ifndef LLONG_MAX
- # define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- # define LLONG_MAX (HALF - 1 + HALF)
- #endif
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
int
-main ()
+main (void)
{
long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
-else
+else $as_nop
ac_cv_type_long_long_int=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- fi
- fi
+ fi;;
+ esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
if test $ac_cv_type_long_long_int = yes; then
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if ${ac_cv_type_unsigned_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+printf %s "checking for unsigned long long int... " >&6; }
+if test ${ac_cv_type_unsigned_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_type_unsigned_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ case $ac_prog_cc_stdc in
+ no | c89) ;;
+ *)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
+ ? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
+ ? 1 : -1)];
int i = 63;
int
-main ()
+main (void)
{
/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
-else
+else $as_nop
ac_cv_type_unsigned_long_long_int=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext;;
+ esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
if test $ac_cv_type_unsigned_long_long_int = yes; then
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_intmax_t" = xyes; then :
+if test "x$ac_cv_type_intmax_t" = xyes
+then :
-$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
-else
+else $as_nop
test $ac_cv_type_long_long_int = yes \
&& ac_type='long long int' \
|| ac_type='long int'
-cat >>confdefs.h <<_ACEOF
-#define intmax_t $ac_type
-_ACEOF
+printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
fi
@@ -7109,36 +7546,36 @@ fi
ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintmax_t" = xyes; then :
+if test "x$ac_cv_type_uintmax_t" = xyes
+then :
-$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h
-else
+else $as_nop
test $ac_cv_type_unsigned_long_long_int = yes \
&& ac_type='unsigned long long int' \
|| ac_type='unsigned long int'
-cat >>confdefs.h <<_ACEOF
-#define uintmax_t $ac_type
-_ACEOF
+printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
-$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
-else
+else $as_nop
for ac_type in 'unsigned int' 'unsigned long int' \
'unsigned long long int'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
test_array [0] = 0;
@@ -7148,53 +7585,49 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-cat >>confdefs.h <<_ACEOF
-#define uintptr_t $ac_type
-_ACEOF
+printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
ac_type=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
test -z "$ac_type" && break
done
fi
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTRDIFF_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
fi
- for ac_func in localeconv
-do :
- ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
-if test "x$ac_cv_func_localeconv" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LOCALECONV 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
+if test "x$ac_cv_func_localeconv" = xyes
+then :
+ printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h
fi
-done
- if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -7207,7 +7640,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -7235,7 +7668,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -7251,18 +7684,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
@@ -7282,26 +7716,30 @@ fi
ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
-if test "x$ac_cv_func_snprintf" = xyes; then :
+if test "x$ac_cv_func_snprintf" = xyes
+then :
hw_cv_func_snprintf=yes
-else
+else $as_nop
hw_cv_func_snprintf=no
fi
- if test "$hw_cv_func_snprintf" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
-$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
-if ${hw_cv_func_snprintf_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ if test "$hw_cv_func_snprintf" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
+printf %s "checking whether snprintf is C99 compliant... " >&6; }
+if test ${hw_cv_func_snprintf_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
hw_cv_func_snprintf_c99=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
char buf[43];
if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
@@ -7312,9 +7750,10 @@ char buf[43];
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
hw_cv_func_snprintf_c99=yes
-else
+else $as_nop
hw_cv_func_snprintf_c99=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -7322,44 +7761,49 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
-$as_echo "$hw_cv_func_snprintf_c99" >&6; }
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
+printf "%s\n" "$hw_cv_func_snprintf_c99" >&6; }
+else $as_nop
hw_cv_func_snprintf_c99=no
fi
-$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
-$as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
- if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
+printf %s "checking if C99-snprintf replacement snprintf will be used... " >&6; }
+ if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no
+then :
hw_use_rpl_snprintf=yes
-else
+else $as_nop
hw_use_rpl_snprintf=no
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
-$as_echo "$hw_use_rpl_snprintf" >&6; }
- if test "$hw_use_rpl_snprintf" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
+printf "%s\n" "$hw_use_rpl_snprintf" >&6; }
+ if test "$hw_use_rpl_snprintf" = yes
+then :
-$as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
+printf "%s\n" "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
- if test ${hw_nodef_snprintf=no} = no; then :
+ if test ${hw_nodef_snprintf=no} = no
+then :
-$as_echo "#define snprintf rpl_snprintf" >>confdefs.h
+printf "%s\n" "#define snprintf rpl_snprintf" >>confdefs.h
fi
- if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -7372,7 +7816,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -7400,7 +7844,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -7416,18 +7860,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
@@ -7461,17 +7906,18 @@ LIBS=
# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
+else $as_nop
with_gnu_ld=no
fi
ac_prog=ld
if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return, which upsets mingw
@@ -7500,15 +7946,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
;;
esac
elif test yes = "$with_gnu_ld"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
fi
-if ${lt_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
@@ -7537,18 +7984,19 @@ fi
LD=$lt_cv_path_LD
if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
@@ -7559,8 +8007,8 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -7573,11 +8021,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
-$as_echo_n "checking for directory path separator... " >&6; }
-if ${ntp_cv_dir_sep+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
+printf %s "checking for directory path separator... " >&6; }
+if test ${ntp_cv_dir_sep+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$ntp_cv_dir_sep" in
'')
@@ -7593,29 +8042,28 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
-$as_echo "$ntp_cv_dir_sep" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
+printf "%s\n" "$ntp_cv_dir_sep" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DIR_SEP $ntp_cv_dir_sep
-_ACEOF
+printf "%s\n" "#define DIR_SEP $ntp_cv_dir_sep" >>confdefs.h
NTP_ORIG_LIBS="$LIBS"
# Check whether --with-lineeditlibs was given.
-if test "${with_lineeditlibs+set}" = set; then :
+if test ${with_lineeditlibs+y}
+then :
withval=$with_lineeditlibs; use_lineeditlibs="$withval"
-else
+else $as_nop
use_lineeditlibs="edit,editline"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
-$as_echo_n "checking line editing libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
-$as_echo "$use_lineeditlibs" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
+printf %s "checking line editing libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
+printf "%s\n" "$use_lineeditlibs" >&6; }
case "$use_lineeditlibs" in
no)
ntp_lib_lineedit=no
@@ -7632,40 +8080,38 @@ $as_echo "$use_lineeditlibs" >&6; }
;;
esac
LIBS="$NTP_ORIG_LIBS $TRY_LIB"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
-$as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
+printf %s "checking for readline() with $TRY_LIB... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char readline ();
int
-main ()
+main (void)
{
return readline ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_lib_lineedit="$TRY_LIB"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
case "$ntp_lib_lineedit" in
'')
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
*)
# Use readline()
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
break
esac
case "$term_lib" in
@@ -7673,39 +8119,37 @@ $as_echo "yes" >&6; }
# do not try el_gets without a terminal library
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
-$as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
+printf %s "checking for el_gets() with $TRY_LIB... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char el_gets ();
int
-main ()
+main (void)
{
return el_gets ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_lib_lineedit="$TRY_LIB"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
case "$ntp_lib_lineedit" in
'')
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
*) # Use el_gets()
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
break
;;
esac # $ntp_lib_lineedit
@@ -7739,40 +8183,47 @@ $as_echo "yes" >&6; }
no)
;;
*)
- for ac_header in readline.h readline/readline.h histedit.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_READLINE_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_readline_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_READLINE_READLINE_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"
+if test "x$ac_cv_header_histedit_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_HISTEDIT_H 1" >>confdefs.h
- for ac_header in history.h readline/history.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+
+ ac_fn_c_check_header_compile "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
+if test "x$ac_cv_header_history_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_HISTORY_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_history_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_READLINE_HISTORY_H 1" >>confdefs.h
-done
+fi
case "$ac_cv_header_histedit_h" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
-$as_echo_n "checking number of arguments to el_init()... " >&6; }
-if ${ntp_cv_el_init_args+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
+printf %s "checking number of arguments to el_init()... " >&6; }
+if test ${ntp_cv_el_init_args+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7780,7 +8231,7 @@ else
#include <histedit.h>
int
-main ()
+main (void)
{
el_init("conftest", stdin, stdout, stderr);
@@ -7790,26 +8241,25 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_el_init_args=4
-else
+else $as_nop
ntp_cv_el_init_args=3
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
-$as_echo "$ntp_cv_el_init_args" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
+printf "%s\n" "$ntp_cv_el_init_args" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define EL_INIT_ARGS $ntp_cv_el_init_args
-_ACEOF
+printf "%s\n" "#define EL_INIT_ARGS $ntp_cv_el_init_args" >>confdefs.h
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
-$as_echo_n "checking whether readline supports history... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
+printf %s "checking whether readline supports history... " >&6; }
ntp_lib_lineedit_history="no"
ORIG_LIBS="$LIBS"
@@ -7820,32 +8270,30 @@ $as_echo_n "checking whether readline supports history... " >&6; }
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char add_history ();
int
-main ()
+main (void)
{
return add_history ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_lib_lineedit_history="yes"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$ORIG_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
-$as_echo "$ntp_lib_lineedit_history" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
+printf "%s\n" "$ntp_lib_lineedit_history" >&6; }
case "$ntp_lib_lineedit_history" in
yes)
-$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
+printf "%s\n" "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
esac
esac # $ntp_lib_lineedit
@@ -7861,11 +8309,12 @@ case "$host" in
;;
*)
_libs=$LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
-$as_echo_n "checking for library containing cos... " >&6; }
-if ${ac_cv_search_cos+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
+printf %s "checking for library containing cos... " >&6; }
+if test ${ac_cv_search_cos+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7873,46 +8322,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char cos ();
int
-main ()
+main (void)
{
return cos ();
;
return 0;
}
_ACEOF
-for ac_lib in '' m; do
+for ac_lib in '' m
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_cos=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_cos+:} false; then :
+ if test ${ac_cv_search_cos+y}
+then :
break
fi
done
-if ${ac_cv_search_cos+:} false; then :
+if test ${ac_cv_search_cos+y}
+then :
-else
+else $as_nop
ac_cv_search_cos=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
-$as_echo "$ac_cv_search_cos" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
+printf "%s\n" "$ac_cv_search_cos" >&6; }
ac_res=$ac_cv_search_cos
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
LIBM="-lm"
fi
@@ -7924,44 +8375,24 @@ esac
{ _libs=; unset _libs;}
-for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-fi
-
-done
-
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+printf %s "checking for working fork... " >&6; }
+if test ${ac_cv_func_fork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_fork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
/* By Ruediger Kuhlmann. */
@@ -7971,9 +8402,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_fork_works=yes
-else
+else $as_nop
ac_cv_func_fork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -7981,8 +8413,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+printf "%s\n" "$ac_cv_func_fork_works" >&6; }
else
ac_cv_func_fork_works=$ac_cv_func_fork
@@ -7997,27 +8429,37 @@ if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_fork_works=yes
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+printf %s "checking for working vfork... " >&6; }
+if test ${ac_cv_func_vfork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_vfork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
+#include <signal.h>
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
+
+static void
+do_nothing (int sig)
+{
+ (void) sig;
+}
+
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent. The compiler
is told about this with #include <vfork.h>, but some compilers
@@ -8025,11 +8467,7 @@ $ac_includes_default
static variable whose address is put into a register that is
clobbered by the vfork. */
static void
-#ifdef __cplusplus
sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
{
static pid_t child;
if (!child) {
@@ -8047,13 +8485,18 @@ sparc_address_test (arg) int arg;
}
int
-main ()
+main (void)
{
pid_t parent = getpid ();
pid_t child;
sparc_address_test (0);
+ /* On Solaris 2.4, changes by the child to the signal handler
+ also munge signal handlers in the parent. To detect this,
+ start by putting the parent's handler in a known state. */
+ signal (SIGTERM, SIG_DFL);
+
child = vfork ();
if (child == 0) {
@@ -8075,6 +8518,10 @@ main ()
|| p != p5 || p != p6 || p != p7)
_exit(1);
+ /* Alter the child's signal handler. */
+ if (signal (SIGTERM, do_nothing) != SIG_DFL)
+ _exit(1);
+
/* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
from child file descriptors. If the child closes a descriptor
before it execs or exits, this munges the parent's descriptor
@@ -8090,6 +8537,9 @@ main ()
/* Was there some problem with vforking? */
child < 0
+ /* Did the child munge the parent's signal handler? */
+ || signal (SIGTERM, SIG_DFL) != SIG_DFL
+
/* Did the child fail? (This shouldn't happen.) */
|| status
@@ -8102,9 +8552,10 @@ main ()
}
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_vfork_works=yes
-else
+else $as_nop
ac_cv_func_vfork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -8112,43 +8563,44 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
else
-$as_echo "#define vfork fork" >>confdefs.h
+printf "%s\n" "#define vfork fork" >>confdefs.h
fi
if test "x$ac_cv_func_fork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
-$as_echo_n "checking for working alloca.h... " >&6; }
-if ${ac_cv_working_alloca_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+printf %s "checking for working alloca.h... " >&6; }
+if test ${ac_cv_working_alloca_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <alloca.h>
int
-main ()
+main (void)
{
char *p = (char *) alloca (2 * sizeof (int));
if (p) return 0;
@@ -8156,52 +8608,52 @@ char *p = (char *) alloca (2 * sizeof (int));
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_working_alloca_h=yes
-else
+else $as_nop
ac_cv_working_alloca_h=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
-$as_echo "$ac_cv_working_alloca_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
if test $ac_cv_working_alloca_h = yes; then
-$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-$as_echo_n "checking for alloca... " >&6; }
-if ${ac_cv_func_alloca_works+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+printf %s "checking for alloca... " >&6; }
+if test ${ac_cv_func_alloca_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test $ac_cv_working_alloca_h = yes; then
+ ac_cv_func_alloca_works=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
+#include <stdlib.h>
+#include <stddef.h>
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-void *alloca (size_t);
-# endif
-# endif
+# ifdef __cplusplus
+extern "C"
# endif
+void *alloca (size_t);
# endif
#endif
int
-main ()
+main (void)
{
char *p = (char *) alloca (1);
if (p) return 0;
@@ -8209,20 +8661,22 @@ char *p = (char *) alloca (1);
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_alloca_works=yes
-else
+else $as_nop
ac_cv_func_alloca_works=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
-$as_echo "$ac_cv_func_alloca_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
+fi
if test $ac_cv_func_alloca_works = yes; then
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -8232,58 +8686,19 @@ else
ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
-$as_echo "#define C_ALLOCA 1" >>confdefs.h
+printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if ${ac_cv_os_cray+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then :
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-$as_echo "$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
- break
-fi
-
- done
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
-$as_echo_n "checking stack direction for C alloca... " >&6; }
-if ${ac_cv_c_stack_direction+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+printf %s "checking stack direction for C alloca... " >&6; }
+if test ${ac_cv_c_stack_direction+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_c_stack_direction=0
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
@@ -8304,9 +8719,10 @@ main (int argc, char **argv)
return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_c_stack_direction=1
-else
+else $as_nop
ac_cv_c_stack_direction=-1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -8314,50 +8730,37 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-$as_echo "$ac_cv_c_stack_direction" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
+printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
fi
-ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R $ac_have_decl
-_ACEOF
+if test $ac_cv_have_decl_strerror_r = yes; then
+ # For backward compatibility's sake, define HAVE_STRERROR_R.
+ # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
+ # as AC_CHECK_DECLS_ONCE.)
-for ac_func in strerror_r
-do :
- ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
-if test "x$ac_cv_func_strerror_r" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR_R 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
fi
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
-$as_echo_n "checking whether strerror_r returns char *... " >&6; }
-if ${ac_cv_func_strerror_r_char_p+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+printf %s "checking whether strerror_r returns char *... " >&6; }
+if test ${ac_cv_func_strerror_r_char_p+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_func_strerror_r_char_p=no
if test $ac_cv_have_decl_strerror_r = yes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
+#include <string.h>
int
-main ()
+main (void)
{
char buf[100];
@@ -8369,49 +8772,20 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_func_strerror_r_char_p=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- else
- # strerror_r is not declared. Choose between
- # systems that have relatively inaccessible declarations for the
- # function. BeOS and DEC UNIX 4.0 fall in this category, but the
- # former has a strerror_r that returns char*, while the latter
- # has a strerror_r that returns `int'.
- # This test should segfault on the DEC system.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
- extern char *strerror_r ();
-int
-main ()
-{
-char buf[100];
- char x = *strerror_r (0, buf, sizeof buf);
- return ! isalpha (x);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_strerror_r_char_p=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
-$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
if test $ac_cv_func_strerror_r_char_p = yes; then
-$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
fi
@@ -8457,11 +8831,12 @@ case "$host" in
# instead to try to set the time to itself and check errno.
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8469,46 +8844,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char clock_gettime ();
int
-main ()
+main (void)
{
return clock_gettime ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt; do
+for ac_lib in '' rt
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_clock_gettime=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
+ if test ${ac_cv_search_clock_gettime+y}
+then :
break
fi
done
-if ${ac_cv_search_clock_gettime+:} false; then :
+if test ${ac_cv_search_clock_gettime+y}
+then :
-else
+else $as_nop
ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_clock_gettime" in
'none required') ;;
@@ -8518,42 +8895,69 @@ if test "$ac_res" != no; then :
fi
- for ac_func in clock_getres clock_gettime clock_settime
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
+if test "x$ac_cv_func_clock_getres" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
+if test "x$ac_cv_func_clock_settime" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
fi
-done
;;
esac
-for ac_func in getclock stime timegm strlcpy strlcat
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "getclock" "ac_cv_func_getclock"
+if test "x$ac_cv_func_getclock" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETCLOCK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "stime" "ac_cv_func_stime"
+if test "x$ac_cv_func_stime" = xyes
+then :
+ printf "%s\n" "#define HAVE_STIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
+if test "x$ac_cv_func_timegm" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
+if test "x$ac_cv_func_strlcat" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
fi
-done
# Bug 2713
LDADD_LIBUTIL=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
-$as_echo_n "checking for library containing snprintb... " >&6; }
-if ${ac_cv_search_snprintb+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
+printf %s "checking for library containing snprintb... " >&6; }
+if test ${ac_cv_search_snprintb+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8561,46 +8965,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char snprintb ();
int
-main ()
+main (void)
{
return snprintb ();
;
return 0;
}
_ACEOF
-for ac_lib in '' util; do
+for ac_lib in '' util
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_snprintb=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_snprintb+:} false; then :
+ if test ${ac_cv_search_snprintb+y}
+then :
break
fi
done
-if ${ac_cv_search_snprintb+:} false; then :
+if test ${ac_cv_search_snprintb+y}
+then :
-else
+else $as_nop
ac_cv_search_snprintb=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
-$as_echo "$ac_cv_search_snprintb" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
+printf "%s\n" "$ac_cv_search_snprintb" >&6; }
ac_res=$ac_cv_search_snprintb
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_snprintb" in
'none required') ;;
@@ -8608,49 +9014,57 @@ if test "$ac_res" != no; then :
*) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
esac
-$as_echo "#define USE_SNPRINTB 1" >>confdefs.h
+printf "%s\n" "#define USE_SNPRINTB 1" >>confdefs.h
fi
#
-for ac_header in errno.h sys/socket.h sys/types.h time.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_types_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
-for ac_header in net/if.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+fi
+ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
"
-if test "x$ac_cv_header_net_if_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_H 1
-_ACEOF
+if test "x$ac_cv_header_net_if_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
fi
-done
-
case "$host" in
*-hp-hpux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
-$as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
-if ${ntp_cv_predecl_mpinfou+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
+printf %s "checking if net/if.h requires mpinfou predeclaration... " >&6; }
+if test ${ntp_cv_predecl_mpinfou+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
np_cv_predecl_mpinfou=no
case "$ac_cv_header_net_if_h" in
@@ -8668,7 +9082,7 @@ else
#include <net/if.h>
int
-main ()
+main (void)
{
@@ -8677,20 +9091,21 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_predecl_mpinfou=yes
ac_cv_header_net_if_h=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
-$as_echo "$ntp_cv_predecl_mpinfou" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
+printf "%s\n" "$ntp_cv_predecl_mpinfou" >&6; }
case "$ntp_cv_predecl_mpinfou" in
yes)
cat >>confdefs.h <<_ACEOF
@@ -8708,76 +9123,82 @@ esac
case "$host" in
*-linux*)
- for ac_header in linux/if_addr.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
+ ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
"
-if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LINUX_IF_ADDR_H 1
-_ACEOF
+if test "x$ac_cv_header_linux_if_addr_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LINUX_IF_ADDR_H 1" >>confdefs.h
fi
-done
-
-$as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
+printf "%s\n" "#define NEED_EARLY_FORK 1" >>confdefs.h
esac
-for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
+if test "x$ac_cv_header_arpa_nameser_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/timers.h" "ac_cv_header_sys_timers_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timers_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIMERS_H 1" >>confdefs.h
+
+fi
# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
-for ac_header in sys/sysctl.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
#if defined HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
"
-if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SYSCTL_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_sysctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
fi
-done
+ac_fn_c_check_header_compile "$LINENO" "netinet/in_system.h" "ac_cv_header_netinet_in_system_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_system_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_SYSTEM_H 1" >>confdefs.h
-for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_systm_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_SYSTM_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
-done
+fi
-for ac_header in resolv.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
+ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -8789,19 +9210,14 @@ do :
#endif
"
-if test "x$ac_cv_header_resolv_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_RESOLV_H 1
-_ACEOF
+if test "x$ac_cv_header_resolv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
fi
-done
-
-for ac_header in net/if_var.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
+ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -8816,20 +9232,14 @@ do :
#endif
"
-if test "x$ac_cv_header_net_if_var_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_VAR_H 1
-_ACEOF
+if test "x$ac_cv_header_net_if_var_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NET_IF_VAR_H 1" >>confdefs.h
fi
-done
-
-for ac_header in netinet/ip.h netinet/in_var.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -8850,22 +9260,46 @@ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
#endif
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_netinet_ip_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IP_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in_var.h" "ac_cv_header_netinet_in_var_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_VAR_H
+ # include <net/if_var.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_SYSTM_H
+ # include <netinet/in_systm.h>
+ #endif
-done
+"
+if test "x$ac_cv_header_netinet_in_var_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_VAR_H 1" >>confdefs.h
+
+fi
# HMS: Do we need to check for -lsocket before or after these tests?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
-$as_echo_n "checking for library containing inet_pton... " >&6; }
-if ${ac_cv_search_inet_pton+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+printf %s "checking for library containing inet_pton... " >&6; }
+if test ${ac_cv_search_inet_pton+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8873,46 +9307,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inet_pton ();
int
-main ()
+main (void)
{
return inet_pton ();
;
return 0;
}
_ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' nsl
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inet_pton=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inet_pton+:} false; then :
+ if test ${ac_cv_search_inet_pton+y}
+then :
break
fi
done
-if ${ac_cv_search_inet_pton+:} false; then :
+if test ${ac_cv_search_inet_pton+y}
+then :
-else
+else $as_nop
ac_cv_search_inet_pton=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
-$as_echo "$ac_cv_search_inet_pton" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
ac_res=$ac_cv_search_inet_pton
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_inet_pton" in
'none required') ;;
@@ -8922,11 +9358,12 @@ if test "$ac_res" != no; then :
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
-$as_echo_n "checking for library containing inet_ntop... " >&6; }
-if ${ac_cv_search_inet_ntop+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
+printf %s "checking for library containing inet_ntop... " >&6; }
+if test ${ac_cv_search_inet_ntop+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8934,46 +9371,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inet_ntop ();
int
-main ()
+main (void)
{
return inet_ntop ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' resolv
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inet_ntop=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inet_ntop+:} false; then :
+ if test ${ac_cv_search_inet_ntop+y}
+then :
break
fi
done
-if ${ac_cv_search_inet_ntop+:} false; then :
+if test ${ac_cv_search_inet_ntop+y}
+then :
-else
+else $as_nop
ac_cv_search_inet_ntop=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
-$as_echo "$ac_cv_search_inet_ntop" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
+printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
ac_res=$ac_cv_search_inet_ntop
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_inet_ntop" in
'none required') ;;
@@ -8991,11 +9430,12 @@ fi
# functions there and never add libsocket. See also [Bug 660]
# http://bugs.ntp.org/show_bug.cgi?id=660#c9
saved_LIBS=$LIBS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
-$as_echo_n "checking for library containing setsockopt... " >&6; }
-if ${ac_cv_search_setsockopt+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+printf %s "checking for library containing setsockopt... " >&6; }
+if test ${ac_cv_search_setsockopt+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9003,46 +9443,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char setsockopt ();
int
-main ()
+main (void)
{
return setsockopt ();
;
return 0;
}
_ACEOF
-for ac_lib in '' socket; do
+for ac_lib in '' socket
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_setsockopt=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_setsockopt+:} false; then :
+ if test ${ac_cv_search_setsockopt+y}
+then :
break
fi
done
-if ${ac_cv_search_setsockopt+:} false; then :
+if test ${ac_cv_search_setsockopt+y}
+then :
-else
+else $as_nop
ac_cv_search_setsockopt=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
-$as_echo "$ac_cv_search_setsockopt" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
+printf "%s\n" "$ac_cv_search_setsockopt" >&6; }
ac_res=$ac_cv_search_setsockopt
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_setsockopt" in
'none required') ;;
@@ -9055,11 +9497,12 @@ fi
case "$ac_cv_search_setsockopt" in
-lsocket)
LIBS="$saved_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
-$as_echo_n "checking for library containing getsockopt... " >&6; }
-if ${ac_cv_search_getsockopt+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
+printf %s "checking for library containing getsockopt... " >&6; }
+if test ${ac_cv_search_getsockopt+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9067,46 +9510,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char getsockopt ();
int
-main ()
+main (void)
{
return getsockopt ();
;
return 0;
}
_ACEOF
-for ac_lib in '' xnet; do
+for ac_lib in '' xnet
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_getsockopt=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_getsockopt+:} false; then :
+ if test ${ac_cv_search_getsockopt+y}
+then :
break
fi
done
-if ${ac_cv_search_getsockopt+:} false; then :
+if test ${ac_cv_search_getsockopt+y}
+then :
-else
+else $as_nop
ac_cv_search_getsockopt=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
-$as_echo "$ac_cv_search_getsockopt" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
+printf "%s\n" "$ac_cv_search_getsockopt" >&6; }
ac_res=$ac_cv_search_getsockopt
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_getsockopt" in
'none required') ;;
@@ -9132,44 +9577,42 @@ esac
{ saved_LIBS=; unset saved_LIBS;}
# Bug 2427 - look for recvmsg here.
-for ac_func in recvmsg
-do :
- ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
-if test "x$ac_cv_func_recvmsg" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_RECVMSG 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
+if test "x$ac_cv_func_recvmsg" = xyes
+then :
+ printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
fi
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_inline=$ac_kw
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
test "$ac_cv_c_inline" != no && break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -9192,61 +9635,37 @@ case "$ac_cv_c_inline" in
;;
*)
-$as_echo "#define HAVE_INLINE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
+# End of obsolete code.
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if ${ac_cv_sizeof_time_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+printf %s "checking size of time_t... " >&6; }
+if test ${ac_cv_sizeof_time_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (time_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -9255,26 +9674,25 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
-$as_echo_n "checking whether char is unsigned... " >&6; }
-if ${ac_cv_c_char_unsigned+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
+printf %s "checking whether char is unsigned... " >&6; }
+if test ${ac_cv_c_char_unsigned+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(((char) -1) < 0)];
test_array [0] = 0;
@@ -9284,34 +9702,37 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_char_unsigned=no
-else
+else $as_nop
ac_cv_c_char_unsigned=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
-$as_echo "$ac_cv_c_char_unsigned" >&6; }
-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
+printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
+if test $ac_cv_c_char_unsigned = yes; then
+ printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
fi
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
-$as_echo_n "checking size of signed char... " >&6; }
-if ${ac_cv_sizeof_signed_char+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
+printf %s "checking size of signed char... " >&6; }
+if test ${ac_cv_sizeof_signed_char+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_signed_char" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (signed char)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -9320,31 +9741,27 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
-$as_echo "$ac_cv_sizeof_signed_char" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
+printf "%s\n" "$ac_cv_sizeof_signed_char" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
-_ACEOF
+printf "%s\n" "#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char" >>confdefs.h
ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
-if test "x$ac_cv_type_s_char" = xyes; then :
+if test "x$ac_cv_type_s_char" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_S_CHAR 1
-_ACEOF
+printf "%s\n" "#define HAVE_S_CHAR 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
-if test "x$ac_cv_type_long_long" = xyes; then :
+if test "x$ac_cv_type_long_long" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_LONG 1
-_ACEOF
+printf "%s\n" "#define HAVE_LONG_LONG 1" >>confdefs.h
fi
@@ -9353,17 +9770,19 @@ fi
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+printf %s "checking size of short... " >&6; }
+if test ${ac_cv_sizeof_short+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -9372,31 +9791,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+printf "%s\n" "$ac_cv_sizeof_short" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
+printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+printf %s "checking size of int... " >&6; }
+if test ${ac_cv_sizeof_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -9405,31 +9824,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+printf "%s\n" "$ac_cv_sizeof_int" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
+printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+printf %s "checking size of long... " >&6; }
+if test ${ac_cv_sizeof_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -9438,14 +9857,12 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
@@ -9457,17 +9874,19 @@ case "$ac_cv_type_long_long" in
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if ${ac_cv_sizeof_long_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+printf %s "checking size of long long... " >&6; }
+if test ${ac_cv_sizeof_long_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -9476,14 +9895,12 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
;;
@@ -9496,13 +9913,13 @@ case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
no0no)
# We have signed chars, can't say 'signed char', no s_char typedef.
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
;;
no1no)
# We have signed chars, can say 'signed char', no s_char typedef.
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
;;
yes0no)
@@ -9512,38 +9929,40 @@ $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
yes1no)
# We have unsigned chars, can say 'signed char', no s_char typedef.
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+printf %s "checking for uid_t in sys/types.h... " >&6; }
+if test ${ac_cv_type_uid_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then :
+ $EGREP "uid_t" >/dev/null 2>&1
+then :
ac_cv_type_uid_t=yes
-else
+else $as_nop
ac_cv_type_uid_t=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+printf "%s\n" "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
-$as_echo "#define uid_t int" >>confdefs.h
+printf "%s\n" "#define uid_t int" >>confdefs.h
-$as_echo "#define gid_t int" >>confdefs.h
+printf "%s\n" "#define gid_t int" >>confdefs.h
fi
@@ -9552,12 +9971,13 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
-$as_echo_n "checking if we're including debugging code... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
+printf %s "checking if we're including debugging code... " >&6; }
# Check whether --enable-debugging was given.
-if test "${enable_debugging+set}" = set; then :
+if test ${enable_debugging+y}
+then :
enableval=$enable_debugging; ntp_ok=$enableval
-else
+else $as_nop
ntp_ok=yes
fi
@@ -9565,42 +9985,34 @@ fi
case "$ntp_ok" in
yes)
-$as_echo "#define DEBUG 1" >>confdefs.h
+printf "%s\n" "#define DEBUG 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+printf "%s\n" "$ntp_ok" >&6; }
# check if we can compile with pthreads
-for ac_header in semaphore.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
-if test "x$ac_cv_header_semaphore_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SEMAPHORE_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
+if test "x$ac_cv_header_semaphore_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h
fi
-done
-
-for ac_func in socketpair
-do :
- ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
-if test "x$ac_cv_func_socketpair" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SOCKETPAIR 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
+if test "x$ac_cv_func_socketpair" = xyes
+then :
+ printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
fi
-done
# Check whether --enable-thread-support was given.
-if test "${enable_thread_support+set}" = set; then :
+if test ${enable_thread_support+y}
+then :
enableval=$enable_thread_support;
-else
+else $as_nop
enable_thread_support=yes
fi
@@ -9622,7 +10034,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# OpenLDAP --with-threads
# Check whether --with-threads was given.
-if test "${with_threads+set}" = set; then :
+if test ${with_threads+y}
+then :
withval=$with_threads;
ol_arg=invalid
for ol_val in auto nt posix mach pth lwp yes no manual ; do
@@ -9635,7 +10048,7 @@ if test "${with_threads+set}" = set; then :
fi
ol_with_threads="$ol_arg"
-else
+else $as_nop
ol_with_threads="auto"
fi
# end --with-threads
@@ -9664,11 +10077,12 @@ if test $ol_aix_threads = yes ; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -9676,11 +10090,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -9691,11 +10109,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -9707,8 +10125,8 @@ done
if test $ol_with_threads != auto ; then
as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
-$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
+printf "%s\n" "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
fi
ol_with_threads=no
fi
@@ -9725,7 +10143,8 @@ ol_link_threads=no
# OpenLDAP --with-yielding_select
# Check whether --with-yielding_select was given.
-if test "${with_yielding_select+set}" = set; then :
+if test ${with_yielding_select+y}
+then :
withval=$with_yielding_select;
ol_arg=invalid
for ol_val in auto yes no manual ; do
@@ -9738,7 +10157,7 @@ if test "${with_yielding_select+set}" = set; then :
fi
ol_with_yielding_select="$ol_arg"
-else
+else $as_nop
ol_with_yielding_select="auto"
fi
# end --with-yielding_select
@@ -9748,14 +10167,15 @@ case $ol_with_threads in auto | yes | nt)
ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
-if test "x$ac_cv_func__beginthread" = xyes; then :
+if test "x$ac_cv_func__beginthread" = xyes
+then :
fi
if test $ac_cv_func__beginthread = yes ; then
-$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NT_THREADS 1" >>confdefs.h
ol_cv_nt_threads=yes
fi
@@ -9767,10 +10187,10 @@ $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
ol_with_yielding_select=yes
-$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
-$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
fi
@@ -9782,25 +10202,21 @@ esac
case $ol_with_threads in auto | yes | posix)
- for ac_header in pthread.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
fi
-done
-
if test $ac_cv_header_pthread_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
-$as_echo_n "checking POSIX thread version... " >&6; }
-if ${ol_cv_pthread_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
+printf %s "checking POSIX thread version... " >&6; }
+if test ${ol_cv_pthread_version+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9808,7 +10224,7 @@ else
# include <pthread.h>
int
-main ()
+main (void)
{
int i = PTHREAD_CREATE_JOINABLE;
@@ -9817,7 +10233,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9825,14 +10242,15 @@ if ac_fn_c_try_compile "$LINENO"; then :
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_detach" >/dev/null 2>&1; then :
+ $EGREP "pthread_detach" >/dev/null 2>&1
+then :
ol_cv_pthread_version=10
-else
+else $as_nop
ol_cv_pthread_version=8
fi
-rm -f conftest*
+rm -rf conftest*
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9844,9 +10262,10 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft7" >/dev/null 2>&1; then :
+ $EGREP "draft7" >/dev/null 2>&1
+then :
ol_cv_pthread_version=7
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9854,9 +10273,10 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
+ $EGREP "pthread_attr_init" >/dev/null 2>&1
+then :
ol_cv_pthread_version=6
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9868,32 +10288,31 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "draft5" >/dev/null 2>&1; then :
+ $EGREP "draft5" >/dev/null 2>&1
+then :
ol_cv_pthread_version=5
-else
+else $as_nop
ol_cv_pthread_version=4
fi
-rm -f conftest*
+rm -rf conftest*
fi
-rm -f conftest*
+rm -rf conftest*
fi
-rm -f conftest*
+rm -rf conftest*
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
-$as_echo "$ol_cv_pthread_version" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
+printf "%s\n" "$ol_cv_pthread_version" >&6; }
if test $ol_cv_pthread_version != 0 ; then
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREADS $ol_cv_pthread_version
-_ACEOF
+printf "%s\n" "#define HAVE_PTHREADS $ol_cv_pthread_version" >>confdefs.h
else
as_fn_error $? "unknown pthread version" "$LINENO" 5
@@ -9903,39 +10322,42 @@ _ACEOF
ol_with_threads=found
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+printf %s "checking for LinuxThreads pthread.h... " >&6; }
+if test ${ol_cv_header_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
+then :
ol_cv_header_linux_threads=yes
-else
+else $as_nop
ol_cv_header_linux_threads=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
if test $ol_cv_header_linux_threads = yes; then
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
-$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
-if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
+printf %s "checking for GNU Pth pthread.h... " >&6; }
+if test ${ol_cv_header_gnu_pth_pthread_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
@@ -9945,42 +10367,40 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
+ $EGREP "__gnu_pth__" >/dev/null 2>&1
+then :
ol_cv_header_gnu_pth_pthread_h=yes
-else
+else $as_nop
ol_cv_header_gnu_pth_pthread_h=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
-$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
+printf "%s\n" "$ol_cv_header_gnu_pth_pthread_h" >&6; }
if test $ol_cv_header_gnu_pth_pthread_h = no ; then
- for ac_header in sched.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
-if test "x$ac_cv_header_sched_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SCHED_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
fi
-done
-
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
-$as_echo_n "checking for pthread_create in default libraries... " >&6; }
-if ${ol_cv_pthread_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
+printf %s "checking for pthread_create in default libraries... " >&6; }
+if test ${ol_cv_pthread_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10000,7 +10420,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -10053,14 +10473,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_create=yes
-else
+else $as_nop
ol_cv_pthread_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10135,9 +10556,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_create=yes
-else
+else $as_nop
ol_cv_pthread_create=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -10145,8 +10567,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
-$as_echo "$ol_cv_pthread_create" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
+printf "%s\n" "$ol_cv_pthread_create" >&6; }
if test $ol_cv_pthread_create != no ; then
ol_link_threads=posix
@@ -10156,17 +10578,19 @@ $as_echo "$ol_cv_pthread_create" >&6; }
# Pthread try link: -kthread (ol_cv_pthread_kthread)
if test "$ol_link_threads" = no ; then
# try -kthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
-$as_echo_n "checking for pthread link with -kthread... " >&6; }
-if ${ol_cv_pthread_kthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
+printf %s "checking for pthread link with -kthread... " >&6; }
+if test ${ol_cv_pthread_kthread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-kthread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10186,7 +10610,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -10239,14 +10663,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_kthread=yes
-else
+else $as_nop
ol_cv_pthread_kthread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10321,9 +10746,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_kthread=yes
-else
+else $as_nop
ol_cv_pthread_kthread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -10335,8 +10761,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
-$as_echo "$ol_cv_pthread_kthread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
+printf "%s\n" "$ol_cv_pthread_kthread" >&6; }
if test $ol_cv_pthread_kthread = yes ; then
ol_link_pthreads="-kthread"
@@ -10347,17 +10773,19 @@ fi
# Pthread try link: -pthread (ol_cv_pthread_pthread)
if test "$ol_link_threads" = no ; then
# try -pthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
-$as_echo_n "checking for pthread link with -pthread... " >&6; }
-if ${ol_cv_pthread_pthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
+printf %s "checking for pthread link with -pthread... " >&6; }
+if test ${ol_cv_pthread_pthread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-pthread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10377,7 +10805,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -10430,14 +10858,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_pthread=yes
-else
+else $as_nop
ol_cv_pthread_pthread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10512,9 +10941,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_pthread=yes
-else
+else $as_nop
ol_cv_pthread_pthread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -10526,8 +10956,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
-$as_echo "$ol_cv_pthread_pthread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
+printf "%s\n" "$ol_cv_pthread_pthread" >&6; }
if test $ol_cv_pthread_pthread = yes ; then
ol_link_pthreads="-pthread"
@@ -10538,17 +10968,19 @@ fi
# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
if test "$ol_link_threads" = no ; then
# try -pthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
-$as_echo_n "checking for pthread link with -pthreads... " >&6; }
-if ${ol_cv_pthread_pthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
+printf %s "checking for pthread link with -pthreads... " >&6; }
+if test ${ol_cv_pthread_pthreads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-pthreads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10568,7 +11000,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -10621,14 +11053,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_pthreads=yes
-else
+else $as_nop
ol_cv_pthread_pthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10703,9 +11136,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_pthreads=yes
-else
+else $as_nop
ol_cv_pthread_pthreads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -10717,8 +11151,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
-$as_echo "$ol_cv_pthread_pthreads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
+printf "%s\n" "$ol_cv_pthread_pthreads" >&6; }
if test $ol_cv_pthread_pthreads = yes ; then
ol_link_pthreads="-pthreads"
@@ -10729,17 +11163,19 @@ fi
# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
if test "$ol_link_threads" = no ; then
# try -mthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
-$as_echo_n "checking for pthread link with -mthreads... " >&6; }
-if ${ol_cv_pthread_mthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
+printf %s "checking for pthread link with -mthreads... " >&6; }
+if test ${ol_cv_pthread_mthreads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-mthreads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10759,7 +11195,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -10812,14 +11248,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_mthreads=yes
-else
+else $as_nop
ol_cv_pthread_mthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10894,9 +11331,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_mthreads=yes
-else
+else $as_nop
ol_cv_pthread_mthreads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -10908,8 +11346,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
-$as_echo "$ol_cv_pthread_mthreads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
+printf "%s\n" "$ol_cv_pthread_mthreads" >&6; }
if test $ol_cv_pthread_mthreads = yes ; then
ol_link_pthreads="-mthreads"
@@ -10920,17 +11358,19 @@ fi
# Pthread try link: -thread (ol_cv_pthread_thread)
if test "$ol_link_threads" = no ; then
# try -thread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
-$as_echo_n "checking for pthread link with -thread... " >&6; }
-if ${ol_cv_pthread_thread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
+printf %s "checking for pthread link with -thread... " >&6; }
+if test ${ol_cv_pthread_thread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-thread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10950,7 +11390,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -11003,14 +11443,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_thread=yes
-else
+else $as_nop
ol_cv_pthread_thread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11085,9 +11526,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_thread=yes
-else
+else $as_nop
ol_cv_pthread_thread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11099,8 +11541,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
-$as_echo "$ol_cv_pthread_thread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
+printf "%s\n" "$ol_cv_pthread_thread" >&6; }
if test $ol_cv_pthread_thread = yes ; then
ol_link_pthreads="-thread"
@@ -11112,17 +11554,19 @@ fi
# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
if test "$ol_link_threads" = no ; then
# try -lpthread -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+printf %s "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
+if test ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11142,7 +11586,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -11195,14 +11639,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11277,9 +11722,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11291,8 +11737,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
+printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
@@ -11303,17 +11749,19 @@ fi
# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
if test "$ol_link_threads" = no ; then
# try -lpthread -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
+printf %s "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
+if test ${ol_cv_pthread_lpthread_lmach_lexc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread -lmach -lexc $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11333,7 +11781,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -11386,14 +11834,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11468,9 +11917,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthread_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthread_lmach_lexc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11482,8 +11932,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
+printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
ol_link_pthreads="-lpthread -lmach -lexc"
@@ -11495,17 +11945,19 @@ fi
# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
if test "$ol_link_threads" = no ; then
# try -lpthread -Wl,-woff,85
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
-$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
-if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+printf %s "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
+if test ${ol_cv_pthread_lib_lpthread_woff+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread -Wl,-woff,85 $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11525,7 +11977,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -11578,14 +12030,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lib_lpthread_woff=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthread_woff=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11660,9 +12113,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lib_lpthread_woff=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthread_woff=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11674,8 +12128,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
-$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
+printf "%s\n" "$ol_cv_pthread_lib_lpthread_woff" >&6; }
if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
ol_link_pthreads="-lpthread -Wl,-woff,85"
@@ -11687,17 +12141,19 @@ fi
# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
if test "$ol_link_threads" = no ; then
# try -lpthread
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
-$as_echo_n "checking for pthread link with -lpthread... " >&6; }
-if ${ol_cv_pthread_lpthread+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
+printf %s "checking for pthread link with -lpthread... " >&6; }
+if test ${ol_cv_pthread_lpthread+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11717,7 +12173,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -11770,14 +12226,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthread=yes
-else
+else $as_nop
ol_cv_pthread_lpthread=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11852,9 +12309,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthread=yes
-else
+else $as_nop
ol_cv_pthread_lpthread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11866,8 +12324,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
-$as_echo "$ol_cv_pthread_lpthread" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
+printf "%s\n" "$ol_cv_pthread_lpthread" >&6; }
if test $ol_cv_pthread_lpthread = yes ; then
ol_link_pthreads="-lpthread"
@@ -11878,17 +12336,19 @@ fi
# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
if test "$ol_link_threads" = no ; then
# try -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
-$as_echo_n "checking for pthread link with -lc_r... " >&6; }
-if ${ol_cv_pthread_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
+printf %s "checking for pthread link with -lc_r... " >&6; }
+if test ${ol_cv_pthread_lc_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11908,7 +12368,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -11961,14 +12421,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12043,9 +12504,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lc_r=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -12057,8 +12519,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
-$as_echo "$ol_cv_pthread_lc_r" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
+printf "%s\n" "$ol_cv_pthread_lc_r" >&6; }
if test $ol_cv_pthread_lc_r = yes ; then
ol_link_pthreads="-lc_r"
@@ -12070,17 +12532,19 @@ fi
# Pthread try link: -threads (ol_cv_pthread_threads)
if test "$ol_link_threads" = no ; then
# try -threads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
-$as_echo_n "checking for pthread link with -threads... " >&6; }
-if ${ol_cv_pthread_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
+printf %s "checking for pthread link with -threads... " >&6; }
+if test ${ol_cv_pthread_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-threads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12100,7 +12564,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -12153,14 +12617,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_threads=yes
-else
+else $as_nop
ol_cv_pthread_threads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12235,9 +12700,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_threads=yes
-else
+else $as_nop
ol_cv_pthread_threads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -12249,8 +12715,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
-$as_echo "$ol_cv_pthread_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
+printf "%s\n" "$ol_cv_pthread_threads" >&6; }
if test $ol_cv_pthread_threads = yes ; then
ol_link_pthreads="-threads"
@@ -12262,17 +12728,19 @@ fi
# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
if test "$ol_link_threads" = no ; then
# try -lpthreads -lmach -lexc -lc_r
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+printf %s "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
+if test ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12292,7 +12760,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -12345,14 +12813,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12427,9 +12896,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -12441,8 +12911,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
+printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
@@ -12453,17 +12923,19 @@ fi
# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
if test "$ol_link_threads" = no ; then
# try -lpthreads -lmach -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
+printf %s "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
+if test ${ol_cv_pthread_lpthreads_lmach_lexc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads -lmach -lexc $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12483,7 +12955,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -12536,14 +13008,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12618,9 +13091,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthreads_lmach_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lmach_lexc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -12632,8 +13106,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
+printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
ol_link_pthreads="-lpthreads -lmach -lexc"
@@ -12644,17 +13118,19 @@ fi
# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
if test "$ol_link_threads" = no ; then
# try -lpthreads -lexc
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
-$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
-if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
+printf %s "checking for pthread link with -lpthreads -lexc... " >&6; }
+if test ${ol_cv_pthread_lpthreads_lexc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads -lexc $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12674,7 +13150,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -12727,14 +13203,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lpthreads_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12809,9 +13286,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lpthreads_lexc=yes
-else
+else $as_nop
ol_cv_pthread_lpthreads_lexc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -12823,8 +13301,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
-$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
+printf "%s\n" "$ol_cv_pthread_lpthreads_lexc" >&6; }
if test $ol_cv_pthread_lpthreads_lexc = yes ; then
ol_link_pthreads="-lpthreads -lexc"
@@ -12836,17 +13314,19 @@ fi
# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
if test "$ol_link_threads" = no ; then
# try -lpthreads
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
-$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
-if ${ol_cv_pthread_lib_lpthreads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
+printf %s "checking for pthread link with -lpthreads... " >&6; }
+if test ${ol_cv_pthread_lib_lpthreads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# save the flags
ol_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12866,7 +13346,7 @@ static void *task(p)
}
int
-main ()
+main (void)
{
/* pthread test function */
@@ -12919,14 +13399,15 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_pthread_lib_lpthreads=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13001,9 +13482,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_lib_lpthreads=yes
-else
+else $as_nop
ol_cv_pthread_lib_lpthreads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -13015,8 +13497,8 @@ fi
LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
-$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
+printf "%s\n" "$ol_cv_pthread_lib_lpthreads" >&6; }
if test $ol_cv_pthread_lib_lpthreads = yes ; then
ol_link_pthreads="-lpthreads"
@@ -13025,8 +13507,8 @@ $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
-$as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
+printf "%s\n" "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
if test $ol_link_threads != no ; then
LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
@@ -13035,27 +13517,35 @@ $as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link
save_LIBS="$LIBS"
LIBS="$LTHREAD_LIBS $LIBS"
- for ac_func in sched_yield pthread_yield thr_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
+if test "x$ac_cv_func_sched_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
+if test "x$ac_cv_func_pthread_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "thr_yield" "ac_cv_func_thr_yield"
+if test "x$ac_cv_func_thr_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_YIELD 1" >>confdefs.h
fi
-done
if test $ac_cv_func_sched_yield = no &&
test $ac_cv_func_pthread_yield = no &&
test $ac_cv_func_thr_yield = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
-$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_yield+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+printf %s "checking for sched_yield in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_sched_yield+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13064,36 +13554,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sched_yield ();
int
-main ()
+main (void)
{
return sched_yield ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_rt_sched_yield=yes
-else
+else $as_nop
ac_cv_lib_rt_sched_yield=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
-$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes
+then :
LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
-$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
ac_cv_func_sched_yield=yes
-else
+else $as_nop
ac_cv_func_sched_yield=no
fi
@@ -13101,27 +13590,24 @@ fi
if test $ac_cv_func_sched_yield = no &&
test $ac_cv_func_pthread_yield = no &&
test "$ac_cv_func_thr_yield" = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
-$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
+printf "%s\n" "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
fi
- for ac_func in pthread_kill
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
-if test "x$ac_cv_func_pthread_kill" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
+if test "x$ac_cv_func_pthread_kill" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
fi
-done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
-$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
+printf %s "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
+if test ${ol_cv_func_pthread_rwlock_destroy+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13130,35 +13616,37 @@ else
pthread_rwlock_t rwlock;
int
-main ()
+main (void)
{
pthread_rwlock_destroy(&rwlock);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_func_pthread_rwlock_destroy=yes
-else
+else $as_nop
ol_cv_func_pthread_rwlock_destroy=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
-$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
+printf "%s\n" "$ol_cv_func_pthread_rwlock_destroy" >&6; }
if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
-$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
-$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
-if ${ol_cv_func_pthread_detach+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
+printf %s "checking for pthread_detach with <pthread.h>... " >&6; }
+if test ${ol_cv_func_pthread_detach+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13169,81 +13657,88 @@ else
#endif
int
-main ()
+main (void)
{
pthread_detach(NULL);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_func_pthread_detach=yes
-else
+else $as_nop
ol_cv_func_pthread_detach=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
-$as_echo "$ol_cv_func_pthread_detach" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
+printf "%s\n" "$ol_cv_func_pthread_detach" >&6; }
if test $ol_cv_func_pthread_detach = no ; then
as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
fi
-$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
- for ac_func in \
- pthread_setconcurrency \
- pthread_getconcurrency \
- thr_setconcurrency \
- thr_getconcurrency \
+ ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
+if test "x$ac_cv_func_pthread_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_func "$LINENO" "pthread_getconcurrency" "ac_cv_func_pthread_getconcurrency"
+if test "x$ac_cv_func_pthread_getconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_GETCONCURRENCY 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
+if test "x$ac_cv_func_thr_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
+if test "x$ac_cv_func_thr_getconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
+fi
- for ac_func in pthread_kill_other_threads_np
-do :
- ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
-if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
-_ACEOF
+
+ ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
+if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1" >>confdefs.h
fi
-done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
-$as_echo_n "checking for LinuxThreads implementation... " >&6; }
-if ${ol_cv_sys_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
+printf %s "checking for LinuxThreads implementation... " >&6; }
+if test ${ol_cv_sys_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
-$as_echo "$ol_cv_sys_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
+printf "%s\n" "$ol_cv_sys_linux_threads" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
-$as_echo_n "checking for LinuxThreads consistency... " >&6; }
-if ${ol_cv_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
+printf %s "checking for LinuxThreads consistency... " >&6; }
+if test ${ol_cv_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test $ol_cv_header_linux_threads = yes &&
test $ol_cv_sys_linux_threads = yes; then
@@ -13256,23 +13751,25 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
-$as_echo "$ol_cv_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
+printf "%s\n" "$ol_cv_linux_threads" >&6; }
if test $ol_cv_linux_threads = error; then
as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
-$as_echo_n "checking if pthread_create() works... " >&6; }
-if ${ol_cv_pthread_create_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
+printf %s "checking if pthread_create() works... " >&6; }
+if test ${ol_cv_pthread_create_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
ol_cv_pthread_create_works=yes
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13347,9 +13844,10 @@ int main(argc, argv)
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_create_works=yes
-else
+else $as_nop
ol_cv_pthread_create_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -13357,8 +13855,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
-$as_echo "$ol_cv_pthread_create_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
+printf "%s\n" "$ol_cv_pthread_create_works" >&6; }
if test $ol_cv_pthread_create_works = no ; then
as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
@@ -13368,20 +13866,22 @@ $as_echo "$ol_cv_pthread_create_works" >&6; }
if test $ol_replace_broken_yield = yes ; then
-$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
+printf "%s\n" "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
fi
if test x$ol_with_yielding_select = xauto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
-$as_echo_n "checking if select yields when using pthreads... " >&6; }
-if ${ol_cv_pthread_select_yields+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
+printf %s "checking if select yields when using pthreads... " >&6; }
+if test ${ol_cv_pthread_select_yields+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ if test "$cross_compiling" = yes
+then :
ol_cv_pthread_select_yields=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13459,9 +13959,10 @@ int main(argc, argv)
exit(2);
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ol_cv_pthread_select_yields=no
-else
+else $as_nop
ol_cv_pthread_select_yields=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -13469,8 +13970,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
-$as_echo "$ol_cv_pthread_select_yields" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
+printf "%s\n" "$ol_cv_pthread_select_yields" >&6; }
if test $ol_cv_pthread_select_yields = cross ; then
as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
@@ -13496,34 +13997,36 @@ esac
case $ol_with_threads in auto | yes | mach)
- for ac_header in mach/cthreads.h cthreads.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_cthreads_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_cthreads_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_CTHREADS_H 1" >>confdefs.h
-done
+fi
if test $ac_cv_header_mach_cthreads_h = yes ; then
ol_with_threads=found
ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
+if test "x$ac_cv_func_cthread_fork" = xyes
+then :
ol_link_threads=yes
fi
if test $ol_link_threads = no ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
-$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
-if ${ol_cv_cthread_all_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
+printf %s "checking for cthread_fork with -all_load... " >&6; }
+if test ${ol_cv_cthread_all_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
save_LIBS="$LIBS"
LIBS="-all_load $LIBS"
@@ -13531,7 +14034,7 @@ else
/* end confdefs.h. */
#include <mach/cthreads.h>
int
-main ()
+main (void)
{
cthread_fork((void *)0, (void *)0);
@@ -13540,18 +14043,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_cthread_all_load=yes
-else
+else $as_nop
ol_cv_cthread_all_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$save_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
-$as_echo "$ol_cv_cthread_all_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
+printf "%s\n" "$ol_cv_cthread_all_load" >&6; }
if test $ol_cv_cthread_all_load = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
@@ -13567,7 +14071,8 @@ $as_echo "$ol_cv_cthread_all_load" >&6; }
save_LIBS="$LIBS"
LIBS="$LIBS -lthreads"
ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
-if test "x$ac_cv_func_cthread_fork" = xyes; then :
+if test "x$ac_cv_func_cthread_fork" = xyes
+then :
ol_link_threads=yes
fi
@@ -13587,7 +14092,7 @@ fi
if test $ol_link_threads = mach ; then
-$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
elif test $ol_with_threads = found ; then
as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
@@ -13597,25 +14102,21 @@ esac
case $ol_with_threads in auto | yes | pth)
- for ac_header in pth.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
-if test "x$ac_cv_header_pth_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTH_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTH_H 1" >>confdefs.h
fi
-done
-
if test $ac_cv_header_pth_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
-$as_echo_n "checking for pth_version in -lpth... " >&6; }
-if ${ac_cv_lib_pth_pth_version+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
+printf %s "checking for pth_version in -lpth... " >&6; }
+if test ${ac_cv_lib_pth_pth_version+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpth $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13624,39 +14125,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char pth_version ();
int
-main ()
+main (void)
{
return pth_version ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_pth_pth_version=yes
-else
+else $as_nop
ac_cv_lib_pth_pth_version=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
-$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
-if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
+printf "%s\n" "$ac_cv_lib_pth_pth_version" >&6; }
+if test "x$ac_cv_lib_pth_pth_version" = xyes
+then :
have_pth=yes
-else
+else $as_nop
have_pth=no
fi
if test $have_pth = yes ; then
-$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GNU_PTH 1" >>confdefs.h
LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
ol_link_threads=pth
@@ -13672,26 +14172,27 @@ esac
case $ol_with_threads in auto | yes | lwp)
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
+if test "x$ac_cv_header_thread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
+if test "x$ac_cv_header_synch_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
-done
+fi
if test $ac_cv_header_thread_h = yes &&
test $ac_cv_header_synch_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
-$as_echo_n "checking for thr_create in -lthread... " >&6; }
-if ${ac_cv_lib_thread_thr_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
+printf %s "checking for thr_create in -lthread... " >&6; }
+if test ${ac_cv_lib_thread_thr_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13700,39 +14201,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char thr_create ();
int
-main ()
+main (void)
{
return thr_create ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_thread_thr_create=yes
-else
+else $as_nop
ac_cv_lib_thread_thr_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
-$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
-if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
+printf "%s\n" "$ac_cv_lib_thread_thr_create" >&6; }
+if test "x$ac_cv_lib_thread_thr_create" = xyes
+then :
have_thr=yes
-else
+else $as_nop
have_thr=no
fi
if test $have_thr = yes ; then
-$as_echo "#define HAVE_THR 1" >>confdefs.h
+printf "%s\n" "#define HAVE_THR 1" >>confdefs.h
LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
ol_link_threads=thr
@@ -13741,42 +14241,36 @@ $as_echo "#define HAVE_THR 1" >>confdefs.h
ol_with_yielding_select=yes
fi
- for ac_func in \
- thr_setconcurrency \
- thr_getconcurrency \
+ ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
+if test "x$ac_cv_func_thr_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
+if test "x$ac_cv_func_thr_getconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
fi
-done
fi
fi
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
fi
-done
-
if test $ac_cv_header_lwp_lwp_h = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
-$as_echo_n "checking for lwp_create in -llwp... " >&6; }
-if ${ac_cv_lib_lwp_lwp_create+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
+printf %s "checking for lwp_create in -llwp... " >&6; }
+if test ${ac_cv_lib_lwp_lwp_create+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-llwp $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13785,39 +14279,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char lwp_create ();
int
-main ()
+main (void)
{
return lwp_create ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_lwp_lwp_create=yes
-else
+else $as_nop
ac_cv_lib_lwp_lwp_create=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
-$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
-if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
+printf "%s\n" "$ac_cv_lib_lwp_lwp_create" >&6; }
+if test "x$ac_cv_lib_lwp_lwp_create" = xyes
+then :
have_lwp=yes
-else
+else $as_nop
have_lwp=no
fi
if test $have_lwp = yes ; then
-$as_echo "#define HAVE_LWP 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LWP 1" >>confdefs.h
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
ol_link_threads=lwp
@@ -13832,189 +14325,186 @@ esac
if test $ol_with_yielding_select = yes ; then
-$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
fi
if test $ol_with_threads = manual ; then
ol_link_threads=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
-$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
+printf "%s\n" "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
- for ac_header in pthread.h sched.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
-done
+fi
- for ac_func in sched_yield pthread_yield
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
+if test "x$ac_cv_func_sched_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
+if test "x$ac_cv_func_pthread_yield" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
-$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
-if ${ol_cv_header_linux_threads+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+printf %s "checking for LinuxThreads pthread.h... " >&6; }
+if test ${ol_cv_header_linux_threads+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
+then :
ol_cv_header_linux_threads=yes
-else
+else $as_nop
ol_cv_header_linux_threads=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
-$as_echo "$ol_cv_header_linux_threads" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
if test $ol_cv_header_linux_threads = yes; then
-$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
fi
- for ac_header in mach/cthreads.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
-if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MACH_CTHREADS_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_cthreads_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
fi
-done
-
- for ac_header in lwp/lwp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
-if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LWP_LWP_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
fi
-done
-
- for ac_header in thread.h synch.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
+if test "x$ac_cv_header_thread_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
+if test "x$ac_cv_header_synch_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
-done
+fi
fi
if test $ol_link_threads != no && test $ol_link_threads != nt ; then
-$as_echo "#define REENTRANT 1" >>confdefs.h
+printf "%s\n" "#define REENTRANT 1" >>confdefs.h
-$as_echo "#define _REENTRANT 1" >>confdefs.h
+printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
-$as_echo "#define THREAD_SAFE 1" >>confdefs.h
+printf "%s\n" "#define THREAD_SAFE 1" >>confdefs.h
-$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+printf "%s\n" "#define _THREAD_SAFE 1" >>confdefs.h
-$as_echo "#define THREADSAFE 1" >>confdefs.h
+printf "%s\n" "#define THREADSAFE 1" >>confdefs.h
-$as_echo "#define _THREADSAFE 1" >>confdefs.h
+printf "%s\n" "#define _THREADSAFE 1" >>confdefs.h
-$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
+printf "%s\n" "#define _SGI_MP_SOURCE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
-$as_echo_n "checking for thread specific errno... " >&6; }
-if ${ol_cv_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
+printf %s "checking for thread specific errno... " >&6; }
+if test ${ol_cv_errno_thread_specific+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <errno.h>
int
-main ()
+main (void)
{
errno = 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_errno_thread_specific=yes
-else
+else $as_nop
ol_cv_errno_thread_specific=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
-$as_echo "$ol_cv_errno_thread_specific" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
+printf "%s\n" "$ol_cv_errno_thread_specific" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
-$as_echo_n "checking for thread specific h_errno... " >&6; }
-if ${ol_cv_h_errno_thread_specific+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
+printf %s "checking for thread specific h_errno... " >&6; }
+if test ${ol_cv_h_errno_thread_specific+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
-main ()
+main (void)
{
h_errno = 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ol_cv_h_errno_thread_specific=yes
-else
+else $as_nop
ol_cv_h_errno_thread_specific=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
-$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
+printf "%s\n" "$ol_cv_h_errno_thread_specific" >&6; }
if test $ol_cv_errno_thread_specific != yes ||
test $ol_cv_h_errno_thread_specific != yes ; then
@@ -14030,13 +14520,13 @@ if test $ol_link_threads = no ; then
fi
if test $ol_with_threads = auto ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
-$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
+printf "%s\n" "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
ol_with_threads=no
fi
-$as_echo "#define NO_THREADS 1" >>confdefs.h
+printf "%s\n" "#define NO_THREADS 1" >>confdefs.h
LTHREAD_LIBS=""
BUILD_THREAD=no
@@ -14046,7 +14536,7 @@ fi
if test $ol_link_threads != no ; then
-$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
+printf "%s\n" "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
fi
@@ -14078,16 +14568,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
LIBS="$LTHREAD_LIBS $LIBS"
saved_CFLAGS="$CFLAGS"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
- for ac_func in sem_timedwait
-do :
- ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
-if test "x$ac_cv_func_sem_timedwait" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SEM_TIMEDWAIT 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
+if test "x$ac_cv_func_sem_timedwait" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
fi
-done
LIBS="$saved_LIBS"
{ saved_LIBS=; unset saved_LIBS;}
@@ -14112,22 +14598,24 @@ case "$have_pthreads" in
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
-$as_echo_n "checking size of pthread_t... " >&6; }
-if ${ac_cv_sizeof_pthread_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+printf %s "checking size of pthread_t... " >&6; }
+if test ${ac_cv_sizeof_pthread_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
$ac_includes_default
#include <pthread.h>
-"; then :
+"
+then :
-else
+else $as_nop
if test "$ac_cv_type_pthread_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (pthread_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14136,32 +14624,32 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
-$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
LIBISC_PTHREADS_NOTHREADS=pthreads
-$as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
#
# We'd like to use sigwait() too
#
ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
-if test "x$ac_cv_func_sigwait" = xyes; then :
+if test "x$ac_cv_func_sigwait" = xyes
+then :
have_sigwait=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
-$as_echo_n "checking for sigwait in -lc... " >&6; }
-if ${ac_cv_lib_c_sigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
+printf %s "checking for sigwait in -lc... " >&6; }
+if test ${ac_cv_lib_c_sigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14170,37 +14658,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sigwait ();
int
-main ()
+main (void)
{
return sigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_c_sigwait=yes
-else
+else $as_nop
ac_cv_lib_c_sigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
-$as_echo "$ac_cv_lib_c_sigwait" >&6; }
-if test "x$ac_cv_lib_c_sigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
+printf "%s\n" "$ac_cv_lib_c_sigwait" >&6; }
+if test "x$ac_cv_lib_c_sigwait" = xyes
+then :
have_sigwait=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
-$as_echo_n "checking for sigwait in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_sigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
+printf %s "checking for sigwait in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_sigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14209,37 +14697,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sigwait ();
int
-main ()
+main (void)
{
return sigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_pthread_sigwait=yes
-else
+else $as_nop
ac_cv_lib_pthread_sigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
-$as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
-if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
+printf "%s\n" "$ac_cv_lib_pthread_sigwait" >&6; }
+if test "x$ac_cv_lib_pthread_sigwait" = xyes
+then :
have_sigwait=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
-$as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread__Psigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
+printf %s "checking for _Psigwait in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread__Psigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14248,32 +14736,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char _Psigwait ();
int
-main ()
+main (void)
{
return _Psigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_pthread__Psigwait=yes
-else
+else $as_nop
ac_cv_lib_pthread__Psigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
-$as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
-if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
+printf "%s\n" "$ac_cv_lib_pthread__Psigwait" >&6; }
+if test "x$ac_cv_lib_pthread__Psigwait" = xyes
+then :
have_sigwait=yes
-else
+else $as_nop
have_sigwait=no
fi
@@ -14289,11 +14776,12 @@ fi
case "$host:$have_sigwait" in
*-freebsd*:no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
-$as_echo_n "checking for sigwait in -lc_r... " >&6; }
-if ${ac_cv_lib_c_r_sigwait+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
+printf %s "checking for sigwait in -lc_r... " >&6; }
+if test ${ac_cv_lib_c_r_sigwait+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14302,30 +14790,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sigwait ();
int
-main ()
+main (void)
{
return sigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_c_r_sigwait=yes
-else
+else $as_nop
ac_cv_lib_c_r_sigwait=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
-$as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
-if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
+printf "%s\n" "$ac_cv_lib_c_r_sigwait" >&6; }
+if test "x$ac_cv_lib_c_r_sigwait" = xyes
+then :
have_sigwait=yes
fi
@@ -14335,32 +14822,29 @@ fi
yes)
ac_cv_func_sigwait=yes
-$as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
esac
- for ac_func in pthread_attr_getstacksize
-do :
- ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
-if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
+if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1" >>confdefs.h
fi
-done
- for ac_func in pthread_attr_setstacksize sysconf
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize"
+if test "x$ac_cv_func_pthread_attr_setstacksize" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
+if test "x$ac_cv_func_sysconf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
fi
-done
case "$host" in
@@ -14368,43 +14852,39 @@ done
;;
*-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
-$as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
+printf "%s\n" "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
;;
*-bsdi3.*|*-bsdi4.0*)
-$as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
+printf "%s\n" "#define NEED_PTHREAD_INIT 1" >>confdefs.h
;;
*-linux*)
-$as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUXTHREADS 1" >>confdefs.h
;;
*-solaris*)
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
- for ac_func in pthread_setconcurrency
-do :
- ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
-if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_SETCONCURRENCY 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
+if test "x$ac_cv_func_pthread_setconcurrency" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
fi
-done
case "$ac_cv_func_pthread_setconcurrency" in
yes)
-$as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
+printf "%s\n" "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
esac
;;
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
-$as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
;;
esac
@@ -14417,18 +14897,19 @@ $as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
hack_shutup_pthreadonceinit=yes
;;
*-solaris2.1[0-9])
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
-$as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
-if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
+printf %s "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
+if test ${ntp_cv_braces_around_pthread_once_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
-main ()
+main (void)
{
static pthread_once_t once_test =
@@ -14439,17 +14920,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_braces_around_pthread_once_init=no
-else
+else $as_nop
ntp_cv_braces_around_pthread_once_init=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
-$as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
+printf "%s\n" "$ntp_cv_braces_around_pthread_once_init" >&6; }
case "$ntp_cv_braces_around_pthread_once_init" in
yes)
hack_shutup_pthreadonceinit=yes
@@ -14459,7 +14941,7 @@ $as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
case "$hack_shutup_pthreadonceinit" in
yes)
-$as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
esac
LIBS="$saved_LIBS"
@@ -14488,15 +14970,17 @@ fi
case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
no:yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
-$as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
-if ${ntp_cv_vsnprintf_percent_m+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
+printf %s "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
+if test ${ntp_cv_vsnprintf_percent_m+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ntp_cv_vsnprintf_percent_m=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14530,7 +15014,7 @@ else
}
int
-main ()
+main (void)
{
char sbuf[512];
@@ -14548,9 +15032,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ntp_cv_vsnprintf_percent_m=yes
-else
+else $as_nop
ntp_cv_vsnprintf_percent_m=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -14559,60 +15044,56 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
-$as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
+printf "%s\n" "$ntp_cv_vsnprintf_percent_m" >&6; }
case "$ntp_cv_vsnprintf_percent_m" in
yes)
-$as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
+printf "%s\n" "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
esac
esac
-for ac_header in sys/clockctl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_CLOCKCTL_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_clockctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_CLOCKCTL_H 1" >>confdefs.h
fi
-done
-
# Check whether --enable-clockctl was given.
-if test "${enable_clockctl+set}" = set; then :
+if test ${enable_clockctl+y}
+then :
enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
-else
+else $as_nop
ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
-$as_echo_n "checking if we should use /dev/clockctl... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
-$as_echo "$ntp_use_dev_clockctl" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
+printf %s "checking if we should use /dev/clockctl... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
+printf "%s\n" "$ntp_use_dev_clockctl" >&6; }
-for ac_header in sys/capability.h sys/prctl.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_capability_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_CAPABILITY_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_prctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h
-done
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
-$as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
+printf %s "checking if we have linux capabilities (libcap)... " >&6; }
case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
yesyes)
@@ -14630,45 +15111,42 @@ case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
esac
# Check whether --enable-linuxcaps was given.
-if test "${enable_linuxcaps+set}" = set; then :
+if test ${enable_linuxcaps+y}
+then :
enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
-$as_echo "$ntp_have_linuxcaps" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
+printf "%s\n" "$ntp_have_linuxcaps" >&6; }
case "$ntp_have_linuxcaps" in
yes)
-$as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
LIBS="$LIBS -lcap"
;;
esac
-for ac_header in priv.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
-if test "x$ac_cv_header_priv_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PRIV_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
+if test "x$ac_cv_header_priv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PRIV_H 1" >>confdefs.h
fi
-done
-
case "$ac_cv_header_priv_h" in
yes)
case "$host" in
*-solaris*)
ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
-if test "x$ac_cv_func_setppriv" = xyes; then :
+if test "x$ac_cv_func_setppriv" = xyes
+then :
ntp_have_solarisprivs=yes
-else
+else $as_nop
ntp_have_solarisprivs=no
fi
@@ -14678,78 +15156,76 @@ fi
esac
# Check whether --enable-solarisprivs was given.
-if test "${enable_solarisprivs+set}" = set; then :
+if test ${enable_solarisprivs+y}
+then :
enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
-$as_echo_n "checking if we have solaris privileges... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
+printf %s "checking if we have solaris privileges... " >&6; }
case "$ntp_have_solarisprivs" in
yes)
-$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
;;
'') ntp_have_solarisprivs="no"
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
-$as_echo "$ntp_have_solarisprivs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
+printf "%s\n" "$ntp_have_solarisprivs" >&6; }
-for ac_header in sys/mac.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_mac_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_MAC_H 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MAC_H 1" >>confdefs.h
fi
-done
-
# Check whether --enable-trustedbsd_mac was given.
-if test "${enable_trustedbsd_mac+set}" = set; then :
+if test ${enable_trustedbsd_mac+y}
+then :
enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
-$as_echo_n "checking if we should use TrustedBSD MAC privileges... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
+printf %s "checking if we should use TrustedBSD MAC privileges... " >&6; }
case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
yesyes)
-$as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
;;
*) ntp_use_trustedbsd_mac="no";
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
-$as_echo "$ntp_use_trustedbsd_mac" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
+printf "%s\n" "$ntp_use_trustedbsd_mac" >&6; }
case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
*yes*)
-$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DROPROOT 1" >>confdefs.h
esac
case "$host" in
*-*-darwin*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
-$as_echo_n "checking for library containing res_9_init... " >&6; }
-if ${ac_cv_search_res_9_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
+printf %s "checking for library containing res_9_init... " >&6; }
+if test ${ac_cv_search_res_9_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14757,56 +15233,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char res_9_init ();
int
-main ()
+main (void)
{
return res_9_init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' resolv
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_res_9_init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_res_9_init+:} false; then :
+ if test ${ac_cv_search_res_9_init+y}
+then :
break
fi
done
-if ${ac_cv_search_res_9_init+:} false; then :
+if test ${ac_cv_search_res_9_init+y}
+then :
-else
+else $as_nop
ac_cv_search_res_9_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
-$as_echo "$ac_cv_search_res_9_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
+printf "%s\n" "$ac_cv_search_res_9_init" >&6; }
ac_res=$ac_cv_search_res_9_init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
-$as_echo_n "checking for library containing res_init... " >&6; }
-if ${ac_cv_search_res_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
+printf %s "checking for library containing res_init... " >&6; }
+if test ${ac_cv_search_res_init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14814,56 +15293,55 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char res_init ();
int
-main ()
+main (void)
{
return res_init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' resolv
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_res_init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_res_init+:} false; then :
+ if test ${ac_cv_search_res_init+y}
+then :
break
fi
done
-if ${ac_cv_search_res_init+:} false; then :
+if test ${ac_cv_search_res_init+y}
+then :
-else
+else $as_nop
ac_cv_search_res_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
-$as_echo "$ac_cv_search_res_init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
+printf "%s\n" "$ac_cv_search_res_init" >&6; }
ac_res=$ac_cv_search_res_init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
;;
esac
-for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
+ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
@@ -14876,85 +15354,149 @@ ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE
# include <netdb.h>
#endif
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_sys_types_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_arpa_nameser_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if test "x$ac_cv_header_resolv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
+
+fi
#HMS: Why do we do this check so "early"?
-for ac_func in res_init
+
+ for ac_func in res_init
do :
ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
-if test "x$ac_cv_func_res_init" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_RES_INIT 1
-_ACEOF
+if test "x$ac_cv_func_res_init" = xyes
+then :
+ printf "%s\n" "#define HAVE_RES_INIT 1" >>confdefs.h
-else
- for ac_func in __res_init
-do :
+else $as_nop
ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
-if test "x$ac_cv_func___res_init" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE___RES_INIT 1
-_ACEOF
+if test "x$ac_cv_func___res_init" = xyes
+then :
+ printf "%s\n" "#define HAVE___RES_INIT 1" >>confdefs.h
fi
-done
fi
-done
+done
# We also need -lsocket, but we have tested for that already.
ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
-if test "x$ac_cv_func_inet_ntop" = xyes; then :
+if test "x$ac_cv_func_inet_ntop" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
fi
ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-if test "x$ac_cv_func_inet_pton" = xyes; then :
+if test "x$ac_cv_func_inet_pton" = xyes
+then :
-else
+else $as_nop
-$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
-if test "x$ac_cv_type_int32" = xyes; then :
+if test "x$ac_cv_type_int32" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT32 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
-if test "x$ac_cv_type_u_int32" = xyes; then :
+if test "x$ac_cv_type_u_int32" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_U_INT32 1
-_ACEOF
+printf "%s\n" "#define HAVE_U_INT32 1" >>confdefs.h
fi
@@ -14964,11 +15506,12 @@ fi
case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
no::yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
-$as_echo_n "checking for int32 with DNS headers included... " >&6; }
-if ${ntp_cv_type_int32_with_dns+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
+printf %s "checking for int32 with DNS headers included... " >&6; }
+if test ${ntp_cv_type_int32_with_dns+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14978,7 +15521,7 @@ else
#include <resolv.h>
int
-main ()
+main (void)
{
size_t cb = sizeof(int32);
@@ -14988,32 +15531,34 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_type_int32_with_dns=yes
-else
+else $as_nop
ntp_cv_type_int32_with_dns=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
-$as_echo "$ntp_cv_type_int32_with_dns" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
+printf "%s\n" "$ntp_cv_type_int32_with_dns" >&6; }
case "$ntp_cv_type_int32_with_dns" in
yes)
-$as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
esac
esac
case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
no::yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
-$as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
-if ${ntp_cv_type_u_int32_with_dns+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
+printf %s "checking for u_int32 with DNS headers included... " >&6; }
+if test ${ntp_cv_type_u_int32_with_dns+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15023,7 +15568,7 @@ else
#include <resolv.h>
int
-main ()
+main (void)
{
size_t cb = sizeof(u_int32);
@@ -15033,28 +15578,27 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_type_u_int32_with_dns=yes
-else
+else $as_nop
ntp_cv_type_u_int32_with_dns=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
-$as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
+printf "%s\n" "$ntp_cv_type_u_int32_with_dns" >&6; }
case "$ntp_cv_type_u_int32_with_dns" in
yes)
-$as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
esac
esac
-for ac_header in sys/timepps.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
+ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -15064,21 +15608,19 @@ do :
"
-if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEPPS_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_timepps_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIMEPPS_H 1" >>confdefs.h
fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
-$as_echo_n "checking for struct timespec... " >&6; }
-if ${ntp_cv_struct_timespec+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
+printf %s "checking for struct timespec... " >&6; }
+if test ${ntp_cv_struct_timespec+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15094,7 +15636,7 @@ else
#endif
int
-main ()
+main (void)
{
struct timespec n;
@@ -15104,29 +15646,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_timespec=yes
-else
+else $as_nop
ntp_cv_struct_timespec=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
-$as_echo "$ntp_cv_struct_timespec" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
+printf "%s\n" "$ntp_cv_struct_timespec" >&6; }
case "$ntp_cv_struct_timespec" in
yes)
-$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
-$as_echo_n "checking for struct ntptimeval... " >&6; }
-if ${ntp_cv_struct_ntptimeval+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
+printf %s "checking for struct ntptimeval... " >&6; }
+if test ${ntp_cv_struct_ntptimeval+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15134,7 +15678,7 @@ else
#include <sys/timex.h>
int
-main ()
+main (void)
{
struct ntptimeval n;
@@ -15144,48 +15688,45 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_struct_ntptimeval=yes
-else
+else $as_nop
ntp_cv_struct_ntptimeval=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
-$as_echo "$ntp_cv_struct_ntptimeval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
+printf "%s\n" "$ntp_cv_struct_ntptimeval" >&6; }
case "$ntp_cv_struct_ntptimeval" in
yes)
-$as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
esac
-for ac_header in md5.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
+ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
"
-if test "x$ac_cv_header_md5_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MD5_H 1
-_ACEOF
+if test "x$ac_cv_header_md5_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MD5_H 1" >>confdefs.h
fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
-$as_echo_n "checking for library containing MD5Init... " >&6; }
-if ${ac_cv_search_MD5Init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
+printf %s "checking for library containing MD5Init... " >&6; }
+if test ${ac_cv_search_MD5Init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15193,78 +15734,107 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char MD5Init ();
int
-main ()
+main (void)
{
return MD5Init ();
;
return 0;
}
_ACEOF
-for ac_lib in '' md5 md; do
+for ac_lib in '' md5 md
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_MD5Init=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_MD5Init+:} false; then :
+ if test ${ac_cv_search_MD5Init+y}
+then :
break
fi
done
-if ${ac_cv_search_MD5Init+:} false; then :
+if test ${ac_cv_search_MD5Init+y}
+then :
-else
+else $as_nop
ac_cv_search_MD5Init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
-$as_echo "$ac_cv_search_MD5Init" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
+printf "%s\n" "$ac_cv_search_MD5Init" >&6; }
ac_res=$ac_cv_search_MD5Init
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "MD5Init" "ac_cv_func_MD5Init"
+if test "x$ac_cv_func_MD5Init" = xyes
+then :
+ printf "%s\n" "#define HAVE_MD5INIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
+if test "x$ac_cv_func_sysconf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
+if test "x$ac_cv_func_getdtablesize" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
+if test "x$ac_cv_func_sigaction" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
+if test "x$ac_cv_func_sigset" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
+if test "x$ac_cv_func_sigvec" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
fi
-done
# HMS: does this need to be a cached variable?
# Check whether --enable-signalled-io was given.
-if test "${enable_signalled_io+set}" = set; then :
+if test ${enable_signalled_io+y}
+then :
enableval=$enable_signalled_io; use_signalled_io=$enableval
-else
+else $as_nop
use_signalled_io=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
-$as_echo_n "checking for SIGIO... " >&6; }
-if ${ntp_cv_hdr_def_sigio+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
+printf %s "checking for SIGIO... " >&6; }
+if test ${ntp_cv_hdr_def_sigio+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15275,20 +15845,21 @@ else
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_cv_hdr_def_sigio=yes
-else
+else $as_nop
ntp_cv_hdr_def_sigio=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
-$as_echo "$ntp_cv_hdr_def_sigio" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
+printf "%s\n" "$ntp_cv_hdr_def_sigio" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
-$as_echo_n "checking if we want to use SIGIO... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
+printf %s "checking if we want to use SIGIO... " >&6; }
ans=no
case "$ntp_cv_hdr_def_sigio" in
yes)
@@ -15346,21 +15917,22 @@ case "$ans" in
case "$use_signalled_io" in
yes)
-$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SIGNALED_IO 1" >>confdefs.h
;;
*) ans="Allowed for $host but --disable-signalled-io was given"
;;
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
-$as_echo_n "checking for SIGPOLL... " >&6; }
-if ${ntp_cv_hdr_def_sigpoll+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
+printf %s "checking for SIGPOLL... " >&6; }
+if test ${ntp_cv_hdr_def_sigpoll+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15371,20 +15943,21 @@ else
#endif
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
ntp_cv_hdr_def_sigpoll=yes
-else
+else $as_nop
ntp_cv_hdr_def_sigpoll=no
fi
rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
-$as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
+printf "%s\n" "$ntp_cv_hdr_def_sigpoll" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
-$as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
+printf %s "checking if we can use SIGPOLL for UDP I/O... " >&6; }
ans=no
case "$ntp_cv_hdr_def_sigpoll" in
yes)
@@ -15443,14 +16016,14 @@ esac
case "$ans" in
yes)
-$as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
+printf "%s\n" "#define USE_UDP_SIGPOLL 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
-$as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
+printf %s "checking if we can use SIGPOLL for TTY I/O... " >&6; }
ans=no
case "$ntp_cv_hdr_def_sigpoll" in
yes)
@@ -15506,24 +16079,25 @@ esac
case "$ans" in
yes)
-$as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
+printf "%s\n" "#define USE_TTY_SIGPOLL 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
-$as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
-if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
+printf %s "checking number of arguments to gettimeofday()... " >&6; }
+if test ${ntp_cv_func_Xettimeofday_nargs+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
int
-main ()
+main (void)
{
gettimeofday(0, 0);
@@ -15534,44 +16108,45 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_func_Xettimeofday_nargs=2
-else
+else $as_nop
ntp_cv_func_Xettimeofday_nargs=1
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
-$as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
+printf "%s\n" "$ntp_cv_func_Xettimeofday_nargs" >&6; }
case "$ntp_cv_func_Xettimeofday_nargs" in
1)
-$as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
+printf "%s\n" "#define SYSV_TIMEOFDAY 1" >>confdefs.h
esac
-for ac_func in settimeofday
+
+ for ac_func in settimeofday
do :
ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
-if test "x$ac_cv_func_settimeofday" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETTIMEOFDAY 1
-_ACEOF
+if test "x$ac_cv_func_settimeofday" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETTIMEOFDAY 1" >>confdefs.h
-else
+else $as_nop
case "$host" in
*-*-mpeix*) ac_cv_func_settimeofday=yes
esac
fi
-done
+done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
-$as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
+printf %s "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
ntp_warning='GRONK'
ans=none
case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
@@ -15593,14 +16168,14 @@ case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
ntp_warning='Which leaves us with nothing to use!'
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+printf "%s\n" "$ans" >&6; }
case "$ntp_warning" in
'')
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
-$as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
+printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
;;
esac
@@ -15612,7 +16187,8 @@ LIBS=$__LIBS
# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
+if test ${enable_shared+y}
+then :
enableval=$enable_shared; p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
@@ -15630,7 +16206,7 @@ if test "${enable_shared+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_shared=no
fi
@@ -15644,8 +16220,8 @@ fi
case `pwd` in
*\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
esac
@@ -15665,6 +16241,7 @@ macro_revision='2.4.6'
+
ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
@@ -15684,11 +16261,12 @@ delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM=$NM
@@ -15738,8 +16316,8 @@ else
: ${lt_cv_path_NM=no}
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
if test no != "$lt_cv_path_NM"; then
NM=$lt_cv_path_NM
else
@@ -15752,11 +16330,12 @@ else
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DUMPBIN"; then
ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
else
@@ -15764,11 +16343,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -15779,11 +16362,11 @@ fi
fi
DUMPBIN=$ac_cv_prog_DUMPBIN
if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -15796,11 +16379,12 @@ if test -z "$DUMPBIN"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DUMPBIN"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
@@ -15808,11 +16392,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -15823,11 +16411,11 @@ fi
fi
ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -15839,8 +16427,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DUMPBIN=$ac_ct_DUMPBIN
@@ -15868,11 +16456,12 @@ test -z "$NM" && NM=nm
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
@@ -15888,26 +16477,27 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
fi
# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
i=0
teststring=ABCD
@@ -16034,11 +16624,11 @@ else
fi
if test -n "$lt_cv_sys_max_cmd_len"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
fi
max_cmd_len=$lt_cv_sys_max_cmd_len
@@ -16082,11 +16672,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $host in
*-*-mingw* )
case $build in
@@ -16122,18 +16713,19 @@ esac
fi
to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
@@ -16149,22 +16741,23 @@ esac
fi
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_reload_flag='-r'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
@@ -16197,11 +16790,12 @@ esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
@@ -16209,11 +16803,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16224,11 +16822,11 @@ fi
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -16237,11 +16835,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
ac_ct_OBJDUMP=$OBJDUMP
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OBJDUMP"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
else
@@ -16249,11 +16848,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16264,11 +16867,11 @@ fi
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OBJDUMP" = x; then
@@ -16276,8 +16879,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OBJDUMP=$ac_ct_OBJDUMP
@@ -16296,11 +16899,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
@@ -16496,8 +17100,8 @@ os2*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
file_magic_glob=
want_nocaseglob=no
@@ -16541,11 +17145,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
@@ -16553,11 +17158,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16568,11 +17177,11 @@ fi
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -16581,11 +17190,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
ac_ct_DLLTOOL=$DLLTOOL
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DLLTOOL"; then
ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
@@ -16593,11 +17203,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16608,11 +17222,11 @@ fi
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DLLTOOL" = x; then
@@ -16620,8 +17234,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DLLTOOL=$ac_ct_DLLTOOL
@@ -16641,11 +17255,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
@@ -16668,8 +17283,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
@@ -16684,11 +17299,12 @@ if test -n "$ac_tool_prefix"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
@@ -16696,11 +17312,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16711,11 +17331,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -16728,11 +17348,12 @@ if test -z "$AR"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
@@ -16740,11 +17361,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16755,11 +17380,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -16771,8 +17396,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
@@ -16792,30 +17417,32 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ar_at_file=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
@@ -16823,7 +17450,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
@@ -16832,11 +17459,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
rm -f conftest.* libconftest.a
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
@@ -16853,11 +17480,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -16865,11 +17493,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16880,11 +17512,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -16893,11 +17525,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -16905,11 +17538,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16920,11 +17557,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -16932,8 +17569,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -16952,11 +17589,12 @@ test -z "$STRIP" && STRIP=:
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
@@ -16964,11 +17602,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -16979,11 +17621,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -16992,11 +17634,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
@@ -17004,11 +17647,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -17019,11 +17666,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -17031,8 +17678,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -17121,11 +17768,12 @@ compiler=$CC
# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
@@ -17277,14 +17925,14 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
# Now try to grab the symbols.
nlist=conftest.nm
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
(eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -17353,7 +18001,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
@@ -17388,11 +18036,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
fi
# Response file support.
@@ -17438,13 +18086,14 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
# Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
+if test ${with_sysroot+y}
+then :
withval=$with_sysroot;
-else
+else $as_nop
with_sysroot=no
fi
@@ -17462,24 +18111,25 @@ case $with_sysroot in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
: ${lt_DD:=$DD}
@@ -17490,10 +18140,15 @@ if test -z "$lt_DD"; then
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in dd; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in dd
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_lt_DD" || continue
if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cmp -s conftest.i conftest.out \
@@ -17513,15 +18168,16 @@ fi
rm -f conftest.i conftest2.i conftest.out
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
lt_cv_truncate_bin=
@@ -17532,8 +18188,8 @@ fi
rm -f conftest.i conftest2.i conftest.out
test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
@@ -17556,7 +18212,8 @@ func_cc_basename ()
}
# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
+if test ${enable_libtool_lock+y}
+then :
enableval=$enable_libtool_lock;
fi
@@ -17572,7 +18229,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
@@ -17592,7 +18249,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
@@ -17630,7 +18287,7 @@ mips64*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
emul=elf
case `/usr/bin/file conftest.$ac_objext` in
@@ -17671,7 +18328,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
@@ -17734,11 +18391,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -17749,19 +18407,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_cc_needs_belf=yes
-else
+else $as_nop
lt_cv_cc_needs_belf=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -17770,8 +18429,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS=$SAVE_CFLAGS
@@ -17784,7 +18443,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*64-bit*)
@@ -17821,11 +18480,12 @@ need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$MANIFEST_TOOL"; then
ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
@@ -17833,11 +18493,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -17848,11 +18512,11 @@ fi
fi
MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
if test -n "$MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -17861,11 +18525,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
# Extract the first word of "mt", so it can be a program name with args.
set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_MANIFEST_TOOL"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
else
@@ -17873,11 +18538,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -17888,11 +18557,11 @@ fi
fi
ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
if test -n "$ac_ct_MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_MANIFEST_TOOL" = x; then
@@ -17900,8 +18569,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
@@ -17911,11 +18580,12 @@ else
fi
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_path_mainfest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
@@ -17925,8 +18595,8 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -17941,11 +18611,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DSYMUTIL"; then
ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
@@ -17953,11 +18624,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -17968,11 +18643,11 @@ fi
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -17981,11 +18656,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
ac_ct_DSYMUTIL=$DSYMUTIL
# Extract the first word of "dsymutil", so it can be a program name with args.
set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DSYMUTIL"; then
ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
else
@@ -17993,11 +18669,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18008,11 +18688,11 @@ fi
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DSYMUTIL" = x; then
@@ -18020,8 +18700,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DSYMUTIL=$ac_ct_DSYMUTIL
@@ -18033,11 +18713,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NMEDIT"; then
ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
@@ -18045,11 +18726,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18060,11 +18745,11 @@ fi
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -18073,11 +18758,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then
ac_ct_NMEDIT=$NMEDIT
# Extract the first word of "nmedit", so it can be a program name with args.
set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_NMEDIT"; then
ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
@@ -18085,11 +18771,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18100,11 +18790,11 @@ fi
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_NMEDIT" = x; then
@@ -18112,8 +18802,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
NMEDIT=$ac_ct_NMEDIT
@@ -18125,11 +18815,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
else
@@ -18137,11 +18828,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18152,11 +18847,11 @@ fi
fi
LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -18165,11 +18860,12 @@ if test -z "$ac_cv_prog_LIPO"; then
ac_ct_LIPO=$LIPO
# Extract the first word of "lipo", so it can be a program name with args.
set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_LIPO"; then
ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
else
@@ -18177,11 +18873,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18192,11 +18892,11 @@ fi
fi
ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_LIPO" = x; then
@@ -18204,8 +18904,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
LIPO=$ac_ct_LIPO
@@ -18217,11 +18917,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
@@ -18229,11 +18930,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18244,11 +18949,11 @@ fi
fi
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -18257,11 +18962,12 @@ if test -z "$ac_cv_prog_OTOOL"; then
ac_ct_OTOOL=$OTOOL
# Extract the first word of "otool", so it can be a program name with args.
set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL"; then
ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
else
@@ -18269,11 +18975,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18284,11 +18994,11 @@ fi
fi
ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL" = x; then
@@ -18296,8 +19006,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL=$ac_ct_OTOOL
@@ -18309,11 +19019,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL64"; then
ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
else
@@ -18321,11 +19032,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18336,11 +19051,11 @@ fi
fi
OTOOL64=$ac_cv_prog_OTOOL64
if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -18349,11 +19064,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then
ac_ct_OTOOL64=$OTOOL64
# Extract the first word of "otool64", so it can be a program name with args.
set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL64"; then
ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
else
@@ -18361,11 +19077,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -18376,11 +19096,11 @@ fi
fi
ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL64" = x; then
@@ -18388,8 +19108,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL64=$ac_ct_OTOOL64
@@ -18424,11 +19144,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_apple_cc_single_mod=no
if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
@@ -18457,14 +19178,15 @@ else
rm -f conftest.*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_exported_symbols_list=no
save_LDFLAGS=$LDFLAGS
echo "_main" > conftest.sym
@@ -18473,31 +19195,33 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_ld_exported_symbols_list=yes
-else
+else $as_nop
lt_cv_ld_exported_symbols_list=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
int forced_loaded() { return 2;}
@@ -18525,8 +19249,8 @@ _LT_EOF
rm -rf conftest.dSYM
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
@@ -18597,19 +19321,14 @@ func_munge_path_list ()
esac
}
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
fi
-done
-
@@ -18626,7 +19345,8 @@ done
# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
+if test ${enable_static+y}
+then :
enableval=$enable_static; p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
@@ -18644,7 +19364,7 @@ if test "${enable_static+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_static=yes
fi
@@ -18658,7 +19378,8 @@ fi
# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
+if test ${with_pic+y}
+then :
withval=$with_pic; lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
@@ -18675,7 +19396,7 @@ if test "${with_pic+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
pic_mode=default
fi
@@ -18687,7 +19408,8 @@ fi
# Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
+if test ${enable_fast_install+y}
+then :
enableval=$enable_fast_install; p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
@@ -18705,7 +19427,7 @@ if test "${enable_fast_install+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_fast_install=yes
fi
@@ -18719,11 +19441,12 @@ fi
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[5-9]*,yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
# Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
+if test ${with_aix_soname+y}
+then :
withval=$with_aix_soname; case $withval in
aix|svr4|both)
;;
@@ -18732,18 +19455,19 @@ if test "${with_aix_soname+set}" = set; then :
;;
esac
lt_cv_with_aix_soname=$with_aix_soname
-else
- if ${lt_cv_with_aix_soname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ if test ${lt_cv_with_aix_soname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_with_aix_soname=aix
fi
with_aix_soname=$lt_cv_with_aix_soname
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
@@ -18825,11 +19549,12 @@ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
@@ -18840,17 +19565,15 @@ else
fi
rmdir .libs 2>/dev/null
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
objdir=$lt_cv_objdir
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
@@ -18896,11 +19619,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -18949,11 +19673,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -18962,11 +19686,12 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -19015,11 +19740,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -19104,11 +19829,12 @@ if test yes = "$GCC"; then
lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -19139,8 +19865,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -19497,26 +20223,28 @@ case $host_os in
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -19547,8 +20275,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
@@ -19576,11 +20304,12 @@ fi
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_static_works=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
@@ -19604,8 +20333,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
if test yes = "$lt_cv_prog_compiler_static_works"; then
:
@@ -19619,11 +20348,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -19666,19 +20396,20 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -19721,8 +20452,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -19730,19 +20461,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
hard_links=nottested
if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
hard_links=yes
$RM conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -19754,8 +20485,8 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag=
@@ -20310,21 +21041,23 @@ _LT_EOF
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -20339,7 +21072,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -20363,21 +21096,23 @@ fi
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -20392,7 +21127,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -20643,11 +21378,12 @@ fi
# Older versions of the 11.00 compiler do not understand -b yet
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler__b=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
@@ -20671,8 +21407,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
if test yes = "$lt_cv_prog_compiler__b"; then
archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -20712,28 +21448,30 @@ fi
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
# This should be the same for all languages, so no per-tag cache variable.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_irix_exported_symbol=yes
-else
+else $as_nop
lt_cv_irix_exported_symbol=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
if test yes = "$lt_cv_irix_exported_symbol"; then
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
@@ -21013,8 +21751,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -21050,18 +21788,19 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
$RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -21079,7 +21818,7 @@ else
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
(eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then
lt_cv_archive_cmds_need_lc=no
@@ -21093,8 +21832,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
;;
esac
@@ -21253,8 +21992,8 @@ esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
if test yes = "$GCC"; then
case $host_os in
@@ -21815,9 +22554,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
shlibpath_overrides_runpath=no
# Some binutils ld are patched to set DT_RUNPATH
- if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
@@ -21827,19 +22567,21 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+if ac_fn_c_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
lt_cv_shlibpath_overrides_runpath=yes
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
@@ -22071,8 +22813,8 @@ uts4*)
dynamic_linker=no
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -22193,8 +22935,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
@@ -22218,8 +22960,8 @@ else
# directories.
hardcode_action=unsupported
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
if test relink = "$hardcode_action" ||
test yes = "$inherit_rpath"; then
@@ -22263,11 +23005,12 @@ else
darwin*)
# if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22276,32 +23019,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
+else $as_nop
lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
@@ -22321,14 +23063,16 @@ fi
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
+if test "x$ac_cv_func_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22337,41 +23081,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char shl_load ();
int
-main ()
+main (void)
{
return shl_load ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_shl_load=yes
-else
+else $as_nop
ac_cv_lib_dld_shl_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else
+else $as_nop
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
+if test "x$ac_cv_func_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22380,37 +23125,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22419,37 +23164,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_svld_dlopen=yes
-else
+else $as_nop
ac_cv_lib_svld_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22458,30 +23203,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dld_link ();
int
-main ()
+main (void)
{
return dld_link ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_dld_link=yes
-else
+else $as_nop
ac_cv_lib_dld_dld_link=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -22520,11 +23264,12 @@ fi
save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
@@ -22603,7 +23348,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -22621,16 +23366,17 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
@@ -22709,7 +23455,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -22727,8 +23473,8 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS=$save_CPPFLAGS
@@ -22766,13 +23512,13 @@ fi
striplib=
old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
@@ -22780,16 +23526,16 @@ else
if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
esac
fi
@@ -22806,13 +23552,13 @@ fi
# Report what library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -22836,15 +23582,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
fi
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test yes = "$enable_shared" || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
@@ -22884,13 +23630,14 @@ CC=$lt_save_CC
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
-$as_echo_n "checking if sntp will be built... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
+printf %s "checking if sntp will be built... " >&6; }
# Check whether --with-sntp was given.
-if test "${with_sntp+set}" = set; then :
+if test ${with_sntp+y}
+then :
withval=$with_sntp;
-else
+else $as_nop
with_sntp="${withsntp=yes}"
fi
@@ -22912,8 +23659,8 @@ else
BUILD_SNTP_FALSE=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
-$as_echo "$with_sntp" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
+printf "%s\n" "$with_sntp" >&6; }
@@ -22941,23 +23688,102 @@ case "${enable_libopts_install+set}" in
*) enable_libopts_install=no ;;
esac
enable_nls=no
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change. They are probably safe to remove.
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+printf %s "checking for $ac_hdr that defines DIR... " >&6; }
+if eval test \${$as_ac_Header+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
int
-main ()
+main (void)
{
if ((DIR *) 0)
return 0;
@@ -22965,19 +23791,21 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_ac_Header=yes"
-else
+else $as_nop
eval "$as_ac_Header=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
ac_header_dirent=$ac_hdr; break
@@ -22986,11 +23814,12 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22998,56 +23827,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dir; do
+for ac_lib in '' dir
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+printf %s "checking for library containing opendir... " >&6; }
+if test ${ac_cv_search_opendir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23055,46 +23887,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char opendir ();
int
-main ()
+main (void)
{
return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
+for ac_lib in '' x
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_opendir=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if test ${ac_cv_search_opendir+y}
+then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if test ${ac_cv_search_opendir+y}
+then :
-else
+else $as_nop
ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -23105,135 +23939,258 @@ fi
# =================
# AC_CHECK_HEADERS
# =================
- for ac_header in \
- sys/mman.h sys/param.h sys/poll.h sys/procset.h \
- sys/select.h sys/socket.h sys/stropts.h sys/time.h \
- sys/un.h sys/wait.h dlfcn.h errno.h \
- fcntl.h libgen.h libintl.h memory.h \
- netinet/in.h setjmp.h stdbool.h sysexits.h \
- unistd.h utime.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mman_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_poll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/procset.h" "ac_cv_header_sys_procset_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_procset_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PROCSET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_select_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stropts_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_un_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcntl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
+if test "x$ac_cv_header_libgen_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
+if test "x$ac_cv_header_memory_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_setjmp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdbool_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
- for ac_header in stdarg.h varargs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
+if test "x$ac_cv_header_sysexits_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
+if test "x$ac_cv_header_utime_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
+
+fi
+
+
+ for ac_header in stdarg.h varargs.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_arg_hdr=true;break
-else
+else $as_nop
lo_have_arg_hdr=false
fi
done
-
- for ac_header in string.h strings.h
+ for ac_header in string.h strings.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_str_hdr=true;break
-else
+else $as_nop
lo_have_str_hdr=false
fi
done
-
- for ac_header in limits.h sys/limits.h values.h
+ for ac_header in limits.h sys/limits.h values.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_lim_hdr=true;break
-else
+else $as_nop
lo_have_lim_hdr=false
fi
done
-
- for ac_header in inttypes.h stdint.h
+ for ac_header in inttypes.h stdint.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
lo_have_typ_hdr=true;break
-else
+else $as_nop
lo_have_typ_hdr=false
fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
-$as_echo_n "checking for working stdnoreturn.h... " >&6; }
-if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ case "$host_os" in
+ cygwin*)
+ STDNORETURN_H='stdnoreturn.h'
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
+printf %s "checking for working stdnoreturn.h... " >&6; }
+if test ${gl_cv_header_working_stdnoreturn_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
- #include <stdnoreturn.h>
- /* Do not check for 'noreturn' after the return type.
- C11 allows it, but it's rarely done that way
- and circa-2012 bleeding-edge GCC rejects it when given
- -Werror=old-style-declaration. */
- noreturn void foo1 (void) { exit (0); }
- _Noreturn void foo2 (void) { exit (0); }
- int testit (int argc, char **argv) {
- if (argc & 1)
- return 0;
- (argv[0][0] ? foo1 : foo2) ();
- }
+ #include <stdnoreturn.h>
+ /* Do not check for 'noreturn' after the return type.
+ C11 allows it, but it's rarely done that way
+ and circa-2012 bleeding-edge GCC rejects it when given
+ -Werror=old-style-declaration. */
+ noreturn void foo1 (void) { exit (0); }
+ _Noreturn void foo2 (void) { exit (0); }
+ int testit (int argc, char **argv)
+ {
+ if (argc & 1)
+ return 0;
+ (argv[0][0] ? foo1 : foo2) ();
+ }
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_working_stdnoreturn_h=yes
-else
+else $as_nop
gl_cv_header_working_stdnoreturn_h=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
-$as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
-
- if test $gl_cv_header_working_stdnoreturn_h = yes; then
- STDNORETURN_H=''
- else
- STDNORETURN_H='stdnoreturn.h'
- fi
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
+printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
+ if test $gl_cv_header_working_stdnoreturn_h = yes; then
+ STDNORETURN_H=''
+ else
+ STDNORETURN_H='stdnoreturn.h'
+ fi
+ ;;
+ esac
if test -n "$STDNORETURN_H"; then
GL_GENERATE_STDNORETURN_H_TRUE=
@@ -23249,36 +24206,44 @@ fi
# check for various programs used during the build.
# On OS/X, "wchar.h" needs "runetype.h" to work properly.
# ----------------------------------------------------------------------
- for ac_header in runetype.h wchar.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+ ac_fn_c_check_header_compile "$LINENO" "runetype.h" "ac_cv_header_runetype_h" "
$ac_includes_default
#if HAVE_RUNETYPE_H
# include <runetype.h>
#endif
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+if test "x$ac_cv_header_runetype_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_RUNETYPE_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "
+ $ac_includes_default
+ #if HAVE_RUNETYPE_H
+ # include <runetype.h>
+ #endif
-done
+"
+if test "x$ac_cv_header_wchar_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
+
+fi
# Check whether --enable-nls was given.
-if test "${enable_nls+set}" = set; then :
+if test ${enable_nls+y}
+then :
enableval=$enable_nls;
fi
if test "x$enable_nls" != "xno" && \
- test "X${ac_cv_header_libintl_h}" = Xyes; then :
+ test "X${ac_cv_header_libintl_h}" = Xyes
+then :
-$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
fi
@@ -23310,11 +24275,10 @@ fi
# Checks for typedefs
# ----------------------------------------------------------------------
ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
-if test "x$ac_cv_type_wchar_t" = xyes; then :
+if test "x$ac_cv_type_wchar_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WCHAR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
fi
@@ -23329,120 +24293,107 @@ fi
#endif
"
-if test "x$ac_cv_type_wint_t" = xyes; then :
+if test "x$ac_cv_type_wint_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINT_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
-if test "x$ac_cv_type_int8_t" = xyes; then :
+if test "x$ac_cv_type_int8_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT8_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint8_t" = xyes; then :
+if test "x$ac_cv_type_uint8_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT8_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
-if test "x$ac_cv_type_int16_t" = xyes; then :
+if test "x$ac_cv_type_int16_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT16_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT16_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint16_t" = xyes; then :
+if test "x$ac_cv_type_uint16_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT16_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT16_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
-if test "x$ac_cv_type_int32_t" = xyes; then :
+if test "x$ac_cv_type_int32_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INT32_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint32_t" = xyes; then :
+if test "x$ac_cv_type_uint32_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT32_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT32_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_intptr_t" = xyes; then :
+if test "x$ac_cv_type_intptr_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INTPTR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint_t" = xyes; then :
+if test "x$ac_cv_type_uint_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
+if test "x$ac_cv_type_pid_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PID_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PID_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIZE_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_SIZE_T 1" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTRDIFF_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
fi
@@ -23451,17 +24402,19 @@ fi
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
-$as_echo_n "checking size of char *... " >&6; }
-if ${ac_cv_sizeof_char_p+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
+printf %s "checking size of char *... " >&6; }
+if test ${ac_cv_sizeof_char_p+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_char_p" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (char *)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -23470,31 +24423,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
-$as_echo "$ac_cv_sizeof_char_p" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
+printf "%s\n" "$ac_cv_sizeof_char_p" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
-_ACEOF
+printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+printf %s "checking size of int... " >&6; }
+if test ${ac_cv_sizeof_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -23503,31 +24456,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+printf "%s\n" "$ac_cv_sizeof_int" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
+printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+printf %s "checking size of long... " >&6; }
+if test ${ac_cv_sizeof_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -23536,31 +24489,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+printf %s "checking size of short... " >&6; }
+if test ${ac_cv_sizeof_short+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -23569,25 +24522,24 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+printf "%s\n" "$ac_cv_sizeof_short" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
+printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
# ------------
# AC_CHECK_LIB
# ------------
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
-$as_echo_n "checking for pathfind in -lgen... " >&6; }
-if ${ac_cv_lib_gen_pathfind+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
+printf %s "checking for pathfind in -lgen... " >&6; }
+if test ${ac_cv_lib_gen_pathfind+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgen $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23596,43 +24548,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char pathfind ();
int
-main ()
+main (void)
{
return pathfind ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_gen_pathfind=yes
-else
+else $as_nop
ac_cv_lib_gen_pathfind=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
-$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
-if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGEN 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
+printf "%s\n" "$ac_cv_lib_gen_pathfind" >&6; }
+if test "x$ac_cv_lib_gen_pathfind" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBGEN 1" >>confdefs.h
LIBS="-lgen $LIBS"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
-$as_echo_n "checking for gettext in -lintl... " >&6; }
-if ${ac_cv_lib_intl_gettext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+printf %s "checking for gettext in -lintl... " >&6; }
+if test ${ac_cv_lib_intl_gettext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23641,95 +24591,65 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char gettext ();
int
-main ()
+main (void)
{
return gettext ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_intl_gettext=yes
-else
+else $as_nop
ac_cv_lib_intl_gettext=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
-$as_echo "$ac_cv_lib_intl_gettext" >&6; }
-if test "x$ac_cv_lib_intl_gettext" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINTL 1
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
+printf "%s\n" "$ac_cv_lib_intl_gettext" >&6; }
+if test "x$ac_cv_lib_intl_gettext" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h
LIBS="-lintl $LIBS"
fi
- for ac_func in vprintf
-do :
- ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VPRINTF 1
-_ACEOF
-ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = xyes; then :
+if test "x$ac_cv_func_vprintf" = xno
+then :
+ ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = xyes
+then :
-$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
fi
fi
-done
-
- for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+printf %s "checking for working fork... " >&6; }
+if test ${ac_cv_func_fork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_fork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
/* By Ruediger Kuhlmann. */
@@ -23739,9 +24659,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_fork_works=yes
-else
+else $as_nop
ac_cv_func_fork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -23749,8 +24670,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+printf "%s\n" "$ac_cv_func_fork_works" >&6; }
else
ac_cv_func_fork_works=$ac_cv_func_fork
@@ -23765,27 +24686,37 @@ if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_fork_works=yes
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+printf %s "checking for working vfork... " >&6; }
+if test ${ac_cv_func_vfork_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "$cross_compiling" = yes
+then :
ac_cv_func_vfork_works=cross
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
$ac_includes_default
+#include <signal.h>
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
+
+static void
+do_nothing (int sig)
+{
+ (void) sig;
+}
+
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent. The compiler
is told about this with #include <vfork.h>, but some compilers
@@ -23793,11 +24724,7 @@ $ac_includes_default
static variable whose address is put into a register that is
clobbered by the vfork. */
static void
-#ifdef __cplusplus
sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
{
static pid_t child;
if (!child) {
@@ -23815,13 +24742,18 @@ sparc_address_test (arg) int arg;
}
int
-main ()
+main (void)
{
pid_t parent = getpid ();
pid_t child;
sparc_address_test (0);
+ /* On Solaris 2.4, changes by the child to the signal handler
+ also munge signal handlers in the parent. To detect this,
+ start by putting the parent's handler in a known state. */
+ signal (SIGTERM, SIG_DFL);
+
child = vfork ();
if (child == 0) {
@@ -23843,6 +24775,10 @@ main ()
|| p != p5 || p != p6 || p != p7)
_exit(1);
+ /* Alter the child's signal handler. */
+ if (signal (SIGTERM, do_nothing) != SIG_DFL)
+ _exit(1);
+
/* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
from child file descriptors. If the child closes a descriptor
before it execs or exits, this munges the parent's descriptor
@@ -23858,6 +24794,9 @@ main ()
/* Was there some problem with vforking? */
child < 0
+ /* Did the child munge the parent's signal handler? */
+ || signal (SIGTERM, SIG_DFL) != SIG_DFL
+
/* Did the child fail? (This shouldn't happen.) */
|| status
@@ -23870,9 +24809,10 @@ main ()
}
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_vfork_works=yes
-else
+else $as_nop
ac_cv_func_vfork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -23880,49 +24820,98 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
fi;
if test "x$ac_cv_func_fork_works" = xcross; then
ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
if test "x$ac_cv_func_vfork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
else
-$as_echo "#define vfork fork" >>confdefs.h
+printf "%s\n" "#define vfork fork" >>confdefs.h
fi
if test "x$ac_cv_func_fork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
fi
- for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
- strrchr strsignal fchmod fstat chmod
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+ printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
fi
-done
+ac_fn_c_check_func "$LINENO" "canonicalize_file_name" "ac_cv_func_canonicalize_file_name"
+if test "x$ac_cv_func_canonicalize_file_name" = xyes
+then :
+ printf "%s\n" "#define HAVE_CANONICALIZE_FILE_NAME 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+fi
+ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes
+then :
+ printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
+if test "x$ac_cv_func_strchr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
+if test "x$ac_cv_func_strrchr" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
+if test "x$ac_cv_func_strsignal" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
+if test "x$ac_cv_func_fchmod" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat"
+if test "x$ac_cv_func_fstat" = xyes
+then :
+ printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "chmod" "ac_cv_func_chmod"
+if test "x$ac_cv_func_chmod" = xyes
+then :
+ printf "%s\n" "#define HAVE_CHMOD 1" >>confdefs.h
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
@@ -23936,10 +24925,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
@@ -23948,13 +24942,13 @@ case `"$ac_path_SED" --version 2>&1` in
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -23982,13 +24976,14 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
SED="$ac_cv_path_SED"
rm -f conftest.sed
while :
do
+ test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which bash`
test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which dash`
@@ -24003,9 +24998,7 @@ $as_echo "$ac_cv_path_SED" >&6; }
as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
done
-cat >>confdefs.h <<_ACEOF
-#define POSIX_SHELL "${POSIX_SHELL}"
-_ACEOF
+printf "%s\n" "#define POSIX_SHELL \"${POSIX_SHELL}\"" >>confdefs.h
@@ -24017,11 +25010,12 @@ _ACEOF
NEED_LIBOPTS_DIR=''
# Check whether --enable-local-libopts was given.
-if test "${enable_local_libopts+set}" = set; then :
+if test ${enable_local_libopts+y}
+then :
enableval=$enable_local_libopts;
if test x$enableval = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
-$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
+printf "%s\n" "$as_me: Using supplied libopts tearoff" >&6;}
LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
NEED_LIBOPTS_DIR=true
LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
@@ -24030,7 +25024,8 @@ fi
# Check whether --enable-libopts-install was given.
-if test "${enable_libopts_install+set}" = set; then :
+if test ${enable_libopts_install+y}
+then :
enableval=$enable_libopts_install;
fi
@@ -24044,33 +25039,36 @@ fi
if test -z "${NEED_LIBOPTS_DIR}" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
-$as_echo_n "checking whether autoopts-config can be found... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
+printf %s "checking whether autoopts-config can be found... " >&6; }
# Check whether --with-autoopts-config was given.
-if test "${with_autoopts_config+set}" = set; then :
+if test ${with_autoopts_config+y}
+then :
withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
-$as_echo_n "checking whether autoopts-config is specified... " >&6; }
-if ${lo_cv_with_autoopts_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
+printf %s "checking whether autoopts-config is specified... " >&6; }
+if test ${lo_cv_with_autoopts_config+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if autoopts-config --help 2>/dev/null 1>&2
then lo_cv_with_autoopts_config=autoopts-config
elif libopts-config --help 2>/dev/null 1>&2
then lo_cv_with_autoopts_config=libopts-config
else lo_cv_with_autoopts_config=no ; fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
-$as_echo "$lo_cv_with_autoopts_config" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
+printf "%s\n" "$lo_cv_with_autoopts_config" >&6; }
fi
# end of AC_ARG_WITH
- if ${lo_cv_test_autoopts+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lo_cv_test_autoopts+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "${lo_cv_with_autoopts_config}" \
-o X"${lo_cv_with_autoopts_config}" = Xno
@@ -24088,8 +25086,8 @@ else
fi
# end of CACHE_VAL
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
-$as_echo "${lo_cv_test_autoopts}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
+printf "%s\n" "${lo_cv_test_autoopts}" >&6; }
if test "X${lo_cv_test_autoopts}" != Xno
then
@@ -24128,30 +25126,30 @@ fi
# Check whether --with-regex-header was given.
-if test "${with_regex_header+set}" = set; then :
+if test ${with_regex_header+y}
+then :
withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
-$as_echo_n "checking whether a reg expr header is specified... " >&6; }
-if ${libopts_cv_with_regex_header+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
+printf %s "checking whether a reg expr header is specified... " >&6; }
+if test ${libopts_cv_with_regex_header+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
libopts_cv_with_regex_header=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
-$as_echo "$libopts_cv_with_regex_header" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
+printf "%s\n" "$libopts_cv_with_regex_header" >&6; }
fi
# end of AC_ARG_WITH
if test "X${libopts_cv_with_regex_header}" != Xno
then
- cat >>confdefs.h <<_ACEOF
-#define REGEX_HEADER <${libopts_cv_with_regex_header}>
-_ACEOF
+ printf "%s\n" "#define REGEX_HEADER <${libopts_cv_with_regex_header}>" >>confdefs.h
else
-$as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
+printf "%s\n" "#define REGEX_HEADER <regex.h>" >>confdefs.h
fi
@@ -24161,18 +25159,20 @@ $as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
# Check whether --with-libregex was given.
-if test "${with_libregex+set}" = set; then :
+if test ${with_libregex+y}
+then :
withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
-$as_echo_n "checking whether with-libregex was specified... " >&6; }
-if ${libopts_cv_with_libregex_root+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
+printf %s "checking whether with-libregex was specified... " >&6; }
+if test ${libopts_cv_with_libregex_root+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
libopts_cv_with_libregex_root=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
-$as_echo "$libopts_cv_with_libregex_root" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
+printf "%s\n" "$libopts_cv_with_libregex_root" >&6; }
fi
# end of AC_ARG_WITH libregex
@@ -24187,36 +25187,40 @@ fi
# Check whether --with-libregex-cflags was given.
-if test "${with_libregex_cflags+set}" = set; then :
+if test ${with_libregex_cflags+y}
+then :
withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
-$as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
-if ${libopts_cv_with_libregex_cflags+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
+printf %s "checking whether with-libregex-cflags was specified... " >&6; }
+if test ${libopts_cv_with_libregex_cflags+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
libopts_cv_with_libregex_cflags=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
-$as_echo "$libopts_cv_with_libregex_cflags" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
+printf "%s\n" "$libopts_cv_with_libregex_cflags" >&6; }
fi
# end of AC_ARG_WITH libregex-cflags
# Check whether --with-libregex-libs was given.
-if test "${with_libregex_libs+set}" = set; then :
+if test ${with_libregex_libs+y}
+then :
withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
-$as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
-if ${libopts_cv_with_libregex_libs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
+printf %s "checking whether with-libregex-libs was specified... " >&6; }
+if test ${libopts_cv_with_libregex_libs+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
libopts_cv_with_libregex_libs=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
-$as_echo "$libopts_cv_with_libregex_libs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
+printf "%s\n" "$libopts_cv_with_libregex_libs" >&6; }
fi
# end of AC_ARG_WITH libregex-libs
@@ -24250,15 +25254,17 @@ fi
esac
LIBREGEX_CFLAGS=""
LIBREGEX_LIBS=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
-$as_echo_n "checking whether libregex functions properly... " >&6; }
- if ${libopts_cv_with_libregex+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
+printf %s "checking whether libregex functions properly... " >&6; }
+ if test ${libopts_cv_with_libregex+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ if test "$cross_compiling" = yes
+then :
libopts_cv_with_libregex=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -24282,9 +25288,10 @@ int main() {
}
return 0; }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
libopts_cv_with_libregex=yes
-else
+else $as_nop
libopts_cv_with_libregex=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -24295,12 +25302,12 @@ fi
fi
# end of AC_CACHE_VAL for libopts_cv_with_libregex
fi ## disabled by request
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
-$as_echo "${libopts_cv_with_libregex}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
+printf "%s\n" "${libopts_cv_with_libregex}" >&6; }
if test "X${libopts_cv_with_libregex}" != Xno
then
-$as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
+printf "%s\n" "#define WITH_LIBREGEX 1" >>confdefs.h
else
CPPFLAGS="${libopts_save_CPPFLAGS}"
@@ -24315,16 +25322,18 @@ libopts_cv_with_libregex=no
# Check to see if pathfind(3) works.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
-$as_echo_n "checking whether pathfind(3) works... " >&6; }
- if ${libopts_cv_run_pathfind+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
+printf %s "checking whether pathfind(3) works... " >&6; }
+ if test ${libopts_cv_run_pathfind+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
libopts_cv_run_pathfind=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
@@ -24334,9 +25343,10 @@ int main (int argc, char ** argv) {
return (pz == 0) ? 1 : 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
libopts_cv_run_pathfind=yes
-else
+else $as_nop
libopts_cv_run_pathfind=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -24346,12 +25356,12 @@ fi
fi
# end of AC_CACHE_VAL for libopts_cv_run_pathfind
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
-$as_echo "${libopts_cv_run_pathfind}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
+printf "%s\n" "${libopts_cv_run_pathfind}" >&6; }
if test "X${libopts_cv_run_pathfind}" != Xno
then
-$as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PATHFIND 1" >>confdefs.h
fi
@@ -24359,11 +25369,12 @@ $as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
# Check to see if /dev/zero is readable device.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
-$as_echo_n "checking whether /dev/zero is readable device... " >&6; }
- if ${libopts_cv_test_dev_zero+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
+printf %s "checking whether /dev/zero is readable device... " >&6; }
+ if test ${libopts_cv_test_dev_zero+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
libopts_cv_test_dev_zero=`exec 2> /dev/null
dzero=\`ls -lL /dev/zero | egrep ^c......r\`
@@ -24375,12 +25386,12 @@ echo ${dzero}`
fi
# end of CACHE_VAL of libopts_cv_test_dev_zero
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
-$as_echo "${libopts_cv_test_dev_zero}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
+printf "%s\n" "${libopts_cv_test_dev_zero}" >&6; }
if test "X${libopts_cv_test_dev_zero}" != Xno
then
-$as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DEV_ZERO 1" >>confdefs.h
fi
@@ -24388,16 +25399,18 @@ $as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
# Check to see if we have a functional realpath(3C).
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
-$as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
- if ${libopts_cv_run_realpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
+printf %s "checking whether we have a functional realpath(3C)... " >&6; }
+ if test ${libopts_cv_run_realpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
libopts_cv_run_realpath=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
@@ -24412,9 +25425,10 @@ choke me!!
return (pz == zPath) ? 0 : 1;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
libopts_cv_run_realpath=yes
-else
+else $as_nop
libopts_cv_run_realpath=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -24424,12 +25438,12 @@ fi
fi
# end of AC_CACHE_VAL for libopts_cv_run_realpath
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
-$as_echo "${libopts_cv_run_realpath}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
+printf "%s\n" "${libopts_cv_run_realpath}" >&6; }
if test "X${libopts_cv_run_realpath}" != Xno
then
-$as_echo "#define HAVE_REALPATH 1" >>confdefs.h
+printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h
fi
@@ -24437,16 +25451,18 @@ $as_echo "#define HAVE_REALPATH 1" >>confdefs.h
# Check to see if strftime() works.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
-$as_echo_n "checking whether strftime() works... " >&6; }
- if ${libopts_cv_run_strftime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
+printf %s "checking whether strftime() works... " >&6; }
+ if test ${libopts_cv_run_strftime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
libopts_cv_run_strftime=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
@@ -24467,9 +25483,10 @@ int main() {
strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
return (strcmp( t_buf, z ) != 0); }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
libopts_cv_run_strftime=yes
-else
+else $as_nop
libopts_cv_run_strftime=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -24479,12 +25496,12 @@ fi
fi
# end of AC_CACHE_VAL for libopts_cv_run_strftime
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
-$as_echo "${libopts_cv_run_strftime}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
+printf "%s\n" "${libopts_cv_run_strftime}" >&6; }
if test "X${libopts_cv_run_strftime}" != Xno
then
-$as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
fi
@@ -24492,16 +25509,18 @@ $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
# Check to see if fopen accepts "b" mode.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
-$as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
- if ${libopts_cv_run_fopen_binary+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
+printf %s "checking whether fopen accepts \"b\" mode... " >&6; }
+ if test ${libopts_cv_run_fopen_binary+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
libopts_cv_run_fopen_binary=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -24509,9 +25528,10 @@ int main (int argc, char ** argv) {
FILE * fp = fopen("conftest.$ac_ext", "rb");
return (fp == NULL) ? 1 : fclose(fp); }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
libopts_cv_run_fopen_binary=yes
-else
+else $as_nop
libopts_cv_run_fopen_binary=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -24521,16 +25541,16 @@ fi
fi
# end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
-$as_echo "${libopts_cv_run_fopen_binary}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
+printf "%s\n" "${libopts_cv_run_fopen_binary}" >&6; }
if test "X${libopts_cv_run_fopen_binary}" != Xno
then
-$as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
+printf "%s\n" "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
else
-$as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
+printf "%s\n" "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
fi
@@ -24538,16 +25558,18 @@ $as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
# Check to see if fopen accepts "t" mode.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
-$as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
- if ${libopts_cv_run_fopen_text+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
+printf %s "checking whether fopen accepts \"t\" mode... " >&6; }
+ if test ${libopts_cv_run_fopen_text+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
libopts_cv_run_fopen_text=no
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -24555,9 +25577,10 @@ int main (int argc, char ** argv) {
FILE * fp = fopen("conftest.$ac_ext", "rt");
return (fp == NULL) ? 1 : fclose(fp); }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
libopts_cv_run_fopen_text=yes
-else
+else $as_nop
libopts_cv_run_fopen_text=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -24567,16 +25590,16 @@ fi
fi
# end of AC_CACHE_VAL for libopts_cv_run_fopen_text
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
-$as_echo "${libopts_cv_run_fopen_text}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
+printf "%s\n" "${libopts_cv_run_fopen_text}" >&6; }
if test "X${libopts_cv_run_fopen_text}" != Xno
then
-$as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
+printf "%s\n" "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
else
-$as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
+printf "%s\n" "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
fi
@@ -24585,25 +25608,27 @@ $as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
# Check to see if not wanting optional option args.
# Check whether --enable-optional-args was given.
-if test "${enable_optional_args+set}" = set; then :
+if test ${enable_optional_args+y}
+then :
enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
-$as_echo_n "checking whether not wanting optional option args... " >&6; }
-if ${libopts_cv_enable_optional_args+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
+printf %s "checking whether not wanting optional option args... " >&6; }
+if test ${libopts_cv_enable_optional_args+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
libopts_cv_enable_optional_args=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
-$as_echo "$libopts_cv_enable_optional_args" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
+printf "%s\n" "$libopts_cv_enable_optional_args" >&6; }
fi
# end of AC_ARG_ENABLE
if test "X${libopts_cv_enable_optional_args}" = Xno
then
-$as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
+printf "%s\n" "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
fi
@@ -24630,11 +25655,12 @@ ntp_pkgconfig_min_version='0.15.0'
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
@@ -24644,11 +25670,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -24660,11 +25690,11 @@ esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -24673,11 +25703,12 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
@@ -24687,11 +25718,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -24703,11 +25738,11 @@ esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
@@ -24715,8 +25750,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
@@ -24730,14 +25765,14 @@ fi
case "$PKG_CONFIG" in
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
-$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
PKG_CONFIG=""
fi
;;
@@ -24747,9 +25782,10 @@ esac
# Check whether --enable-local-libevent was given.
-if test "${enable_local_libevent+set}" = set; then :
+if test ${enable_local_libevent+y}
+then :
enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
-else
+else $as_nop
ntp_use_local_libevent=${ntp_use_local_libevent-detect}
fi
@@ -24776,8 +25812,8 @@ case "$ntp_use_local_libevent" in
*) # If we have (a good enough) pkg-config, see if it can find libevent
case "$PKG_CONFIG" in
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
-$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
then
ntp_use_local_libevent=no
@@ -24786,8 +25822,8 @@ $as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed
*.*) ;;
*) ntp_libevent_version='(unknown)' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
-$as_echo "yes, version $ntp_libevent_version" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
+printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
# HMS: I hope the following is accurate.
@@ -24820,8 +25856,8 @@ $as_echo "yes, version $ntp_libevent_version" >&6; }
# HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
# is "pthreads"?
CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
;;
*)
@@ -24833,8 +25869,8 @@ esac
case "$ntp_use_local_libevent" in
yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
-$as_echo "$as_me: Using libevent tearoff" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
+printf "%s\n" "$as_me: Using libevent tearoff" >&6;}
CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
case "$LIBISC_PTHREADS_NOTHREADS" in
pthreads)
@@ -24891,11 +25927,12 @@ esac
LIB_SYSLOG=''
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
-$as_echo_n "checking for library containing openlog... " >&6; }
-if ${ac_cv_search_openlog+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
+printf %s "checking for library containing openlog... " >&6; }
+if test ${ac_cv_search_openlog+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24903,46 +25940,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char openlog ();
int
-main ()
+main (void)
{
return openlog ();
;
return 0;
}
_ACEOF
-for ac_lib in '' gen syslog; do
+for ac_lib in '' gen syslog
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_openlog=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_openlog+:} false; then :
+ if test ${ac_cv_search_openlog+y}
+then :
break
fi
done
-if ${ac_cv_search_openlog+:} false; then :
+if test ${ac_cv_search_openlog+y}
+then :
-else
+else $as_nop
ac_cv_search_openlog=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
-$as_echo "$ac_cv_search_openlog" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
+printf "%s\n" "$ac_cv_search_openlog" >&6; }
ac_res=$ac_cv_search_openlog
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
case "$ac_cv_search_openlog" in
'none required') ;;
@@ -24954,36 +25993,47 @@ fi
# Checks for header files.
-for ac_header in netdb.h string.h strings.h syslog.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
+if test "x$ac_cv_header_string_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
+if test "x$ac_cv_header_strings_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
+if test "x$ac_cv_header_syslog_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
+
+fi
-for ac_header in sysexits.h
+ for ac_header in sysexits.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
-if test "x$ac_cv_header_sysexits_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYSEXITS_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
+if test "x$ac_cv_header_sysexits_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
-else
+else $as_nop
-$as_echo "#define EX_OK 0" >>confdefs.h
+printf "%s\n" "#define EX_OK 0" >>confdefs.h
-$as_echo "#define EX_SOFTWARE 70" >>confdefs.h
+printf "%s\n" "#define EX_SOFTWARE 70" >>confdefs.h
fi
@@ -24991,12 +26041,12 @@ fi
done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
-$as_echo_n "checking for facilitynames in syslog.h... " >&6; }
-if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
+printf %s "checking for facilitynames in syslog.h... " >&6; }
+if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25006,130 +26056,180 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <syslog.h>
int
-main ()
+main (void)
{
void *fnames; fnames = facilitynames;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
-else
+else $as_nop
ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
-$as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
+printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
yes)
-$as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
;;
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
-$as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
+printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
;;
cross)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
-$as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
+printf "%s\n" "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
;;
esac
# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
-$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if ${ac_cv_header_stdbool_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes
+then :
+
+printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+printf %s "checking for stdbool.h that conforms to C99... " >&6; }
+if test ${ac_cv_header_stdbool_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdbool.h>
- #include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
+ #ifndef __bool_true_false_are_defined
+ #error "__bool_true_false_are_defined is not defined"
#endif
- #ifndef true
- "error: true is not defined"
+ char a[__bool_true_false_are_defined == 1 ? 1 : -1];
+
+ /* Regardless of whether this is C++ or "_Bool" is a
+ valid type name, "true" and "false" should be usable
+ in #if expressions and integer constant expressions,
+ and "bool" should be a valid type name. */
+
+ #if !true
+ #error "'true' is not true"
#endif
#if true != 1
- "error: true is not 1"
+ #error "'true' is not equal to 1"
#endif
- #ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
+ char b[true == 1 ? 1 : -1];
+ char c[true];
+
+ #if false
+ #error "'false' is not false"
+ #endif
+ #if false != 0
+ #error "'false' is not equal to 0"
#endif
+ char d[false == 0 ? 1 : -1];
+
+ enum { e = false, f = true, g = false * true, h = true * 256 };
+
+ char i[(bool) 0.5 == true ? 1 : -1];
+ char j[(bool) 0.0 == false ? 1 : -1];
+ char k[sizeof (bool) > 0 ? 1 : -1];
+
+ struct sb { bool s: 1; bool t; } s;
+ char l[sizeof s.t > 0 ? 1 : -1];
- struct s { _Bool s: 1; _Bool t; } s;
-
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- /* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ bool m[h];
+ char n[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char o[-1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
*/
- _Bool q = true;
- _Bool *pq = &q;
+ bool p = true;
+ bool *pp = &p;
+
+ /* C 1999 specifies that bool, true, and false are to be
+ macros, but C++ 2011 and later overrule this. */
+ #if __cplusplus < 201103
+ #ifndef bool
+ #error "bool is not defined"
+ #endif
+ #ifndef false
+ #error "false is not defined"
+ #endif
+ #ifndef true
+ #error "true is not defined"
+ #endif
+ #endif
+
+ /* If _Bool is available, repeat with it all the tests
+ above that used bool. */
+ #ifdef HAVE__BOOL
+ struct sB { _Bool s: 1; _Bool t; } t;
+
+ char q[(_Bool) 0.5 == true ? 1 : -1];
+ char r[(_Bool) 0.0 == false ? 1 : -1];
+ char u[sizeof (_Bool) > 0 ? 1 : -1];
+ char v[sizeof t.t > 0 ? 1 : -1];
+
+ _Bool w[h];
+ char x[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
+ _Bool z = true;
+ _Bool *pz = &p;
+ #endif
int
-main ()
+main (void)
{
- bool e = &s;
- *pq |= q;
- *pq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ bool ps = &s;
+ *pp |= p;
+ *pp |= ! p;
+
+ #ifdef HAVE__BOOL
+ _Bool pt = &t;
+ *pz |= z;
+ *pz |= ! z;
+ #endif
+
+ /* Refer to every declared value, so they cannot be
+ discarded as unused. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
+ + !l + !m + !n + !o + !p + !pp + !ps
+ #ifdef HAVE__BOOL
+ + !q + !r + !u + !v + !w + !x + !y + !z + !pt
+ #endif
+ );
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_header_stdbool_h=yes
-else
+else $as_nop
ac_cv_header_stdbool_h=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
-$as_echo "$ac_cv_header_stdbool_h" >&6; }
- ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE__BOOL 1
-_ACEOF
-
-
-fi
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
if test $ac_cv_header_stdbool_h = yes; then
-$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
fi
@@ -25143,25 +26243,29 @@ VER_SUFFIX=
# Check whether --with-crypto was given.
-if test "${with_crypto+set}" = set; then :
+if test ${with_crypto+y}
+then :
withval=$with_crypto;
fi
# Check whether --with-openssl-libdir was given.
-if test "${with_openssl_libdir+set}" = set; then :
+if test ${with_openssl_libdir+y}
+then :
withval=$with_openssl_libdir;
fi
# Check whether --with-openssl-incdir was given.
-if test "${with_openssl_incdir+set}" = set; then :
+if test ${with_openssl_incdir+y}
+then :
withval=$with_openssl_incdir;
fi
# Check whether --with-rpath was given.
-if test "${with_rpath+set}" = set; then :
+if test ${with_rpath+y}
+then :
withval=$with_rpath;
fi
@@ -25180,8 +26284,8 @@ case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${wit
no:*) ;;
*:notempty:notgiven:notgiven)
for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
-$as_echo_n "checking pkg-config for $pkg... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
+printf %s "checking pkg-config for $pkg... " >&6; }
if $PKG_CONFIG --exists $pkg ; then
CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
@@ -25196,13 +26300,13 @@ $as_echo_n "checking pkg-config for $pkg... " >&6; }
*.*) ;;
*) ntp_openssl_version='(unknown)' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
-$as_echo "yes, version $ntp_openssl_version" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
+printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
break
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
done
esac
case "$with_crypto:$ntp_openssl" in
@@ -25231,8 +26335,8 @@ case "$with_crypto:$ntp_openssl" in
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
-$as_echo_n "checking for openssl library directory... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
+printf %s "checking for openssl library directory... " >&6; }
with_openssl_libdir=${with_openssl_libdir-notgiven}
case "$with_openssl_libdir" in
notgiven)
@@ -25271,17 +26375,17 @@ $as_echo_n "checking for openssl library directory... " >&6; }
openssl_libdir=$i
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
-$as_echo "$openssl_libdir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
+printf "%s\n" "$openssl_libdir" >&6; }
case "$openssl_libdir" in
no)
openssl_libdir=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
-$as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
+printf "%s\n" "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
-$as_echo_n "checking for openssl include directory... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
+printf %s "checking for openssl include directory... " >&6; }
with_openssl_incdir=${with_openssl_incdir-notgiven}
case "$with_openssl_incdir" in
notgiven)
@@ -25302,13 +26406,13 @@ $as_echo_n "checking for openssl include directory... " >&6; }
;;
esac
{ i=; unset i;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
-$as_echo "$openssl_incdir" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
+printf "%s\n" "$openssl_incdir" >&6; }
case "$openssl_incdir" in
no)
openssl_incdir=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
-$as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
+printf "%s\n" "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
esac
if test -z "$openssl_libdir" -o -z "$openssl_incdir"
then
@@ -25346,28 +26450,28 @@ $as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_in
esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
-$as_echo_n "checking if we will use crypto... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
-$as_echo "$ntp_openssl" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
+printf %s "checking if we will use crypto... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
+printf "%s\n" "$ntp_openssl" >&6; }
case "$ntp_openssl" in
yes)
- for ac_header in openssl/cmac.h openssl/hmac.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_cmac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_hmac_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h
-done
+fi
-$as_echo "#define OPENSSL /**/" >>confdefs.h
+printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
case "$VER_SUFFIX" in
*o*) ;;
@@ -25387,11 +26491,12 @@ NTPO_SAVED_LIBS="$LIBS"
case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
yes:no)
LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
-$as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
-if ${ntp_cv_bare_lcrypto+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
+printf %s "checking if linking with -lcrypto alone works... " >&6; }
+if test ${ntp_cv_bare_lcrypto+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25399,7 +26504,7 @@ else
#include "openssl/evp.h"
int
-main ()
+main (void)
{
ERR_load_crypto_strings();
@@ -25410,26 +26515,28 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_cv_bare_lcrypto=yes
-else
+else $as_nop
ntp_cv_bare_lcrypto=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
-$as_echo "$ntp_cv_bare_lcrypto" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
+printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
case "$ntp_cv_bare_lcrypto" in
no)
LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
-$as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
-if ${ntp_cv_lcrypto_lz+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
+printf %s "checking if linking with -lcrypto -lz works... " >&6; }
+if test ${ntp_cv_lcrypto_lz+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25437,7 +26544,7 @@ else
#include "openssl/evp.h"
int
-main ()
+main (void)
{
ERR_load_crypto_strings();
@@ -25448,18 +26555,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ntp_cv_lcrypto_lz=yes
-else
+else $as_nop
ntp_cv_lcrypto_lz=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
-$as_echo "$ntp_cv_lcrypto_lz" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
+printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
case "$ntp_cv_lcrypto_lz" in
yes)
LDADD_NTP="$LDADD_NTP -lz"
@@ -25491,7 +26599,7 @@ case "$ntp_openssl:$GCC" in
int
-main ()
+main (void)
{
/* see if -Werror breaks gcc */
@@ -25501,13 +26609,14 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gcc_handles_Werror=yes
-else
+else $as_nop
gcc_handles_Werror=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
case "$gcc_handles_Werror" in
no)
# if this gcc doesn't do -Werror go ahead and use
@@ -25528,7 +26637,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include "openssl/x509v3.h"
int
-main ()
+main (void)
{
/* empty body */
@@ -25538,13 +26647,14 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
openssl_triggers_warnings=no
-else
+else $as_nop
openssl_triggers_warnings=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
esac
case "$openssl_triggers_warnings" in
yes)
@@ -25565,16 +26675,12 @@ CFLAGS="$NTPO_SAVED_CFLAGS"
case "$ntp_openssl" in
yes)
LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
- for ac_func in EVP_MD_do_all_sorted
-do :
- ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
-if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EVP_MD_DO_ALL_SORTED 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
+if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
fi
-done
;;
esac
@@ -25590,11 +26696,12 @@ LIBS="$NTPO_SAVED_LIBS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
-$as_echo_n "checking for struct sockaddr_storage... " >&6; }
-if ${ntp_cv_sockaddr_storage+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
+printf %s "checking for struct sockaddr_storage... " >&6; }
+if test ${ntp_cv_sockaddr_storage+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25609,7 +26716,7 @@ else
#endif
int
-main ()
+main (void)
{
struct sockaddr_storage n;
@@ -25619,27 +26726,29 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_sockaddr_storage=yes
-else
+else $as_nop
ntp_cv_sockaddr_storage=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
-$as_echo "$ntp_cv_sockaddr_storage" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
+printf "%s\n" "$ntp_cv_sockaddr_storage" >&6; }
case "$ntp_cv_sockaddr_storage" in
yes)
-$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
-$as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
-if ${ntp_cv_have___ss_family+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
+printf %s "checking for sockaddr_storage.__ss_family... " >&6; }
+if test ${ntp_cv_have___ss_family+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25654,7 +26763,7 @@ else
#endif
int
-main ()
+main (void)
{
struct sockaddr_storage s;
@@ -25665,21 +26774,22 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_have___ss_family=yes
-else
+else $as_nop
ntp_cv_have___ss_family=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
-$as_echo "$ntp_cv_have___ss_family" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
+printf "%s\n" "$ntp_cv_have___ss_family" >&6; }
case "$ntp_cv_have___ss_family" in
yes)
-$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
+printf "%s\n" "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
esac
@@ -25689,11 +26799,12 @@ esac
#
# Look for in_port_t.
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
-$as_echo_n "checking for in_port_t... " >&6; }
-if ${isc_cv_have_in_port_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
+printf %s "checking for in_port_t... " >&6; }
+if test ${isc_cv_have_in_port_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25701,7 +26812,7 @@ else
#include <netinet/in.h>
int
-main ()
+main (void)
{
in_port_t port = 25;
@@ -25712,29 +26823,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_have_in_port_t=yes
-else
+else $as_nop
isc_cv_have_in_port_t=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
-$as_echo "$isc_cv_have_in_port_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
+printf "%s\n" "$isc_cv_have_in_port_t" >&6; }
case "$isc_cv_have_in_port_t" in
no)
-$as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
-$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
-if ${ntp_cv_getsockname_socklen_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
+printf %s "checking type of socklen arg for getsockname()... " >&6; }
+if test ${ntp_cv_getsockname_socklen_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
getsockname_socklen_type_found=no
for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
@@ -25750,7 +26863,7 @@ else
#endif
int
-main ()
+main (void)
{
extern
@@ -25762,10 +26875,11 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
getsockname_socklen_type_found=yes ; break 2
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
done
case "$getsockname_socklen_type_found" in
@@ -25777,19 +26891,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
-$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
+printf "%s\n" "$ntp_cv_getsockname_socklen_type" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
-_ACEOF
+printf "%s\n" "#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
-$as_echo_n "checking struct sockaddr for sa_len... " >&6; }
-if ${isc_cv_platform_havesalen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
+printf %s "checking struct sockaddr for sa_len... " >&6; }
+if test ${isc_cv_platform_havesalen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25797,7 +26910,7 @@ else
#include <sys/socket.h>
int
-main ()
+main (void)
{
extern struct sockaddr *ps;
@@ -25808,26 +26921,28 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_platform_havesalen=yes
-else
+else $as_nop
isc_cv_platform_havesalen=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
-$as_echo "$isc_cv_platform_havesalen" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
+printf "%s\n" "$isc_cv_platform_havesalen" >&6; }
case "$isc_cv_platform_havesalen" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
esac
# Check whether --enable-ipv6 was given.
-if test "${enable_ipv6+set}" = set; then :
+if test ${enable_ipv6+y}
+then :
enableval=$enable_ipv6;
fi
@@ -25839,7 +26954,7 @@ case "$enable_ipv6" in
;;
*)
-$as_echo "#define WANT_IPV6 1" >>confdefs.h
+printf "%s\n" "#define WANT_IPV6 1" >>confdefs.h
;;
esac
@@ -25852,16 +26967,17 @@ esac
case "$host" in
*-*-darwin*)
-$as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
+printf "%s\n" "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
-$as_echo_n "checking for IPv6 structures... " >&6; }
-if ${isc_cv_found_ipv6+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
+printf %s "checking for IPv6 structures... " >&6; }
+if test ${isc_cv_found_ipv6+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25870,7 +26986,7 @@ else
#include <netinet/in.h>
int
-main ()
+main (void)
{
struct sockaddr_in6 sin6;
@@ -25880,29 +26996,31 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_found_ipv6=yes
-else
+else $as_nop
isc_cv_found_ipv6=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
-$as_echo "$isc_cv_found_ipv6" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
+printf "%s\n" "$isc_cv_found_ipv6" >&6; }
#
# See whether IPv6 support is provided via a Kame add-on.
# This is done before other IPv6 linking tests so LIBS is properly set.
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
-$as_echo_n "checking for Kame IPv6 support... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
+printf %s "checking for Kame IPv6 support... " >&6; }
# Check whether --with-kame was given.
-if test "${with_kame+set}" = set; then :
+if test ${with_kame+y}
+then :
withval=$with_kame; use_kame="$withval"
-else
+else $as_nop
use_kame="no"
fi
@@ -25919,13 +27037,13 @@ case "$use_kame" in
esac
case "$use_kame" in
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
*)
if test -f $kame_path/lib/libinet6.a; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
-$as_echo "$kame_path/lib/libinet6.a" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
+printf "%s\n" "$kame_path/lib/libinet6.a" >&6; }
LIBS="-L$kame_path/lib -linet6 $LIBS"
else
as_fn_error $? "$kame_path/lib/libinet6.a not found.
@@ -25949,7 +27067,7 @@ esac
case "$host" in
*-bsdi4.[01]*)
-$as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
isc_netinet6in6_hack="#include <netinet6/in6.h>"
;;
@@ -25964,7 +27082,7 @@ esac
case "$host" in
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
-$as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
isc_netinetin6_hack="#include <netinet/in6.h>"
;;
@@ -25977,13 +27095,14 @@ esac
case "$isc_cv_found_ipv6" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
-$as_echo_n "checking for in6_pktinfo... " >&6; }
-if ${isc_cv_have_in6_pktinfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
+printf %s "checking for in6_pktinfo... " >&6; }
+if test ${isc_cv_have_in6_pktinfo+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25994,7 +27113,7 @@ else
$isc_netinet6in6_hack
int
-main ()
+main (void)
{
struct in6_pktinfo xyzzy;
@@ -26004,31 +27123,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_have_in6_pktinfo=yes
-else
+else $as_nop
isc_cv_have_in6_pktinfo=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
-$as_echo "$isc_cv_have_in6_pktinfo" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
+printf "%s\n" "$isc_cv_have_in6_pktinfo" >&6; }
case "$isc_cv_have_in6_pktinfo" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
esac
# HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
-$as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
-if ${isc_cv_have_sin6_scope_id+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
+printf %s "checking for sockaddr_in6.sin6_scope_id... " >&6; }
+if test ${isc_cv_have_sin6_scope_id+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26039,7 +27160,7 @@ else
$isc_netinet6in6_hack
int
-main ()
+main (void)
{
struct sockaddr_in6 xyzzy;
@@ -26050,22 +27171,23 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_have_sin6_scope_id=yes
-else
+else $as_nop
isc_cv_have_sin6_scope_id=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
-$as_echo "$isc_cv_have_sin6_scope_id" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
+printf "%s\n" "$isc_cv_have_sin6_scope_id" >&6; }
case "$isc_cv_have_sin6_scope_id" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
esac
esac
@@ -26073,11 +27195,12 @@ esac
# We need this check run even without isc_cv_found_ipv6=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
-$as_echo_n "checking for in6addr_any... " >&6; }
-if ${isc_cv_in6addr_any_links+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
+printf %s "checking for in6addr_any... " >&6; }
+if test ${isc_cv_in6addr_any_links+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
SAVED_LIBS="$LIBS"
LIBS="$LDADD_LIBNTP $LIBS"
@@ -26090,7 +27213,7 @@ $ac_includes_default
$isc_netinet6in6_hack
int
-main ()
+main (void)
{
printf("%x", in6addr_any.s6_addr[15]);
@@ -26100,35 +27223,37 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
isc_cv_in6addr_any_links=yes
-else
+else $as_nop
isc_cv_in6addr_any_links=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$SAVED_LIBS"
{ SAVED_LIBS=; unset SAVED_LIBS;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
-$as_echo "$isc_cv_in6addr_any_links" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
+printf "%s\n" "$isc_cv_in6addr_any_links" >&6; }
case "$isc_cv_in6addr_any_links" in
no)
-$as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
-$as_echo_n "checking for struct if_laddrconf... " >&6; }
-if ${isc_cv_struct_if_laddrconf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
+printf %s "checking for struct if_laddrconf... " >&6; }
+if test ${isc_cv_struct_if_laddrconf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26136,7 +27261,7 @@ else
#include <net/if6.h>
int
-main ()
+main (void)
{
struct if_laddrconf a;
@@ -26146,30 +27271,32 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_struct_if_laddrconf=yes
-else
+else $as_nop
isc_cv_struct_if_laddrconf=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
-$as_echo "$isc_cv_struct_if_laddrconf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
+printf "%s\n" "$isc_cv_struct_if_laddrconf" >&6; }
case "$isc_cv_struct_if_laddrconf" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
-$as_echo_n "checking for struct if_laddrreq... " >&6; }
-if ${isc_cv_struct_if_laddrreq+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
+printf %s "checking for struct if_laddrreq... " >&6; }
+if test ${isc_cv_struct_if_laddrreq+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26177,7 +27304,7 @@ else
#include <net/if6.h>
int
-main ()
+main (void)
{
struct if_laddrreq a;
@@ -26187,30 +27314,32 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
isc_cv_struct_if_laddrreq=yes
-else
+else $as_nop
isc_cv_struct_if_laddrreq=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
-$as_echo "$isc_cv_struct_if_laddrreq" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
+printf "%s\n" "$isc_cv_struct_if_laddrreq" >&6; }
case "$isc_cv_struct_if_laddrreq" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
-$as_echo_n "checking for multicast IP support... " >&6; }
-if ${ntp_cv_multicast+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
+printf %s "checking for multicast IP support... " >&6; }
+if test ${ntp_cv_multicast+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ntp_cv_multicast=no
case "$host" in
@@ -26225,7 +27354,7 @@ else
#endif
int
-main ()
+main (void)
{
struct ip_mreq ipmr;
@@ -26236,27 +27365,29 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ntp_cv_multicast=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
-$as_echo "$ntp_cv_multicast" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
+printf "%s\n" "$ntp_cv_multicast" >&6; }
case "$ntp_cv_multicast" in
yes)
-$as_echo "#define MCAST 1" >>confdefs.h
+printf "%s\n" "#define MCAST 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
-$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
-if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
+printf %s "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
+if test ${ntp_cv_typeof_ip_multicast_loop+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case "$host" in
*-*-netbsd*|*-*-*linux*)
@@ -26269,19 +27400,18 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
-$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
+printf "%s\n" "$ntp_cv_typeof_ip_multicast_loop" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
-_ACEOF
+printf "%s\n" "#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop" >>confdefs.h
esac
# Check whether --enable-getifaddrs was given.
-if test "${enable_getifaddrs+set}" = set; then :
+if test ${enable_getifaddrs+y}
+then :
enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
-else
+else $as_nop
want_getifaddrs="yes"
fi
@@ -26289,8 +27419,8 @@ fi
case $want_getifaddrs in
glibc)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
-$as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
+printf "%s\n" "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
esac
case $want_getifaddrs in
no)
@@ -26298,16 +27428,12 @@ case $want_getifaddrs in
*)
SAVED_LIBS="$LIBS"
LIBS="$LDADD_LIBNTP $LIBS"
- for ac_func in getifaddrs
-do :
- ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
-if test "x$ac_cv_func_getifaddrs" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETIFADDRS 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
fi
-done
LIBS="$SAVED_LIBS"
{ SAVED_LIBS=; unset SAVED_LIBS;}
@@ -26319,11 +27445,12 @@ esac
#
case "$host" in
*-hp-hpux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
-$as_echo_n "checking for library containing if_nametoindex... " >&6; }
-if ${ac_cv_search_if_nametoindex+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
+printf %s "checking for library containing if_nametoindex... " >&6; }
+if test ${ac_cv_search_if_nametoindex+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26331,46 +27458,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char if_nametoindex ();
int
-main ()
+main (void)
{
return if_nametoindex ();
;
return 0;
}
_ACEOF
-for ac_lib in '' ipv6; do
+for ac_lib in '' ipv6
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_if_nametoindex=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_if_nametoindex+:} false; then :
+ if test ${ac_cv_search_if_nametoindex+y}
+then :
break
fi
done
-if ${ac_cv_search_if_nametoindex+:} false; then :
+if test ${ac_cv_search_if_nametoindex+y}
+then :
-else
+else $as_nop
ac_cv_search_if_nametoindex=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
-$as_echo "$ac_cv_search_if_nametoindex" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
+printf "%s\n" "$ac_cv_search_if_nametoindex" >&6; }
ac_res=$ac_cv_search_if_nametoindex
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
@@ -26378,23 +27507,19 @@ fi
esac
SAVED_LIBS="$LIBS"
LIBS="$LDADD_LIBNTP $LIBS"
-for ac_func in if_nametoindex
-do :
- ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
-if test "x$ac_cv_func_if_nametoindex" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_IF_NAMETOINDEX 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
+if test "x$ac_cv_func_if_nametoindex" = xyes
+then :
+ printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
fi
-done
LIBS="$SAVED_LIBS"
{ SAVED_LIBS=; unset SAVED_LIBS;}
case "$ac_cv_func_if_nametoindex" in
yes)
-$as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
+printf "%s\n" "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
esac
@@ -26405,23 +27530,19 @@ esac
# Hacks
# these need work if we're to move libntp under sntp
-$as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_NO_NICE 1" >>confdefs.h
-$as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TERMIOS 1" >>confdefs.h
# Checks for library functions.
-for ac_func in socket
-do :
- ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
-if test "x$ac_cv_func_socket" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SOCKET 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
+if test "x$ac_cv_func_socket" = xyes
+then :
+ printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h
fi
-done
@@ -26429,11 +27550,12 @@ done
have_unity=false
# Extract the first word of "ruby", so it can be a program name with args.
set dummy ruby; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_RUBY+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PATH_RUBY+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PATH_RUBY in
[\\/]* | ?:[\\/]*)
ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
@@ -26443,11 +27565,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PATH_RUBY="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -26459,11 +27585,11 @@ esac
fi
PATH_RUBY=$ac_cv_path_PATH_RUBY
if test -n "$PATH_RUBY"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
-$as_echo "$PATH_RUBY" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
+printf "%s\n" "$PATH_RUBY" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -26485,9 +27611,6 @@ fi
-## HMS: if we don't find c++ we should not look for gtest.
-#AC_PROG_CXX
-#NTP_GOOGLETEST
case "$build" in
@@ -26495,28 +27618,29 @@ case "$build" in
*) cross=1 ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
-$as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
+printf %s "checking if we want to enable tests with undiagnosed problems... " >&6; }
# Check whether --enable-problem-tests was given.
-if test "${enable_problem_tests+set}" = set; then :
+if test ${enable_problem_tests+y}
+then :
enableval=$enable_problem_tests; sntp_ept=$enableval
-else
+else $as_nop
sntp_ept=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_ept" >&5
-$as_echo "$sntp_ept" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sntp_ept" >&5
+printf "%s\n" "$sntp_ept" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodDatabase" >&5
-$as_echo_n "checking if we can run test-kodDatabase... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodDatabase" >&5
+printf %s "checking if we can run test-kodDatabase... " >&6; }
sntp_test_kodDatabase="no"
case "$sntp_ept:$cross:$host" in
no:0:*-apple-darwin12.6.0) ;;
*) sntp_test_kodDatabase="yes" ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodDatabase" >&5
-$as_echo "$sntp_test_kodDatabase" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodDatabase" >&5
+printf "%s\n" "$sntp_test_kodDatabase" >&6; }
if test x$sntp_test_kodDatabase = xyes; then
BUILD_TEST_KODDATABASE_TRUE=
BUILD_TEST_KODDATABASE_FALSE='#'
@@ -26526,15 +27650,15 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodFile" >&5
-$as_echo_n "checking if we can run test-kodFile... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodFile" >&5
+printf %s "checking if we can run test-kodFile... " >&6; }
sntp_test_kodFile="no"
case "$sntp_ept:$cross:$host" in
no:0:*-apple-darwin12.6.0) ;;
*) sntp_test_kodFile="yes" ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodFile" >&5
-$as_echo "$sntp_test_kodFile" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodFile" >&5
+printf "%s\n" "$sntp_test_kodFile" >&6; }
if test x$sntp_test_kodFile = xyes; then
BUILD_TEST_KODFILE_TRUE=
BUILD_TEST_KODFILE_FALSE='#'
@@ -26591,8 +27715,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -26622,15 +27746,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -26644,8 +27768,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -26662,7 +27786,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -26673,14 +27797,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -26755,8 +27879,8 @@ fi
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -26779,14 +27903,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -26796,46 +27922,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -26844,13 +27970,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -26859,8 +27978,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -26872,30 +27995,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -26908,13 +28011,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -26941,18 +28045,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -26964,12 +28070,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -27000,7 +28107,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -27022,6 +28129,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -27035,6 +28146,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -27076,7 +28193,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -27085,7 +28202,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -27147,8 +28264,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sntp $as_me 4.2.8p15, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by sntp $as_me 4.2.8p16, which was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -27207,18 +28324,20 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <http://bugs.ntp.org./>.
-sntp home page: <http://www.ntp.org./>."
+Report bugs to <https://bugs.ntp.org/>.
+sntp home page: <https://www.ntp.org/>."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-sntp config.status 4.2.8p15
-configured by $0, generated by GNU Autoconf 2.69,
+sntp config.status 4.2.8p16
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -27258,15 +28377,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -27274,7 +28393,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -27283,7 +28402,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -27311,7 +28430,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -27325,7 +28444,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -27333,7 +28452,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -27647,9 +28766,9 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -27985,7 +29104,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -27993,17 +29112,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -28020,7 +29139,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -28044,9 +29163,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -28108,8 +29227,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -28153,9 +29272,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -28171,20 +29290,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
@@ -28204,7 +29323,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$_am_arg" : 'X\(//\)[^/]' \| \
X"$_am_arg" : 'X\(//\)$' \| \
X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
+printf "%s\n" X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -28224,8 +29343,8 @@ $as_echo X"$_am_arg" |
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -28235,29 +29354,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -28275,53 +29400,50 @@ $as_echo X"$mf" |
q
}
s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "$am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
- /^X\(\/\/\)$/{
+ /^X\/\(\/\/\)$/{
s//\1/
q
}
- /^X\(\/\).*/{
+ /^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
}
;;
"libtool":C)
@@ -28852,6 +29974,7 @@ _LT_EOF
esac
+
ltmain=$ac_aux_dir/ltmain.sh
@@ -28940,7 +30063,7 @@ if test "$no_recursion" != yes; then
;;
*)
case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
esac
@@ -28950,7 +30073,7 @@ if test "$no_recursion" != yes; then
# in subdir configurations.
ac_arg="--prefix=$prefix"
case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
@@ -28971,17 +30094,17 @@ if test "$no_recursion" != yes; then
test -d "$srcdir/$ac_dir" || continue
ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
- $as_echo "$ac_msg" >&6
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ printf "%s\n" "$ac_msg" >&6
as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -29011,17 +30134,15 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir"
- # Check for guested configure; otherwise get Cygnus style configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
ac_sub_configure=$ac_srcdir/configure.gnu
elif test -f "$ac_srcdir/configure"; then
ac_sub_configure=$ac_srcdir/configure
- elif test -f "$ac_srcdir/configure.in"; then
- # This should be Cygnus configure.
- ac_sub_configure=$ac_aux_dir/configure
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
ac_sub_configure=
fi
@@ -29034,8 +30155,8 @@ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
# The eval makes quoting arguments work.
eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
--cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
@@ -29046,7 +30167,8 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
done
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/contrib/ntp/sntp/configure.ac b/contrib/ntp/sntp/configure.ac
index f6de8a134565..43c2ad6c5828 100644
--- a/contrib/ntp/sntp/configure.ac
+++ b/contrib/ntp/sntp/configure.ac
@@ -5,9 +5,9 @@ AC_PREREQ([2.68])
AC_INIT(
[sntp],
[VERSION_NUMBER],
- [http://bugs.ntp.org./],
+ [https://bugs.ntp.org/],
[],
- [http://www.ntp.org./]dnl
+ [https://www.ntp.org/]dnl
)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([libevent/build-aux])
@@ -40,7 +40,7 @@ sntp_configure_cache_version=20120806
NTP_CACHEVERSION([sntp], [$sntp_configure_cache_version])
-AM_INIT_AUTOMAKE([1.15 foreign -Wall -Wno-gnu])
+AM_INIT_AUTOMAKE([1.15 foreign subdir-objects -Wall -Wno-gnu])
AM_SILENT_RULES([yes])
@@ -58,11 +58,7 @@ NTP_HARDEN
NTP_LOCINFO()
-dnl AM_PROG_AR req. automake 1.12
-m4_ifdef(
- [AM_PROG_AR],
- [AM_PROG_AR]
-)
+AM_PROG_AR
NTP_LIBNTP
@@ -139,9 +135,6 @@ AC_DEFINE([HAVE_TERMIOS], 1, [sntp does not care about TTY stuff])
AC_CHECK_FUNCS([socket])
NTP_UNITYBUILD
-## HMS: if we don't find c++ we should not look for gtest.
-#AC_PROG_CXX
-#NTP_GOOGLETEST
SNTP_PROBLEM_TESTS
diff --git a/contrib/ntp/sntp/crypto.c b/contrib/ntp/sntp/crypto.c
index 8a47edef7184..5456c092aff8 100644
--- a/contrib/ntp/sntp/crypto.c
+++ b/contrib/ntp/sntp/crypto.c
@@ -36,7 +36,7 @@ compute_mac(
size_t slen = 0;
#endif
int key_type;
-
+
INIT_SSL();
key_type = keytype_from_text(macname, NULL);
@@ -69,16 +69,16 @@ compute_mac(
slen = 0;
}
len = (u_int)slen;
-
+
if (ctx)
CMAC_CTX_free(ctx);
/* Test our AES-128-CMAC implementation */
-
+
} else /* MD5 MAC handling */
#endif
{
EVP_MD_CTX * ctx;
-
+
if (!(ctx = EVP_MD_CTX_new())) {
msyslog(LOG_ERR, "make_mac: MAC %s Digest CTX new failed.",
macname);
@@ -111,7 +111,11 @@ compute_mac(
len = 0;
}
#else /* !OPENSSL */
- EVP_DigestInit(ctx, EVP_get_digestbynid(key_type));
+ (void)key_type; /* unused, so try to prevent compiler from croaks */
+ if (!EVP_DigestInit(ctx, EVP_get_digestbynid(key_type))) {
+ msyslog(LOG_ERR, "make_mac: MAC MD5 Digest Init failed.");
+ goto mac_fail;
+ }
EVP_DigestUpdate(ctx, key_data, key_size);
EVP_DigestUpdate(ctx, pkt_data, pkt_size);
EVP_DigestFinal(ctx, digest, &len);
@@ -134,7 +138,7 @@ make_mac(
{
u_int len;
u_char dbuf[EVP_MAX_MD_SIZE];
-
+
if (cmp_key->key_len > 64 || mac_size <= 0)
return 0;
if (pkt_size % 4 != 0)
@@ -143,7 +147,7 @@ make_mac(
len = compute_mac(dbuf, cmp_key->typen,
pkt_data, (u_int)pkt_size,
cmp_key->key_seq, (u_int)cmp_key->key_len);
-
+
if (len) {
if (len > (u_int)mac_size)
@@ -170,10 +174,10 @@ auth_md5(
u_int len = 0;
u_char const * pkt_ptr = pkt_data;
u_char dbuf[EVP_MAX_MD_SIZE];
-
+
if (mac_size <= 0 || (size_t)mac_size > sizeof(dbuf))
return FALSE;
-
+
len = compute_mac(dbuf, cmp_key->typen,
pkt_ptr, (u_int)pkt_size,
cmp_key->key_seq, (u_int)cmp_key->key_len);
@@ -181,7 +185,7 @@ auth_md5(
pkt_ptr += pkt_size + 4;
if (len > (u_int)mac_size)
len = (u_int)mac_size;
-
+
/* isc_tsmemcmp will be better when its easy to link with. sntp
* is a 1-shot program, so snooping for timing attacks is
* Harder.
@@ -226,7 +230,7 @@ auth_init(
/* HMS: Is it OK to do this later, after we know we have a key file? */
INIT_SSL();
-
+
if (keyf == NULL) {
if (debug)
printf("sntp auth_init: Couldn't open key file %s for reading!\n", keyfile);
diff --git a/contrib/ntp/sntp/deps-ver b/contrib/ntp/sntp/deps-ver
index 596602f0205b..abd139968b25 100644
--- a/contrib/ntp/sntp/deps-ver
+++ b/contrib/ntp/sntp/deps-ver
@@ -1 +1 @@
-Mon Jan 31 21:14:29 UTC 2011
+Mon Jan 16 09:26:08 UTC 2023
diff --git a/contrib/ntp/sntp/depsver.mf b/contrib/ntp/sntp/depsver.mf
index 695f7303ce31..62c59c4f1d12 100644
--- a/contrib/ntp/sntp/depsver.mf
+++ b/contrib/ntp/sntp/depsver.mf
@@ -2,9 +2,9 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -22,7 +22,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -30,6 +30,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
BUILT_SOURCES += .deps-ver
CLEANFILES += .deps-ver
+DISTCLEANFILES += $(DEPDIR)/deps-ver
#
# depsver.mf included in Makefile.am for directories with .deps
@@ -55,6 +56,6 @@ CLEANFILES += .deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/sntp/include/Makefile.in b/contrib/ntp/sntp/include/Makefile.in
index b66440c621ef..c3db03921ec4 100644
--- a/contrib/ntp/sntp/include/Makefile.in
+++ b/contrib/ntp/sntp/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -164,6 +164,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -171,6 +172,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -182,6 +185,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@@ -367,6 +371,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -408,8 +413,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -432,8 +437,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/sntp/include/autogen-version.def b/contrib/ntp/sntp/include/autogen-version.def
index e494f0ef4d1f..762a00823428 100644
--- a/contrib/ntp/sntp/include/autogen-version.def
+++ b/contrib/ntp/sntp/include/autogen-version.def
@@ -1,4 +1,4 @@
-#assert (version-compare >= autogen-version "5.18.5")
+#assert (version-compare >= autogen-version "5.18.16")
// >= is usually what we want.
// > is when we need a pre* version
guard-option-names;
diff --git a/contrib/ntp/sntp/include/copyright.def b/contrib/ntp/sntp/include/copyright.def
index 9334ac8da816..c93887e2cdae 100644
--- a/contrib/ntp/sntp/include/copyright.def
+++ b/contrib/ntp/sntp/include/copyright.def
@@ -1,9 +1,9 @@
/* -*- Mode: Text -*- */
copyright = {
- date = "1992-2020";
+ date = "1992-2023";
owner = "The University of Delaware and Network Time Foundation";
- eaddr = "http://bugs.ntp.org, bugs@ntp.org";
+ eaddr = "https://bugs.ntp.org, bugs@ntp.org";
type = ntp;
};
diff --git a/contrib/ntp/sntp/include/version.def b/contrib/ntp/sntp/include/version.def
index 4f36d06d1971..c8c4ebe3d900 100644
--- a/contrib/ntp/sntp/include/version.def
+++ b/contrib/ntp/sntp/include/version.def
@@ -1 +1 @@
-version = '4.2.8p15';
+version = '4.2.8p16';
diff --git a/contrib/ntp/sntp/include/version.texi b/contrib/ntp/sntp/include/version.texi
index 9dfcfd768fbe..75c06dd43af0 100644
--- a/contrib/ntp/sntp/include/version.texi
+++ b/contrib/ntp/sntp/include/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 23 June 2020
-@set EDITION 4.2.8p15
-@set VERSION 4.2.8p15
+@set UPDATED 31 May 2023
+@set EDITION 4.2.8p16
+@set VERSION 4.2.8p16
diff --git a/contrib/ntp/sntp/includes.mf b/contrib/ntp/sntp/includes.mf
index 9ba126df498d..d717aea53eb6 100644
--- a/contrib/ntp/sntp/includes.mf
+++ b/contrib/ntp/sntp/includes.mf
@@ -1,6 +1,6 @@
## includes.mf - automake fragment
SNTP_INCS = -I$(top_srcdir)/../include
-SNTP_INCS += -I$(top_srcdir)/../lib/isc/include
-SNTP_INCS += -I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include
-SNTP_INCS += -I$(top_srcdir)/../lib/isc/unix/include
+SNTP_INCS += -I$(top_srcdir)/../libntp/lib/isc/include
+SNTP_INCS += -I$(top_srcdir)/../libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include
+SNTP_INCS += -I$(top_srcdir)/../libntp/lib/isc/unix/include
diff --git a/contrib/ntp/sntp/invoke-sntp.texi b/contrib/ntp/sntp/invoke-sntp.texi
index 29f097ce6276..7f31eddb8b4d 100644
--- a/contrib/ntp/sntp/invoke-sntp.texi
+++ b/contrib/ntp/sntp/invoke-sntp.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:19:36 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 02:48:07 PM by AutoGen 5.18.16
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -101,7 +101,7 @@ with a status code of 0.
@exampleindent 0
@example
-sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p15
+sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p16
Usage: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
@@ -152,7 +152,7 @@ The following option preset mechanisms are supported:
- reading file ./.ntprc
- examining environment variables named SNTP_*
-Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+Please send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4
@@ -397,7 +397,7 @@ The command line options relating to configuration and/or usage help are:
Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
@table @samp
diff --git a/contrib/ntp/sntp/libevent/CMakeLists.txt b/contrib/ntp/sntp/libevent/CMakeLists.txt
new file mode 100644
index 000000000000..676727f16563
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/CMakeLists.txt
@@ -0,0 +1,1575 @@
+#
+# Libevent CMake project
+#
+# Based on initial work by:
+# Alexey Ozeritsky
+#
+# Additional changes:
+# Brodie Thiesfield
+# Joakim Soderberg
+# Trond Norbye
+# Sergei Nikulov
+#
+# Build example:
+#
+# cd libevent
+# md build
+# cd build
+# cmake -G "Visual Studio 10" ..
+# start libevent.sln
+#
+
+cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
+
+if (POLICY CMP0054)
+ cmake_policy(SET CMP0054 NEW)
+endif()
+if (POLICY CMP0074)
+ cmake_policy(SET CMP0074 NEW)
+endif()
+if (POLICY CMP0075)
+ cmake_policy(SET CMP0075 NEW)
+endif()
+
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release
+ CACHE STRING "Set build type to Debug o Release (default Release)" FORCE)
+endif()
+string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
+
+# get rid of the extra default configurations
+# what? why would you get id of other useful build types? - Ellzey
+set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Limited configurations" FORCE)
+
+set(EVENT__LIBRARY_TYPE DEFAULT CACHE STRING
+ "Set library type to SHARED/STATIC/BOTH (default SHARED for MSVC, otherwise BOTH)")
+
+project(libevent C)
+
+list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
+string(REGEX MATCH "SunOS" SOLARIS "${CMAKE_SYSTEM_NAME}")
+
+
+include(CheckTypeSize)
+include(CheckFileOffsetBits)
+include(Macros)
+include(CheckVariableExists)
+include(CheckSymbolExists)
+include(CheckStructHasMember)
+include(CheckCSourceCompiles)
+include(CheckPrototypeDefinition)
+include(CheckFunctionKeywords)
+include(CheckConstExists)
+include(AddCompilerFlags)
+include(VersionViaGit)
+
+event_fuzzy_version_from_git()
+
+set(EVENT_VERSION_MAJOR ${EVENT_GIT___VERSION_MAJOR})
+set(EVENT_VERSION_MINOR ${EVENT_GIT___VERSION_MINOR})
+set(EVENT_VERSION_PATCH ${EVENT_GIT___VERSION_PATCH})
+set(EVENT_VERSION_STAGE ${EVENT_GIT___VERSION_STAGE})
+
+
+set(EVENT_ABI_MAJOR ${EVENT_VERSION_MAJOR})
+set(EVENT_ABI_MINOR ${EVENT_VERSION_MINOR})
+set(EVENT_ABI_PATCH ${EVENT_VERSION_PATCH})
+
+set(EVENT_ABI_LIBVERSION
+ "${EVENT_ABI_MAJOR}.${EVENT_ABI_MINOR}.${EVENT_ABI_PATCH}")
+
+set(EVENT_PACKAGE_VERSION
+ "${EVENT_VERSION_MAJOR}.${EVENT_VERSION_MINOR}.${EVENT_VERSION_PATCH}")
+
+set(EVENT_NUMERIC_VERSION 0x02010c00)
+# equals to VERSION_INFO in Makefile.am
+set(EVENT_ABI_LIBVERSION_CURRENT 7)
+set(EVENT_ABI_LIBVERSION_REVISION 1)
+set(EVENT_ABI_LIBVERSION_AGE 0)
+
+# equals to RELEASE in Makefile.am
+set(EVENT_PACKAGE_RELEASE 2.1)
+
+# only a subset of names can be used, defaults to "beta"
+set(EVENT_STAGE_NAME ${EVENT_VERSION_STAGE})
+
+# a list that defines what can set for EVENT_STAGE_VERSION
+set(EVENT__ALLOWED_STAGE_NAMES
+ rc
+ beta
+ alpha
+ alpha-dev
+ release
+ stable
+)
+list(
+ FIND EVENT__ALLOWED_STAGE_NAMES
+ "${EVENT_STAGE_NAME}"
+ EVENT__STAGE_RET
+)
+if (EVENT__STAGE_RET EQUAL -1)
+ message(WARNING
+ "stage ${EVENT_STAGE_NAME} is not allowed, reset to beta")
+ set(EVENT_STAGE_NAME beta)
+endif()
+
+set(EVENT_VERSION
+ "${EVENT_VERSION_MAJOR}.${EVENT_VERSION_MINOR}.${EVENT_VERSION_PATCH}-${EVENT_STAGE_NAME}")
+
+option(EVENT__DISABLE_DEBUG_MODE
+ "Define if libevent should build without support for a debug mode" OFF)
+
+option(EVENT__ENABLE_VERBOSE_DEBUG
+ "Enables verbose debugging" OFF)
+
+option(EVENT__DISABLE_MM_REPLACEMENT
+ "Define if libevent should not allow replacing the mm functions" OFF)
+
+option(EVENT__DISABLE_THREAD_SUPPORT
+ "Define if libevent should not be compiled with thread support" OFF)
+
+option(EVENT__DISABLE_OPENSSL
+ "Define if libevent should build without support for OpenSSL encryption" OFF)
+
+option(EVENT__DISABLE_BENCHMARK
+ "Defines if libevent should build without the benchmark executables" OFF)
+
+option(EVENT__DISABLE_TESTS
+ "If tests should be compiled or not" OFF)
+
+option(EVENT__DISABLE_REGRESS
+ "Disable the regress tests" OFF)
+
+option(EVENT__DISABLE_SAMPLES
+ "Disable sample files" OFF)
+
+option(EVENT__DISABLE_CLOCK_GETTIME
+ "Do not use clock_gettime even if it is available" OFF)
+
+option(EVENT__FORCE_KQUEUE_CHECK
+ "When crosscompiling forces running a test program that verifies that Kqueue works with pipes. Note that this requires you to manually run the test program on the cross compilation target to verify that it works. See cmake documentation for try_run for more details" OFF)
+
+# TODO: Add --disable-largefile omit support for large files
+option(EVENT__COVERAGE
+"Enable running gcov to get a test coverage report (only works with GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well." OFF)
+
+# Put the libaries and binaries that get built into directories at the
+# top of the build tree rather than in hard-to-find leaf directories.
+#
+# But only if this variables are not defined yet
+# (i.e. libevent is used via add_subdirectory())
+if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
+endif()
+if (NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
+endif()
+if (NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
+endif()
+
+if (EVENT__ENABLE_VERBOSE_DEBUG)
+ add_definitions(-DUSE_DEBUG=1)
+endif()
+
+# make it colorful under ninja-build
+if ("${CMAKE_GENERATOR}" STREQUAL "Ninja")
+ add_compiler_flags(-fdiagnostics-color=always)
+endif()
+
+# Setup compiler flags for coverage.
+if (EVENT__COVERAGE)
+ if (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "debug")
+ message(FATAL_ERROR "Coverage requires -DCMAKE_BUILD_TYPE=Debug")
+ endif()
+
+ message(STATUS "Setting coverage compiler flags")
+
+ set(CMAKE_REQUIRED_LIBRARIES "--coverage")
+ add_compiler_flags(-g -O0 --coverage)
+ set(CMAKE_REQUIRED_LIBRARIES "")
+endif()
+
+set(GNUC 0)
+set(CLANG 0)
+set(MSVC 0)
+if (("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR
+ ("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang"))
+ set(CLANG 1)
+endif()
+if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR (${CLANG}))
+ set(GNUC 1)
+endif()
+if (("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") OR (${CLANG}))
+ set(MSVC 1)
+endif()
+
+# Detect library type
+set(EVENT_LIBRARY_TYPE)
+if ("${EVENT__LIBRARY_TYPE}" STREQUAL "DEFAULT")
+ if (${MSVC})
+ set(EVENT_LIBRARY_TYPE SHARED)
+ else()
+ set(EVENT_LIBRARY_TYPE BOTH)
+ endif()
+else()
+ string(TOUPPER "${EVENT__LIBRARY_TYPE}" EVENT_LIBRARY_TYPE)
+endif()
+if ((${MSVC}) AND ("${EVENT_LIBRARY_TYPE}" STREQUAL "BOTH"))
+ message(WARNING
+ "Building SHARED and STATIC is not supported for MSVC "
+ "(due to conflicts in library name"
+ " between STATIC library and IMPORTED library for SHARED libraries)")
+endif()
+set(EVENT_LIBRARY_STATIC OFF)
+set(EVENT_LIBRARY_SHARED OFF)
+if ("${EVENT_LIBRARY_TYPE}" STREQUAL "BOTH")
+ set(EVENT_LIBRARY_STATIC ON)
+ set(EVENT_LIBRARY_SHARED ON)
+elseif ("${EVENT_LIBRARY_TYPE}" STREQUAL "STATIC")
+ set(EVENT_LIBRARY_STATIC ON)
+elseif ("${EVENT_LIBRARY_TYPE}" STREQUAL "SHARED")
+ set(EVENT_LIBRARY_SHARED ON)
+else()
+ message(FATAL_ERROR "${EVENT_LIBRARY_TYPE} is not supported")
+endif()
+
+if (${MSVC})
+ set(msvc_static_runtime OFF)
+ if ("${EVENT_LIBRARY_TYPE}" STREQUAL "STATIC")
+ set(msvc_static_runtime ON)
+ endif()
+
+ # For more info:
+ # - https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=vs-2017
+ # - https://gitlab.kitware.com/cmake/community/wikis/FAQ#how-can-i-build-my-msvc-application-with-a-static-runtime
+ option(EVENT__MSVC_STATIC_RUNTIME
+ "Link static runtime libraries"
+ ${msvc_static_runtime})
+
+ if (EVENT__MSVC_STATIC_RUNTIME)
+ foreach (flag_var
+ CMAKE_C_FLAGS_DEBUG
+ CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL
+ CMAKE_C_FLAGS_RELWITHDEBINFO
+ )
+ if (${flag_var} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ endif()
+ endforeach()
+ endif()
+endif()
+
+# GNUC specific options.
+if (${GNUC})
+ option(EVENT__DISABLE_GCC_WARNINGS "Disable verbose warnings with GCC" OFF)
+ option(EVENT__ENABLE_GCC_HARDENING "Enable compiler security checks" OFF)
+ option(EVENT__ENABLE_GCC_FUNCTION_SECTIONS "Enable gcc function sections" OFF)
+ option(EVENT__ENABLE_GCC_WARNINGS "Make all GCC warnings into errors" OFF)
+
+ set(GCC_V ${CMAKE_C_COMPILER_VERSION})
+
+ list(APPEND __FLAGS
+ -Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
+
+ -fno-strict-aliasing # gcc 2.9.5+
+ -Wmissing-prototypes
+
+ # gcc 4
+ -Winit-self
+ -Wmissing-field-initializers
+ -Wdeclaration-after-statement
+
+ # gcc 4.2
+ -Waddress
+ -Wnormalized=id
+ -Woverride-init
+
+ # gcc 4.5
+ -Wlogical-op
+
+ -Wwrite-strings
+ )
+
+ if (${CLANG})
+ list(APPEND __FLAGS -Wno-unused-function)
+ endif()
+
+ if (EVENT__DISABLE_GCC_WARNINGS)
+ list(APPEND __FLAGS -w)
+ endif()
+
+ if (EVENT__ENABLE_GCC_HARDENING)
+ list(APPEND __FLAGS
+ -fstack-protector-all
+ -fwrapv
+ -fPIE
+ -Wstack-protector
+ "--param ssp-buffer-size=1")
+
+ add_definitions(-D_FORTIFY_SOURCE=2)
+ endif()
+
+ if (EVENT__ENABLE_GCC_FUNCTION_SECTIONS)
+ list(APPEND __FLAGS -ffunction-sections)
+ # TODO: Add --gc-sections support. We need some checks for NetBSD to ensure this works.
+ endif()
+
+ if (EVENT__ENABLE_GCC_WARNINGS)
+ list(APPEND __FLAGS -Werror)
+ endif()
+
+ add_compiler_flags(${__FLAGS})
+endif()
+
+if (APPLE)
+ # Get rid of deprecated warnings for OpenSSL on OSX 10.7 and greater.
+ add_compiler_flags(
+ -Wno-error=deprecated-declarations
+ -Qunused-arguments
+ )
+endif()
+
+if (MINGW OR CYGWIN)
+ set(WIN32 TRUE)
+endif()
+
+# Winsock.
+if(WIN32)
+ set(CMAKE_REQUIRED_LIBRARIES ws2_32 shell32 advapi32)
+ set(CMAKE_REQUIRED_DEFINITIONS -FIwinsock2.h -FIws2tcpip.h -D_WIN32_WINNT=0x0600)
+endif()
+if (SOLARIS)
+ set(CMAKE_REQUIRED_LIBRARIES socket nsl)
+endif()
+
+# Check if _GNU_SOURCE is available.
+if (NOT DEFINED _GNU_SOURCE)
+ CHECK_SYMBOL_EXISTS(__GNU_LIBRARY__ "features.h" _GNU_SOURCE)
+
+ if (NOT _GNU_SOURCE)
+ unset(_GNU_SOURCE CACHE)
+ CHECK_SYMBOL_EXISTS(_GNU_SOURCE "features.h" _GNU_SOURCE)
+ endif()
+
+ if (ANDROID)
+ set(_GNU_SOURCE TRUE)
+ endif()
+endif()
+
+if (_GNU_SOURCE)
+ add_definitions(-D_GNU_SOURCE=1)
+ set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+endif()
+
+# Check if header files exist
+list(APPEND FILES_TO_CHECK
+ fcntl.h
+ inttypes.h
+ memory.h
+ signal.h
+ stdarg.h
+ stddef.h
+ stdint.h
+ stdlib.h
+ string.h
+ errno.h
+ unistd.h
+ time.h
+ sys/types.h
+ sys/stat.h
+ sys/time.h
+ sys/param.h
+)
+if (WIN32)
+ list(APPEND FILES_TO_CHECK
+ io.h
+ winsock2.h
+ ws2tcpip.h
+ afunix.h
+ )
+else()
+ list(APPEND FILES_TO_CHECK
+ netdb.h
+ dlfcn.h
+ arpa/inet.h
+ poll.h
+ port.h
+ sys/socket.h
+ sys/random.h
+ sys/un.h
+ sys/devpoll.h
+ sys/epoll.h
+ sys/eventfd.h
+ sys/event.h
+ sys/ioctl.h
+ sys/mman.h
+ sys/queue.h
+ sys/select.h
+ sys/sendfile.h
+ sys/uio.h
+ sys/wait.h
+ sys/resource.h
+ sys/timerfd.h
+ netinet/in.h
+ netinet/in6.h
+ netinet/tcp.h
+ ifaddrs.h
+ )
+endif()
+
+if (NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
+ list(APPEND FILES_TO_CHECK sys/sysctl.h)
+endif()
+
+if (APPLE)
+ list(APPEND FILES_TO_CHECK
+ mach/mach_time.h
+ mach/mach.h
+ )
+endif()
+
+foreach(FILE ${FILES_TO_CHECK})
+ CHECK_INCLUDE_FILE_CONCAT(${FILE} "EVENT")
+endforeach()
+unset(FILES_TO_CHECK)
+
+# Check if functions exist
+list(APPEND SYMBOLS_TO_CHECK
+ getaddrinfo
+ getnameinfo
+ getprotobynumber
+ getservbyname
+ gethostbyname
+ inet_ntop
+ inet_pton
+ gettimeofday
+ signal
+ strtoll
+ splice
+ strlcpy
+ strsep
+ strtok_r
+ vasprintf
+ timerclear
+ timercmp
+ timerisset
+ timeradd
+ nanosleep
+ putenv
+ umask
+)
+if (NOT EVENT__DISABLE_CLOCK_GETTIME)
+ list(APPEND SYMBOLS_TO_CHECK clock_gettime)
+endif()
+
+if (WIN32)
+ list(APPEND SYMBOLS_TO_CHECK
+ _gmtime64_s
+ _gmtime64
+ )
+else()
+ list(APPEND SYMBOLS_TO_CHECK
+ getifaddrs
+ select
+ epoll_create
+ epoll_create1
+ epoll_ctl
+ eventfd
+ poll
+ port_create
+ kqueue
+ fcntl
+ mmap
+ pipe
+ pipe2
+ sendfile
+ sigaction
+ strsignal
+ sysctl
+ accept4
+ arc4random
+ arc4random_buf
+ arc4random_addrandom
+ getrandom
+ getegid
+ geteuid
+ issetugid
+ usleep
+ timerfd_create
+ setenv
+ unsetenv
+ setrlimit
+ gethostbyname_r
+ )
+ if (APPLE)
+ list(APPEND SYMBOLS_TO_CHECK mach_absolute_time)
+ endif()
+endif()
+
+# Add stdio.h for vasprintf
+set(EVENT_INCLUDES ${EVENT_INCLUDES} stdio.h)
+CHECK_SYMBOLS_EXIST("${SYMBOLS_TO_CHECK}" "${EVENT_INCLUDES}" "EVENT")
+unset(SYMBOLS_TO_CHECK)
+set(EVENT__HAVE_EPOLL ${EVENT__HAVE_EPOLL_CREATE})
+
+# Get the gethostbyname_r prototype.
+if(EVENT__HAVE_GETHOSTBYNAME_R)
+ CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
+ "int gethostbyname_r(const char *name, struct hostent *hp, struct hostent_data *hdata)"
+ "0"
+ "netdb.h"
+ EVENT__HAVE_GETHOSTBYNAME_R_3_ARG)
+
+ CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
+ "struct hostent *gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, int *herr)"
+ "NULL"
+ "netdb.h"
+ EVENT__HAVE_GETHOSTBYNAME_R_5_ARG)
+
+ CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
+ "int gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, struct hostent **result, int *herr)"
+ "0"
+ "netdb.h"
+ EVENT__HAVE_GETHOSTBYNAME_R_6_ARG)
+endif()
+
+if(HAVE_PORT_H AND HAVE_PORT_CREATE)
+ set(EVENT__HAVE_EVENT_PORTS 1)
+endif()
+
+# Only `CHECK_TYPE_SIZE()' will use `CMAKE_EXTRA_INCLUDE_FILES'
+set(CMAKE_EXTRA_INCLUDE_FILES ${EVENT_INCLUDES})
+
+CHECK_TYPE_SIZE("struct sockaddr_un" EVENT__HAVE_STRUCT_SOCKADDR_UN)
+CHECK_TYPE_SIZE("uint8_t" EVENT__HAVE_UINT8_T)
+CHECK_TYPE_SIZE("uint16_t" EVENT__HAVE_UINT16_T)
+CHECK_TYPE_SIZE("uint32_t" EVENT__HAVE_UINT32_T)
+CHECK_TYPE_SIZE("uint64_t" EVENT__HAVE_UINT64_T)
+CHECK_TYPE_SIZE("short" EVENT__SIZEOF_SHORT BUILTIN_TYPES_ONLY)
+CHECK_TYPE_SIZE("int" EVENT__SIZEOF_INT BUILTIN_TYPES_ONLY)
+CHECK_TYPE_SIZE("unsigned" EVENT__SIZEOF_UNSIGNED BUILTIN_TYPES_ONLY)
+CHECK_TYPE_SIZE("unsigned int" EVENT__SIZEOF_UNSIGNED_INT BUILTIN_TYPES_ONLY)
+CHECK_TYPE_SIZE("long" EVENT__SIZEOF_LONG BUILTIN_TYPES_ONLY)
+CHECK_TYPE_SIZE("long long" EVENT__SIZEOF_LONG_LONG BUILTIN_TYPES_ONLY)
+
+if(WIN32)
+ # These aren't available until Windows Vista.
+ # But you can still link them. They just won't be found when running the exe.
+ set(EVENT__HAVE_INET_NTOP 0)
+ set(EVENT__HAVE_INET_PTON 0)
+endif()
+
+# Check for different inline keyword versions.
+check_function_keywords("inline" "__inline" "__inline__")
+
+if (HAVE_INLINE)
+ set(EVENT__inline inline)
+elseif (HAVE___INLINE)
+ set(EVENT__inline __inline)
+elseif(HAVE___INLINE__)
+ set(EVENT__inline __inline__)
+else()
+ set(EVENT__inline)
+endif()
+
+# __func__/__FUNCTION__ is not a macros in general
+CHECK_SYMBOL_EXISTS("__func__" "" EVENT__HAVE___func__)
+CHECK_SYMBOL_EXISTS("__FUNCTION__" "" EVENT__HAVE___FUNCTION__)
+
+CHECK_SYMBOL_EXISTS(TAILQ_FOREACH sys/queue.h EVENT__HAVE_TAILQFOREACH)
+CHECK_CONST_EXISTS(CTL_KERN sys/sysctl.h EVENT__HAVE_DECL_CTL_KERN)
+CHECK_CONST_EXISTS(KERN_ARND sys/sysctl.h EVENT__HAVE_DECL_KERN_ARND)
+CHECK_SYMBOL_EXISTS(F_SETFD fcntl.h EVENT__HAVE_SETFD)
+
+CHECK_TYPE_SIZE(fd_mask EVENT__HAVE_FD_MASK)
+
+CHECK_TYPE_SIZE(size_t EVENT__SIZEOF_SIZE_T)
+if(NOT EVENT__SIZEOF_SIZE_T)
+ set(EVENT__size_t "unsigned")
+ set(EVENT__SIZEOF_SIZE_T ${EVENT__SIZEOF_UNSIGNED})
+else()
+ set(EVENT__size_t size_t)
+endif()
+
+CHECK_TYPE_SIZE("off_t" EVENT__SIZEOF_OFF_T LANGUAGE C)
+
+
+# XXX we should functionalize these size and type sets. --elley
+
+# Winssck.
+if (_MSC_VER)
+ list(APPEND CMAKE_EXTRA_INCLUDE_FILES BaseTsd.h)
+endif()
+CHECK_TYPE_SIZE("ssize_t" EVENT__SIZEOF_SSIZE_T_LOWER LANGUAGE C)
+CHECK_TYPE_SIZE("SSIZE_T" EVENT__SIZEOF_SSIZE_T_UPPER LANGUAGE C)
+
+if (EVENT__SIZEOF_SSIZE_T_LOWER)
+ set(EVENT__ssize_t "ssize_t")
+ set(EVENT__SIZEOF_SSIZE_T ${EVENT__SIZEOF_SSIZE_T_LOWER})
+elseif (EVENT__SIZEOF_SSIZE_T_UPPER)
+ set(EVENT__ssize_t "SSIZE_T")
+ set(EVENT__SIZEOF_SSIZE_T ${EVENT__SIZEOF_SSIZE_T_UPPER})
+else()
+ set(EVENT__ssize_t "int")
+ set(EVENT__SIZEOF_SSIZE_T ${EVENT__SIZEOF_INT})
+endif()
+
+CHECK_TYPE_SIZE(socklen_t EVENT__SIZEOF_SOCKLEN_T)
+if(NOT EVENT__SIZEOF_SOCKLEN_T)
+ set(EVENT__socklen_t "unsigned int")
+ set(EVENT__SIZEOF_SOCKLEN_T ${EVENT__SIZEOF_UNSIGNED_INT})
+else()
+ set(EVENT__socklen_t "socklen_t")
+endif()
+
+CHECK_TYPE_SIZE(pid_t EVENT__SIZEOF_PID_T)
+if(NOT EVENT__SIZEOF_PID_T)
+ set(EVENT__SIZEOF_PID_T ${EVENT__SIZEOF_INT})
+else()
+ set(EVENT__SIZEOF_PID_T EVENT__SIZEOF_PID_T)
+endif()
+
+if (NOT EVENT__DISABLE_THREAD_SUPPORT)
+ if (NOT WIN32)
+ list(APPEND CMAKE_EXTRA_INCLUDE_FILES pthread.h)
+ endif()
+ CHECK_TYPE_SIZE(pthread_t EVENT__SIZEOF_PTHREAD_T)
+endif()
+
+if(EVENT__HAVE_CLOCK_GETTIME)
+ set(EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1)
+endif()
+
+# we're just getting lazy now.
+CHECK_TYPE_SIZE("uintptr_t" EVENT__HAVE_UINTPTR_T)
+CHECK_TYPE_SIZE("void *" EVENT__SIZEOF_VOID_P)
+CHECK_TYPE_SIZE("time_t" EVENT__SIZEOF_TIME_T)
+
+# Tests file offset bits.
+# TODO: Add AIX test for if -D_LARGE_FILES is needed.
+
+# XXX: Why is this here? we don't even use it. Well, we don't even use it
+# on top of that, why is it set in the config.h?! IT_MAKES_NO_SENSE
+# I'm commenting it out for now.
+# - ellzey
+
+#CHECK_FILE_OFFSET_BITS()
+
+# Verify kqueue works with pipes.
+if (EVENT__HAVE_KQUEUE)
+ if ((CMAKE_CROSSCOMPILING OR APPLE) AND NOT EVENT__FORCE_KQUEUE_CHECK)
+ message(WARNING "Cannot check if kqueue works with pipes when crosscompiling, use EVENT__FORCE_KQUEUE_CHECK to be sure (this requires manually running a test program on the cross compilation target)")
+ set(EVENT__HAVE_WORKING_KQUEUE 1)
+ else()
+ message(STATUS "Checking if kqueue works with pipes...")
+ include(CheckWorkingKqueue)
+ endif()
+endif()
+
+if(EVENT__HAVE_NETDB_H)
+ list(APPEND CMAKE_EXTRA_INCLUDE_FILES netdb.h)
+ CHECK_TYPE_SIZE("struct addrinfo" EVENT__HAVE_STRUCT_ADDRINFO)
+elseif(WIN32)
+ list(APPEND CMAKE_EXTRA_INCLUDE_FILES ws2tcpip.h)
+ CHECK_TYPE_SIZE("struct addrinfo" EVENT__HAVE_STRUCT_ADDRINFO)
+endif()
+
+# Check for sockaddr structure sizes.
+set(SOCKADDR_HEADERS)
+if (WIN32)
+ set(CMAKE_REQUIRED_DEFINITIONS "-DWIN32_LEAN_AND_MEAN")
+ if (_MSC_VER LESS 1300)
+ set(SOCKADDR_HEADERS winsock.h)
+ else()
+ set(SOCKADDR_HEADERS winsock2.h ws2tcpip.h)
+ endif()
+else()
+ if (EVENT__HAVE_NETINET_IN_H)
+ set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} netinet/in.h)
+ endif()
+
+ if (EVENT__HAVE_NETINET_IN6_H)
+ set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} netinet/in6.h)
+ endif()
+
+ if (EVENT__HAVE_SYS_SOCKET_H)
+ set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} sys/socket.h)
+ endif()
+
+ if (EVENT__HAVE_NETDB_H)
+ set(SOCKADDR_HEADERS ${SOCKADDR_HEADERS} netdb.h)
+ endif()
+endif()
+
+CHECK_TYPE_SIZE("struct in6_addr" EVENT__HAVE_STRUCT_IN6_ADDR)
+if(EVENT__HAVE_STRUCT_IN6_ADDR)
+ CHECK_STRUCT_HAS_MEMBER("struct in6_addr"
+ s6_addr16 "${SOCKADDR_HEADERS}"
+ EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16)
+
+ CHECK_STRUCT_HAS_MEMBER("struct in6_addr"
+ s6_addr32 "${SOCKADDR_HEADERS}"
+ EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32)
+endif()
+
+CHECK_TYPE_SIZE("sa_family_t" EVENT__HAVE_SA_FAMILY_T)
+CHECK_TYPE_SIZE("struct sockaddr_in6" EVENT__HAVE_STRUCT_SOCKADDR_IN6)
+
+if(EVENT__HAVE_STRUCT_SOCKADDR_IN6)
+ CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6"
+ sin6_len "${SOCKADDR_HEADERS}"
+ EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN)
+
+ CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6"
+ sin_len "${SOCKADDR_HEADERS}"
+ EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN)
+endif()
+
+CHECK_TYPE_SIZE("struct sockaddr_storage" EVENT__HAVE_STRUCT_SOCKADDR_STORAGE)
+if(EVENT__HAVE_STRUCT_SOCKADDR_STORAGE)
+ CHECK_STRUCT_HAS_MEMBER("struct sockaddr_storage"
+ ss_family "${SOCKADDR_HEADERS}"
+ EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)
+
+ CHECK_STRUCT_HAS_MEMBER("struct sockaddr_storage"
+ __ss_family "${SOCKADDR_HEADERS}" EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY)
+endif()
+
+CHECK_TYPE_SIZE("struct linger" EVENT__HAVE_STRUCT_LINGER)
+
+# Group the source files.
+set(HDR_PRIVATE
+ bufferevent-internal.h
+ changelist-internal.h
+ defer-internal.h
+ epolltable-internal.h
+ evbuffer-internal.h
+ event-internal.h
+ evmap-internal.h
+ evrpc-internal.h
+ evsignal-internal.h
+ evthread-internal.h
+ ht-internal.h
+ http-internal.h
+ iocp-internal.h
+ ipv6-internal.h
+ log-internal.h
+ minheap-internal.h
+ mm-internal.h
+ ratelim-internal.h
+ strlcpy-internal.h
+ util-internal.h
+ evconfig-private.h
+ compat/sys/queue.h)
+
+set(HDR_COMPAT
+ include/evdns.h
+ include/evrpc.h
+ include/event.h
+ include/evhttp.h
+ include/evutil.h)
+
+set(HDR_PUBLIC
+ include/event2/buffer.h
+ include/event2/bufferevent.h
+ include/event2/bufferevent_compat.h
+ include/event2/bufferevent_struct.h
+ include/event2/buffer_compat.h
+ include/event2/dns.h
+ include/event2/dns_compat.h
+ include/event2/dns_struct.h
+ include/event2/event.h
+ include/event2/event_compat.h
+ include/event2/event_struct.h
+ include/event2/http.h
+ include/event2/http_compat.h
+ include/event2/http_struct.h
+ include/event2/keyvalq_struct.h
+ include/event2/listener.h
+ include/event2/rpc.h
+ include/event2/rpc_compat.h
+ include/event2/rpc_struct.h
+ include/event2/tag.h
+ include/event2/tag_compat.h
+ include/event2/thread.h
+ include/event2/util.h
+ include/event2/visibility.h
+ ${PROJECT_BINARY_DIR}/include/event2/event-config.h)
+
+set(SRC_CORE
+ buffer.c
+ bufferevent.c
+ bufferevent_filter.c
+ bufferevent_pair.c
+ bufferevent_ratelim.c
+ bufferevent_sock.c
+ event.c
+ evmap.c
+ evthread.c
+ evutil.c
+ evutil_rand.c
+ evutil_time.c
+ listener.c
+ log.c
+ signal.c
+ strlcpy.c)
+
+if(EVENT__HAVE_SELECT)
+ list(APPEND SRC_CORE select.c)
+endif()
+
+if(EVENT__HAVE_POLL)
+ list(APPEND SRC_CORE poll.c)
+endif()
+
+if(EVENT__HAVE_KQUEUE)
+ list(APPEND SRC_CORE kqueue.c)
+endif()
+
+if(EVENT__HAVE_DEVPOLL)
+ list(APPEND SRC_CORE devpoll.c)
+endif()
+
+if(EVENT__HAVE_EPOLL)
+ list(APPEND SRC_CORE epoll.c)
+endif()
+
+if(EVENT__HAVE_EVENT_PORTS)
+ list(APPEND SRC_CORE evport.c)
+endif()
+
+if (NOT EVENT__DISABLE_OPENSSL)
+ find_package(OpenSSL REQUIRED)
+
+ set(EVENT__HAVE_OPENSSL 1)
+
+ message(STATUS "OpenSSL include: ${OPENSSL_INCLUDE_DIR}")
+ message(STATUS "OpenSSL lib: ${OPENSSL_LIBRARIES}")
+
+ include_directories(${OPENSSL_INCLUDE_DIR})
+
+ list(APPEND SRC_OPENSSL bufferevent_openssl.c)
+ list(APPEND HDR_PUBLIC include/event2/bufferevent_ssl.h)
+ list(APPEND LIB_APPS ${OPENSSL_LIBRARIES})
+endif()
+
+if (NOT EVENT__DISABLE_THREAD_SUPPORT)
+ if (WIN32)
+ list(APPEND SRC_CORE evthread_win32.c)
+ else()
+ find_package(Threads REQUIRED)
+ if (NOT CMAKE_USE_PTHREADS_INIT)
+ message(FATAL_ERROR
+ "Failed to find Pthreads, set EVENT__DISABLE_THREAD_SUPPORT to disable")
+ endif()
+
+ set(EVENT__HAVE_PTHREADS 1)
+ list(APPEND LIB_APPS ${CMAKE_THREAD_LIBS_INIT})
+ endif()
+endif()
+
+if (NOT EVENT__DISABLE_TESTS)
+ # Zlib is only used for testing.
+ find_package(ZLIB)
+
+ if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+ include_directories(${ZLIB_INCLUDE_DIRS})
+
+ set(EVENT__HAVE_LIBZ 1)
+ list(APPEND LIB_APPS ${ZLIB_LIBRARIES})
+ endif()
+endif()
+
+set(SRC_EXTRA
+ event_tagging.c
+ http.c
+ evdns.c
+ evrpc.c)
+
+add_definitions(-DHAVE_CONFIG_H)
+
+# We use BEFORE here so we don't accidentally look in system directories
+# first for some previous versions of the headers that are installed.
+include_directories(BEFORE ${PROJECT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/compat
+ ${PROJECT_SOURCE_DIR}/include)
+
+if(WIN32)
+ list(APPEND SRC_CORE
+ buffer_iocp.c
+ bufferevent_async.c
+ event_iocp.c
+ win32select.c)
+
+ list(APPEND HDR_PRIVATE WIN32-Code/getopt.h)
+
+ set(EVENT__DNS_USE_FTIME_FOR_ID 1)
+ set(LIB_PLATFORM ws2_32 shell32 advapi32)
+ add_definitions(
+ -D_CRT_SECURE_NO_WARNINGS
+ -D_CRT_NONSTDC_NO_DEPRECATE)
+
+ include_directories(./WIN32-Code)
+endif()
+
+if (SOLARIS)
+ list(APPEND LIB_PLATFORM socket nsl)
+endif()
+
+source_group("Headers Private" FILES ${HDR_PRIVATE})
+source_group("Header Compat" FILES ${HDR_COMPAT})
+source_group("Headers Public" FILES ${HDR_PUBLIC})
+source_group("Source Core" FILES ${SRC_CORE})
+source_group("Source Extra" FILES ${SRC_EXTRA})
+
+# Generate the configure headers.
+# (Place them in the build dir so we don't polute the source tree with generated files).
+include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include)
+
+if (${GNUC})
+ set(EVENT_SHARED_FLAGS -fvisibility=hidden)
+elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro")
+ set(EVENT_SHARED_FLAGS -xldscope=hidden)
+endif()
+
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/event-config.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/include/event2/event-config.h
+ NEWLINE_STYLE UNIX)
+
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/evconfig-private.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/include/evconfig-private.h)
+
+#
+# Create the libraries.
+#
+include(AddEventLibrary)
+add_event_library(event_core SOURCES ${SRC_CORE})
+add_event_library(event_extra
+ INNER_LIBRARIES event_core
+ SOURCES ${SRC_EXTRA})
+
+if (NOT EVENT__DISABLE_OPENSSL)
+ add_event_library(event_openssl
+ INNER_LIBRARIES event_core
+ OUTER_INCLUDES ${OPENSSL_INCLUDE_DIR}
+ LIBRARIES ${OPENSSL_LIBRARIES}
+ SOURCES ${SRC_OPENSSL})
+endif()
+
+if (EVENT__HAVE_PTHREADS)
+ set(SRC_PTHREADS evthread_pthread.c)
+ add_event_library(event_pthreads
+ INNER_LIBRARIES event_core
+ SOURCES ${SRC_PTHREADS})
+endif()
+
+# library exists for historical reasons; it contains the contents of
+# both libevent_core and libevent_extra. You shouldn’t use it; it may
+# go away in a future version of Libevent.
+add_event_library(event SOURCES ${SRC_CORE} ${SRC_EXTRA})
+
+set(WIN32_GETOPT)
+if (WIN32)
+ set(_TMPLIBS)
+ if (${EVENT_LIBRARY_STATIC})
+ list(APPEND _TMPLIBS event_core_static event_static)
+ endif()
+ if (${EVENT_LIBRARY_SHARED})
+ list(APPEND _TMPLIBS event_core_shared event_shared)
+ endif()
+ foreach(lib ${_TMPLIBS})
+ target_link_libraries(${lib} iphlpapi)
+ endforeach()
+ unset(_TMPLIBS)
+
+ list(APPEND WIN32_GETOPT
+ WIN32-Code/getopt.c
+ WIN32-Code/getopt_long.c)
+endif()
+
+#
+# Samples.
+#
+macro(add_sample_prog ssl name)
+ add_executable(${name} ${ARGN})
+
+ target_link_libraries(${name}
+ event_extra
+ event_core
+ ${LIB_APPS}
+ ${LIB_PLATFORM})
+
+ if (${ssl})
+ target_link_libraries(${name} event_openssl)
+ if(WIN32)
+ target_link_libraries(${name} crypt32)
+ endif()
+ endif()
+endmacro()
+if (NOT EVENT__DISABLE_SAMPLES)
+ set(SAMPLES
+ event-read-fifo
+ hello-world
+ signal-test
+ http-connect
+ time-test)
+
+ foreach(SAMPLE ${SAMPLES})
+ add_sample_prog(OFF ${SAMPLE} sample/${SAMPLE}.c)
+ endforeach()
+
+ if (NOT EVENT__DISABLE_OPENSSL)
+ add_sample_prog(ON https-client
+ sample/https-client.c
+ sample/openssl_hostname_validation.c
+ sample/hostcheck.c)
+ add_sample_prog(ON le-proxy
+ sample/le-proxy.c)
+ endif()
+
+ set(SAMPLES_WOPT
+ dns-example
+ http-server
+ )
+ foreach (SAMPLE ${SAMPLES_WOPT})
+ add_sample_prog(OFF ${SAMPLE} sample/${SAMPLE}.c ${WIN32_GETOPT})
+ endforeach()
+endif()
+
+#
+# Benchmarks
+#
+macro(add_bench_prog prog)
+ add_executable(${prog} ${ARGN})
+ target_link_libraries(${prog}
+ event_extra
+ event_core
+ ${LIB_APPS}
+ ${LIB_PLATFORM})
+endmacro()
+if (NOT EVENT__DISABLE_BENCHMARK)
+ foreach (BENCHMARK bench_http bench_httpclient)
+ add_bench_prog(${BENCHMARK} test/${BENCHMARK}.c)
+ endforeach()
+
+ add_bench_prog(bench test/bench.c ${WIN32_GETOPT})
+ add_bench_prog(bench_cascade test/bench_cascade.c ${WIN32_GETOPT})
+endif()
+
+#
+# Tests
+#
+macro(add_test_prog prog)
+ add_executable(${prog} test/${prog}.c)
+ target_link_libraries(${prog}
+ ${LIB_APPS}
+ ${LIB_PLATFORM}
+ event_core
+ event_extra
+ ${ARGN})
+endmacro()
+if (NOT EVENT__DISABLE_TESTS)
+ #
+ # Generate Regress tests.
+ #
+ if (NOT EVENT__DISABLE_REGRESS)
+ # (We require python to generate the regress tests)
+ find_package(PythonInterp 3)
+
+ if (PYTHONINTERP_FOUND)
+ set(__FOUND_USABLE_PYTHON 1)
+ else()
+ find_package(PythonInterp 2)
+ if (PYTHONINTERP_FOUND)
+ set(__FOUND_USABLE_PYTHON 1)
+ else()
+ message(ERROR "No suitable Python version found, bailing...")
+ endif()
+ endif()
+
+ if (__FOUND_USABLE_PYTHON)
+ message(STATUS "Generating regress tests...")
+
+ add_definitions(-DTINYTEST_LOCAL)
+
+ add_custom_command(
+ OUTPUT
+ ${CMAKE_CURRENT_SOURCE_DIR}/test/regress.gen.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/test/regress.gen.h
+ DEPENDS
+ event_rpcgen.py
+ test/regress.rpc
+ COMMAND ${PYTHON_EXECUTABLE} ../event_rpcgen.py --quiet regress.rpc
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
+
+ list(APPEND SRC_REGRESS
+ test/regress.c
+ test/regress.gen.c
+ test/regress.gen.h
+ test/regress_buffer.c
+ test/regress_bufferevent.c
+ test/regress_dns.c
+ test/regress_et.c
+ test/regress_finalize.c
+ test/regress_http.c
+ test/regress_listener.c
+ test/regress_main.c
+ test/regress_minheap.c
+ test/regress_rpc.c
+ test/regress_testutils.c
+ test/regress_testutils.h
+ test/regress_util.c
+ test/tinytest.c)
+
+ if (WIN32)
+ list(APPEND SRC_REGRESS test/regress_iocp.c)
+ if (NOT EVENT__DISABLE_THREAD_SUPPORT)
+ list(APPEND SRC_REGRESS test/regress_thread.c)
+ endif()
+ elseif (EVENT__HAVE_PTHREADS)
+ list(APPEND SRC_REGRESS test/regress_thread.c)
+ endif()
+
+ if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+ list(APPEND SRC_REGRESS test/regress_zlib.c)
+ endif()
+
+ if (NOT EVENT__DISABLE_OPENSSL)
+ list(APPEND SRC_REGRESS test/regress_ssl.c)
+ endif()
+
+ add_executable(regress ${SRC_REGRESS})
+
+ target_link_libraries(regress
+ ${LIB_APPS}
+ ${LIB_PLATFORM}
+ event_core
+ event_extra)
+ if (NOT EVENT__DISABLE_OPENSSL)
+ target_link_libraries(regress event_openssl)
+ endif()
+ if (CMAKE_USE_PTHREADS_INIT)
+ target_link_libraries(regress event_pthreads)
+ endif()
+ else()
+ message(WARNING "No suitable Python interpreter found, cannot generate regress tests!")
+ endif()
+ endif()
+
+ #
+ # Test programs.
+ #
+ # all of these, including the cmakelists.txt should be moved
+ # into the dirctory 'tests' first.
+ #
+ # doing this, we can remove all the DISABLE_TESTS stuff, and simply
+ # do something like:
+ #
+ # add_custom_targets(tests)
+ # add_executable(... EXCLUDE_FROM_ALL ...c)
+ # add_dependencis(tests testa testb testc)
+ # add_test(....)
+ #
+ # then you can just run 'make tests' instead of them all
+ # auto-compile|running
+ # - ellzey
+ set(TESTPROGS test-changelist
+ test-eof
+ test-closed
+ test-fdleak
+ test-init
+ test-time
+ test-weof)
+
+ foreach (TESTPROG ${TESTPROGS} test-dumpevents)
+ add_test_prog(${TESTPROG})
+ endforeach()
+ if (UNIX)
+ add_test_prog(test-ratelim m)
+ else()
+ add_test_prog(test-ratelim)
+ endif()
+
+ set(ALL_TESTPROGS
+ ${TESTPROGS}
+ test-dumpevents
+ test-ratelim
+ )
+
+ #
+ # We run all tests with the different backends turned on one at a time.
+ #
+
+ # Add event backends based on system introspection result.
+ set(BACKENDS "")
+
+ if (EVENT__HAVE_EPOLL)
+ list(APPEND BACKENDS EPOLL)
+ endif()
+
+ if (EVENT__HAVE_SELECT)
+ list(APPEND BACKENDS SELECT)
+ endif()
+
+ if (EVENT__HAVE_POLL)
+ list(APPEND BACKENDS POLL)
+ endif()
+
+ if (EVENT__HAVE_KQUEUE)
+ list(APPEND BACKENDS KQUEUE)
+ endif()
+
+ if (EVENT__HAVE_EVENT_PORTS)
+ list(APPEND BACKENDS EVPORT)
+ endif()
+
+ if (EVENT__HAVE_DEVPOLL)
+ list(APPEND BACKENDS DEVPOLL)
+ endif()
+
+ if (WIN32)
+ list(APPEND BACKENDS WIN32)
+ endif()
+
+
+ # Default environment variables turns off all event systems,
+ # then we enable each one, one at a time when creating the tests.
+ set(DEFAULT_TEST_ENV_VARS)
+ foreach(BACKEND ${BACKENDS})
+ set(BACKEND_ENV_VAR "EVENT_NO${BACKEND}=1")
+ list(APPEND DEFAULT_TEST_ENV_VARS "${BACKEND_ENV_VAR}")
+ endforeach()
+
+ # Macro that creates the ctest test for a backend.
+ macro(add_backend_test BACKEND_TEST_NAME ENV_VARS)
+ set(TEST_NAMES "")
+
+ foreach (TESTPROG ${TESTPROGS})
+ set(TEST_NAME ${TESTPROG}__${BACKEND_TEST_NAME})
+
+ add_test(${TEST_NAME}
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTPROG})
+
+ list(APPEND TEST_NAMES ${TEST_NAME})
+
+ set_tests_properties(${TEST_NAME}
+ PROPERTIES ENVIRONMENT "${ENV_VARS}")
+ endforeach()
+
+ # Dump events test.
+ if (__FOUND_USABLE_PYTHON)
+ set(TEST_NAME test-dumpevents__${BACKEND_TEST_NAME})
+
+ add_test(${TEST_NAME}
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-dumpevents |
+ ${PYTHON_EXECUTABLE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/test/check-dumpevents.py)
+
+ set_tests_properties(${TEST_NAME}
+ PROPERTIES ENVIRONMENT "${ENV_VARS}")
+ else()
+ message(WARNING "test-dumpevents will be run without output check since python was not found!")
+ set(TEST_NAME test-dumpevents__${BACKEND_TEST_NAME}_no_check)
+
+ add_test(${TEST_NAME}
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-dumpevents)
+
+ set_tests_properties(${TEST_NAME}
+ PROPERTIES ENVIRONMENT "${ENV_VARS}")
+ endif()
+
+ # Regress tests.
+ if (NOT EVENT__DISABLE_REGRESS AND __FOUND_USABLE_PYTHON)
+ set(TEST_NAME regress__${BACKEND_TEST_NAME})
+
+ add_test(${TEST_NAME}
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/regress --quiet)
+
+ set_tests_properties(${TEST_NAME}
+ PROPERTIES ENVIRONMENT "${ENV_VARS}")
+
+ add_test(${TEST_NAME}_debug
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/regress --quiet)
+
+ set_tests_properties(${TEST_NAME}_debug
+ PROPERTIES ENVIRONMENT "${ENV_VARS};EVENT_DEBUG_MODE=1")
+ endif()
+ endmacro()
+
+ # Add the tests for each backend.
+ foreach(BACKEND ${BACKENDS})
+ # Enable this backend only.
+ set(BACKEND_ENV_VARS ${DEFAULT_TEST_ENV_VARS})
+ list(REMOVE_ITEM BACKEND_ENV_VARS EVENT_NO${BACKEND}=1)
+
+ # Epoll has some extra settings.
+ if (${BACKEND} STREQUAL "EPOLL")
+ add_backend_test(timerfd_${BACKEND}
+ "${BACKEND_ENV_VARS};EVENT_PRECISE_TIMER=1")
+
+ add_backend_test(changelist_${BACKEND}
+ "${BACKEND_ENV_VARS};EVENT_EPOLL_USE_CHANGELIST=yes")
+
+ add_backend_test(timerfd_changelist_${BACKEND}
+ "${BACKEND_ENV_VARS};EVENT_EPOLL_USE_CHANGELIST=yes;EVENT_PRECISE_TIMER=1")
+ else()
+ add_backend_test(${BACKEND} "${BACKEND_ENV_VARS}")
+ endif()
+ endforeach()
+
+ #
+ # Rate limiter tests.
+ #
+
+ # Group limits, no connection limit.
+ set(RL_BIN ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test-ratelim)
+
+ add_test(test-ratelim__group_lim
+ ${RL_BIN}
+ -g 30000
+ -n 30
+ -t 100
+ --check-grouplimit 1000
+ --check-stddev 100)
+
+ # Connection limit, no group limit.
+ add_test(test-ratelim__con_lim
+ ${RL_BIN}
+ -c 1000
+ -n 30
+ -t 100
+ --check-connlimit 50
+ --check-stddev 50)
+
+ # Connection limit and group limit.
+ add_test(test-ratelim__group_con_lim
+ ${RL_BIN}
+ -c 1000
+ -g 30000
+ -n 30
+ -t 100
+ --check-grouplimit 1000
+ --check-connlimit 50
+ --check-stddev 50)
+
+ # Connection limit and group limit with independent drain.
+ add_test(test-ratelim__group_con_lim_drain
+ ${RL_BIN}
+ -c 1000
+ -g 35000
+ -n 30
+ -t 100
+ -G 500
+ --check-grouplimit 1000
+ --check-connlimit 50
+ --check-stddev 50)
+
+ # Add a "make verify" target, same as for autoconf.
+ # (Important! This will unset all EVENT_NO* environment variables.
+ # If they are set in the shell the tests are running using simply "ctest" or "make test" will fail)
+ if (WIN32)
+ # Windows doesn't have "unset". But you can use "set VAR=" instead.
+ # We need to guard against the possibility taht EVENT_NOWIN32 is set, and all test failing
+ # since no event backend being available.
+ file(TO_NATIVE_PATH ${CMAKE_CTEST_COMMAND} WINDOWS_CTEST_COMMAND)
+
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.bat
+ "
+ set EVENT_NOWIN32=
+ \"${WINDOWS_CTEST_COMMAND}\"
+ ")
+
+ message(STATUS "${WINDOWS_CTEST_COMMAND}")
+
+ file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.bat
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+ FILE_PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE)
+
+ file(TO_NATIVE_PATH
+ "${CMAKE_CURRENT_BINARY_DIR}/verify_tests.bat" VERIFY_PATH)
+
+ add_custom_target(verify COMMAND "${VERIFY_PATH}"
+ DEPENDS event ${ALL_TESTPROGS})
+ else()
+ # On some platforms doing exec(unset) as CMake does won't work, so make sure
+ # we run the unset command in a shell instead.
+ # First we write the script contents.
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.sh
+ "
+ #!/bin/bash
+ unset EVENT_NOEPOLL; unset EVENT_NOPOLL; unset EVENT_NOSELECT; unset EVENT_NOWIN32; unset EVENT_NOEVPORT; unset EVENT_NOKQUEUE; unset EVENT_NODEVPOLL
+ ${CMAKE_CTEST_COMMAND}
+ ")
+
+ # Then we copy the file (this allows us to set execute permission on it)
+ file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.sh
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+ FILE_PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE)
+
+ # Create the target that runs the script.
+ add_custom_target(verify
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/verify_tests.sh
+ DEPENDS event ${ALL_TESTPROGS})
+ endif()
+
+ if (NOT EVENT__DISABLE_REGRESS AND __FOUND_USABLE_PYTHON)
+ add_dependencies(verify regress)
+ endif()
+
+ if (EVENT__COVERAGE)
+ include(CodeCoverage)
+
+ setup_target_for_coverage(
+ verify_coverage # Coverage target name "make verify_coverage"
+ make # Test runner.
+ coverage # Output directory.
+ verify) # Arguments passed to test runner. "make verify"
+ endif()
+
+ enable_testing()
+
+ include(CTest)
+endif()
+
+#
+# Installation preparation.
+#
+
+set(EVENT_INSTALL_CMAKE_DIR
+ "${CMAKE_INSTALL_PREFIX}/lib/cmake/libevent")
+
+export(PACKAGE libevent)
+
+function(gen_package_config forinstall)
+ if(${forinstall})
+ set(CONFIG_FOR_INSTALL_TREE 1)
+ set(dir "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}")
+ else()
+ set(CONFIG_FOR_INSTALL_TREE 0)
+ set(dir "${PROJECT_BINARY_DIR}")
+ endif()
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfig.cmake.in
+ "${dir}/LibeventConfig.cmake"
+ @ONLY)
+endfunction()
+
+# Generate the config file for the build-tree.
+set(EVENT__INCLUDE_DIRS
+ "${PROJECT_SOURCE_DIR}/include"
+ "${PROJECT_BINARY_DIR}/include")
+
+set(LIBEVENT_INCLUDE_DIRS
+ ${EVENT__INCLUDE_DIRS}
+ CACHE PATH "Libevent include directories")
+
+gen_package_config(0)
+
+# Generate the config file for the installation tree.
+gen_package_config(1)
+
+# Generate version info for both build-tree and install-tree.
+configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigVersion.cmake.in
+ ${PROJECT_BINARY_DIR}/LibeventConfigVersion.cmake
+ @ONLY)
+
+# Install compat headers
+install(FILES ${HDR_COMPAT}
+ DESTINATION "include"
+ COMPONENT dev)
+
+# Install public headers
+install(FILES ${HDR_PUBLIC}
+ DESTINATION "include/event2"
+ COMPONENT dev)
+
+# Install the configs.
+install(FILES
+ ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/LibeventConfig.cmake
+ ${PROJECT_BINARY_DIR}/LibeventConfigVersion.cmake
+ DESTINATION "${EVENT_INSTALL_CMAKE_DIR}"
+ COMPONENT dev)
+
+# Install exports for the install-tree.
+macro(install_export type)
+ install(EXPORT LibeventTargets-${type}
+ NAMESPACE ${PROJECT_NAME}::
+ DESTINATION "${EVENT_INSTALL_CMAKE_DIR}"
+ COMPONENT dev)
+endmacro()
+
+if (${EVENT_LIBRARY_STATIC})
+ install_export(static)
+endif()
+if (${EVENT_LIBRARY_SHARED})
+ install_export(shared)
+endif()
+
+# Install the scripts.
+install(PROGRAMS
+ ${CMAKE_CURRENT_SOURCE_DIR}/event_rpcgen.py
+ DESTINATION "bin"
+ COMPONENT runtime)
+
+# Create documents with doxygen.
+option(EVENT__DOXYGEN
+ "Enables doxygen documentation" OFF)
+if (EVENT__DOXYGEN)
+ include(UseDoxygen)
+ UseDoxygen()
+endif()
+
+
+if (NOT TARGET uninstall)
+ # Create the uninstall target.
+ # https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/Uninstall.cmake.in
+ ${PROJECT_BINARY_DIR}/Uninstall.cmake
+ @ONLY)
+
+ add_custom_target(uninstall
+ COMMAND ${CMAKE_COMMAND} -P ${PROJECT_BINARY_DIR}/Uninstall.cmake)
+endif()
+
+message(STATUS "")
+message(STATUS " ---( Libevent " ${EVENT_VERSION} " )---")
+message(STATUS "")
+message(STATUS "Available event backends: ${BACKENDS}")
+message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
+message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
+message(STATUS "CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
+message(STATUS "CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
+message(STATUS "PROJECT_BINARY_DIR: ${PROJECT_BINARY_DIR}")
+message(STATUS "PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
+message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
+message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}")
+message(STATUS "CMAKE_ROOT: ${CMAKE_ROOT}")
+message(STATUS "CMAKE_SYSTEM: ${CMAKE_SYSTEM}")
+message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
+message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}")
+message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
+message(STATUS "CMAKE_SKIP_RPATH: ${CMAKE_SKIP_RPATH}")
+message(STATUS "CMAKE_VERBOSE_MAKEFILE: ${CMAKE_VERBOSE_MAKEFILE}")
+message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
+message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER} (id ${CMAKE_C_COMPILER_ID}, clang ${CLANG}, GNUC ${GNUC})")
+message(STATUS "CMAKE_AR: ${CMAKE_AR}")
+message(STATUS "CMAKE_RANLIB: ${CMAKE_RANLIB}")
+message(STATUS "")
+
diff --git a/contrib/ntp/sntp/libevent/ChangeLog b/contrib/ntp/sntp/libevent/ChangeLog
index 149963750496..17874b14b92b 100644
--- a/contrib/ntp/sntp/libevent/ChangeLog
+++ b/contrib/ntp/sntp/libevent/ChangeLog
@@ -1,3 +1,763 @@
+Changes in version 2.1.12-stable (05 Jul 2020)
+
+ This release contains mostly bug fixes (I decided not to port some features
+ that can be ported even without ABI breakage, if you cannot find feature that
+ you are interested in, please give us a note!)
+
+ Since 2.1.12 libevent will use github actions as main CI, since
+ it recommends itself better then travis/appveyor (and had been removed from
+ upstream).
+
+ Look carefully at "slightly touches the behaviour" section.
+
+ Below you will find some of changes (this list has been cleaned up from the
+ patches that touches only tests and similar):
+
+ CI:
+ o Backport github actions to 2.1 (be3acd7c Azat Khuzhin)
+ o Merge branch 'event_rpcgen.py-cleanup' (f0ded5f3, 48e04887 Enji Cooper)
+ o Add API/ABI checker (using LVC) (709210d4, 2af1f6cc yuangongji)
+
+ test:
+ o tinytest: support timeout on Windows (794e8f75 yuangongji)
+ o Merge branch 'osx-clock' (e85afbe3 Azat Khuzhin)
+ o test-ratelim: calculate timers bias (for slow CPUs) to avoid false-positive (8ad26d0b Azat Khuzhin)
+
+ fixes:
+ o buffer: do not pass NULL to memcpy() from evbuffer_pullup() (5b063049 Azat Khuzhin)
+ o http: fix undefined-shift in EVUTIL_IS*_ helpers (6b8d02a7 Azat Khuzhin)
+ o Check error code of evhttp_add_header_internal() in evhttp_parse_query_impl() (97e28f09 Azat Khuzhin)
+ o http: fix EVHTTP_CON_AUTOFREE in case of timeout (and some else) (1be25938 Azat Khuzhin)
+ o evdns: Add additional validation for values of dns options (c2972453 ayuseleznev)
+ o There is typo in GetAdaptersAddresses windows library. It should be iphlpapi.dll (891adda9 Aleksandr-Melnikov)
+ o Merge branch 'EV_CLOSED-and-EV_ET-fixes' (db2efdf5 Azat Khuzhin)
+ o Fix memory corruption in EV_CLOSURE_EVENT_FINALIZE with debug enabled (8ccd8f56 Jan Kasiak)
+ o increase segment refcnt only if evbuffer_add_file_segment() succeeds (30662a3c yuangongji)
+ o evdns: fix a crash when evdns_base with waiting requests is freed (6f8e0e97 ayuseleznev)
+ o event_base_once: fix potential null pointer threat (2e9ceb16 chenguolong)
+ o http: do not assume body for CONNECT (1b42270b Azat Khuzhin)
+ o evbuffer_add_file: fix freeing of segment in the error path (5f017bde Azat Khuzhin)
+ o Fix checking return value of the evdns_base_resolv_conf_parse() (fc51bf2c Azat Khuzhin)
+ o Merge branch 'fix-signal-leak' (poll/select now needs reinit) (1c9cc07b Azat Khuzhin)
+
+ improvements:
+ o evutil_time: improve evutil_gettimeofday on Windows (a8219143 Nick Grifka)
+ o Support EV_CLOSED on linux for poll(2) (2530e7c6 Azat Khuzhin)
+ o Parse IPv6 scope IDs. (f602211f Philip Homburg)
+ o evutil_time: Implements usleep() using wait funtion on Windows (d42240d1 yuangongji)
+ o evutil_time: detect and use _gmtime64_s()/_gmtime64() (f4a6152c yuangongji)
+
+ slightly touches the behaviour:
+ o bufferevent: allow setting priority on socket and openssl type (4dd3acdd Nicolas J. Bouliane)
+ o Fix EV_CLOSED detection/reporting (epoll only) (1df324d4 Azat Khuzhin) (XXX)
+ o Revert "Warn if forked from the event loop during event_reinit()" (71f5c0d3 Azat Khuzhin)
+
+ samples:
+ o https-client: load certificates from the system cert store on Windows (e9478640 yuangongji)
+
+ build fixes:
+ o Do not use sysctl.h on linux (it had been deprecated) (d2871a37 Azat Khuzhin)
+ o cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT (a62ec765 Paul Osborne)
+ o Update list of cmake files for autotools dist archive (2016f017 Azat Khuzhin)
+ o LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default (640f9cf6 Mario Emmenlauer)
+ o cmake: fix getaddrinfo checking error (dea51c2e yuangongji)
+ o autoconf: fix getaddrinfo checking errors on mingw (b9bf7fa7 yuangongji)
+ o Do not use shared global structures on CYGWIN (8a9b5655 Azat Khuzhin)
+ o Added uninstall target check to cmakelists (3f1fb1f9 Dimo Markov)
+ o Fix compilation without OPENSSL_API_COMPAT (921bdcdd Azat Khuzhin)
+ o cmake: improve package config file (1c047618, baec84f2 yuangongji)
+ o Link with iphlpapi only on windows (976f7d34 Azat Khuzhin)
+ o autotools: fails build when need but can not find openssl (93174bb5 yuangongji)
+ o Merge branch 'http-connect' (e2424229 Azat Khuzhin)
+ o Fix compat with NetBSD >= 10 (5febb4e1 Kamil Rytarowski)
+ o cmake: fix getrandom() detection (e0e5f3bd Azat Khuzhin)
+ o arc4random: replace sysctl() with getrandom (on linux) (66ec78fd Azat Khuzhin)
+ o Upgrade autoconf (after upgrading minimum required to 2.67) (45da7d9d yuangongji)
+ o eliminate some C4267 warnings in Windows (9e468c77 yuangongji)
+ o autotools: attach doxygen target into all target (5d1e8570 yuangongji)
+ o cmake: attach doxygen target into all target (7a85300a yuangongji)
+ o Change the minimum version of automake to 1.13 and autoconf to 2.67 (fdb8fb66 ygj6)
+ o Add Uninstall.cmake.in into dist archive (877f2355 Azat Khuzhin)
+
+Changes in version 2.1.11-stable (01 Aug 2019)
+
+ This release contains one ABI breakage fix (that had been introduced in
+ 2.1.10, and strictly speaking this release breaks ABI again to make it
+ compatible with 2.1.9 and less, please take a look at 18104973 for more
+ details). Apart from that it contains some bug fixes, that grouped below.
+
+ And even though the return value for evbuffer_setcb() had been changed it
+ should ABI compatible (anyway that function is in -compat.h header).
+
+ There is also one patch that introduce new functionality, this is 546a366c,
+ to tune SO_RCVBUF/SO_SNDBUF in evdns, but one can count it as a bug-fix on
+ the application level, since before you cannot tune this settings and hence
+ you could stumble on problems.
+
+ ABI breakage:
+ o Protect min_heap_push_ against integer overflow. (8c899768 Tobias Stoeckmann)
+ o Revert "Protect min_heap_push_ against integer overflow." (18104973 Azat Khuzhin)
+
+ functionality:
+ o evdns: add new options -- so-rcvbuf/so-sndbuf (546a366c Azat Khuzhin)
+
+ build:
+ o Change autoconf version to 2.62 and automake version to 1.11.2 (2a333008 yuangongji)
+ o cmake: install shared library only if it was requested (596855f7 Azat Khuzhin)
+ o Missing <winerror.h> on win7/MinGW(MINGW32_NT-6.1)/MSYS (9559349c yuangongji)
+ o cmake: set library names to be the same as with autotools (305251b9 yuangongji)
+ o Enable _GNU_SOURCE for Android (f013fc7d Keith Smiley)
+ o Enable kqueue for APPLE targets (3aa68a82 Keith Smiley)
+ o autotools: do not install bufferevent_ssl.h under --disable-openssl (5349a07e Azat Khuzhin)
+ o cmake: link against shell32.lib/advapi32.lib (c9ce638c Azat Khuzhin)
+ o Add README.md into dist archive (3660a4cc Azat Khuzhin)
+ o cmake: add missing autotools targets (doxygen, uninstall, event_rpcgen.py) (2d65071c yuangongji)
+ o m4/libevent_openssl.m4: fix detection of openssl (d4056e59 Fabrice Fontaine)
+ o Fix detection of the __has_attribute() for apple clang [ci skip] (7fd7c5ef Azat Khuzhin)
+
+ lib:
+ o buffer: fix possible NULL dereference in evbuffer_setcb() on ENOMEM (598f247d Azat Khuzhin)
+ o Warn if forked from the event loop during event_reinit() (b75922ae Azat Khuzhin)
+ o evutil: set the have_checked_interfaces in evutil_check_interfaces()
+ (ef498aa2, a09265ac jeremyerb)
+
+ samples:
+ o https-client: correction error checking (a8a04565 wenyg)
+
+
+Changes in version 2.1.10-stable (26 May 2019)
+
+ This release contains mostly fixes (some evbuffer oddity, AF_UNIX handling in
+ http server, some UB fixes and others) but also some new functionality
+ (without ABI breakage as usual) and now dist archive can be used for building
+ on windows (getopt had been added into it).
+
+ Above you will find changelog for this particular release (but with some
+ trivial fixes pruned out from it - to make it a little bit more informative).
+
+ To view full changelog please use git:
+ git log --format=' o %s (%h %aN)' release-2.1.9-beta...release-2.1.10-stable
+
+ dist:
+ o Add getopt into dist archive (7042ff24 Azat Khuzhin)
+
+ functionality:
+ o evdns: add DNS_OPTION_NAMESERVERS_NO_DEFAULT/EVDNS_BASE_NAMESERVERS_NO_DEFAULT
+ (58e81106 Azat Khuzhin)
+ o Add support for EV_TIMEOUT to event_base_active_by_fd (3f893f0a John Ohl)
+
+ fixes:
+ o Merge branch 'evbuffer-fixes-806-v2' (2fea04b3 Azat Khuzhin)
+ o Merge branch 'issue-807-accept4-getnameinfo-AF_UNIX' (7c4da937, e2790a7f
+ Azat Khuzhin)
+ o kqueue: Avoid undefined behaviour. (e70e18e9 Tobias Stoeckmann)
+ o Prevent integer overflow in kq_build_changes_list. (43a55a23 Tobias Stoeckmann)
+ o evdns: fix lock/unlock mismatch in evdns_close_server_port() (54103883 zhuizhuhaomeng)
+ o Merge remote-tracking branch 'official/pr/804' -- Enforce limit of NSIG
+ signals (87fa93a8 Tobias Stoeckmann)
+ o Protect min_heap_push_ against integer overflow. (0b46bb8c Tobias Stoeckmann)
+ o le-proxy: initiate use of the Winsock DLL (2a1e1530 linxiaohui)
+ o Fix leaks in error path of the bufferevent_init_common_() (bb0f8fe7 Azat Khuzhin)
+ o buffer: make evbuffer_prepend() of zero-length array no-op (61fa7b7d Azat Khuzhin)
+ o Merge branch 'evbuffer-empty-chain-handling' (6a3dd717 Azat Khuzhin)
+ o Don't loose top error in SSL (3d1a7a1d Yury Korzhetsky)
+ o Remove needless check for arc4_seeded_ok (6602a97d Seong-Joong Kim)
+ o Merge pull request #769 from sungjungk/fix-return-handling (91084140 Nathan French)
+
+ build:
+ o Define `_GNU_SOURCE` properly/consistently per autoconf (00ba9fa2 Enji Cooper)
+ o signal: guard __cdecl definition with #ifdef (d89045a6 Azat Khuzhin)
+ o Link test/regress with event_core/event_extra over event (22380996 Azat Khuzhin)
+
+ tests:
+ o Use kill() over raise() for raising the signal (fixes osx 10.14 with
+ kqueue) (3db5296b, a45f6733 Azat Khuzhin)
+ o tinytest: implement per-test timeout (via alarm() under !win32 only)
+ (b64dbfb6, 75d7e1ff Azat Khuzhin)
+
+Changes in version 2.1.9-beta (10 February 2019)
+
+ This changelog will differs from other releases in the next few clauses:
+ - contains only highlighted changes (so now it will not contains a lot of
+ patches that fixes some stuff in regression tests, typos, leaks fixes in
+ samples and so forth)
+ - no authors (since merge commits breaks them anyway, but AUTHORS sections in
+ README will be kept up to date)
+ - group name trimmed from commit subjects trimmed
+ - it's been 2 years since the previoius release, so it is pretty huge
+
+ And I think that this is more useful, so from now on it will always has the
+ same look (until there will too many objections of course).
+
+ To view full changelog please use git:
+ git log --format=' o %s (%h %aN)' release-2.1.8-stable...release-2.1.9-beta
+
+
+ dist archive:
+ o Add cmake rules into dist archive (bf3a67cf)
+ o Add missing print-winsock-errors.c into dist archive (822d6462)
+ o Include openssl-compat.h into dist archive (08658136)
+
+ core:
+ o Merge branch 'check-O_NONBLOCK-in-debug' (a39898f3, a8155c62)
+ o Merge branch 'event-ET-#636-v2' (ca4b6404)
+ o Fix visibility issues under (mostly on win32)
+ (349081e1g, 802be13ag, a1f28e2f)
+ o Define __EXT_POSIX2 for QNX (a2176f2c)
+ o Cleanup __func__ detection (b3af7bdd)
+ o Add convenience macros for user-triggered events (06ec5de6)
+ o Notify event base if there are no more events, so it can exit without delay (d9d1c09e)
+ o Fix base unlocking in event_del() if event_base_set() runned in another thread (4f0f40e3)
+ o If precise_time is false, we should not set EVENT_BASE_FLAG_PRECISE_TIMER (27dee54d)
+ o Fix race in access to ev_res from event loop with event_active() (43d92a6d)
+ o Return from event_del() after the last event callback termination (876c7ac7)
+
+ http:
+ o Merge branch 'http-EVHTTP_CON_READ_ON_WRITE_ERROR-fixes-v2' (eb7b472b)
+ o Preserve socket error from listen across closesocket cleanup (2ccd00a6)
+ o fix connection retries when there more then one request for connection (d30e7bba)
+ o improve error path for bufferevent_{setfd,enable,disable}() (a8cc449e)
+ o Fix conceivable UAF of the bufferevent in evhttp_connection_free() (6ac2ec25)
+ o Merge branch 'http-request-line-parsing' (cdcfbafe)
+ o Fix evhttp_connection_get_addr() fox incomming http connections (4215c003)
+ o fix leaks in evhttp_uriencode() (123362e9)
+ o CONNECT method only takes an authority (7d1ffe64)
+ o Allow bodies for GET/DELETE/OPTIONS/CONNECT (23eb38b9)
+ o Do not crash when evhttp_send_reply_start() is called after a timeout. (826f1134)
+ o Fix crashing http server when callback do not reply in place (5b40744d, b2581380)
+ o fix handling of close_notify (ssl) in http with openssl bufferevents (7e91622b)
+
+ evrpc:
+ o use *_new_with_arg() to match function prototype (a95cc9e3)
+ o avoid NULL dereference on request is not EVHTTP_REQ_POST (e05136c7)
+
+ regression tests:
+ o Merge branch 'TT_RETRIABLE' (6ea1ec68, f9b592aa)
+
+ bufferevent:
+ o Merge branch 'iocp-fixes' (6bfac964)
+ o Merge branch 'be-wm-overrun-v2' (3f692fff)
+ o bufferevent_socket_connect{,_hostname}() missing event callback and use ret code (1dde74ef)
+ o don't fail be_null_filter if bytes are copied (b92b0792)
+ o Call underlying bev ctrl GET_FD on filtered bufferevents (ebfac517)
+
+ bufferevent_openssl/openssl:
+ o Merge branch 'ssl_bufferevent_wm_filter-fix' (30020a35)
+ o be_openssl: avoid leaking of SSL structure (e86ccfe5)
+ o Fix build with LibreSSL 2.7 (894ca48a)
+ o Add missing includes into openssl-compat.h (01bc36c1)
+ o Explicitly call SSL_clear when reseting the fd. (29b7a516)
+ o Unbreak build with LibreSSL after openssl 1.1 support added (230af9f0)
+
+ samples:
+ o Merge branch 'sample-http-server' (b6309bcc)
+ o sample/https-client: use host SSL certificate store by default (5c0132f3)
+
+ listener:
+ o ipv6only socket bind support (ba148796)
+ o Merge branch 'listener-immediate-close' (df2ed13f)
+ o Merge branch 'evconnlistener-do-not-close-client-fd' (42e851bb)
+
+ evdns:
+ o evdns: handle NULL filename explicitly (0033f5cc)
+ o Merge branch 'evdns_getaddrinfo-race-fix' (3237d697)
+ o Generating evdns_base_config_windows_nameservers docs on all platforms (3bd2ce43)
+
+ utils:
+ o Merge branch 'evutil_found_ifaddr-dev' (b07e43e6)
+ o Avoid possible SEGVs in select() (in unit tests) (8818c86c)
+ o Port `event_rpcgen.py` and `test/check-dumpevents.py` to Python 3. (532a8cc3)
+
+ buffer:
+ o Fix assert() condition in evbuffer_drain() for IOCP (d6326104)
+ o fix incorrect unlock of the buffer mutex (for deferred callbacks) (2b4d127d)
+ o Fix wrong assert in evbuffer_drain() (9f4d0dce)
+
+ cmake:
+ o fix checking of devpoll backend (like in autotools, by devpoll.h existence) (7f161902)
+ o support static runtime (MSVC) (c8b3ec17, 61fb055a)
+ o do not build both (SHARED and STATIC) for MSVC/win32 (bc7f2fd9)
+ o introduce EVENT__LIBRARY_TYPE option (eb10a738)
+ o ensure windows dll's are installed as well as lib files (29590718)
+ o Fix generation of LibeventConfig.cmake for the installation tree (7fa08c4b)
+ o fix pkgconfig generation (copy-paste typo) (cc554d87)
+ o Merge branch 'cmake-missing-bits' (9806b126)
+ o Fix detection of timerfd_create() in CMake. (e50af331)
+ o Merge branch 'cmake-configure-fixes-v2' (a0bfe2c4)
+ o Do not add epoll_sub (syscall wrappers) for epoll in cmake (cea61de6)
+ o Fix RPATH for APPLE (45b1f379)
+
+ autotools:
+ o include win32 specific headers for socklen_t detection on win32/mingw (d7579fb9)
+ o Ignore evconfig-private.h for autotools (37423849)
+ o config.h can't be prefixed unconditionally (63a054f8)
+ o Merge branch 'pull-628' (7e56c8b2)
+ o Provide Makefile variables LIBEVENT_{CFLAGS,CPPFLAGS,LDFLAGS} (2f060c5f)
+ o confirm openssl is working before using (b39ccf8e)
+ o pass $(OPENSSL_INCS) for samples (FTBFS macOS) (c2495265)
+ o Add configure check for midipix (d433201e)
+ o Fix tests with detached builds (c46ff439)
+
+ build:
+ o Fix arc4random_addrandom() detecting and fallback (regression) (303d6d77)
+ o Merge branch 'win32-fixes' (ebd12e6d)
+ o Merge branch 'fix-openssl-linking' (e7bd9e03)
+ o Merge branch 'fix-struct-linger' (8567f2f5)
+
+ CI:
+ o travis-ci/appveyor now uses fast_finish+allow_failures
+ (5e97b6e6, dd472e7d, dfb5fc167)
+ o Merge branch 'travis-ci-osx-fixes' (9f02b39c)
+ o Merge branch 'win64-fixes' (aee0fcd5)
+
+
+Changes in version 2.1.8-stable (22 January 2017)
+
+ Libevent 2.1.8-stable, it contains openssl fixes for resetting fd and using
+ bufferevent_openssl_filter_new(). vagrant fixes, some build fixes, increased
+ timeout for some tests (to reduce number of failures due to timing issues),
+ date in RFC1123 format and running tests in parallel.
+
+ There are highlighted changes above.
+
+ Build fixes:
+ o Fix _FILE_OFFSET_BITS redinition (solaris/autotools) (336f3b11 Azat Khuzhin)
+ o util-internal: fix __func__ redefinition (netbsd) (253e7fa9 Azat Khuzhin)
+ o Fix signedness differ for iov_base (solaris) (2c62062e Azat Khuzhin)
+ o evutil_time: include <unistd.h> when there is only sleep()/usleep() (3e75194c Azat Khuzhin)
+ o http: fix formatter for pritnf for req->ntoread (osx) (1cbf26f6 Azat Khuzhin)
+ Testing environment:
+ o Merge branch 'automake-tests-parallel-v4' (*includes ci bits also*) (59e217df Azat Khuzhin)
+ Vagrant env fixes:
+ o vagrant/netbsd: missing libtool (9c9be399 Azat Khuzhin)
+ o vagrant/netbsd: more reliable way of installing packages (36da6877 Azat Khuzhin)
+ o vagrant/osx: use make instead of gmake (there is no gmake) (f7c70aef Azat Khuzhin)
+ o vagrant: add centos box (ca591c5b Azat Khuzhin)
+ Tests:
+ o test/dns: replace servname since solaris does not have "http" (d6bafbbe Azat Khuzhin)
+ o test/thread: netbsd is too slow, increase timeout for conditions_simple (3c7422fc Azat Khuzhin)
+ o test/dns: run async resolving after sync one (to avoid timeouts) (07862531 Azat Khuzhin)
+ o test/http: turn off some tests that based on backlog filling (falky) (26f416c1 Azat Khuzhin)
+ Bugfixes:
+ o Merge branch 'openssl-filter-fixes-v4' (83e0f43b Azat Khuzhin)
+ o Merge branch 'date-rfc1123' (68def435,4798de6c,4545807d Azat Khuzhin)
+ o Merge branch 'be-openssl-fd-reset-fix-v2' (86fa0070,32adf434 Azat Khuzhin)
+ o Merge branch 'openssl-1.1-init-fixes-v2' (18a161f0 Azat Khuzhin)
+ o Fix incorrect MIME type (23f9a20e johnsonlee)
+ Trivial fixes:
+ Documentation updates:
+ o Update README.md (3821cca1 Breaker)
+
+
+Changes in version 2.1.7-rc (2 Novemer 2016)
+
+ Libevent 2.1.7-rc contains openssl 1.1 support, build fixes, CI improvements
+ and plus Vagrantfile for testing under multiple OS'es.
+
+
+ Continious Integration:
+ o Use coveralls.io via travis (9ac000c Azat Khuzhin)
+ o travis-ci: use container-based infrastructure (7e12e96 Azat Khuzhin)
+ o travis-ci/osx: fix compiling/linking openssl libraries (9d2f8d4 Azat Khuzhin)
+ o travis-ci: use gcc-5 (fixes osx|gcc failures) (d7ceae5 Azat Khuzhin)
+ o Testing with vagrant for 6 OS and cmake+autoconf (9585338 Azat Khuzhin)
+ o travis-ci/osx: install lcov (e4e099b Azat Khuzhin)
+
+ Build Improvements/Fixes:
+ o Fix cmake -DEVENT__COVERAGE=ON (40fbffc Azat Khuzhin)
+ o autogen.sh: learn about gmake (9376ac4 Azat Khuzhin)
+ o autogen.sh: remove all autoconf/automake caches, if any (69cce25 Azat Khuzhin)
+ o cmake: fix finding python2, and check that it is really 2 (3453c08 Azat Khuzhin)
+ o cmake: fix CheckFunctionExistsEx/CheckPrototypeDefinition (CMP0054) (43b69b2 Azat Khuzhin)
+ o cmake: cleanup (dc624ad Zonr Chang)
+ o cmake/win32: fix running regress, but fixing finding python2 interpreter (bcb990a Azat Khuzhin)
+ o cmake: use PYTHON_EXECUTABLE to find python2 (a4d044c Azat Khuzhin)
+ o Merge branch 'force-disable-clockgettime' (83c7cdf Azat Khuzhin)
+
+ Code Improvements (core)
+ o use ev_uint16_t instead of unsigned short for port (e983712 Thomas Bernard)
+ o Merge branch 'contrib-guide-v2' (b9c5077 Azat Khuzhin)
+ o poll: Prevent libevent from spinning if POLLNVAL occurs (675974c Tim Hentenaar)
+
+ Testing:
+ o test/regress: cover a polling of invalid fd (cb0df5c Tim Hentenaar)
+
+ Code Improvements (bufferevent_openssl)
+ o Make it build using OpenSSL 1.1.0 (3e9e0a0 Kurt Roeckx)
+ o Don't call BIO_number_{read|written} on NULL BIOs. (6702da1 Adam Langley)
+ o Switch from a 512 to 2048-bit RSA key. (f9803a6 Adam Langley)
+
+ Trivial fixes:
+ o Ignore temporary configure files (8fb08ae Azat Khuzhin)
+ o README.md: fix typo: ar -> are (2361616 Simone Basso)
+ o be: just a simple mistake, reinclude the <errno.h> (7521664 Seven)
+
+Changes in version 2.1.6-beta (4 July 2016)
+
+ Libevent 2.1.6-beta contains mostly bug fixes (evbuffers, evthread, evdns,
+ bufferevents, core, http, samples), improvements but mostly to fix some
+ possible issues (EVHTTP_CON_LINGERING_CLOSE), a lot of new unit tests and new
+ appveyor integration.
+
+ Security Fixes (utils)
+ o evutil_parse_sockaddr_port(): fix buffer overflow (329acc1 Azat Khuzhin)
+
+ Security Fixes (evdns)
+ o evdns: name_parse(): fix remote stack overread (96f64a0 Azat Khuzhin)
+ o evdns: fix searching empty hostnames (ec65c42 Azat Khuzhin)
+
+ New APIs (evdns)
+ o New function to get address for nameserver. (537177d Nick Mathewson)
+
+ New APIs (bufferevents)
+ o expose bufferevent_incref/decref (with fewer modifications) (1ed6718 Mark Ellzey)
+
+ New APIs (internal)
+ o evdns: export cancel via callbacks in util (like async lib core/extra issues) (8cbe65d Azat Khuzhin)
+
+ New APIs/Improvements (http)
+ o http: take EVHTTP_CON_LINGERING_CLOSE into account for "Expect: 100-Continue" (ac448a7 Azat Khuzhin)
+ o http: lingering close (like nginx have) for entity-too-large (9fde518 Azat Khuzhin)
+ o http: read server response even after server closed the connection (680742e Azat Khuzhin)
+ o http: export evhttp_connection_set_family() (714fc70 Azat Khuzhin)
+ o http: reuse connected address only with EVHTTP_CON_REUSE_CONNECTED_ADDR (a50f5f0 Azat Khuzhin)
+ o http: use IP address that we got before (if any) during retrying (54c887d Azat Khuzhin)
+
+ Bugfixes (core)
+ o Fix getaddrinfo under solaris (for multiprotocol case) (40730ae Azat Khuzhin)
+ o Check for Mac OS X 10.4 kqueue bug properly (df6f99e Mark Mentovai)
+ o event_reinit: make signals works after fork() without evsig_add() (88640aa Nicholas Marriott)
+ o event_reinit: always re-init signal's socketpair (ad0c237 Nicholas Marriott)
+ o Free event queues even for recursive finalizers (7c8d015 Azat Khuzhin)
+ o Fix checking for make_base_notifiable() (f337296 Azat Khuzhin)
+ o Set correct socklen for PF_INET6 sockaddr len (3499ad9 Mark Ellzey)
+ o Fix garbage value in socketpair util function, stdint? (043ae74 Mark Ellzey)
+ o fix the return value of event_deferred_cb_schedule_ (38cef64 Greg Hazel)
+ o event_free_debug_globals_locks(): disable lock debugging (e5c87d1 Azat Khuzhin)
+ o event: call event_disable_debug_mode() in libevent_global_shutdown() (941faae Azat Khuzhin)
+ o ht-internal: don't reset hth_table_length explicitly in name_##HT_CLEAR (597c7b2 Azat Khuzhin)
+
+ Bugfixes (evthread)
+ o evthread: fix evthread_setup_global_lock_() for debug-lock with a real-lock case (e4556fc Azat Khuzhin)
+ o evthread: evthreadimpl_disable_lock_debugging_() for libevent_global_shutdown() (ccc5593 Azat Khuzhin)
+
+ Bugfixes (evdns)
+ o evdns: avoid double-free in evdns_base_free() for probing requests (4db15e0 Azat Khuzhin)
+ o evdns: evdns_base_free(): fix UAF of evdns_base with @fail_requests (00313c5 Azat Khuzhin)
+ o evdns: evdns_base_free(): free requests before namservers (14f84bb Azat Khuzhin)
+ o evdns: fix randomize-case by make case-insensitive as required (9c238de Azat Khuzhin)
+
+ Bugfixes (bufferevents)
+ o be_sock: handle readv() returns ECONNREFUSED (freebsd 9.2) (3189eb0 Azat Khuzhin)
+ o be_filter: avoid data stuck under active watermarks (b627ad8 Eduardo Panisset)
+ o Fix bufferevent_pair to properly set BEV_EVENT_{READING,WRITING} on flush. (2851889 David Paschich)
+ o be_openssl: clear all pending errors before SSL_*() calls (38e0f4a Azat Khuzhin)
+ o be_sock: cancel in-progress dns requests (86dfd2c Azat Khuzhin)
+ o be_sock: unfreeze buffers on fd changing (255525d Azat Khuzhin)
+ o be_sock: bufferevent_socket_connect_hostname(): make it thread-safe (809bb39 Azat Khuzhin)
+ o be_openssl: don't call do_write() directly from outbuf_cb (da52933 Azat Khuzhin)
+ o be_openssl: use bufferevent_enable() instead of bufferevent_add_event_() (0c66d32 Azat Khuzhin)
+ o be_openssl: don't add events during bev creation (like be_sock) (f4b6284 Azat Khuzhin)
+ o Fix lock leak in be_pair_flush() if flush type is BEV_NORMAL (f45d39d Bill Vaughan)
+ o be_openssl: don't use *_auto() in do_handshake() we can't have fd == -1 there (877280d Azat Khuzhin)
+ o be_openssl: don't call set_open_callbacks() if fd == -1 (e8a2da9 Azat Khuzhin)
+ o be_openssl: get rid off hackish "fd_is_set", to fix some corner cases (40b0379 Azat Khuzhin)
+ o be: we don't need to use getpeername() we we have conn_address (2c271e2 Azat Khuzhin)
+ o Call underlying bev ctrl SET_FD on filtered bufferevents (c2aa7dc Mark Ellzey)
+ o be_pair: release shared lock with the latest of bufferevent_pair (92a359e Azat Khuzhin)
+
+ Bugfixes (http)
+ o [Issue #313] set method to ASCII "NULL" if evhttp_method() returns NULL (17cc636 Mark Ellzey)
+ o evhttp_have_expect(): fix -Wlogical-not-parentheses (24b5214 Azat Khuzhin)
+ o http: set fd to -1 unconditioally, to avoid leaking of DNS requests (7a4b472 Azat Khuzhin)
+ o http: avoid leaking of fd in evhttp_connection_free() (f0e1341 Azat Khuzhin)
+ o http: get fd from be layer during connection reset (4a53c54 Azat Khuzhin)
+ o http: fix EVHTTP_CON_READ_ON_WRITE_ERROR when it doesn't supported by OS (2ff164a Azat Khuzhin)
+ o http: do not do function calls under EVUTIL_ASSERT() to fix NDEBUG builds (7c89999 Azat Khuzhin)
+ o http: fix leaking of response_code_line (8f18a62 Azat Khuzhin)
+ o http: fix "Expect: 100-continue" client side (0b46b39 Azat Khuzhin)
+ o http: fix conflicts EVHTTP_CON_AUTOFREE and EVHTTP_CON_REUSE_CONNECTED_ADDR (4dc0979 Azat Khuzhin)
+ o http: avoid epoll_ctl() on already closed fd (triggers by http/chunk_out) (ab3bc69 Azat Khuzhin)
+ o http: install timeout for read too during connect for ssl (040000d Azat Khuzhin)
+ o http: fix evhttp_request_own() by checking EVHTTP_USER_OWNED in more cases (b0d3964 Azat Khuzhin)
+ o http: fix detecting EOF without write (7ed02ac Azat Khuzhin)
+ o evhttp: Fix failure to send all output data for POST/PUT requests (24eea0d John Ohl)
+ o Fix evhttp_uriencode() regression. (c6b1ec1 Mark Ellzey)
+ o removed unused vars (e94250c Mark Ellzey)
+ o pointer overflow checks for evhttp_uriencode (72afe4c Zonr Chang)
+
+ Bugfixes (evbuffers)
+ o buffer: fix overflow check in evbuffer_expand_singlechain() (a3f4ccd Azat Khuzhin)
+ o buffer: evbuffer_add_buffer(): clean empty chains from destination buffer (26fd932 Azat Khuzhin)
+ o Fix n_add_for_cb in evbuffer_prepend() in case of new buffer required (0abd039 Azat Khuzhin)
+ o be_filter: actually disable output_filter during processing output (c031215 Simon Perreault)
+ o evbuffer_add: Use last_with_datap if set, not last. (a8769ef Marcus Sundberg)
+ o EVBUFFER_PTR_SET -> EVBUFFER_PTR_ADD (8674e4f jer-gentoo)
+
+ Bugfixes (evconnlistener)
+ o listener: unlock lev on error in listener_read_cb() (2a71b33 Azat Khuzhin)
+ o Fix potential fd leak in listener_read_cb() (a695a72 Mark Ellzey)
+
+ Testing
+ o tests: use waitpid(..., WNOWAIT) to fix failing of main/fork under solaris (43eb56c Azat Khuzhin)
+ o test: replace sleeping with syncing pair in main/fork (16d220c Azat Khuzhin)
+ o test/http: do not run tests that based on backlog filling (freebsd) (500b6b7 Azat Khuzhin)
+ o test/bufferevent/iocp: fix test name for "bufferevent_connect_fail_eventcb" (4410e9d Azat Khuzhin)
+ o test/ssl: use send()/recv()/EVUTIL_ERR_RW_RETRIABLE()/EVUTIL_SOCKET_ERROR() to fix win32 (a9e8cd6 Azat Khuzhin)
+ o test/https_basic: increase timeout for complete write (fixes win32) (d5a2f2f Azat Khuzhin)
+ o test: fix building with --disable-thread-support under win32 (a487706 Azat Khuzhin)
+ o test/buffer: evbuffer_add_buffer() with empty chains (a272bc4 Azat Khuzhin)
+ o test/buffer: evbuffer_remove_buffer() with empty chains (prepend) (f0cfa14 Azat Khuzhin)
+ o test/buffer: evbuffer_remove_buffer() with empty chains (evbuffer_add_buffer()) (2880ce6 Azat Khuzhin)
+ o test/buffer: cover evbuffer_expand() for overflow (48dab7a Azat Khuzhin)
+ o test/be_filter: creating test case for data stuck with active watermarks (766194b Eduardo Panisset)
+ o test/http: avoid using conditionals with omitted operands (fixes VS2015) (2a4bf29 Azat Khuzhin)
+ o test/http: don't mix declarations and code (fixes -Wdeclaration-after-statement) (aabf1c2 Azat Khuzhin)
+ o test/buffer: fix leak in test_evbuffer_prepend() (c08d90b Azat Khuzhin)
+ o test/buffer: avoid errors with --no-fork (reinitialize static vars) (e7d1e39 Azat Khuzhin)
+ o test/buffer: cover n_add_for_cb when evbuffer_prepend() need to allocate buffer (e77ff41 Azat Khuzhin)
+ o test/tinytest_macros: add new one tt_nstr_op() (bd19a28 Azat Khuzhin)
+ o test/bufferevent: check that output_filter disabled during processing output (ae28812 Azat Khuzhin)
+ o test/listener: regression for missing unlock in listener_read_cb() (7d85651 Azat Khuzhin)
+ o test/regress: add tests for evbuffer_add() breakage on empty last chain (d5ee739 Marcus Sundberg)
+ o test/http: fix running some tests sequential (with --no-fork) (bddad71 Azat Khuzhin)
+ o test/http: localize evhttp server structure (cbc3209 Azat Khuzhin)
+ o test/dns: regression for empty hostname (d7348ba Azat Khuzhin)
+ o test/http: fix SERVER_TIMEOUT tests under win32 (d49a658 Azat Khuzhin)
+ o test/http: add a helper for creating timedout/failed request (376f107 Azat Khuzhin)
+ o test/http: adopt for C90 (mixed code and declarations) (d02a285 Azat Khuzhin)
+ o test/http: cover NS timed out during request cancellations separatelly (0c343af Azat Khuzhin)
+ o test/http: request cancellation with resolving/{conn,write}-timeouts in progress (334340d Azat Khuzhin)
+ o test/http: exit from the loop in the errorcb to wait cancellation (927ab33 Azat Khuzhin)
+ o regress_clean_dnsserver(): reset global port vars (351207f Azat Khuzhin)
+ o test/http: read_on_write_error: fix it for win32 (3b58169 Azat Khuzhin)
+ o test/http: separate coverage for EVHTTP_CON_READ_ON_WRITE_ERROR (5c2b4c1 Azat Khuzhin)
+ o test/http: cover "Expect: 100-continue" client-server interaction (31d8116 Azat Khuzhin)
+ o test/http: *lingering tests shouldn't have "Expect: 100-continue" (ed469ab Azat Khuzhin)
+ o test: use EVUTIL_SHUT_WR (04fc82f Azat Khuzhin)
+ o test/http: avoid huge stack allocations to fix win32 builds (3166765 Azat Khuzhin)
+ o test: http/lingering_close: cover EVHTTP_SERVER_LINGERING_CLOSE (e122ca1 Azat Khuzhin)
+ o test: http/non_lingering_close: cover ~EVHTTP_SERVER_LINGERING_CLOSE (f41e1b0 Azat Khuzhin)
+ o test: http/*: update expected HTTP codes for body exceeds `max_body_size` (addf2b9 Azat Khuzhin)
+ o test: http/data_length_constrains: set EVHTTP_CON_READ_ON_WRITE_ERROR (d38a723 Azat Khuzhin)
+ o test: increase buffer size for http/data_length_constraints to trigger EPIPE (0792e1e Azat Khuzhin)
+ o test/tinytest_demo: include <windows.h> for win32 to fix tdm-gcc (f062bbe Azat Khuzhin)
+ o test/regress: cover event_del() waiting mechanism (5b58b70 Azat Khuzhin)
+ o test/regress: cover existing signal callbacks and fork() + event_reinit() (ceddc60 Azat Khuzhin)
+ o test/regress: cover signals after fork() + event_reinit() (b075b81 Azat Khuzhin)
+ o test/regress: main/fork: rewrite assertions by just removing event in callback (088d8b3 Azat Khuzhin)
+ o test/dns: check exit code of evdns_getaddrinfo() (0b9d432 Azat Khuzhin)
+ o test/dns: cover evdns_getaddrinfo() and evdns_base_free() with @fail_requests (4ad3483 Azat Khuzhin)
+ o test/dns: cover @fail_requests for evdns_base_free() (d6c6fb4 Azat Khuzhin)
+ o test/dns: more graceful coverage of @fail_requests (123d372 Azat Khuzhin)
+ o test/ssl: cover busy-loop (i.e. {read,write}-blocked-on-{write,read} stuff) (da0ea7a Azat Khuzhin)
+ o test/http: write_during_read for https (23c77b6 Azat Khuzhin)
+ o test/http: connection_fail for https (7ea26f7 Azat Khuzhin)
+ o test/http: stream_out for https (ac04968 Azat Khuzhin)
+ o test/http: chunk_out for https (a71ffb9 Azat Khuzhin)
+ o test/regress: fix ssl-less builds (need to make this prettier) (3160716 Azat Khuzhin)
+ o test/http: allow dirty shutdown for ssl to fix https_incomplete (1ede326 Azat Khuzhin)
+ o test/http: https basic (59714b4 Azat Khuzhin)
+ o test/http: incomplete{,_timeout} for https (615490d Azat Khuzhin)
+ o test/http: add simplest test for http/https/https_dirty_shutdown (93b19dc Azat Khuzhin)
+ o test/http: https: retry coverage (7c2d24a Azat Khuzhin)
+ o test/http: https server support (plus some helpers) (a7088ad Azat Khuzhin)
+ o test/http: more sanity checks (a27c53c Azat Khuzhin)
+ o test/ssl: export getkey()/getcert()/get_ssl_ctx()/init_ssl() for https (0c4c387 Azat Khuzhin)
+ o test/regress_be: basic coverage bufferevent_flush() for pair/sock layers (ad52602 Azat Khuzhin)
+ o test/regress_be: socket_filter_inactive: check bufferevent after creation (f8081af Azat Khuzhin)
+ o test/regress_be: cover finalizers from inactive to active queue (337684b Azat Khuzhin)
+ o test/regress_buffer: fix clang compilation warnings (d8fd4c0 Azat Khuzhin)
+ o test/regress_http: fix compilation warnings (-Wmissing-field-initializers) (cd422e0 Azat Khuzhin)
+ o test/regress_dns: fix compilation warnings (-Wmissing-field-initializers/for) (f55db98 Azat Khuzhin)
+ o tests/regress_dns: cover that randomize-case works case-insensitive (1e8bfbc Azat Khuzhin)
+ o test: fix bufferevent/bufferevent_pair_release_lock in debug mode (3f749e9 Azat Khuzhin)
+ o test: fix bufferevent/bufferevent_pair_release_lock for freebsd (79f9ace Azat Khuzhin)
+ o test/regress_be: bufferevent_enable() shouldn't call eventcb by it's own (a0f308d Azat Khuzhin)
+ o test/regress_be: introduce fake_listener_create() (37dc9e0 Azat Khuzhin)
+ o test/regress_http: cover evhttp_request_own() (6f6fa0d Azat Khuzhin)
+ o test/regress_http: cover write during read (3d15aeb Azat Khuzhin)
+ o test/regress_http: verify that closecb will be called without multiple write (4be6c70 Azat Khuzhin)
+ o test/regress: fix bufferevent_pair_release_lock with EVENT_DEBUG_MODE (6ea6655 Azat Khuzhin)
+ o test/regress_ssl: check events fd/pending after timeout triggered (cdafdf0 Azat Khuzhin)
+ o test/regress_ssl: cover case when server didn't up (failed with timeout) (74845f1 Azat Khuzhin)
+ o test/regress_ssl: covert that we can't change fd with underlying (df507af Azat Khuzhin)
+ o test/regress_ssl: cover that events (read/write) at finish not pending (762edb4 Azat Khuzhin)
+ o test/regress_ssl: cover fd manipulations (b78a829 Azat Khuzhin)
+ o test/regress_ssl: convert open_ssl_bufevs() to mask (46bba73 Azat Khuzhin)
+ o test/regress_ssl: convert client/server to mask too (3455991 Azat Khuzhin)
+ o test/regress_ssl: cover "allow_dirty_shutdown" (0430327 Azat Khuzhin)
+ o test/regress_ssl: convert regress_bufferevent_openssl() to bitmask (342e116 Azat Khuzhin)
+ o tests/regress_ssl: drop duplicated assert (25e56fd Azat Khuzhin)
+ o test/regress_http: initialize "dns_base" to avoid reading trash (9f0bff3 Azat Khuzhin)
+ o test/http: cover retrying with saved conn_address by shutting down dns server (f4874d8 Azat Khuzhin)
+ o be_pair/regress: cover use of shared lock (lock/unlock/free) (a558fcd Azat Khuzhin)
+ o regress_dns: drop hack for event_debug_map_HT_GROW in leak tests (3540a19 Azat Khuzhin)
+
+ Sample code
+ o Fix memory leak in signal-test.c (666db91 basavesh.as)
+ o sample/hello-world: exAmple, not eXMple (2d3cd35 kirillDanshin)
+ o dns-example: allow to set ns from args (df19a97 Azat Khuzhin)
+ o dns-example: convert to getopt() (32f8592 Azat Khuzhin)
+ o http-connect: make it win32 compilable (1bf7595 Azat Khuzhin)
+ o sample/https-client: allow to change path to ca-certificates (fdf713a Azat Khuzhin)
+ o sample/https-client: check for ERR_remove_thread_state() existence (c4e9d9b Azat Khuzhin)
+ o sample/https-client: replace ERR_remove_state() by ERR_remove_thread_state() (77ad68a Azat Khuzhin)
+ o sample/https-client: add -timeout option (4637aa8 Azat Khuzhin)
+ o sample/https-client: don't try to free uninitialized SSL (f3d7ff5 Azat Khuzhin)
+ o sample/https-client: graceful exit with freeing memory (to make valgrind happy) (24a1f25 Azat Khuzhin)
+ o https-client: correctly handle URLs with no path (like "https://host:port") (29a0482 Andrey Skriabin)
+ o sample/http-connect: don't use assert() to make it work with NDEBUG (6dc71e7 Azat Khuzhin)
+ o sample/http-connect: made it compatible with C90 (f976d43 Azat Khuzhin)
+ o sample: add HTTP CONNECT tunnelling example using libevent http layer (1d34498 Azat Khuzhin)
+ o Update dns-example. (620ff24 Mark Ellzey)
+
+ Documentation
+ o Update README.md (b8ec70c Mark Ellzey)
+ o Update README.md (80faee9 Mark Ellzey)
+ o Update README.md (ad4a897 Mark Ellzey)
+ o Update README.md (a2b2e1e Mark Ellzey)
+ o Update README.md (0dfa5dc Mark Ellzey)
+
+ Code Improvements (evthread)
+ o evthread: add evthread_get_{lock,condition}_callbacks() helpers (c0b34f6 Azat Khuzhin)
+
+ Code Improvements (core)
+ o util: make @sa const for evutil_socket_connect_() (a8d32c2 Azat Khuzhin)
+
+ Code Improvements (http)
+ o http: assert's that evbuffer_drain() success on connection reset (2185e63 Azat Khuzhin)
+ o http: introduce evhttp_request_free_() helper (22061ac Azat Khuzhin)
+ o http: introduce evhttp_is_request_connection_close() helper (6540da3 Azat Khuzhin)
+
+ Code Improvements (bufferevents)
+ o be_sock: bufferevent_socket_set_conn_address(): assert instead of silent no-op (0ab88c2 Azat Khuzhin)
+ o be_sock: sanity check in bufferevent_socket_set_conn_address() (eedbeff Azat Khuzhin)
+ o be: replace sockaddr_storage with sockaddr_in6 for conn_address (3889612 Azat Khuzhin)
+ o be: replace conn_address by full struct instead of pointer (e5615aa Azat Khuzhin)
+ o bufferevent: move conn_address out from http into bufferevent (8bb3842 Azat Khuzhin)
+ o be: make @sa const for bufferevent_socket_connect() (dc33c78 Azat Khuzhin)
+
+ Cleanups (core)
+ o Refactoring conditional directives that break parts of statements. (4b41eeb lzmths)
+ o epoll: introduce PRINT_CHANGES() macro to avoid copy-pasting (a1b142b Azat Khuzhin)
+ o tab (6e7a580 Greg Hazel)
+
+ Cleanups (evbuffers)
+ o buffer_compat: fix comment -- we have EVBUFFER_EOL_ANY not EOL_STYLE_ANY (575ff67 Azat Khuzhin)
+
+ Cleanups (bufferevents)
+ o be_sock: evutil_getaddrinfo_async_() always return 0 (dbff101 Azat Khuzhin)
+ o be_sock: drop be_sock_add() macro (useless and debug unfriendly) (fad5fe2 Azat Khuzhin)
+ o be: introduce bufferevent_generic_adj_existing_timeouts_() (3c1f58f Azat Khuzhin)
+ o be: add_event: use evutil_timerisset() (a96b73b Azat Khuzhin)
+ o be_openssl: introduce be_openssl_auto_fd() helper (2a8a711 Azat Khuzhin)
+ o be_openssl: introduce set_open_callbacks_auto() (510da71 Azat Khuzhin)
+
+ Cleanups (http)
+ o http: make fallback for EVHTTP_CON_READ_ON_WRITE_ERROR more cleaner (d405492 Azat Khuzhin)
+ o http: coding style issue (365f181 Azat Khuzhin)
+
+ Cleanups (evdns)
+ o evnds: inline TEST_NAME macro to make debuggin easier (0c615f4 Azat Khuzhin)
+
+ Portability Fixes
+ o [#372] check for errno.h (3031617 Mark Ellzey)
+ o Fixed Unicode issue in error messages. (e8b7895 Mattes D)
+ o Assume that ke_udata is an integer type on CloudABI. (5602e45 Ed Schouten)
+ o Add missing include of <netinet/in.h>. (b2c68bc Ed Schouten)
+ o Include <sys/ioctl.h>, <sys/resource.h> and <sys/wait.h> optionally. (c1404b5 Ed Schouten)
+ o Test against SO_REUSEADDR (along with _WIN32). (ce1776c Ed Schouten)
+ o Always define missing TAILQ functions from sys/queue.h (2828bdb Christopher Wiley)
+ o Don't use BSD u_* types. (fd36647 Ed Schouten)
+ o Remove BSD-ism: TIMEVAL_TO_TIMESPEC(). (193c7de Ed Schouten)
+ o be: include all variations of headers for sockaddr_in6 struct (c212291 Azat Khuzhin)
+ o be: fix sockaddr_in6 type definition for win32 (c42bc6b Azat Khuzhin)
+
+ Continious Integration:
+ o travis: split long lines, and make it cleaner (685a6a1 Azat Khuzhin)
+ o travis: fix autotools on osx by reinstalling libtool (088ea5e Azat Khuzhin)
+ o appveyor/autotools: link with openssl by passing LDFLAGS/CFLAGS (6fcfa25 Azat Khuzhin)
+ o appveyor: image already had openssl installed (4634b85 Azat Khuzhin)
+ o appveyor: check -DUNICODE -D_UNICODE according to ReleaseChecklist (cmake only) (e9acc44 Azat Khuzhin)
+ o appveyor: ignore failure of mingw-get (1810857 Azat Khuzhin)
+ o appveyor: drop shallow_clone, since we use tags for detecting version in cmake (ac90133 Azat Khuzhin)
+ o appveyor: support cmake & autotools using build matrix (like travis-ci has) (8f95015 Azat Khuzhin)
+ o travis-ci/osx: relink gcc/g++ instead of clang (481481d Azat Khuzhin)
+ o travis-ci: enable multi-os mode (osx, linux) (79917e4 Azat Khuzhin)
+ o travis-ci: increase matrix (--disable-foo) (59649f7 Azat Khuzhin)
+ o travis-ci: adjust alignment (c8be339 Azat Khuzhin)
+ o travis: add builds without debug mode into matrix (3e56da2 Azat Khuzhin)
+ o test: run regress with EVENT_DEBUG_MODE=1 and without (cf2cf2a Azat Khuzhin)
+ o Update travis config for status updates (37453ab Mark Ellzey)
+ o Use autotools for appveyor until cmake is fixed. (1cc2e29 Mark Ellzey)
+ o Fix the link for appveyor OpenSSL installer (WIN32) (107d565 Mark Ellzey)
+ o Forgot to install OpenSSL for appveyor (26164a5 Joakim Söderberg)
+ o Add support for appveyor.com windows CI (5f89c37 Joakim Söderberg)
+
+ Build Improvements/Fixes:
+ o evutil: mark ai_find_protocol() static (prototype-less) (5a157c8 Azat Khuzhin)
+ o cmake/solaris: set CMAKE_REQUIRED_LIBRARIES to fix functions detections (dc95823 Azat Khuzhin)
+ o cmake/solaris: fix building (link with socket,nsl) (050bfc7 Azat Khuzhin)
+ o cmake: check for ZLIB_INCLUDE_DIR, since we can have only library without headers (c4dfb93 Azat Khuzhin)
+ o autotools/win32: fix searching ssl library (671a24f Azat Khuzhin)
+ o cmake/win32: do not compile regress_thread on -DEVENT__DISABLE_THREAD_SUPPORT=ON (de0c196 Azat Khuzhin)
+ o cmake/win32: do not compile evthread_win32 on -DEVENT__DISABLE_THREAD_SUPPORT=ON (ecb0ec8 Azat Khuzhin)
+ o cmake: fix -DEVENT__ENABLE_VERBOSE_DEBUG (typo on -DUSE_DEBUG) (e35f224 Azat Khuzhin)
+ o cmake: do not use stderr for notifications/version-info (38716c6 Azat Khuzhin)
+ o autoconf: fix --disable-thread-support build under win32 (bb09535 Azat Khuzhin)
+ o buffer: don't mix code and declarations (8892f4c Azat Khuzhin)
+ o Update gitignore file to ignore cscope gen'ed files (0aaa4fb Neeraj Badlani)
+ o For non GCC/clang on OSX the -Wno-deprecated-declarations may not be valid (b5ca365 Rainer Keller)
+ o automake: define serial-tests only if automake have this option (61179de Azat Khuzhin)
+ o test/automake: don't use paralell test harness (since automake 1.12) (44d755e Azat Khuzhin)
+ o Ignore all pkgconfig generated stuff (ce38993 Azat Khuzhin)
+ o libevent_core and libevent_extra also deserve a pkgconfig file (b8d7c62 Jan Heylen)
+ o Ignore verify_tests.bat (win32 version) (0f2de10 Azat Khuzhin)
+ o cmake: require 3.1 only for win32 to make it work under ubunty precise (87f7238 Azat Khuzhin)
+ o cmake: require at least 3.1 for target_sources() (c46ead5 Azat Khuzhin)
+ o cmake: fix adding of compiler flags, and now it will (36588e1 Azat Khuzhin)
+ o Replace -Wswitch-enum with -Wswitch, and add it into cmake rules too (f29f59e Azat Khuzhin)
+ o test/regress_ssl: Fix compile problems for win32 (73d0360 Trond Norbye)
+ o util: fix "%zu" format on TDM-gcc/MinGW-w64 (79b69d8 Azat Khuzhin)
+ o cmake: don't define EVENT__NEED_DLLIMPORT always (fixes VS2013 static build) (49bd790 Azat Khuzhin)
+ o Add missing return statement to del_wait_thread so libevent can build. (4f778ab Nick Mathewson)
+ o cmake: fix building dns-example under win32 (missing getopt) (a1609a8 Azat Khuzhin)
+ o visibility: align it to make it more readable (bb6b53d Azat Khuzhin)
+ o cmake: Fix detection of ssize_t/SSIZE_T (7707f6b Azat Khuzhin)
+ o Ignore more configure stuff (configure.lineno) (8d34302 Azat Khuzhin)
+ o Fixed issue with cmake version generation (d56efd9 Mark Ellzey)
+ o Cmake is now officially working. (7f9646d Mark Ellzey)
+ o More cmake updates, lot's of missing definitions (49a5381 Mark Ellzey)
+ o CMake syntax fixes fo .in files (6aad23d Mark Ellzey)
+ o Revert "The Windows socket type is defined as SOCKET." (a264da8 Mark Ellzey)
+ o CMAKE CMAKE CMAKE CLEANUPS (a9db46a Mark Ellzey)
+ o Lot's of cmake updates (8b228e2 Mark Ellzey)
+ o Provide a mechanism for building the library on Windows with different compiler flags. Add a batch file that builds it for the M[DT][d] options and performs a hunt and gather of the different output libraries. (ded8086 billsegall)
+ o The Windows socket type is defined as SOCKET. (c9e6c3d billsegall)
+ o autotools: fix getservbyname() detection (959a4c2 Azat Khuzhin)
+ o Add missing <string.h> for openssl_hostname_validation module (3316a21 Azat Khuzhin)
+ o make test/regress_ssl.c compile without warnings (9f02a44 Thomas Bernard)
+ o test/regress_be: drop debug __asm__(int3) to fix arm build (8240379 Azat Khuzhin)
+ o event_debug_created_threadable_ctx_: fix compilation without debug mode (a068f2e Azat Khuzhin)
+ o Add a prototype for event_disable_debug_mode() (bfcedee Sebastian Hahn)
+ o http: eliminate warning about "socklen" in evhttp_connection_connect_() (dfad1a4 Azat Khuzhin)
+ o Updated gitignore (1dbb55d Mark Ellzey)
+ o Update bench_httpclient.c (cb96931 Seungmo Koo)
+ o *fix: bench_httpclient to support win32 (4e9325e zeliard)
+ o Commented out a WIN32 threading / timing test for now (e84e269 Mark Ellzey)
+ o Fix mixed declarations and code (forbidden by ISO C90) (0c7f217 Thomas Bernard)
+ o Fix "function declaration isn’t a prototype" (746d2c5 Thomas Bernard)
+ o This fixes a bug introduced in 27bd9faf498b91923296cc91643e03ec4055c230 (19ba454 Joakim Söderberg)
+ o changed strtotimeval signature as per #211 (bdbc823 Xiao Bao Clark)
+ o Added cmake-generated files to ignore list. (6c12bfe Matyas Dolak)
+ o Ignore `make dist` generated files (8a2c6c7 Azat Khuzhin)
+
+ Debugging
+ o Debug mode option to error on evthread init AFTER other event calls. (dcfb19a Mark Ellzey)
+
+
+
Changes in version 2.1.5-beta (5 January 2015)
Security Fixes (evbuffers)
diff --git a/contrib/ntp/sntp/libevent/ChangeLog-1.4 b/contrib/ntp/sntp/libevent/ChangeLog-1.4
index 166d30872f81..d7f6517b2b92 100644
--- a/contrib/ntp/sntp/libevent/ChangeLog-1.4
+++ b/contrib/ntp/sntp/libevent/ChangeLog-1.4
@@ -175,7 +175,7 @@ Changes in 1.4.1-beta:
o support for 32-bit tag numbers in rpc structures; this is wire compatible, but changes the API slightly.
o prefix {encode,decode}_tag functions with evtag to avoid collisions
o Correctly handle DNS replies with no answers set (Fixes bug 1846282)
- o The configure script now takes an --enable-gcc-warnigns option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
+ o The configure script now takes an --enable-gcc-warnings option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
o When building with GCC, use the "format" attribute to verify type correctness of calls to printf-like functions.
o removed linger from http server socket; reported by Ilya Martynov
o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
diff --git a/contrib/ntp/sntp/libevent/ChangeLog-2.0 b/contrib/ntp/sntp/libevent/ChangeLog-2.0
index a925d33b180a..16f36008cdec 100644
--- a/contrib/ntp/sntp/libevent/ChangeLog-2.0
+++ b/contrib/ntp/sntp/libevent/ChangeLog-2.0
@@ -1143,7 +1143,7 @@ Changes in 2.0.1-alpha (17 Apr 2009):
o Check return value of event_add in signal.c
o Add a more powerful evbuffer_readln as a replacement for evbuffer_readline. The new function handles more newline styles, and is more useful with buffers that may contain a nul characters.
o Do not mangle socket handles on 64-bit windows.
- o The configure script now takes an --enable-gcc-warnigns option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
+ o The configure script now takes an --enable-gcc-warnings option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
o move EV_PERSIST handling out of the event backends
o small improvements to evhttp documentation
o always generate Date and Content-Length headers for HTTP/1.1 replies
diff --git a/contrib/ntp/sntp/libevent/Doxyfile b/contrib/ntp/sntp/libevent/Doxyfile
index d9d6603459c3..3f094f72134e 100644
--- a/contrib/ntp/sntp/libevent/Doxyfile
+++ b/contrib/ntp/sntp/libevent/Doxyfile
@@ -17,11 +17,11 @@
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = libevent
+PROJECT_NAME = $(PROJECT)-$(VERSION)
# Place all output under 'doxygen/'
-OUTPUT_DIRECTORY = doxygen/
+OUTPUT_DIRECTORY = $(DOCDIR)
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
@@ -64,24 +64,24 @@ STRIP_FROM_PATH = include/
# with spaces.
INPUT = \
- include/event2/buffer.h \
- include/event2/buffer_compat.h \
- include/event2/bufferevent.h \
- include/event2/bufferevent_compat.h \
- include/event2/bufferevent_ssl.h \
- include/event2/dns.h \
- include/event2/dns_compat.h \
- include/event2/event.h \
- include/event2/event_compat.h \
- include/event2/http.h \
- include/event2/http_compat.h \
- include/event2/listener.h \
- include/event2/rpc.h \
- include/event2/rpc_compat.h \
- include/event2/tag.h \
- include/event2/tag_compat.h \
- include/event2/thread.h \
- include/event2/util.h
+ $(SRCDIR)/include/event2/buffer.h \
+ $(SRCDIR)/include/event2/buffer_compat.h \
+ $(SRCDIR)/include/event2/bufferevent.h \
+ $(SRCDIR)/include/event2/bufferevent_compat.h \
+ $(SRCDIR)/include/event2/bufferevent_ssl.h \
+ $(SRCDIR)/include/event2/dns.h \
+ $(SRCDIR)/include/event2/dns_compat.h \
+ $(SRCDIR)/include/event2/event.h \
+ $(SRCDIR)/include/event2/event_compat.h \
+ $(SRCDIR)/include/event2/http.h \
+ $(SRCDIR)/include/event2/http_compat.h \
+ $(SRCDIR)/include/event2/listener.h \
+ $(SRCDIR)/include/event2/rpc.h \
+ $(SRCDIR)/include/event2/rpc_compat.h \
+ $(SRCDIR)/include/event2/tag.h \
+ $(SRCDIR)/include/event2/tag_compat.h \
+ $(SRCDIR)/include/event2/thread.h \
+ $(SRCDIR)/include/event2/util.h
#---------------------------------------------------------------------------
# configuration options related to the HTML output
@@ -90,7 +90,7 @@ INPUT = \
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output.
-GENERATE_HTML = YES
+GENERATE_HTML = $(GENERATE_HTML)
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
@@ -99,7 +99,7 @@ GENERATE_HTML = YES
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
-GENERATE_LATEX = YES
+GENERATE_LATEX = $(GENERATE_LATEX)
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -175,7 +175,7 @@ LATEX_HIDE_INDICES = NO
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
-GENERATE_MAN = NO
+GENERATE_MAN = $(GENERATE_MAN)
# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
diff --git a/contrib/ntp/sntp/libevent/Makefile.am b/contrib/ntp/sntp/libevent/Makefile.am
index 0da682b5d103..21815008a43c 100644
--- a/contrib/ntp/sntp/libevent/Makefile.am
+++ b/contrib/ntp/sntp/libevent/Makefile.am
@@ -5,8 +5,8 @@
# See LICENSE for copying information.
# 'foreign' means that we're not enforcing GNU package rules strictly.
-# '1.9' means that we need automake 1.9 or later (and we do).
-AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
+# '1.13' means that we need automake 1.13 or later (and we do).
+AUTOMAKE_OPTIONS = foreign 1.13 subdir-objects
ACLOCAL_AMFLAGS = -I m4
@@ -38,7 +38,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 5:0:0
+VERSION_INFO = 7:1:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -69,6 +69,13 @@ VERSION_INFO = 5:0:0
# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
# 2.1.4-alpha -- 2.1 4:0:0 (ABI changed slightly)
# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
+# 2.1.6-beta -- 2.1 6:0:0 (ABI changed slightly)
+# 2.1.7-beta -- 2.1 6:1:0 (ABI changed slightly)
+# 2.1.8-stable-- 2.1 6:2:0 (No ABI change)
+# 2.1.9-beta-- 2.1 6:3:0 (No ABI change)
+# 2.1.10-stable-- 2.1 6:4:0 (No ABI change, WRONG)
+# 2.1.11-stable-- 2.1 7:0:0 (ABI changed)
+# 2.1.12-stable-- 2.1 7:1:0 (No ABI change)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
@@ -93,7 +100,7 @@ dist_bin_SCRIPTS = event_rpcgen.py
endif
pkgconfigdir=$(libdir)/pkgconfig
-LIBEVENT_PKGCONFIG=libevent.pc
+LIBEVENT_PKGCONFIG=libevent.pc libevent_core.pc libevent_extra.pc
# These sources are conditionally added by configure.ac or conditionally
# included from other files.
@@ -101,6 +108,29 @@ PLATFORM_DEPENDENT_SRC = \
arc4random.c \
epoll_sub.c
+CMAKE_FILES = \
+ cmake/AddCompilerFlags.cmake \
+ cmake/AddEventLibrary.cmake \
+ cmake/CheckConstExists.cmake \
+ cmake/CheckFileOffsetBits.c \
+ cmake/CheckFileOffsetBits.cmake \
+ cmake/CheckFunctionKeywords.cmake \
+ cmake/CheckPrototypeDefinition.c.in \
+ cmake/CheckPrototypeDefinition.cmake \
+ cmake/CheckWorkingKqueue.cmake \
+ cmake/CodeCoverage.cmake \
+ cmake/COPYING-CMAKE-SCRIPTS \
+ cmake/Copyright.txt \
+ cmake/LibeventConfig.cmake.in \
+ cmake/LibeventConfigVersion.cmake.in \
+ cmake/Macros.cmake \
+ cmake/Uninstall.cmake.in \
+ cmake/UseDoxygen.cmake \
+ cmake/VersionViaGit.cmake \
+ event-config.h.cmake \
+ evconfig-private.h.cmake \
+ CMakeLists.txt
+
EXTRA_DIST = \
ChangeLog-1.4 \
ChangeLog-2.0 \
@@ -113,6 +143,8 @@ EXTRA_DIST = \
make-event-config.sed \
whatsnew-2.0.txt \
whatsnew-2.1.txt \
+ README.md \
+ $(CMAKE_FILES) \
$(PLATFORM_DEPENDENT_SRC)
LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
@@ -140,18 +172,24 @@ CLEANFILES=
DISTCLEANFILES=
BUILT_SOURCES =
include include/include.am
-#include sample/include.am
+include sample/include.am
include test/include.am
if BUILD_WIN32
+SYS_CORE_LIBS = -liphlpapi
SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
-SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
+SYS_SRC = win32select.c buffer_iocp.c event_iocp.c \
bufferevent_async.c
SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
+if THREADS
+SYS_SRC += evthread_win32.c
+endif
+
else
+SYS_CORE_LIBS =
SYS_LIBS =
SYS_SRC =
SYS_INCLUDES =
@@ -221,18 +259,18 @@ NO_UNDEFINED =
MAYBE_CORE =
endif
-AM_CFLAGS = $(LEP_CFLAGS)
-AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES) $(LEP_CPPFLAGS)
-AM_LDFLAGS = $(LEP_CFLAGS)
+AM_CFLAGS = $(LIBEVENT_CFLAGS)
+AM_CPPFLAGS = -I$(srcdir)/compat -I./include -I$(srcdir)/include $(SYS_INCLUDES) $(LIBEVENT_CPPFLAGS)
+AM_LDFLAGS = $(LIBEVENT_LDFLAGS)
GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED) $(AM_LDFLAGS)
libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC)
-libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) $(SYS_CORE_LIBS)
libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
libevent_core_la_SOURCES = $(CORE_SRC)
-libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) $(SYS_CORE_LIBS)
libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
if PTHREADS
@@ -255,14 +293,16 @@ endif
noinst_HEADERS += \
WIN32-Code/nmake/evconfig-private.h \
WIN32-Code/nmake/event2/event-config.h \
+ WIN32-Code/getopt.h \
+ WIN32-Code/getopt.c \
+ WIN32-Code/getopt_long.c \
WIN32-Code/tree.h \
- bufferevent-internal.h \
- changelist-internal.h \
+ bufferevent-internal.h \
+ changelist-internal.h \
compat/sys/queue.h \
defer-internal.h \
- epolltable-internal.h \
+ epolltable-internal.h \
evbuffer-internal.h \
- evconfig-private.h \
event-internal.h \
evmap-internal.h \
evrpc-internal.h \
@@ -280,7 +320,8 @@ noinst_HEADERS += \
ratelim-internal.h \
strlcpy-internal.h \
time-internal.h \
- util-internal.h
+ util-internal.h \
+ openssl-compat.h
EVENT1_HDRS = \
include/evdns.h \
@@ -297,9 +338,7 @@ endif
verify: check
-doxygen: FORCE
- doxygen $(srcdir)/Doxyfile
-FORCE:
+include doxygen.am
-DISTCLEANFILES += *~ libevent.pc ./include/event2/event-config.h
+DISTCLEANFILES += *~ libevent.pc libevent_core.pc libevent_extra.pc ./include/event2/event-config.h
diff --git a/contrib/ntp/sntp/libevent/Makefile.in b/contrib/ntp/sntp/libevent/Makefile.in
index a608569d2265..6a285613eace 100644
--- a/contrib/ntp/sntp/libevent/Makefile.in
+++ b/contrib/ntp/sntp/libevent/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,13 @@
#
# See LICENSE for copying information.
-# include/Makefile.am for libevent
+# include/include.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+# sample/include.am for libevent
# Copyright 2000-2007 Niels Provos
# Copyright 2007-2012 Niels Provos and Nick Mathewson
#
@@ -32,6 +38,16 @@
#
# See LICENSE for copying information.
+# Doxygen documentation will not be generated with default configuration,
+# unless '--enable-doxygen-doc' is configured.
+# The following targets are all about doxygen:
+# make # 'make doxygen' would be auto executed
+# make doxygen # generating doxygen documentation
+# make doxygen-doc # same as 'make doxygen'
+# make clean # clean docs generated by doxygen
+# make install # install doxygen documentation
+# make uninstall # uninstall doxygen documentation
+
@@ -114,30 +130,41 @@ host_triplet = @host@
@PTHREADS_TRUE@am__append_2 = libevent_pthreads.pc
@OPENSSL_TRUE@am__append_3 = libevent_openssl.la
@OPENSSL_TRUE@am__append_4 = libevent_openssl.pc
-noinst_PROGRAMS = $(am__EXEEXT_3)
+noinst_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_6)
EXTRA_PROGRAMS = $(am__EXEEXT_1)
-@INSTALL_LIBEVENT_FALSE@am__append_5 = $(EVENT2_EXPORT)
-@BUILD_REGRESS_TRUE@am__append_6 = $(TESTPROGRAMS)
-@BUILD_REGRESS_TRUE@am__append_7 = test/regress
-@BUILD_REGRESS_TRUE@am__append_8 = test/regress.gen.c test/regress.gen.h
-@PTHREADS_TRUE@am__append_9 = libevent_pthreads.la
-@BUILD_WIN32_TRUE@am__append_10 = test/regress_iocp.c
-@OPENSSL_TRUE@am__append_11 = test/regress_ssl.c
-@OPENSSL_TRUE@am__append_12 = $(OPENSSL_INCS)
-@OPENSSL_TRUE@am__append_13 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
-@STRLCPY_IMPL_TRUE@am__append_14 = strlcpy.c
-@SELECT_BACKEND_TRUE@am__append_15 = select.c
-@POLL_BACKEND_TRUE@am__append_16 = poll.c
-@DEVPOLL_BACKEND_TRUE@am__append_17 = devpoll.c
-@KQUEUE_BACKEND_TRUE@am__append_18 = kqueue.c
-@EPOLL_BACKEND_TRUE@am__append_19 = epoll.c
-@EVPORT_BACKEND_TRUE@am__append_20 = evport.c
-@SIGNAL_SUPPORT_TRUE@am__append_21 = signal.c
-@INSTALL_LIBEVENT_FALSE@am__append_22 = $(EVENT1_HDRS)
+@OPENSSL_TRUE@am__append_5 = include/event2/bufferevent_ssl.h
+@INSTALL_LIBEVENT_FALSE@am__append_6 = $(EVENT2_EXPORT)
+@OPENSSL_TRUE@am__append_7 = sample/le-proxy sample/https-client
+@BUILD_WIN32_TRUE@@OPENSSL_TRUE@am__append_8 = -lcrypt32
+@OPENSSL_TRUE@am__append_9 = \
+@OPENSSL_TRUE@ sample/hostcheck.h \
+@OPENSSL_TRUE@ sample/openssl_hostname_validation.h
+
+@BUILD_SAMPLES_TRUE@am__append_10 = $(SAMPLES)
+@BUILD_REGRESS_TRUE@am__append_11 = $(TESTPROGRAMS)
+@BUILD_REGRESS_TRUE@am__append_12 = test/regress
+@BUILD_REGRESS_TRUE@am__append_13 = test/regress.gen.c test/regress.gen.h
+@PTHREADS_TRUE@am__append_14 = libevent_pthreads.la
+@BUILD_WIN32_TRUE@am__append_15 = test/regress_iocp.c
+@OPENSSL_TRUE@am__append_16 = test/regress_ssl.c
+@OPENSSL_TRUE@am__append_17 = $(OPENSSL_INCS)
+@OPENSSL_TRUE@am__append_18 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
+@BUILD_WIN32_TRUE@@THREADS_TRUE@am__append_19 = evthread_win32.c
+@STRLCPY_IMPL_TRUE@am__append_20 = strlcpy.c
+@SELECT_BACKEND_TRUE@am__append_21 = select.c
+@POLL_BACKEND_TRUE@am__append_22 = poll.c
+@DEVPOLL_BACKEND_TRUE@am__append_23 = devpoll.c
+@KQUEUE_BACKEND_TRUE@am__append_24 = kqueue.c
+@EPOLL_BACKEND_TRUE@am__append_25 = epoll.c
+@EVPORT_BACKEND_TRUE@am__append_26 = evport.c
+@SIGNAL_SUPPORT_TRUE@am__append_27 = signal.c
+@INSTALL_LIBEVENT_FALSE@am__append_28 = $(EVENT1_HDRS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_backport_259_ssizet.m4 \
$(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_check_funcs_ex.m4 \
+ $(top_srcdir)/m4/ax_prog_doxygen.m4 \
$(top_srcdir)/m4/libevent_openssl.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
@@ -154,8 +181,26 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h evconfig-private.h
CONFIG_CLEAN_FILES = libevent.pc libevent_openssl.pc \
- libevent_pthreads.pc
+ libevent_pthreads.pc libevent_core.pc libevent_extra.pc
CONFIG_CLEAN_VPATH_FILES =
+@BUILD_REGRESS_TRUE@am__EXEEXT_1 = test/regress$(EXEEXT)
+@OPENSSL_TRUE@am__EXEEXT_2 = sample/le-proxy$(EXEEXT) \
+@OPENSSL_TRUE@ sample/https-client$(EXEEXT)
+am__EXEEXT_3 = sample/dns-example$(EXEEXT) \
+ sample/event-read-fifo$(EXEEXT) sample/hello-world$(EXEEXT) \
+ sample/http-server$(EXEEXT) sample/http-connect$(EXEEXT) \
+ sample/signal-test$(EXEEXT) sample/time-test$(EXEEXT) \
+ $(am__EXEEXT_2)
+@BUILD_SAMPLES_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
+am__EXEEXT_5 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
+ test/bench_http$(EXEEXT) test/bench_httpclient$(EXEEXT) \
+ test/test-changelist$(EXEEXT) test/test-dumpevents$(EXEEXT) \
+ test/test-eof$(EXEEXT) test/test-closed$(EXEEXT) \
+ test/test-fdleak$(EXEEXT) test/test-init$(EXEEXT) \
+ test/test-ratelim$(EXEEXT) test/test-time$(EXEEXT) \
+ test/test-weof$(EXEEXT) test/regress$(EXEEXT)
+@BUILD_REGRESS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_5)
+PROGRAMS = $(noinst_PROGRAMS)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -184,19 +229,20 @@ am__uninstall_files_from_dir = { \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
- "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \
- "$(DESTDIR)$(include_event2dir)" \
+ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(pkgconfigdir)" \
+ "$(DESTDIR)$(includedir)" "$(DESTDIR)$(include_event2dir)" \
"$(DESTDIR)$(include_event2dir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
am__DEPENDENCIES_1 =
-libevent_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1)
+libevent_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
am__libevent_la_SOURCES_DIST = buffer.c bufferevent.c \
bufferevent_filter.c bufferevent_pair.c bufferevent_ratelim.c \
bufferevent_sock.c event.c evmap.c evthread.c evutil.c \
evutil_rand.c evutil_time.c listener.c log.c strlcpy.c \
select.c poll.c devpoll.c kqueue.c epoll.c evport.c signal.c \
- win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
- bufferevent_async.c evdns.c event_tagging.c evrpc.c http.c
+ win32select.c buffer_iocp.c event_iocp.c bufferevent_async.c \
+ evthread_win32.c evdns.c event_tagging.c evrpc.c http.c
@STRLCPY_IMPL_TRUE@am__objects_1 = strlcpy.lo
@SELECT_BACKEND_TRUE@am__objects_2 = select.lo
@POLL_BACKEND_TRUE@am__objects_3 = poll.lo
@@ -205,23 +251,24 @@ am__libevent_la_SOURCES_DIST = buffer.c bufferevent.c \
@EPOLL_BACKEND_TRUE@am__objects_6 = epoll.lo
@EVPORT_BACKEND_TRUE@am__objects_7 = evport.lo
@SIGNAL_SUPPORT_TRUE@am__objects_8 = signal.lo
-@BUILD_WIN32_FALSE@am__objects_9 = $(am__objects_1) $(am__objects_2) \
+@BUILD_WIN32_TRUE@@THREADS_TRUE@am__objects_9 = evthread_win32.lo
+@BUILD_WIN32_FALSE@am__objects_10 = $(am__objects_1) $(am__objects_2) \
@BUILD_WIN32_FALSE@ $(am__objects_3) $(am__objects_4) \
@BUILD_WIN32_FALSE@ $(am__objects_5) $(am__objects_6) \
@BUILD_WIN32_FALSE@ $(am__objects_7) $(am__objects_8)
-@BUILD_WIN32_TRUE@am__objects_9 = win32select.lo evthread_win32.lo \
-@BUILD_WIN32_TRUE@ buffer_iocp.lo event_iocp.lo \
-@BUILD_WIN32_TRUE@ bufferevent_async.lo $(am__objects_1) \
+@BUILD_WIN32_TRUE@am__objects_10 = win32select.lo buffer_iocp.lo \
+@BUILD_WIN32_TRUE@ event_iocp.lo bufferevent_async.lo \
+@BUILD_WIN32_TRUE@ $(am__objects_9) $(am__objects_1) \
@BUILD_WIN32_TRUE@ $(am__objects_2) $(am__objects_3) \
@BUILD_WIN32_TRUE@ $(am__objects_4) $(am__objects_5) \
@BUILD_WIN32_TRUE@ $(am__objects_6) $(am__objects_7) \
@BUILD_WIN32_TRUE@ $(am__objects_8)
-am__objects_10 = buffer.lo bufferevent.lo bufferevent_filter.lo \
+am__objects_11 = buffer.lo bufferevent.lo bufferevent_filter.lo \
bufferevent_pair.lo bufferevent_ratelim.lo bufferevent_sock.lo \
event.lo evmap.lo evthread.lo evutil.lo evutil_rand.lo \
- evutil_time.lo listener.lo log.lo $(am__objects_9)
-am__objects_11 = evdns.lo event_tagging.lo evrpc.lo http.lo
-am_libevent_la_OBJECTS = $(am__objects_10) $(am__objects_11)
+ evutil_time.lo listener.lo log.lo $(am__objects_10)
+am__objects_12 = evdns.lo event_tagging.lo evrpc.lo http.lo
+am_libevent_la_OBJECTS = $(am__objects_11) $(am__objects_12)
libevent_la_OBJECTS = $(am_libevent_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -232,15 +279,16 @@ libevent_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(libevent_la_LDFLAGS) $(LDFLAGS) -o $@
@INSTALL_LIBEVENT_FALSE@am_libevent_la_rpath =
@INSTALL_LIBEVENT_TRUE@am_libevent_la_rpath = -rpath $(libdir)
-libevent_core_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1)
+libevent_core_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
am__libevent_core_la_SOURCES_DIST = buffer.c bufferevent.c \
bufferevent_filter.c bufferevent_pair.c bufferevent_ratelim.c \
bufferevent_sock.c event.c evmap.c evthread.c evutil.c \
evutil_rand.c evutil_time.c listener.c log.c strlcpy.c \
select.c poll.c devpoll.c kqueue.c epoll.c evport.c signal.c \
- win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
- bufferevent_async.c
-am_libevent_core_la_OBJECTS = $(am__objects_10)
+ win32select.c buffer_iocp.c event_iocp.c bufferevent_async.c \
+ evthread_win32.c
+am_libevent_core_la_OBJECTS = $(am__objects_11)
libevent_core_la_OBJECTS = $(am_libevent_core_la_OBJECTS)
libevent_core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -251,7 +299,7 @@ libevent_core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@BUILD_WITH_NO_UNDEFINED_TRUE@am__DEPENDENCIES_2 = libevent_core.la
libevent_extra_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1)
-am_libevent_extra_la_OBJECTS = $(am__objects_11)
+am_libevent_extra_la_OBJECTS = $(am__objects_12)
libevent_extra_la_OBJECTS = $(am_libevent_extra_la_OBJECTS)
libevent_extra_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -284,17 +332,46 @@ libevent_pthreads_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@INSTALL_LIBEVENT_FALSE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath =
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath = \
@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@ -rpath $(libdir)
-@BUILD_REGRESS_TRUE@am__EXEEXT_1 = test/regress$(EXEEXT)
-am__EXEEXT_2 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
- test/bench_http$(EXEEXT) test/bench_httpclient$(EXEEXT) \
- test/test-changelist$(EXEEXT) test/test-dumpevents$(EXEEXT) \
- test/test-eof$(EXEEXT) test/test-closed$(EXEEXT) \
- test/test-fdleak$(EXEEXT) test/test-init$(EXEEXT) \
- test/test-ratelim$(EXEEXT) test/test-time$(EXEEXT) \
- test/test-weof$(EXEEXT) test/regress$(EXEEXT)
-@BUILD_REGRESS_TRUE@am__EXEEXT_3 = $(am__EXEEXT_2)
-PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
+am_sample_dns_example_OBJECTS = sample/dns-example.$(OBJEXT)
+sample_dns_example_OBJECTS = $(am_sample_dns_example_OBJECTS)
+sample_dns_example_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_sample_event_read_fifo_OBJECTS = sample/event-read-fifo.$(OBJEXT)
+sample_event_read_fifo_OBJECTS = $(am_sample_event_read_fifo_OBJECTS)
+sample_event_read_fifo_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ libevent.la
+am_sample_hello_world_OBJECTS = sample/hello-world.$(OBJEXT)
+sample_hello_world_OBJECTS = $(am_sample_hello_world_OBJECTS)
+sample_hello_world_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_sample_http_connect_OBJECTS = sample/http-connect.$(OBJEXT)
+sample_http_connect_OBJECTS = $(am_sample_http_connect_OBJECTS)
+sample_http_connect_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_sample_http_server_OBJECTS = sample/http-server.$(OBJEXT)
+sample_http_server_OBJECTS = $(am_sample_http_server_OBJECTS)
+sample_http_server_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am__sample_https_client_SOURCES_DIST = sample/https-client.c \
+ sample/hostcheck.c sample/openssl_hostname_validation.c
+@OPENSSL_TRUE@am_sample_https_client_OBJECTS = \
+@OPENSSL_TRUE@ sample/https_client-https-client.$(OBJEXT) \
+@OPENSSL_TRUE@ sample/https_client-hostcheck.$(OBJEXT) \
+@OPENSSL_TRUE@ sample/https_client-openssl_hostname_validation.$(OBJEXT)
+sample_https_client_OBJECTS = $(am_sample_https_client_OBJECTS)
+@OPENSSL_TRUE@sample_https_client_DEPENDENCIES = libevent.la \
+@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
+@OPENSSL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__sample_le_proxy_SOURCES_DIST = sample/le-proxy.c
+@OPENSSL_TRUE@am_sample_le_proxy_OBJECTS = \
+@OPENSSL_TRUE@ sample/le_proxy-le-proxy.$(OBJEXT)
+sample_le_proxy_OBJECTS = $(am_sample_le_proxy_OBJECTS)
+@OPENSSL_TRUE@sample_le_proxy_DEPENDENCIES = libevent.la \
+@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
+@OPENSSL_TRUE@ $(am__DEPENDENCIES_1)
+am_sample_signal_test_OBJECTS = sample/signal-test.$(OBJEXT)
+sample_signal_test_OBJECTS = $(am_sample_signal_test_OBJECTS)
+sample_signal_test_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_sample_time_test_OBJECTS = sample/time-test.$(OBJEXT)
+sample_time_test_OBJECTS = $(am_sample_time_test_OBJECTS)
+sample_time_test_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
am_test_bench_OBJECTS = test/bench.$(OBJEXT)
test_bench_OBJECTS = $(am_test_bench_OBJECTS)
test_bench_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
@@ -317,37 +394,36 @@ am__test_regress_SOURCES_DIST = test/regress.c test/regress.gen.c \
test/regress_testutils.c test/regress_testutils.h \
test/regress_util.c test/tinytest.c test/regress_thread.c \
test/regress_zlib.c test/regress_iocp.c test/regress_ssl.c
-@BUILD_WIN32_FALSE@@PTHREADS_TRUE@am__objects_12 = test/test_regress-regress_thread.$(OBJEXT)
-@BUILD_WIN32_TRUE@am__objects_12 = \
-@BUILD_WIN32_TRUE@ test/test_regress-regress_thread.$(OBJEXT)
-@ZLIB_REGRESS_TRUE@am__objects_13 = \
-@ZLIB_REGRESS_TRUE@ test/test_regress-regress_zlib.$(OBJEXT)
-@BUILD_WIN32_TRUE@am__objects_14 = \
-@BUILD_WIN32_TRUE@ test/test_regress-regress_iocp.$(OBJEXT)
-@OPENSSL_TRUE@am__objects_15 = \
-@OPENSSL_TRUE@ test/test_regress-regress_ssl.$(OBJEXT)
-am_test_regress_OBJECTS = test/test_regress-regress.$(OBJEXT) \
- test/test_regress-regress.gen.$(OBJEXT) \
- test/test_regress-regress_buffer.$(OBJEXT) \
- test/test_regress-regress_bufferevent.$(OBJEXT) \
- test/test_regress-regress_dns.$(OBJEXT) \
- test/test_regress-regress_et.$(OBJEXT) \
- test/test_regress-regress_finalize.$(OBJEXT) \
- test/test_regress-regress_http.$(OBJEXT) \
- test/test_regress-regress_listener.$(OBJEXT) \
- test/test_regress-regress_main.$(OBJEXT) \
- test/test_regress-regress_minheap.$(OBJEXT) \
- test/test_regress-regress_rpc.$(OBJEXT) \
- test/test_regress-regress_testutils.$(OBJEXT) \
- test/test_regress-regress_util.$(OBJEXT) \
- test/test_regress-tinytest.$(OBJEXT) $(am__objects_12) \
- $(am__objects_13) $(am__objects_14) $(am__objects_15)
+@BUILD_WIN32_FALSE@@PTHREADS_TRUE@am__objects_13 = test/regress-regress_thread.$(OBJEXT)
+@BUILD_WIN32_TRUE@@THREADS_TRUE@am__objects_13 = test/regress-regress_thread.$(OBJEXT)
+@PTHREADS_TRUE@@THREADS_FALSE@am__objects_13 = test/regress-regress_thread.$(OBJEXT)
+@ZLIB_REGRESS_TRUE@am__objects_14 = \
+@ZLIB_REGRESS_TRUE@ test/regress-regress_zlib.$(OBJEXT)
+@BUILD_WIN32_TRUE@am__objects_15 = \
+@BUILD_WIN32_TRUE@ test/regress-regress_iocp.$(OBJEXT)
+@OPENSSL_TRUE@am__objects_16 = test/regress-regress_ssl.$(OBJEXT)
+am_test_regress_OBJECTS = test/regress-regress.$(OBJEXT) \
+ test/regress-regress.gen.$(OBJEXT) \
+ test/regress-regress_buffer.$(OBJEXT) \
+ test/regress-regress_bufferevent.$(OBJEXT) \
+ test/regress-regress_dns.$(OBJEXT) \
+ test/regress-regress_et.$(OBJEXT) \
+ test/regress-regress_finalize.$(OBJEXT) \
+ test/regress-regress_http.$(OBJEXT) \
+ test/regress-regress_listener.$(OBJEXT) \
+ test/regress-regress_main.$(OBJEXT) \
+ test/regress-regress_minheap.$(OBJEXT) \
+ test/regress-regress_rpc.$(OBJEXT) \
+ test/regress-regress_testutils.$(OBJEXT) \
+ test/regress-regress_util.$(OBJEXT) \
+ test/regress-tinytest.$(OBJEXT) $(am__objects_13) \
+ $(am__objects_14) $(am__objects_15) $(am__objects_16)
test_regress_OBJECTS = $(am_test_regress_OBJECTS)
-am__DEPENDENCIES_3 = $(am__append_9)
+am__DEPENDENCIES_3 = $(am__append_14)
@OPENSSL_TRUE@am__DEPENDENCIES_4 = libevent_openssl.la \
@OPENSSL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la \
- $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent_core.la \
+ libevent_extra.la $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_4)
test_regress_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -395,7 +471,64 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = $(DEPDIR)/epoll_sub.Plo ./$(DEPDIR)/buffer.Plo \
+ ./$(DEPDIR)/buffer_iocp.Plo ./$(DEPDIR)/bufferevent.Plo \
+ ./$(DEPDIR)/bufferevent_async.Plo \
+ ./$(DEPDIR)/bufferevent_filter.Plo \
+ ./$(DEPDIR)/bufferevent_pair.Plo \
+ ./$(DEPDIR)/bufferevent_ratelim.Plo \
+ ./$(DEPDIR)/bufferevent_sock.Plo ./$(DEPDIR)/devpoll.Plo \
+ ./$(DEPDIR)/epoll.Plo ./$(DEPDIR)/evdns.Plo \
+ ./$(DEPDIR)/event.Plo ./$(DEPDIR)/event_iocp.Plo \
+ ./$(DEPDIR)/event_tagging.Plo ./$(DEPDIR)/evmap.Plo \
+ ./$(DEPDIR)/evport.Plo ./$(DEPDIR)/evrpc.Plo \
+ ./$(DEPDIR)/evthread.Plo ./$(DEPDIR)/evthread_pthread.Plo \
+ ./$(DEPDIR)/evthread_win32.Plo ./$(DEPDIR)/evutil.Plo \
+ ./$(DEPDIR)/evutil_rand.Plo ./$(DEPDIR)/evutil_time.Plo \
+ ./$(DEPDIR)/http.Plo ./$(DEPDIR)/kqueue.Plo \
+ ./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo \
+ ./$(DEPDIR)/listener.Plo ./$(DEPDIR)/log.Plo \
+ ./$(DEPDIR)/poll.Plo ./$(DEPDIR)/select.Plo \
+ ./$(DEPDIR)/signal.Plo ./$(DEPDIR)/strlcpy.Plo \
+ ./$(DEPDIR)/win32select.Plo sample/$(DEPDIR)/dns-example.Po \
+ sample/$(DEPDIR)/event-read-fifo.Po \
+ sample/$(DEPDIR)/hello-world.Po \
+ sample/$(DEPDIR)/http-connect.Po \
+ sample/$(DEPDIR)/http-server.Po \
+ sample/$(DEPDIR)/https_client-hostcheck.Po \
+ sample/$(DEPDIR)/https_client-https-client.Po \
+ sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po \
+ sample/$(DEPDIR)/le_proxy-le-proxy.Po \
+ sample/$(DEPDIR)/signal-test.Po sample/$(DEPDIR)/time-test.Po \
+ test/$(DEPDIR)/bench.Po test/$(DEPDIR)/bench_cascade.Po \
+ test/$(DEPDIR)/bench_http.Po \
+ test/$(DEPDIR)/bench_httpclient.Po \
+ test/$(DEPDIR)/regress-regress.Po \
+ test/$(DEPDIR)/regress-regress.gen.Po \
+ test/$(DEPDIR)/regress-regress_buffer.Po \
+ test/$(DEPDIR)/regress-regress_bufferevent.Po \
+ test/$(DEPDIR)/regress-regress_dns.Po \
+ test/$(DEPDIR)/regress-regress_et.Po \
+ test/$(DEPDIR)/regress-regress_finalize.Po \
+ test/$(DEPDIR)/regress-regress_http.Po \
+ test/$(DEPDIR)/regress-regress_iocp.Po \
+ test/$(DEPDIR)/regress-regress_listener.Po \
+ test/$(DEPDIR)/regress-regress_main.Po \
+ test/$(DEPDIR)/regress-regress_minheap.Po \
+ test/$(DEPDIR)/regress-regress_rpc.Po \
+ test/$(DEPDIR)/regress-regress_ssl.Po \
+ test/$(DEPDIR)/regress-regress_testutils.Po \
+ test/$(DEPDIR)/regress-regress_thread.Po \
+ test/$(DEPDIR)/regress-regress_util.Po \
+ test/$(DEPDIR)/regress-regress_zlib.Po \
+ test/$(DEPDIR)/regress-tinytest.Po \
+ test/$(DEPDIR)/test-changelist.Po \
+ test/$(DEPDIR)/test-closed.Po \
+ test/$(DEPDIR)/test-dumpevents.Po test/$(DEPDIR)/test-eof.Po \
+ test/$(DEPDIR)/test-fdleak.Po test/$(DEPDIR)/test-init.Po \
+ test/$(DEPDIR)/test-ratelim.Po test/$(DEPDIR)/test-time.Po \
+ test/$(DEPDIR)/test-weof.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -417,7 +550,12 @@ am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libevent_la_SOURCES) $(libevent_core_la_SOURCES) \
$(libevent_extra_la_SOURCES) $(libevent_openssl_la_SOURCES) \
- $(libevent_pthreads_la_SOURCES) $(test_bench_SOURCES) \
+ $(libevent_pthreads_la_SOURCES) $(sample_dns_example_SOURCES) \
+ $(sample_event_read_fifo_SOURCES) \
+ $(sample_hello_world_SOURCES) $(sample_http_connect_SOURCES) \
+ $(sample_http_server_SOURCES) $(sample_https_client_SOURCES) \
+ $(sample_le_proxy_SOURCES) $(sample_signal_test_SOURCES) \
+ $(sample_time_test_SOURCES) $(test_bench_SOURCES) \
$(test_bench_cascade_SOURCES) $(test_bench_http_SOURCES) \
$(test_bench_httpclient_SOURCES) $(test_regress_SOURCES) \
$(test_test_changelist_SOURCES) $(test_test_closed_SOURCES) \
@@ -429,9 +567,16 @@ DIST_SOURCES = $(am__libevent_la_SOURCES_DIST) \
$(am__libevent_core_la_SOURCES_DIST) \
$(libevent_extra_la_SOURCES) \
$(am__libevent_openssl_la_SOURCES_DIST) \
- $(am__libevent_pthreads_la_SOURCES_DIST) $(test_bench_SOURCES) \
- $(test_bench_cascade_SOURCES) $(test_bench_http_SOURCES) \
- $(test_bench_httpclient_SOURCES) \
+ $(am__libevent_pthreads_la_SOURCES_DIST) \
+ $(sample_dns_example_SOURCES) \
+ $(sample_event_read_fifo_SOURCES) \
+ $(sample_hello_world_SOURCES) $(sample_http_connect_SOURCES) \
+ $(sample_http_server_SOURCES) \
+ $(am__sample_https_client_SOURCES_DIST) \
+ $(am__sample_le_proxy_SOURCES_DIST) \
+ $(sample_signal_test_SOURCES) $(sample_time_test_SOURCES) \
+ $(test_bench_SOURCES) $(test_bench_cascade_SOURCES) \
+ $(test_bench_http_SOURCES) $(test_bench_httpclient_SOURCES) \
$(am__test_regress_SOURCES_DIST) \
$(test_test_changelist_SOURCES) $(test_test_closed_SOURCES) \
$(test_test_dumpevents_SOURCES) $(test_test_eof_SOURCES) \
@@ -443,13 +588,15 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+man3dir = $(mandir)/man3
+NROFF = nroff
+MANS = $(man3_MANS)
DATA = $(pkgconfig_DATA)
am__include_HEADERS_DIST = include/evdns.h include/event.h \
include/evhttp.h include/evrpc.h include/evutil.h
am__include_event2_HEADERS_DIST = include/event2/buffer.h \
include/event2/buffer_compat.h include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
- include/event2/bufferevent_ssl.h \
include/event2/bufferevent_struct.h include/event2/dns.h \
include/event2/dns_compat.h include/event2/dns_struct.h \
include/event2/event.h include/event2/event_compat.h \
@@ -459,11 +606,11 @@ am__include_event2_HEADERS_DIST = include/event2/buffer.h \
include/event2/rpc.h include/event2/rpc_compat.h \
include/event2/rpc_struct.h include/event2/tag.h \
include/event2/tag_compat.h include/event2/thread.h \
- include/event2/util.h include/event2/visibility.h
+ include/event2/util.h include/event2/visibility.h \
+ include/event2/bufferevent_ssl.h
am__noinst_HEADERS_DIST = include/event2/buffer.h \
include/event2/buffer_compat.h include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
- include/event2/bufferevent_ssl.h \
include/event2/bufferevent_struct.h include/event2/dns.h \
include/event2/dns_compat.h include/event2/dns_struct.h \
include/event2/event.h include/event2/event_compat.h \
@@ -474,25 +621,27 @@ am__noinst_HEADERS_DIST = include/event2/buffer.h \
include/event2/rpc_struct.h include/event2/tag.h \
include/event2/tag_compat.h include/event2/thread.h \
include/event2/util.h include/event2/visibility.h \
- test/regress.h test/regress_thread.h test/tinytest.h \
- test/tinytest_local.h test/tinytest_macros.h \
- WIN32-Code/nmake/evconfig-private.h \
- WIN32-Code/nmake/event2/event-config.h WIN32-Code/tree.h \
+ include/event2/bufferevent_ssl.h sample/hostcheck.h \
+ sample/openssl_hostname_validation.h test/regress.h \
+ test/regress_thread.h test/tinytest.h test/tinytest_local.h \
+ test/tinytest_macros.h WIN32-Code/nmake/evconfig-private.h \
+ WIN32-Code/nmake/event2/event-config.h WIN32-Code/getopt.h \
+ WIN32-Code/getopt.c WIN32-Code/getopt_long.c WIN32-Code/tree.h \
bufferevent-internal.h changelist-internal.h \
compat/sys/queue.h defer-internal.h epolltable-internal.h \
- evbuffer-internal.h evconfig-private.h event-internal.h \
- evmap-internal.h evrpc-internal.h evsignal-internal.h \
- evthread-internal.h ht-internal.h http-internal.h \
- iocp-internal.h ipv6-internal.h kqueue-internal.h \
- log-internal.h minheap-internal.h mm-internal.h \
- ratelim-internal.h strlcpy-internal.h time-internal.h \
- util-internal.h include/evdns.h include/event.h \
- include/evhttp.h include/evrpc.h include/evutil.h
+ evbuffer-internal.h event-internal.h evmap-internal.h \
+ evrpc-internal.h evsignal-internal.h evthread-internal.h \
+ ht-internal.h http-internal.h iocp-internal.h ipv6-internal.h \
+ kqueue-internal.h log-internal.h minheap-internal.h \
+ mm-internal.h ratelim-internal.h strlcpy-internal.h \
+ time-internal.h util-internal.h openssl-compat.h \
+ include/evdns.h include/event.h include/evhttp.h \
+ include/evrpc.h include/evutil.h
HEADERS = $(include_HEADERS) $(include_event2_HEADERS) \
$(nodist_include_event2_HEADERS) $(nodist_noinst_HEADERS) \
$(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
- $(LISP)config.h.in evconfig-private.h.in
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+ config.h.in evconfig-private.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@@ -509,9 +658,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
AM_RECURSIVE_TARGETS = cscope check recheck
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
@@ -668,6 +814,7 @@ am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
RECHECK_LOGS = $(TEST_LOGS)
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
@@ -690,20 +837,23 @@ TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(srcdir)/evconfig-private.h.in $(srcdir)/include/include.am \
- $(srcdir)/libevent.pc.in $(srcdir)/libevent_openssl.pc.in \
- $(srcdir)/libevent_pthreads.pc.in $(srcdir)/test/include.am \
- $(top_srcdir)/build-aux/compile \
+ $(srcdir)/doxygen.am $(srcdir)/evconfig-private.h.in \
+ $(srcdir)/include/include.am $(srcdir)/libevent.pc.in \
+ $(srcdir)/libevent_core.pc.in $(srcdir)/libevent_extra.pc.in \
+ $(srcdir)/libevent_openssl.pc.in \
+ $(srcdir)/libevent_pthreads.pc.in $(srcdir)/sample/include.am \
+ $(srcdir)/test/include.am $(top_srcdir)/build-aux/compile \
$(top_srcdir)/build-aux/config.guess \
$(top_srcdir)/build-aux/config.sub \
$(top_srcdir)/build-aux/depcomp \
$(top_srcdir)/build-aux/install-sh \
$(top_srcdir)/build-aux/ltmain.sh \
$(top_srcdir)/build-aux/missing \
- $(top_srcdir)/build-aux/test-driver ChangeLog build-aux/ar-lib \
- build-aux/compile build-aux/config.guess build-aux/config.sub \
- build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
- build-aux/missing build-aux/ylwrap epoll_sub.c
+ $(top_srcdir)/build-aux/test-driver ChangeLog README.md \
+ build-aux/ar-lib build-aux/compile build-aux/config.guess \
+ build-aux/config.sub build-aux/depcomp build-aux/install-sh \
+ build-aux/ltmain.sh build-aux/missing build-aux/ylwrap compile \
+ config.guess config.sub depcomp epoll_sub.c ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -717,6 +867,8 @@ am__post_remove_distdir = $(am__remove_distdir)
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -734,16 +886,43 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EV_LIB_GDI = @EV_LIB_GDI@
EV_LIB_WS32 = @EV_LIB_WS32@
EXEEXT = @EXEEXT@
@@ -756,9 +935,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LEP_CFLAGS = @LEP_CFLAGS@
-LEP_CPPFLAGS = @LEP_CPPFLAGS@
-LEP_LDFLAGS = @LEP_LDFLAGS@
LIBEVENT_GC_SECTIONS = @LIBEVENT_GC_SECTIONS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -791,7 +967,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_9)
+PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_14)
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -844,6 +1020,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -854,8 +1031,8 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# 'foreign' means that we're not enforcing GNU package rules strictly.
-# '1.9' means that we need automake 1.9 or later (and we do).
-AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
+# '1.13' means that we need automake 1.13 or later (and we do).
+AUTOMAKE_OPTIONS = foreign 1.13 subdir-objects
ACLOCAL_AMFLAGS = -I m4
# This is the "Release" of the Libevent ABI. It takes precedence over
@@ -886,7 +1063,7 @@ RELEASE = -release 2.1
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 5:0:0
+VERSION_INFO = 7:1:0
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
@@ -917,6 +1094,13 @@ VERSION_INFO = 5:0:0
# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
# 2.1.4-alpha -- 2.1 4:0:0 (ABI changed slightly)
# 2.1.5-beta -- 2.1 5:0:0 (ABI changed slightly)
+# 2.1.6-beta -- 2.1 6:0:0 (ABI changed slightly)
+# 2.1.7-beta -- 2.1 6:1:0 (ABI changed slightly)
+# 2.1.8-stable-- 2.1 6:2:0 (No ABI change)
+# 2.1.9-beta-- 2.1 6:3:0 (No ABI change)
+# 2.1.10-stable-- 2.1 6:4:0 (No ABI change, WRONG)
+# 2.1.11-stable-- 2.1 7:0:0 (ABI changed)
+# 2.1.12-stable-- 2.1 7:1:0 (No ABI change)
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
@@ -937,7 +1121,8 @@ VERSION_INFO = 5:0:0
# series won't be binary-compatible.
@INSTALL_LIBEVENT_TRUE@dist_bin_SCRIPTS = event_rpcgen.py
pkgconfigdir = $(libdir)/pkgconfig
-LIBEVENT_PKGCONFIG = libevent.pc $(am__append_2) $(am__append_4)
+LIBEVENT_PKGCONFIG = libevent.pc libevent_core.pc libevent_extra.pc \
+ $(am__append_2) $(am__append_4)
# These sources are conditionally added by configure.ac or conditionally
# included from other files.
@@ -945,67 +1130,109 @@ PLATFORM_DEPENDENT_SRC = \
arc4random.c \
epoll_sub.c
+CMAKE_FILES = \
+ cmake/AddCompilerFlags.cmake \
+ cmake/AddEventLibrary.cmake \
+ cmake/CheckConstExists.cmake \
+ cmake/CheckFileOffsetBits.c \
+ cmake/CheckFileOffsetBits.cmake \
+ cmake/CheckFunctionKeywords.cmake \
+ cmake/CheckPrototypeDefinition.c.in \
+ cmake/CheckPrototypeDefinition.cmake \
+ cmake/CheckWorkingKqueue.cmake \
+ cmake/CodeCoverage.cmake \
+ cmake/COPYING-CMAKE-SCRIPTS \
+ cmake/Copyright.txt \
+ cmake/LibeventConfig.cmake.in \
+ cmake/LibeventConfigVersion.cmake.in \
+ cmake/Macros.cmake \
+ cmake/Uninstall.cmake.in \
+ cmake/UseDoxygen.cmake \
+ cmake/VersionViaGit.cmake \
+ event-config.h.cmake \
+ evconfig-private.h.cmake \
+ CMakeLists.txt
+
EXTRA_DIST = ChangeLog-1.4 ChangeLog-2.0 Doxyfile LICENSE \
Makefile.nmake test/Makefile.nmake autogen.sh event_rpcgen.py \
libevent.pc.in make-event-config.sed whatsnew-2.0.txt \
- whatsnew-2.1.txt $(PLATFORM_DEPENDENT_SRC) \
- test/check-dumpevents.py test/regress.gen.c test/regress.gen.h \
- test/regress.rpc test/rpcgen_wrapper.sh test/test.sh
+ whatsnew-2.1.txt README.md $(CMAKE_FILES) \
+ $(PLATFORM_DEPENDENT_SRC) test/check-dumpevents.py \
+ test/regress.gen.c test/regress.gen.h test/regress.rpc \
+ test/rpcgen_wrapper.sh test/print-winsock-errors.c \
+ test/test.sh
LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la \
$(am__append_1) $(am__append_3)
@INSTALL_LIBEVENT_TRUE@lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
@INSTALL_LIBEVENT_TRUE@pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
@INSTALL_LIBEVENT_FALSE@noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
EXTRA_SOURCE =
-noinst_HEADERS = $(am__append_5) test/regress.h test/regress_thread.h \
- test/tinytest.h test/tinytest_local.h test/tinytest_macros.h \
- WIN32-Code/nmake/evconfig-private.h \
- WIN32-Code/nmake/event2/event-config.h WIN32-Code/tree.h \
+noinst_HEADERS = $(am__append_6) $(am__append_9) test/regress.h \
+ test/regress_thread.h test/tinytest.h test/tinytest_local.h \
+ test/tinytest_macros.h WIN32-Code/nmake/evconfig-private.h \
+ WIN32-Code/nmake/event2/event-config.h WIN32-Code/getopt.h \
+ WIN32-Code/getopt.c WIN32-Code/getopt_long.c WIN32-Code/tree.h \
bufferevent-internal.h changelist-internal.h \
compat/sys/queue.h defer-internal.h epolltable-internal.h \
- evbuffer-internal.h evconfig-private.h event-internal.h \
- evmap-internal.h evrpc-internal.h evsignal-internal.h \
- evthread-internal.h ht-internal.h http-internal.h \
- iocp-internal.h ipv6-internal.h kqueue-internal.h \
- log-internal.h minheap-internal.h mm-internal.h \
- ratelim-internal.h ratelim-internal.h strlcpy-internal.h \
- time-internal.h util-internal.h $(am__append_22)
+ evbuffer-internal.h event-internal.h evmap-internal.h \
+ evrpc-internal.h evsignal-internal.h evthread-internal.h \
+ ht-internal.h http-internal.h iocp-internal.h ipv6-internal.h \
+ kqueue-internal.h log-internal.h minheap-internal.h \
+ mm-internal.h ratelim-internal.h ratelim-internal.h \
+ strlcpy-internal.h time-internal.h util-internal.h \
+ openssl-compat.h $(am__append_28)
CLEANFILES = test/rpcgen-attempted
-DISTCLEANFILES = test/test-script.sh test/regress.gen.c \
- test/regress.gen.h *~ libevent.pc \
+DISTCLEANFILES = test/regress.gen.c test/regress.gen.h *~ libevent.pc \
+ libevent_core.pc libevent_extra.pc \
./include/event2/event-config.h
-BUILT_SOURCES = $(am__append_8) include/event2/event-config.h
+BUILT_SOURCES = $(am__append_13) include/event2/event-config.h
include_event2dir = $(includedir)/event2
-EVENT2_EXPORT = \
- include/event2/buffer.h \
- include/event2/buffer_compat.h \
+EVENT2_EXPORT = include/event2/buffer.h include/event2/buffer_compat.h \
include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
- include/event2/bufferevent_ssl.h \
- include/event2/bufferevent_struct.h \
- include/event2/dns.h \
- include/event2/dns_compat.h \
- include/event2/dns_struct.h \
- include/event2/event.h \
- include/event2/event_compat.h \
- include/event2/event_struct.h \
- include/event2/http.h \
- include/event2/http_compat.h \
- include/event2/http_struct.h \
- include/event2/keyvalq_struct.h \
- include/event2/listener.h \
- include/event2/rpc.h \
- include/event2/rpc_compat.h \
- include/event2/rpc_struct.h \
- include/event2/tag.h \
- include/event2/tag_compat.h \
- include/event2/thread.h \
- include/event2/util.h \
- include/event2/visibility.h
-
+ include/event2/bufferevent_struct.h include/event2/dns.h \
+ include/event2/dns_compat.h include/event2/dns_struct.h \
+ include/event2/event.h include/event2/event_compat.h \
+ include/event2/event_struct.h include/event2/http.h \
+ include/event2/http_compat.h include/event2/http_struct.h \
+ include/event2/keyvalq_struct.h include/event2/listener.h \
+ include/event2/rpc.h include/event2/rpc_compat.h \
+ include/event2/rpc_struct.h include/event2/tag.h \
+ include/event2/tag_compat.h include/event2/thread.h \
+ include/event2/util.h include/event2/visibility.h \
+ $(am__append_5)
@INSTALL_LIBEVENT_TRUE@include_event2_HEADERS = $(EVENT2_EXPORT)
@INSTALL_LIBEVENT_TRUE@nodist_include_event2_HEADERS = include/event2/event-config.h
@INSTALL_LIBEVENT_FALSE@nodist_noinst_HEADERS = include/event2/event-config.h
+SAMPLES = sample/dns-example sample/event-read-fifo sample/hello-world \
+ sample/http-server sample/http-connect sample/signal-test \
+ sample/time-test $(am__append_7)
+@OPENSSL_TRUE@sample_le_proxy_SOURCES = sample/le-proxy.c
+@OPENSSL_TRUE@sample_le_proxy_LDADD = libevent.la libevent_openssl.la $(OPENSSL_LIBS) $(OPENSSL_LIBADD)
+@OPENSSL_TRUE@sample_le_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+@OPENSSL_TRUE@sample_https_client_SOURCES = \
+@OPENSSL_TRUE@ sample/https-client.c \
+@OPENSSL_TRUE@ sample/hostcheck.c \
+@OPENSSL_TRUE@ sample/openssl_hostname_validation.c
+
+@OPENSSL_TRUE@sample_https_client_LDADD = libevent.la \
+@OPENSSL_TRUE@ libevent_openssl.la $(OPENSSL_LIBS) \
+@OPENSSL_TRUE@ $(OPENSSL_LIBADD) $(am__append_8)
+@OPENSSL_TRUE@sample_https_client_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+sample_event_read_fifo_SOURCES = sample/event-read-fifo.c
+sample_event_read_fifo_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_time_test_SOURCES = sample/time-test.c
+sample_time_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_signal_test_SOURCES = sample/signal-test.c
+sample_signal_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_dns_example_SOURCES = sample/dns-example.c
+sample_dns_example_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_hello_world_SOURCES = sample/hello-world.c
+sample_hello_world_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_http_server_SOURCES = sample/http-server.c
+sample_http_server_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_http_connect_SOURCES = sample/http-connect.c
+sample_http_connect_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
regress_CPPFLAGS = -DTINYTEST_LOCAL
TESTPROGRAMS = \
test/bench \
@@ -1023,10 +1250,20 @@ TESTPROGRAMS = \
test/test-weof \
test/regress
-
-# We need to copy this file, since automake doesn't want us to use top_srcdir
-# in TESTS.
-TESTS = test/test-script.sh
+TESTS = \
+ test_runner_epoll \
+ test_runner_select \
+ test_runner_kqueue \
+ test_runner_evport \
+ test_runner_devpoll \
+ test_runner_poll \
+ test_runner_win32 \
+ test_runner_timerfd \
+ test_runner_changelist \
+ test_runner_timerfd_changelist
+
+LOG_COMPILER = true
+TESTS_COMPILER = true
test_test_init_SOURCES = test/test-init.c
test_test_init_LDADD = libevent_core.la
test_test_dumpevents_SOURCES = test/test-dumpevents.c
@@ -1053,14 +1290,15 @@ test_regress_SOURCES = test/regress.c test/regress.gen.c \
test/regress_minheap.c test/regress_rpc.c \
test/regress_testutils.c test/regress_testutils.h \
test/regress_util.c test/tinytest.c $(regress_thread_SOURCES) \
- $(regress_zlib_SOURCES) $(am__append_10) $(am__append_11)
-@BUILD_WIN32_TRUE@regress_thread_SOURCES = test/regress_thread.c
+ $(regress_zlib_SOURCES) $(am__append_15) $(am__append_16)
+@BUILD_WIN32_TRUE@@THREADS_TRUE@regress_thread_SOURCES = test/regress_thread.c
@PTHREADS_TRUE@regress_thread_SOURCES = test/regress_thread.c
@ZLIB_REGRESS_TRUE@regress_zlib_SOURCES = test/regress_zlib.c
-test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la \
- $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_13)
+test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la \
+ libevent_extra.la $(PTHREAD_LIBS) $(ZLIB_LIBS) \
+ $(am__append_18)
test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) \
- $(ZLIB_CFLAGS) -Itest $(am__append_12)
+ $(ZLIB_CFLAGS) -Itest $(am__append_17)
test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
test_bench_SOURCES = test/bench.c
test_bench_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
@@ -1070,20 +1308,20 @@ test_bench_http_SOURCES = test/bench_http.c
test_bench_http_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
test_bench_httpclient_SOURCES = test/bench_httpclient.c
test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
+@BUILD_WIN32_FALSE@SYS_CORE_LIBS =
+@BUILD_WIN32_TRUE@SYS_CORE_LIBS = -liphlpapi
@BUILD_WIN32_FALSE@SYS_LIBS =
-#include sample/include.am
@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
-@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_14) $(am__append_15) \
-@BUILD_WIN32_FALSE@ $(am__append_16) $(am__append_17) \
-@BUILD_WIN32_FALSE@ $(am__append_18) $(am__append_19) \
-@BUILD_WIN32_FALSE@ $(am__append_20) $(am__append_21)
-@BUILD_WIN32_TRUE@SYS_SRC = win32select.c evthread_win32.c \
-@BUILD_WIN32_TRUE@ buffer_iocp.c event_iocp.c \
-@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_14) \
-@BUILD_WIN32_TRUE@ $(am__append_15) $(am__append_16) \
-@BUILD_WIN32_TRUE@ $(am__append_17) $(am__append_18) \
-@BUILD_WIN32_TRUE@ $(am__append_19) $(am__append_20) \
-@BUILD_WIN32_TRUE@ $(am__append_21)
+@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_20) $(am__append_21) \
+@BUILD_WIN32_FALSE@ $(am__append_22) $(am__append_23) \
+@BUILD_WIN32_FALSE@ $(am__append_24) $(am__append_25) \
+@BUILD_WIN32_FALSE@ $(am__append_26) $(am__append_27)
+@BUILD_WIN32_TRUE@SYS_SRC = win32select.c buffer_iocp.c event_iocp.c \
+@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_19) \
+@BUILD_WIN32_TRUE@ $(am__append_20) $(am__append_21) \
+@BUILD_WIN32_TRUE@ $(am__append_22) $(am__append_23) \
+@BUILD_WIN32_TRUE@ $(am__append_24) $(am__append_25) \
+@BUILD_WIN32_TRUE@ $(am__append_26) $(am__append_27)
@BUILD_WIN32_FALSE@SYS_INCLUDES =
@BUILD_WIN32_TRUE@SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
CORE_SRC = \
@@ -1113,15 +1351,15 @@ EXTRAS_SRC = \
@BUILD_WITH_NO_UNDEFINED_TRUE@NO_UNDEFINED = -no-undefined
@BUILD_WITH_NO_UNDEFINED_FALSE@MAYBE_CORE =
@BUILD_WITH_NO_UNDEFINED_TRUE@MAYBE_CORE = libevent_core.la
-AM_CFLAGS = $(LEP_CFLAGS)
-AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES) $(LEP_CPPFLAGS)
-AM_LDFLAGS = $(LEP_CFLAGS)
+AM_CFLAGS = $(LIBEVENT_CFLAGS)
+AM_CPPFLAGS = -I$(srcdir)/compat -I./include -I$(srcdir)/include $(SYS_INCLUDES) $(LIBEVENT_CPPFLAGS)
+AM_LDFLAGS = $(LIBEVENT_LDFLAGS)
GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED) $(AM_LDFLAGS)
libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC)
-libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) $(SYS_CORE_LIBS)
libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
libevent_core_la_SOURCES = $(CORE_SRC)
-libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) $(SYS_CORE_LIBS)
libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
@PTHREADS_TRUE@libevent_pthreads_la_SOURCES = evthread_pthread.c
@PTHREADS_TRUE@libevent_pthreads_la_LIBADD = $(MAYBE_CORE)
@@ -1141,6 +1379,13 @@ EVENT1_HDRS = \
include/evutil.h
@INSTALL_LIBEVENT_TRUE@include_HEADERS = $(EVENT1_HDRS)
+
+# integrate doxygen with automake targets
+@ENABLE_DOXYGEN_TRUE@man3_MANS = @DX_DOCDIR@/man/man3/*
+
+# Docs will be installed. It may be one or more docs supported
+# by doxygen, but does not include 'man'.
+@ENABLE_DOXYGEN_TRUE@docdirs = $(DX_INSTALL_DOCS)
all: $(BUILT_SOURCES) config.h evconfig-private.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -1148,7 +1393,7 @@ all: $(BUILT_SOURCES) config.h evconfig-private.h
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/include/include.am $(srcdir)/test/include.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/include/include.am $(srcdir)/sample/include.am $(srcdir)/test/include.am $(srcdir)/doxygen.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -1167,10 +1412,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
-$(srcdir)/include/include.am $(srcdir)/test/include.am $(am__empty):
+$(srcdir)/include/include.am $(srcdir)/sample/include.am $(srcdir)/test/include.am $(srcdir)/doxygen.am $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -1209,6 +1454,19 @@ libevent_openssl.pc: $(top_builddir)/config.status $(srcdir)/libevent_openssl.pc
cd $(top_builddir) && $(SHELL) ./config.status $@
libevent_pthreads.pc: $(top_builddir)/config.status $(srcdir)/libevent_pthreads.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
+libevent_core.pc: $(top_builddir)/config.status $(srcdir)/libevent_core.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+libevent_extra.pc: $(top_builddir)/config.status $(srcdir)/libevent_extra.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@@ -1270,15 +1528,70 @@ libevent_openssl.la: $(libevent_openssl_la_OBJECTS) $(libevent_openssl_la_DEPEND
libevent_pthreads.la: $(libevent_pthreads_la_OBJECTS) $(libevent_pthreads_la_DEPENDENCIES) $(EXTRA_libevent_pthreads_la_DEPENDENCIES)
$(AM_V_CCLD)$(libevent_pthreads_la_LINK) $(am_libevent_pthreads_la_rpath) $(libevent_pthreads_la_OBJECTS) $(libevent_pthreads_la_LIBADD) $(LIBS)
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
+sample/$(am__dirstamp):
+ @$(MKDIR_P) sample
+ @: > sample/$(am__dirstamp)
+sample/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) sample/$(DEPDIR)
+ @: > sample/$(DEPDIR)/$(am__dirstamp)
+sample/dns-example.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/dns-example$(EXEEXT): $(sample_dns_example_OBJECTS) $(sample_dns_example_DEPENDENCIES) $(EXTRA_sample_dns_example_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/dns-example$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_dns_example_OBJECTS) $(sample_dns_example_LDADD) $(LIBS)
+sample/event-read-fifo.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/event-read-fifo$(EXEEXT): $(sample_event_read_fifo_OBJECTS) $(sample_event_read_fifo_DEPENDENCIES) $(EXTRA_sample_event_read_fifo_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/event-read-fifo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_event_read_fifo_OBJECTS) $(sample_event_read_fifo_LDADD) $(LIBS)
+sample/hello-world.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/hello-world$(EXEEXT): $(sample_hello_world_OBJECTS) $(sample_hello_world_DEPENDENCIES) $(EXTRA_sample_hello_world_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/hello-world$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_hello_world_OBJECTS) $(sample_hello_world_LDADD) $(LIBS)
+sample/http-connect.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/http-connect$(EXEEXT): $(sample_http_connect_OBJECTS) $(sample_http_connect_DEPENDENCIES) $(EXTRA_sample_http_connect_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/http-connect$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_http_connect_OBJECTS) $(sample_http_connect_LDADD) $(LIBS)
+sample/http-server.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/http-server$(EXEEXT): $(sample_http_server_OBJECTS) $(sample_http_server_DEPENDENCIES) $(EXTRA_sample_http_server_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/http-server$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_http_server_OBJECTS) $(sample_http_server_LDADD) $(LIBS)
+sample/https_client-https-client.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/https_client-hostcheck.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/https_client-openssl_hostname_validation.$(OBJEXT): \
+ sample/$(am__dirstamp) sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/https-client$(EXEEXT): $(sample_https_client_OBJECTS) $(sample_https_client_DEPENDENCIES) $(EXTRA_sample_https_client_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/https-client$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_https_client_OBJECTS) $(sample_https_client_LDADD) $(LIBS)
+sample/le_proxy-le-proxy.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/le-proxy$(EXEEXT): $(sample_le_proxy_OBJECTS) $(sample_le_proxy_DEPENDENCIES) $(EXTRA_sample_le_proxy_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/le-proxy$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_le_proxy_OBJECTS) $(sample_le_proxy_LDADD) $(LIBS)
+sample/signal-test.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/signal-test$(EXEEXT): $(sample_signal_test_OBJECTS) $(sample_signal_test_DEPENDENCIES) $(EXTRA_sample_signal_test_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/signal-test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_signal_test_OBJECTS) $(sample_signal_test_LDADD) $(LIBS)
+sample/time-test.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+
+sample/time-test$(EXEEXT): $(sample_time_test_OBJECTS) $(sample_time_test_DEPENDENCIES) $(EXTRA_sample_time_test_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/time-test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_time_test_OBJECTS) $(sample_time_test_LDADD) $(LIBS)
test/$(am__dirstamp):
@$(MKDIR_P) test
@: > test/$(am__dirstamp)
@@ -1309,43 +1622,43 @@ test/bench_httpclient.$(OBJEXT): test/$(am__dirstamp) \
test/bench_httpclient$(EXEEXT): $(test_bench_httpclient_OBJECTS) $(test_bench_httpclient_DEPENDENCIES) $(EXTRA_test_bench_httpclient_DEPENDENCIES) test/$(am__dirstamp)
@rm -f test/bench_httpclient$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_bench_httpclient_OBJECTS) $(test_bench_httpclient_LDADD) $(LIBS)
-test/test_regress-regress.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress.gen.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress.gen.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_buffer.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_buffer.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_bufferevent.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_bufferevent.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_dns.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_dns.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_et.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_et.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_finalize.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_finalize.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_http.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_http.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_listener.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_listener.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_main.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_main.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_minheap.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_minheap.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_rpc.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_rpc.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_testutils.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_testutils.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_util.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_util.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-tinytest.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-tinytest.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_thread.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_thread.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_zlib.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_zlib.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_iocp.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_iocp.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
-test/test_regress-regress_ssl.$(OBJEXT): test/$(am__dirstamp) \
+test/regress-regress_ssl.$(OBJEXT): test/$(am__dirstamp) \
test/$(DEPDIR)/$(am__dirstamp)
test/regress$(EXEEXT): $(test_regress_OBJECTS) $(test_regress_DEPENDENCIES) $(EXTRA_test_regress_DEPENDENCIES) test/$(am__dirstamp)
@@ -1443,77 +1756,95 @@ uninstall-dist_binSCRIPTS:
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f sample/*.$(OBJEXT)
-rm -f test/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/epoll_sub.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer_iocp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_async.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_filter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_pair.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_ratelim.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_sock.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devpoll.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdns.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_iocp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_tagging.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evmap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evport.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evrpc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_pthread.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_win32.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_rand.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_time.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kqueue.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32select.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_cascade.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_http.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_httpclient.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-changelist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-closed.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-dumpevents.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-eof.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-fdleak.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-init.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-ratelim.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-time.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-weof.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress.gen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_buffer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_bufferevent.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_dns.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_et.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_finalize.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_http.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_iocp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_listener.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_minheap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_rpc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_ssl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_testutils.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_thread.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_zlib.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-tinytest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/epoll_sub.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer_iocp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_async.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_filter.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_pair.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_ratelim.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_sock.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devpoll.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdns.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_iocp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_tagging.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evmap.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evport.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evrpc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_pthread.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_win32.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_rand.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_time.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kqueue.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32select.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/dns-example.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/event-read-fifo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hello-world.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-connect.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-server.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https_client-hostcheck.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https_client-https-client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/le_proxy-le-proxy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/signal-test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/time-test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_cascade.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_http.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_httpclient.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress.gen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_buffer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_bufferevent.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_dns.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_et.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_finalize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_http.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_iocp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_listener.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_minheap.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_rpc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_testutils.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_util.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-regress_zlib.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/regress-tinytest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-changelist.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-closed.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-dumpevents.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-eof.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-fdleak.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-init.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-ratelim.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-time.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-weof.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1546,281 +1877,379 @@ libevent_openssl_la-bufferevent_openssl.lo: bufferevent_openssl.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libevent_openssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libevent_openssl_la-bufferevent_openssl.lo `test -f 'bufferevent_openssl.c' || echo '$(srcdir)/'`bufferevent_openssl.c
-test/test_regress-regress.o: test/regress.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress.Tpo -c -o test/test_regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.Tpo test/$(DEPDIR)/test_regress-regress.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/test_regress-regress.o' libtool=no @AMDEPBACKSLASH@
+sample/https_client-https-client.o: sample/https-client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-https-client.o -MD -MP -MF sample/$(DEPDIR)/https_client-https-client.Tpo -c -o sample/https_client-https-client.o `test -f 'sample/https-client.c' || echo '$(srcdir)/'`sample/https-client.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-https-client.Tpo sample/$(DEPDIR)/https_client-https-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/https-client.c' object='sample/https_client-https-client.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-https-client.o `test -f 'sample/https-client.c' || echo '$(srcdir)/'`sample/https-client.c
+
+sample/https_client-https-client.obj: sample/https-client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-https-client.obj -MD -MP -MF sample/$(DEPDIR)/https_client-https-client.Tpo -c -o sample/https_client-https-client.obj `if test -f 'sample/https-client.c'; then $(CYGPATH_W) 'sample/https-client.c'; else $(CYGPATH_W) '$(srcdir)/sample/https-client.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-https-client.Tpo sample/$(DEPDIR)/https_client-https-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/https-client.c' object='sample/https_client-https-client.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-https-client.obj `if test -f 'sample/https-client.c'; then $(CYGPATH_W) 'sample/https-client.c'; else $(CYGPATH_W) '$(srcdir)/sample/https-client.c'; fi`
+
+sample/https_client-hostcheck.o: sample/hostcheck.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-hostcheck.o -MD -MP -MF sample/$(DEPDIR)/https_client-hostcheck.Tpo -c -o sample/https_client-hostcheck.o `test -f 'sample/hostcheck.c' || echo '$(srcdir)/'`sample/hostcheck.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-hostcheck.Tpo sample/$(DEPDIR)/https_client-hostcheck.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/hostcheck.c' object='sample/https_client-hostcheck.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-hostcheck.o `test -f 'sample/hostcheck.c' || echo '$(srcdir)/'`sample/hostcheck.c
+
+sample/https_client-hostcheck.obj: sample/hostcheck.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-hostcheck.obj -MD -MP -MF sample/$(DEPDIR)/https_client-hostcheck.Tpo -c -o sample/https_client-hostcheck.obj `if test -f 'sample/hostcheck.c'; then $(CYGPATH_W) 'sample/hostcheck.c'; else $(CYGPATH_W) '$(srcdir)/sample/hostcheck.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-hostcheck.Tpo sample/$(DEPDIR)/https_client-hostcheck.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/hostcheck.c' object='sample/https_client-hostcheck.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-hostcheck.obj `if test -f 'sample/hostcheck.c'; then $(CYGPATH_W) 'sample/hostcheck.c'; else $(CYGPATH_W) '$(srcdir)/sample/hostcheck.c'; fi`
+
+sample/https_client-openssl_hostname_validation.o: sample/openssl_hostname_validation.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-openssl_hostname_validation.o -MD -MP -MF sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo -c -o sample/https_client-openssl_hostname_validation.o `test -f 'sample/openssl_hostname_validation.c' || echo '$(srcdir)/'`sample/openssl_hostname_validation.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/openssl_hostname_validation.c' object='sample/https_client-openssl_hostname_validation.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-openssl_hostname_validation.o `test -f 'sample/openssl_hostname_validation.c' || echo '$(srcdir)/'`sample/openssl_hostname_validation.c
+
+sample/https_client-openssl_hostname_validation.obj: sample/openssl_hostname_validation.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/https_client-openssl_hostname_validation.obj -MD -MP -MF sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo -c -o sample/https_client-openssl_hostname_validation.obj `if test -f 'sample/openssl_hostname_validation.c'; then $(CYGPATH_W) 'sample/openssl_hostname_validation.c'; else $(CYGPATH_W) '$(srcdir)/sample/openssl_hostname_validation.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/https_client-openssl_hostname_validation.Tpo sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/openssl_hostname_validation.c' object='sample/https_client-openssl_hostname_validation.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_https_client_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/https_client-openssl_hostname_validation.obj `if test -f 'sample/openssl_hostname_validation.c'; then $(CYGPATH_W) 'sample/openssl_hostname_validation.c'; else $(CYGPATH_W) '$(srcdir)/sample/openssl_hostname_validation.c'; fi`
+
+sample/le_proxy-le-proxy.o: sample/le-proxy.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/le_proxy-le-proxy.o -MD -MP -MF sample/$(DEPDIR)/le_proxy-le-proxy.Tpo -c -o sample/le_proxy-le-proxy.o `test -f 'sample/le-proxy.c' || echo '$(srcdir)/'`sample/le-proxy.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/le_proxy-le-proxy.Tpo sample/$(DEPDIR)/le_proxy-le-proxy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/le-proxy.c' object='sample/le_proxy-le-proxy.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/le_proxy-le-proxy.o `test -f 'sample/le-proxy.c' || echo '$(srcdir)/'`sample/le-proxy.c
+
+sample/le_proxy-le-proxy.obj: sample/le-proxy.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sample/le_proxy-le-proxy.obj -MD -MP -MF sample/$(DEPDIR)/le_proxy-le-proxy.Tpo -c -o sample/le_proxy-le-proxy.obj `if test -f 'sample/le-proxy.c'; then $(CYGPATH_W) 'sample/le-proxy.c'; else $(CYGPATH_W) '$(srcdir)/sample/le-proxy.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sample/$(DEPDIR)/le_proxy-le-proxy.Tpo sample/$(DEPDIR)/le_proxy-le-proxy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sample/le-proxy.c' object='sample/le_proxy-le-proxy.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sample_le_proxy_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sample/le_proxy-le-proxy.obj `if test -f 'sample/le-proxy.c'; then $(CYGPATH_W) 'sample/le-proxy.c'; else $(CYGPATH_W) '$(srcdir)/sample/le-proxy.c'; fi`
+
+test/regress-regress.o: test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.o -MD -MP -MF test/$(DEPDIR)/regress-regress.Tpo -c -o test/regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.Tpo test/$(DEPDIR)/regress-regress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/regress-regress.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
-test/test_regress-regress.obj: test/regress.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress.Tpo -c -o test/test_regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.Tpo test/$(DEPDIR)/test_regress-regress.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/test_regress-regress.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress.obj: test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.obj -MD -MP -MF test/$(DEPDIR)/regress-regress.Tpo -c -o test/regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.Tpo test/$(DEPDIR)/regress-regress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.c' object='test/regress-regress.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
-test/test_regress-regress.gen.o: test/regress.gen.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.gen.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress.gen.Tpo -c -o test/test_regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.gen.Tpo test/$(DEPDIR)/test_regress-regress.gen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/test_regress-regress.gen.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress.gen.o: test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.gen.o -MD -MP -MF test/$(DEPDIR)/regress-regress.gen.Tpo -c -o test/regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.gen.Tpo test/$(DEPDIR)/regress-regress.gen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/regress-regress.gen.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
-test/test_regress-regress.gen.obj: test/regress.gen.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.gen.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress.gen.Tpo -c -o test/test_regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.gen.Tpo test/$(DEPDIR)/test_regress-regress.gen.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/test_regress-regress.gen.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress.gen.obj: test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress.gen.obj -MD -MP -MF test/$(DEPDIR)/regress-regress.gen.Tpo -c -o test/regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress.gen.Tpo test/$(DEPDIR)/regress-regress.gen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress.gen.c' object='test/regress-regress.gen.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
-test/test_regress-regress_buffer.o: test/regress_buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_buffer.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_buffer.Tpo -c -o test/test_regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_buffer.Tpo test/$(DEPDIR)/test_regress-regress_buffer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/test_regress-regress_buffer.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_buffer.o: test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_buffer.o -MD -MP -MF test/$(DEPDIR)/regress-regress_buffer.Tpo -c -o test/regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_buffer.Tpo test/$(DEPDIR)/regress-regress_buffer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/regress-regress_buffer.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
-test/test_regress-regress_buffer.obj: test/regress_buffer.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_buffer.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_buffer.Tpo -c -o test/test_regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_buffer.Tpo test/$(DEPDIR)/test_regress-regress_buffer.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/test_regress-regress_buffer.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_buffer.obj: test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_buffer.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_buffer.Tpo -c -o test/regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_buffer.Tpo test/$(DEPDIR)/regress-regress_buffer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_buffer.c' object='test/regress-regress_buffer.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
-test/test_regress-regress_bufferevent.o: test/regress_bufferevent.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_bufferevent.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo -c -o test/test_regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo test/$(DEPDIR)/test_regress-regress_bufferevent.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/test_regress-regress_bufferevent.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_bufferevent.o: test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_bufferevent.o -MD -MP -MF test/$(DEPDIR)/regress-regress_bufferevent.Tpo -c -o test/regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_bufferevent.Tpo test/$(DEPDIR)/regress-regress_bufferevent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/regress-regress_bufferevent.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
-test/test_regress-regress_bufferevent.obj: test/regress_bufferevent.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_bufferevent.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo -c -o test/test_regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo test/$(DEPDIR)/test_regress-regress_bufferevent.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/test_regress-regress_bufferevent.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_bufferevent.obj: test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_bufferevent.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_bufferevent.Tpo -c -o test/regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_bufferevent.Tpo test/$(DEPDIR)/regress-regress_bufferevent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_bufferevent.c' object='test/regress-regress_bufferevent.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
-test/test_regress-regress_dns.o: test/regress_dns.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_dns.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_dns.Tpo -c -o test/test_regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_dns.Tpo test/$(DEPDIR)/test_regress-regress_dns.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/test_regress-regress_dns.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_dns.o: test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_dns.o -MD -MP -MF test/$(DEPDIR)/regress-regress_dns.Tpo -c -o test/regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_dns.Tpo test/$(DEPDIR)/regress-regress_dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/regress-regress_dns.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
-test/test_regress-regress_dns.obj: test/regress_dns.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_dns.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_dns.Tpo -c -o test/test_regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_dns.Tpo test/$(DEPDIR)/test_regress-regress_dns.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/test_regress-regress_dns.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_dns.obj: test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_dns.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_dns.Tpo -c -o test/regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_dns.Tpo test/$(DEPDIR)/regress-regress_dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_dns.c' object='test/regress-regress_dns.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
-test/test_regress-regress_et.o: test/regress_et.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_et.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_et.Tpo -c -o test/test_regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_et.Tpo test/$(DEPDIR)/test_regress-regress_et.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/test_regress-regress_et.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_et.o: test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_et.o -MD -MP -MF test/$(DEPDIR)/regress-regress_et.Tpo -c -o test/regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_et.Tpo test/$(DEPDIR)/regress-regress_et.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/regress-regress_et.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
-test/test_regress-regress_et.obj: test/regress_et.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_et.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_et.Tpo -c -o test/test_regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_et.Tpo test/$(DEPDIR)/test_regress-regress_et.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/test_regress-regress_et.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_et.obj: test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_et.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_et.Tpo -c -o test/regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_et.Tpo test/$(DEPDIR)/regress-regress_et.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_et.c' object='test/regress-regress_et.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
-test/test_regress-regress_finalize.o: test/regress_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_finalize.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_finalize.Tpo -c -o test/test_regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_finalize.Tpo test/$(DEPDIR)/test_regress-regress_finalize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/test_regress-regress_finalize.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_finalize.o: test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_finalize.o -MD -MP -MF test/$(DEPDIR)/regress-regress_finalize.Tpo -c -o test/regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_finalize.Tpo test/$(DEPDIR)/regress-regress_finalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/regress-regress_finalize.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
-test/test_regress-regress_finalize.obj: test/regress_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_finalize.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_finalize.Tpo -c -o test/test_regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_finalize.Tpo test/$(DEPDIR)/test_regress-regress_finalize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/test_regress-regress_finalize.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_finalize.obj: test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_finalize.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_finalize.Tpo -c -o test/regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_finalize.Tpo test/$(DEPDIR)/regress-regress_finalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_finalize.c' object='test/regress-regress_finalize.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
-test/test_regress-regress_http.o: test/regress_http.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_http.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_http.Tpo -c -o test/test_regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_http.Tpo test/$(DEPDIR)/test_regress-regress_http.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/test_regress-regress_http.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_http.o: test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_http.o -MD -MP -MF test/$(DEPDIR)/regress-regress_http.Tpo -c -o test/regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_http.Tpo test/$(DEPDIR)/regress-regress_http.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/regress-regress_http.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
-test/test_regress-regress_http.obj: test/regress_http.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_http.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_http.Tpo -c -o test/test_regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_http.Tpo test/$(DEPDIR)/test_regress-regress_http.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/test_regress-regress_http.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_http.obj: test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_http.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_http.Tpo -c -o test/regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_http.Tpo test/$(DEPDIR)/regress-regress_http.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_http.c' object='test/regress-regress_http.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
-test/test_regress-regress_listener.o: test/regress_listener.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_listener.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_listener.Tpo -c -o test/test_regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_listener.Tpo test/$(DEPDIR)/test_regress-regress_listener.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/test_regress-regress_listener.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_listener.o: test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_listener.o -MD -MP -MF test/$(DEPDIR)/regress-regress_listener.Tpo -c -o test/regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_listener.Tpo test/$(DEPDIR)/regress-regress_listener.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/regress-regress_listener.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
-test/test_regress-regress_listener.obj: test/regress_listener.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_listener.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_listener.Tpo -c -o test/test_regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_listener.Tpo test/$(DEPDIR)/test_regress-regress_listener.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/test_regress-regress_listener.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_listener.obj: test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_listener.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_listener.Tpo -c -o test/regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_listener.Tpo test/$(DEPDIR)/regress-regress_listener.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_listener.c' object='test/regress-regress_listener.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
-test/test_regress-regress_main.o: test/regress_main.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_main.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_main.Tpo -c -o test/test_regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_main.Tpo test/$(DEPDIR)/test_regress-regress_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/test_regress-regress_main.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_main.o: test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_main.o -MD -MP -MF test/$(DEPDIR)/regress-regress_main.Tpo -c -o test/regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_main.Tpo test/$(DEPDIR)/regress-regress_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/regress-regress_main.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
-test/test_regress-regress_main.obj: test/regress_main.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_main.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_main.Tpo -c -o test/test_regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_main.Tpo test/$(DEPDIR)/test_regress-regress_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/test_regress-regress_main.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_main.obj: test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_main.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_main.Tpo -c -o test/regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_main.Tpo test/$(DEPDIR)/regress-regress_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_main.c' object='test/regress-regress_main.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
-test/test_regress-regress_minheap.o: test/regress_minheap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_minheap.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_minheap.Tpo -c -o test/test_regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_minheap.Tpo test/$(DEPDIR)/test_regress-regress_minheap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/test_regress-regress_minheap.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_minheap.o: test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_minheap.o -MD -MP -MF test/$(DEPDIR)/regress-regress_minheap.Tpo -c -o test/regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_minheap.Tpo test/$(DEPDIR)/regress-regress_minheap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/regress-regress_minheap.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
-test/test_regress-regress_minheap.obj: test/regress_minheap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_minheap.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_minheap.Tpo -c -o test/test_regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_minheap.Tpo test/$(DEPDIR)/test_regress-regress_minheap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/test_regress-regress_minheap.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_minheap.obj: test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_minheap.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_minheap.Tpo -c -o test/regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_minheap.Tpo test/$(DEPDIR)/regress-regress_minheap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_minheap.c' object='test/regress-regress_minheap.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
-test/test_regress-regress_rpc.o: test/regress_rpc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_rpc.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_rpc.Tpo -c -o test/test_regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_rpc.Tpo test/$(DEPDIR)/test_regress-regress_rpc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/test_regress-regress_rpc.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_rpc.o: test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_rpc.o -MD -MP -MF test/$(DEPDIR)/regress-regress_rpc.Tpo -c -o test/regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_rpc.Tpo test/$(DEPDIR)/regress-regress_rpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/regress-regress_rpc.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
-test/test_regress-regress_rpc.obj: test/regress_rpc.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_rpc.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_rpc.Tpo -c -o test/test_regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_rpc.Tpo test/$(DEPDIR)/test_regress-regress_rpc.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/test_regress-regress_rpc.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_rpc.obj: test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_rpc.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_rpc.Tpo -c -o test/regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_rpc.Tpo test/$(DEPDIR)/regress-regress_rpc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_rpc.c' object='test/regress-regress_rpc.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
-test/test_regress-regress_testutils.o: test/regress_testutils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_testutils.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_testutils.Tpo -c -o test/test_regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_testutils.Tpo test/$(DEPDIR)/test_regress-regress_testutils.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/test_regress-regress_testutils.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_testutils.o: test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_testutils.o -MD -MP -MF test/$(DEPDIR)/regress-regress_testutils.Tpo -c -o test/regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_testutils.Tpo test/$(DEPDIR)/regress-regress_testutils.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/regress-regress_testutils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
-test/test_regress-regress_testutils.obj: test/regress_testutils.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_testutils.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_testutils.Tpo -c -o test/test_regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_testutils.Tpo test/$(DEPDIR)/test_regress-regress_testutils.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/test_regress-regress_testutils.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_testutils.obj: test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_testutils.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_testutils.Tpo -c -o test/regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_testutils.Tpo test/$(DEPDIR)/regress-regress_testutils.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_testutils.c' object='test/regress-regress_testutils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
-test/test_regress-regress_util.o: test/regress_util.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_util.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_util.Tpo -c -o test/test_regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_util.Tpo test/$(DEPDIR)/test_regress-regress_util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/test_regress-regress_util.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_util.o: test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_util.o -MD -MP -MF test/$(DEPDIR)/regress-regress_util.Tpo -c -o test/regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_util.Tpo test/$(DEPDIR)/regress-regress_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/regress-regress_util.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
-test/test_regress-regress_util.obj: test/regress_util.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_util.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_util.Tpo -c -o test/test_regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_util.Tpo test/$(DEPDIR)/test_regress-regress_util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/test_regress-regress_util.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_util.obj: test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_util.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_util.Tpo -c -o test/regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_util.Tpo test/$(DEPDIR)/regress-regress_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_util.c' object='test/regress-regress_util.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
-test/test_regress-tinytest.o: test/tinytest.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-tinytest.o -MD -MP -MF test/$(DEPDIR)/test_regress-tinytest.Tpo -c -o test/test_regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-tinytest.Tpo test/$(DEPDIR)/test_regress-tinytest.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/test_regress-tinytest.o' libtool=no @AMDEPBACKSLASH@
+test/regress-tinytest.o: test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-tinytest.o -MD -MP -MF test/$(DEPDIR)/regress-tinytest.Tpo -c -o test/regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-tinytest.Tpo test/$(DEPDIR)/regress-tinytest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/regress-tinytest.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
-test/test_regress-tinytest.obj: test/tinytest.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-tinytest.obj -MD -MP -MF test/$(DEPDIR)/test_regress-tinytest.Tpo -c -o test/test_regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-tinytest.Tpo test/$(DEPDIR)/test_regress-tinytest.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/test_regress-tinytest.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-tinytest.obj: test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-tinytest.obj -MD -MP -MF test/$(DEPDIR)/regress-tinytest.Tpo -c -o test/regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-tinytest.Tpo test/$(DEPDIR)/regress-tinytest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/tinytest.c' object='test/regress-tinytest.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
-test/test_regress-regress_thread.o: test/regress_thread.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_thread.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_thread.Tpo -c -o test/test_regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_thread.Tpo test/$(DEPDIR)/test_regress-regress_thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/test_regress-regress_thread.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_thread.o: test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_thread.o -MD -MP -MF test/$(DEPDIR)/regress-regress_thread.Tpo -c -o test/regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_thread.Tpo test/$(DEPDIR)/regress-regress_thread.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/regress-regress_thread.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
-test/test_regress-regress_thread.obj: test/regress_thread.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_thread.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_thread.Tpo -c -o test/test_regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_thread.Tpo test/$(DEPDIR)/test_regress-regress_thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/test_regress-regress_thread.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_thread.obj: test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_thread.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_thread.Tpo -c -o test/regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_thread.Tpo test/$(DEPDIR)/regress-regress_thread.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_thread.c' object='test/regress-regress_thread.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
-test/test_regress-regress_zlib.o: test/regress_zlib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_zlib.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_zlib.Tpo -c -o test/test_regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_zlib.Tpo test/$(DEPDIR)/test_regress-regress_zlib.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/test_regress-regress_zlib.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_zlib.o: test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_zlib.o -MD -MP -MF test/$(DEPDIR)/regress-regress_zlib.Tpo -c -o test/regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_zlib.Tpo test/$(DEPDIR)/regress-regress_zlib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/regress-regress_zlib.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
-test/test_regress-regress_zlib.obj: test/regress_zlib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_zlib.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_zlib.Tpo -c -o test/test_regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_zlib.Tpo test/$(DEPDIR)/test_regress-regress_zlib.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/test_regress-regress_zlib.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_zlib.obj: test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_zlib.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_zlib.Tpo -c -o test/regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_zlib.Tpo test/$(DEPDIR)/regress-regress_zlib.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_zlib.c' object='test/regress-regress_zlib.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
-test/test_regress-regress_iocp.o: test/regress_iocp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_iocp.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_iocp.Tpo -c -o test/test_regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_iocp.Tpo test/$(DEPDIR)/test_regress-regress_iocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/test_regress-regress_iocp.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_iocp.o: test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_iocp.o -MD -MP -MF test/$(DEPDIR)/regress-regress_iocp.Tpo -c -o test/regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_iocp.Tpo test/$(DEPDIR)/regress-regress_iocp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/regress-regress_iocp.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
-test/test_regress-regress_iocp.obj: test/regress_iocp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_iocp.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_iocp.Tpo -c -o test/test_regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_iocp.Tpo test/$(DEPDIR)/test_regress-regress_iocp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/test_regress-regress_iocp.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_iocp.obj: test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_iocp.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_iocp.Tpo -c -o test/regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_iocp.Tpo test/$(DEPDIR)/regress-regress_iocp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_iocp.c' object='test/regress-regress_iocp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
-test/test_regress-regress_ssl.o: test/regress_ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_ssl.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_ssl.Tpo -c -o test/test_regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_ssl.Tpo test/$(DEPDIR)/test_regress-regress_ssl.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/test_regress-regress_ssl.o' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_ssl.o: test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_ssl.o -MD -MP -MF test/$(DEPDIR)/regress-regress_ssl.Tpo -c -o test/regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_ssl.Tpo test/$(DEPDIR)/regress-regress_ssl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/regress-regress_ssl.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
-test/test_regress-regress_ssl.obj: test/regress_ssl.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_ssl.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_ssl.Tpo -c -o test/test_regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_ssl.Tpo test/$(DEPDIR)/test_regress-regress_ssl.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/test_regress-regress_ssl.obj' libtool=no @AMDEPBACKSLASH@
+test/regress-regress_ssl.obj: test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/regress-regress_ssl.obj -MD -MP -MF test/$(DEPDIR)/regress-regress_ssl.Tpo -c -o test/regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/regress-regress_ssl.Tpo test/$(DEPDIR)/regress-regress_ssl.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/regress_ssl.c' object='test/regress-regress_ssl.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
+ -rm -rf sample/.libs sample/_libs
-rm -rf test/.libs test/_libs
distclean-libtool:
-rm -f libtool config.lt
+install-man3: $(man3_MANS)
+ @$(NORMAL_INSTALL)
+ @list1='$(man3_MANS)'; \
+ list2=''; \
+ test -n "$(man3dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.3[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man3:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
@@ -2072,7 +2501,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
@@ -2085,7 +2514,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
fi; \
$$success || exit 1
-check-TESTS:
+check-TESTS:
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@@ -2106,9 +2535,72 @@ recheck: all
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
-test/test-script.sh.log: test/test-script.sh
- @p='test/test-script.sh'; \
- b='test/test-script.sh'; \
+test_runner_epoll.log: test_runner_epoll
+ @p='test_runner_epoll'; \
+ b='test_runner_epoll'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_select.log: test_runner_select
+ @p='test_runner_select'; \
+ b='test_runner_select'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_kqueue.log: test_runner_kqueue
+ @p='test_runner_kqueue'; \
+ b='test_runner_kqueue'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_evport.log: test_runner_evport
+ @p='test_runner_evport'; \
+ b='test_runner_evport'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_devpoll.log: test_runner_devpoll
+ @p='test_runner_devpoll'; \
+ b='test_runner_devpoll'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_poll.log: test_runner_poll
+ @p='test_runner_poll'; \
+ b='test_runner_poll'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_win32.log: test_runner_win32
+ @p='test_runner_win32'; \
+ b='test_runner_win32'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_timerfd.log: test_runner_timerfd
+ @p='test_runner_timerfd'; \
+ b='test_runner_timerfd'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_changelist.log: test_runner_changelist
+ @p='test_runner_changelist'; \
+ b='test_runner_changelist'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_runner_timerfd_changelist.log: test_runner_timerfd_changelist
+ @p='test_runner_timerfd_changelist'; \
+ b='test_runner_timerfd_changelist'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -2127,8 +2619,10 @@ test/test-script.sh.log: test/test-script.sh
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -2183,6 +2677,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@@ -2225,6 +2723,8 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@@ -2240,7 +2740,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -2295,15 +2795,18 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
+all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
$(HEADERS) config.h evconfig-private.h
+install-EXTRAPROGRAMS: install-libLTLIBRARIES
+
installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(include_event2dir)" "$(DESTDIR)$(include_event2dir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(include_event2dir)" "$(DESTDIR)$(include_event2dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -2332,6 +2835,8 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f sample/$(DEPDIR)/$(am__dirstamp)
+ -rm -f sample/$(am__dirstamp)
-rm -f test/$(DEPDIR)/$(am__dirstamp)
-rm -f test/$(am__dirstamp)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
@@ -2340,14 +2845,93 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+@ENABLE_DOXYGEN_FALSE@clean-local:
+@ENABLE_DOXYGEN_FALSE@install-data-local:
+@ENABLE_DOXYGEN_FALSE@uninstall-local:
clean: clean-am
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(DEPDIR) ./$(DEPDIR) test/$(DEPDIR)
+ -rm -f $(DEPDIR)/epoll_sub.Plo
+ -rm -f ./$(DEPDIR)/buffer.Plo
+ -rm -f ./$(DEPDIR)/buffer_iocp.Plo
+ -rm -f ./$(DEPDIR)/bufferevent.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_async.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_filter.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_pair.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_ratelim.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_sock.Plo
+ -rm -f ./$(DEPDIR)/devpoll.Plo
+ -rm -f ./$(DEPDIR)/epoll.Plo
+ -rm -f ./$(DEPDIR)/evdns.Plo
+ -rm -f ./$(DEPDIR)/event.Plo
+ -rm -f ./$(DEPDIR)/event_iocp.Plo
+ -rm -f ./$(DEPDIR)/event_tagging.Plo
+ -rm -f ./$(DEPDIR)/evmap.Plo
+ -rm -f ./$(DEPDIR)/evport.Plo
+ -rm -f ./$(DEPDIR)/evrpc.Plo
+ -rm -f ./$(DEPDIR)/evthread.Plo
+ -rm -f ./$(DEPDIR)/evthread_pthread.Plo
+ -rm -f ./$(DEPDIR)/evthread_win32.Plo
+ -rm -f ./$(DEPDIR)/evutil.Plo
+ -rm -f ./$(DEPDIR)/evutil_rand.Plo
+ -rm -f ./$(DEPDIR)/evutil_time.Plo
+ -rm -f ./$(DEPDIR)/http.Plo
+ -rm -f ./$(DEPDIR)/kqueue.Plo
+ -rm -f ./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo
+ -rm -f ./$(DEPDIR)/listener.Plo
+ -rm -f ./$(DEPDIR)/log.Plo
+ -rm -f ./$(DEPDIR)/poll.Plo
+ -rm -f ./$(DEPDIR)/select.Plo
+ -rm -f ./$(DEPDIR)/signal.Plo
+ -rm -f ./$(DEPDIR)/strlcpy.Plo
+ -rm -f ./$(DEPDIR)/win32select.Plo
+ -rm -f sample/$(DEPDIR)/dns-example.Po
+ -rm -f sample/$(DEPDIR)/event-read-fifo.Po
+ -rm -f sample/$(DEPDIR)/hello-world.Po
+ -rm -f sample/$(DEPDIR)/http-connect.Po
+ -rm -f sample/$(DEPDIR)/http-server.Po
+ -rm -f sample/$(DEPDIR)/https_client-hostcheck.Po
+ -rm -f sample/$(DEPDIR)/https_client-https-client.Po
+ -rm -f sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
+ -rm -f sample/$(DEPDIR)/le_proxy-le-proxy.Po
+ -rm -f sample/$(DEPDIR)/signal-test.Po
+ -rm -f sample/$(DEPDIR)/time-test.Po
+ -rm -f test/$(DEPDIR)/bench.Po
+ -rm -f test/$(DEPDIR)/bench_cascade.Po
+ -rm -f test/$(DEPDIR)/bench_http.Po
+ -rm -f test/$(DEPDIR)/bench_httpclient.Po
+ -rm -f test/$(DEPDIR)/regress-regress.Po
+ -rm -f test/$(DEPDIR)/regress-regress.gen.Po
+ -rm -f test/$(DEPDIR)/regress-regress_buffer.Po
+ -rm -f test/$(DEPDIR)/regress-regress_bufferevent.Po
+ -rm -f test/$(DEPDIR)/regress-regress_dns.Po
+ -rm -f test/$(DEPDIR)/regress-regress_et.Po
+ -rm -f test/$(DEPDIR)/regress-regress_finalize.Po
+ -rm -f test/$(DEPDIR)/regress-regress_http.Po
+ -rm -f test/$(DEPDIR)/regress-regress_iocp.Po
+ -rm -f test/$(DEPDIR)/regress-regress_listener.Po
+ -rm -f test/$(DEPDIR)/regress-regress_main.Po
+ -rm -f test/$(DEPDIR)/regress-regress_minheap.Po
+ -rm -f test/$(DEPDIR)/regress-regress_rpc.Po
+ -rm -f test/$(DEPDIR)/regress-regress_ssl.Po
+ -rm -f test/$(DEPDIR)/regress-regress_testutils.Po
+ -rm -f test/$(DEPDIR)/regress-regress_thread.Po
+ -rm -f test/$(DEPDIR)/regress-regress_util.Po
+ -rm -f test/$(DEPDIR)/regress-regress_zlib.Po
+ -rm -f test/$(DEPDIR)/regress-tinytest.Po
+ -rm -f test/$(DEPDIR)/test-changelist.Po
+ -rm -f test/$(DEPDIR)/test-closed.Po
+ -rm -f test/$(DEPDIR)/test-dumpevents.Po
+ -rm -f test/$(DEPDIR)/test-eof.Po
+ -rm -f test/$(DEPDIR)/test-fdleak.Po
+ -rm -f test/$(DEPDIR)/test-init.Po
+ -rm -f test/$(DEPDIR)/test-ratelim.Po
+ -rm -f test/$(DEPDIR)/test-time.Po
+ -rm -f test/$(DEPDIR)/test-weof.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
@@ -2364,7 +2948,8 @@ info: info-am
info-am:
-install-data-am: install-includeHEADERS install-include_event2HEADERS \
+install-data-am: install-data-local install-includeHEADERS \
+ install-include_event2HEADERS install-man \
install-nodist_include_event2HEADERS install-pkgconfigDATA
install-dvi: install-dvi-am
@@ -2381,7 +2966,7 @@ install-info: install-info-am
install-info-am:
-install-man:
+install-man: install-man3
install-pdf: install-pdf-am
@@ -2396,7 +2981,83 @@ installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf $(DEPDIR) ./$(DEPDIR) test/$(DEPDIR)
+ -rm -f $(DEPDIR)/epoll_sub.Plo
+ -rm -f ./$(DEPDIR)/buffer.Plo
+ -rm -f ./$(DEPDIR)/buffer_iocp.Plo
+ -rm -f ./$(DEPDIR)/bufferevent.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_async.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_filter.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_pair.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_ratelim.Plo
+ -rm -f ./$(DEPDIR)/bufferevent_sock.Plo
+ -rm -f ./$(DEPDIR)/devpoll.Plo
+ -rm -f ./$(DEPDIR)/epoll.Plo
+ -rm -f ./$(DEPDIR)/evdns.Plo
+ -rm -f ./$(DEPDIR)/event.Plo
+ -rm -f ./$(DEPDIR)/event_iocp.Plo
+ -rm -f ./$(DEPDIR)/event_tagging.Plo
+ -rm -f ./$(DEPDIR)/evmap.Plo
+ -rm -f ./$(DEPDIR)/evport.Plo
+ -rm -f ./$(DEPDIR)/evrpc.Plo
+ -rm -f ./$(DEPDIR)/evthread.Plo
+ -rm -f ./$(DEPDIR)/evthread_pthread.Plo
+ -rm -f ./$(DEPDIR)/evthread_win32.Plo
+ -rm -f ./$(DEPDIR)/evutil.Plo
+ -rm -f ./$(DEPDIR)/evutil_rand.Plo
+ -rm -f ./$(DEPDIR)/evutil_time.Plo
+ -rm -f ./$(DEPDIR)/http.Plo
+ -rm -f ./$(DEPDIR)/kqueue.Plo
+ -rm -f ./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo
+ -rm -f ./$(DEPDIR)/listener.Plo
+ -rm -f ./$(DEPDIR)/log.Plo
+ -rm -f ./$(DEPDIR)/poll.Plo
+ -rm -f ./$(DEPDIR)/select.Plo
+ -rm -f ./$(DEPDIR)/signal.Plo
+ -rm -f ./$(DEPDIR)/strlcpy.Plo
+ -rm -f ./$(DEPDIR)/win32select.Plo
+ -rm -f sample/$(DEPDIR)/dns-example.Po
+ -rm -f sample/$(DEPDIR)/event-read-fifo.Po
+ -rm -f sample/$(DEPDIR)/hello-world.Po
+ -rm -f sample/$(DEPDIR)/http-connect.Po
+ -rm -f sample/$(DEPDIR)/http-server.Po
+ -rm -f sample/$(DEPDIR)/https_client-hostcheck.Po
+ -rm -f sample/$(DEPDIR)/https_client-https-client.Po
+ -rm -f sample/$(DEPDIR)/https_client-openssl_hostname_validation.Po
+ -rm -f sample/$(DEPDIR)/le_proxy-le-proxy.Po
+ -rm -f sample/$(DEPDIR)/signal-test.Po
+ -rm -f sample/$(DEPDIR)/time-test.Po
+ -rm -f test/$(DEPDIR)/bench.Po
+ -rm -f test/$(DEPDIR)/bench_cascade.Po
+ -rm -f test/$(DEPDIR)/bench_http.Po
+ -rm -f test/$(DEPDIR)/bench_httpclient.Po
+ -rm -f test/$(DEPDIR)/regress-regress.Po
+ -rm -f test/$(DEPDIR)/regress-regress.gen.Po
+ -rm -f test/$(DEPDIR)/regress-regress_buffer.Po
+ -rm -f test/$(DEPDIR)/regress-regress_bufferevent.Po
+ -rm -f test/$(DEPDIR)/regress-regress_dns.Po
+ -rm -f test/$(DEPDIR)/regress-regress_et.Po
+ -rm -f test/$(DEPDIR)/regress-regress_finalize.Po
+ -rm -f test/$(DEPDIR)/regress-regress_http.Po
+ -rm -f test/$(DEPDIR)/regress-regress_iocp.Po
+ -rm -f test/$(DEPDIR)/regress-regress_listener.Po
+ -rm -f test/$(DEPDIR)/regress-regress_main.Po
+ -rm -f test/$(DEPDIR)/regress-regress_minheap.Po
+ -rm -f test/$(DEPDIR)/regress-regress_rpc.Po
+ -rm -f test/$(DEPDIR)/regress-regress_ssl.Po
+ -rm -f test/$(DEPDIR)/regress-regress_testutils.Po
+ -rm -f test/$(DEPDIR)/regress-regress_thread.Po
+ -rm -f test/$(DEPDIR)/regress-regress_util.Po
+ -rm -f test/$(DEPDIR)/regress-regress_zlib.Po
+ -rm -f test/$(DEPDIR)/regress-tinytest.Po
+ -rm -f test/$(DEPDIR)/test-changelist.Po
+ -rm -f test/$(DEPDIR)/test-closed.Po
+ -rm -f test/$(DEPDIR)/test-dumpevents.Po
+ -rm -f test/$(DEPDIR)/test-eof.Po
+ -rm -f test/$(DEPDIR)/test-fdleak.Po
+ -rm -f test/$(DEPDIR)/test-init.Po
+ -rm -f test/$(DEPDIR)/test-ratelim.Po
+ -rm -f test/$(DEPDIR)/test-time.Po
+ -rm -f test/$(DEPDIR)/test-weof.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -2415,39 +3076,66 @@ ps-am:
uninstall-am: uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
uninstall-include_event2HEADERS uninstall-libLTLIBRARIES \
+ uninstall-local uninstall-man \
uninstall-nodist_include_event2HEADERS uninstall-pkgconfigDATA
-.MAKE: all check check-am install install-am install-strip
+uninstall-man: uninstall-man3
-.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \
- check-am clean clean-cscope clean-generic clean-libLTLIBRARIES \
- clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
- cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+.MAKE: all check check-am install install-am install-exec \
+ install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
+ check-TESTS check-am clean clean-cscope clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \
+ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am html html-am info \
- info-am install install-am install-data install-data-am \
+ dist-zstd distcheck distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local \
install-dist_binSCRIPTS install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-includeHEADERS install-include_event2HEADERS \
install-info install-info-am install-libLTLIBRARIES \
- install-man install-nodist_include_event2HEADERS install-pdf \
- install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am recheck tags tags-am uninstall \
- uninstall-am uninstall-dist_binSCRIPTS \
+ install-man install-man3 install-nodist_include_event2HEADERS \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
+ uninstall uninstall-am uninstall-dist_binSCRIPTS \
uninstall-includeHEADERS uninstall-include_event2HEADERS \
- uninstall-libLTLIBRARIES \
- uninstall-nodist_include_event2HEADERS uninstall-pkgconfigDATA
+ uninstall-libLTLIBRARIES uninstall-local uninstall-man \
+ uninstall-man3 uninstall-nodist_include_event2HEADERS \
+ uninstall-pkgconfigDATA
.PRECIOUS: Makefile
-test/test-script.sh: test/test.sh
- cp $(top_srcdir)/test/test.sh $@
+$(SAMPLES) : libevent.la
+
+test_runner_epoll: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b EPOLL
+test_runner_select: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b SELECT
+test_runner_kqueue: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b KQUEUE
+test_runner_evport: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b EVPORT
+test_runner_devpoll: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b DEVPOLL
+test_runner_poll: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b POLL
+test_runner_win32: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b WIN32
+test_runner_timerfd: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b "" -t
+test_runner_changelist: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b "" -c
+test_runner_timerfd_changelist: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b "" -T
test/regress.gen.c test/regress.gen.h: test/rpcgen-attempted
@@ -2470,9 +3158,40 @@ include/event2/event-config.h: config.h make-event-config.sed
verify: check
-doxygen: FORCE
- doxygen $(srcdir)/Doxyfile
-FORCE:
+# Add all needed rules defined in ax_prog_doxygen.m4
+@ENABLE_DOXYGEN_TRUE@@DX_RULES@
+
+# Use 'make clean' to clean docs generated by doxygen.
+@ENABLE_DOXYGEN_TRUE@clean-local:
+@ENABLE_DOXYGEN_TRUE@ -rm -rf $(DX_CLEANFILES)
+@ENABLE_DOXYGEN_TRUE@$(man3_MANS): doxygen-doc
+
+# Rules for installing docs generated by doxygen into $(htmldir),
+# The typical value of $(htmldir) is '/usr/local/share/doc/$(PACKAGE)'
+@ENABLE_DOXYGEN_TRUE@install-data-local:
+@ENABLE_DOXYGEN_TRUE@ @if ! test -d "$(DESTDIR)$(htmldir)"; then \
+@ENABLE_DOXYGEN_TRUE@ echo "$(mkinstalldirs) '$(DESTDIR)$(htmldir)'"; \
+@ENABLE_DOXYGEN_TRUE@ $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \
+@ENABLE_DOXYGEN_TRUE@ fi
+@ENABLE_DOXYGEN_TRUE@ @for d in $(docdirs); do \
+@ENABLE_DOXYGEN_TRUE@ echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \
+@ENABLE_DOXYGEN_TRUE@ cp -pR $$d '$(DESTDIR)$(htmldir)/'; \
+@ENABLE_DOXYGEN_TRUE@ done
+
+# Rules for uninstalling docs generated by doxygen from $(htmldir)
+@ENABLE_DOXYGEN_TRUE@uninstall-local:
+@ENABLE_DOXYGEN_TRUE@ @for d in $(docdirs); do \
+@ENABLE_DOXYGEN_TRUE@ d=`basename $$d`; \
+@ENABLE_DOXYGEN_TRUE@ echo "test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
+@ENABLE_DOXYGEN_TRUE@ { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
+@ENABLE_DOXYGEN_TRUE@ rm -rf '$(DESTDIR)$(htmldir)/'$$d; }"; \
+@ENABLE_DOXYGEN_TRUE@ test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
+@ENABLE_DOXYGEN_TRUE@ { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
+@ENABLE_DOXYGEN_TRUE@ rm -rf '$(DESTDIR)$(htmldir)/'$$d; }; \
+@ENABLE_DOXYGEN_TRUE@ done
+@ENABLE_DOXYGEN_TRUE@ rmdir "$(DESTDIR)$(htmldir)/" || true
+
+@ENABLE_DOXYGEN_TRUE@doxygen: doxygen-doc
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/ntp/sntp/libevent/README.md b/contrib/ntp/sntp/libevent/README.md
new file mode 100644
index 000000000000..1247e220f50e
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/README.md
@@ -0,0 +1,487 @@
+<p align="center">
+ <img src="https://strcpy.net/libevent3.png" alt="libevent logo"/>
+</p>
+
+
+
+[![Appveyor Win32 Build Status](https://ci.appveyor.com/api/projects/status/ng3jg0uhy44mp7ik?svg=true)](https://ci.appveyor.com/project/libevent/libevent)
+[![Travis Build Status](https://travis-ci.org/libevent/libevent.svg?branch=master)](https://travis-ci.org/libevent/libevent)
+[![Coverage Status](https://coveralls.io/repos/github/libevent/libevent/badge.svg)](https://coveralls.io/github/libevent/libevent)
+[![Join the chat at https://gitter.im/libevent/libevent](https://badges.gitter.im/libevent/libevent.svg)](https://gitter.im/libevent/libevent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+
+
+# 0. BUILDING AND INSTALLATION (Briefly)
+
+## Autoconf
+
+ $ ./configure
+ $ make
+ $ make verify # (optional)
+ $ sudo make install
+
+## CMake (General)
+
+
+The following Libevent specific CMake variables are as follows (the values being
+the default).
+
+```
+# Type of the library to build (SHARED or STATIC)
+# Default is: SHARED for MSVC, otherwise BOTH
+EVENT__LIBRARY_TYPE:STRING=DEFAULT
+
+# Installation directory for CMake files
+EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent
+
+# Enable running gcov to get a test coverage report (only works with
+# GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well.
+EVENT__COVERAGE:BOOL=OFF
+
+# Defines if Libevent should build without the benchmark executables
+EVENT__DISABLE_BENCHMARK:BOOL=OFF
+
+# Define if Libevent should build without support for a debug mode
+EVENT__DISABLE_DEBUG_MODE:BOOL=OFF
+
+# Define if Libevent should not allow replacing the mm functions
+EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF
+
+# Define if Libevent should build without support for OpenSSL encryption
+EVENT__DISABLE_OPENSSL:BOOL=OFF
+
+# Disable the regress tests
+EVENT__DISABLE_REGRESS:BOOL=OFF
+
+# Disable sample files
+EVENT__DISABLE_SAMPLES:BOOL=OFF
+
+# If tests should be compiled or not
+EVENT__DISABLE_TESTS:BOOL=OFF
+
+# Define if Libevent should not be compiled with thread support
+EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF
+
+# Enables verbose debugging
+EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
+
+# When cross compiling, forces running a test program that verifies that Kqueue
+# works with pipes. Note that this requires you to manually run the test program
+# on the the cross compilation target to verify that it works. See CMake
+# documentation for try_run for more details
+EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
+```
+
+__More variables can be found by running `cmake -LAH <sourcedir_path>`__
+
+
+## CMake (Windows)
+
+Install CMake: <https://www.cmake.org>
+
+
+ $ md build && cd build
+ $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
+ $ start libevent.sln
+
+## CMake (Unix)
+
+ $ mkdir build && cd build
+ $ cmake .. # Default to Unix Makefiles.
+ $ make
+ $ make verify # (optional)
+
+
+# 1. BUILDING AND INSTALLATION (In Depth)
+
+## Autoconf
+
+To build Libevent, type
+
+ $ ./configure && make
+
+
+ (If you got Libevent from the git repository, you will
+ first need to run the included "autogen.sh" script in order to
+ generate the configure script.)
+
+You can run the regression tests by running
+
+ $ make verify
+
+Install as root via
+
+ $ make install
+
+Before reporting any problems, please run the regression tests.
+
+To enable low-level tracing, build the library as:
+
+ $ CFLAGS=-DUSE_DEBUG ./configure [...]
+
+Standard configure flags should work. In particular, see:
+
+ --disable-shared Only build static libraries.
+ --prefix Install all files relative to this directory.
+
+
+The configure script also supports the following flags:
+
+ --enable-gcc-warnings Enable extra compiler checking with GCC.
+ --disable-malloc-replacement
+ Don't let applications replace our memory
+ management functions.
+ --disable-openssl Disable support for OpenSSL encryption.
+ --disable-thread-support Don't support multithreaded environments.
+
+## CMake (Windows)
+
+(Note that autoconf is currently the most mature and supported build
+environment for Libevent; the CMake instructions here are new and
+experimental, though they _should_ be solid. We hope that CMake will
+still be supported in future versions of Libevent, and will try to
+make sure that happens.)
+
+First of all install <https://www.cmake.org>.
+
+To build Libevent using Microsoft Visual studio open the "Visual Studio Command prompt" and type:
+
+```
+$ cd <libevent source dir>
+$ mkdir build && cd build
+$ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
+$ start libevent.sln
+```
+
+In the above, the ".." refers to the dir containing the Libevent source code.
+You can build multiple versions (with different compile time settings) from the same source tree
+by creating other build directories.
+
+It is highly recommended to build "out of source" when using
+CMake instead of "in source" like the normal behaviour of autoconf for this reason.
+
+The "NMake Makefiles" CMake generator can be used to build entirely via the command line.
+
+To get a list of settings available for the project you can type:
+
+```
+$ cmake -LH ..
+```
+
+### GUI
+
+CMake also provides a GUI that lets you specify the source directory and output (binary) directory
+that the build should be placed in.
+
+# 2. USEFUL LINKS:
+
+For the latest released version of Libevent, see the official website at
+<http://libevent.org/> .
+
+There's a pretty good work-in-progress manual up at
+ <http://www.wangafu.net/~nickm/libevent-book/> .
+
+For the latest development versions of Libevent, access our Git repository
+via
+
+```
+$ git clone https://github.com/libevent/libevent.git
+```
+
+You can browse the git repository online at:
+
+<https://github.com/libevent/libevent>
+
+To report bugs, issues, or ask for new features:
+
+__Patches__: https://github.com/libevent/libevent/pulls
+> OK, those are not really _patches_. You fork, modify, and hit the "Create Pull Request" button.
+> You can still submit normal git patches via the mailing list.
+
+__Bugs, Features [RFC], and Issues__: https://github.com/libevent/libevent/issues
+> Or you can do it via the mailing list.
+
+There's also a libevent-users mailing list for talking about Libevent
+use and development:
+
+<http://archives.seul.org/libevent/users/>
+
+# 3. ACKNOWLEDGMENTS
+
+The following people have helped with suggestions, ideas, code or
+fixing bugs:
+
+ * Samy Al Bahra
+ * Antony Antony
+ * Jacob Appelbaum
+ * Arno Bakker
+ * Weston Andros Adamson
+ * William Ahern
+ * Ivan Andropov
+ * Sergey Avseyev
+ * Avi Bab
+ * Joachim Bauch
+ * Andrey Belobrov
+ * Gilad Benjamini
+ * Stas Bekman
+ * Denis Bilenko
+ * Julien Blache
+ * Kevin Bowling
+ * Tomash Brechko
+ * Kelly Brock
+ * Ralph Castain
+ * Adrian Chadd
+ * Lawnstein Chan
+ * Shuo Chen
+ * Ka-Hing Cheung
+ * Andrew Cox
+ * Paul Croome
+ * George Danchev
+ * Andrew Danforth
+ * Ed Day
+ * Christopher Davis
+ * Mike Davis
+ * Frank Denis
+ * Antony Dovgal
+ * Mihai Draghicioiu
+ * Alexander Drozdov
+ * Mark Ellzey
+ * Shie Erlich
+ * Leonid Evdokimov
+ * Juan Pablo Fernandez
+ * Christophe Fillot
+ * Mike Frysinger
+ * Remi Gacogne
+ * Artem Germanov
+ * Alexander von Gernler
+ * Diego Giagio
+ * Artur Grabowski
+ * Diwaker Gupta
+ * Kuldeep Gupta
+ * Sebastian Hahn
+ * Dave Hart
+ * Greg Hazel
+ * Nicholas Heath
+ * Michael Herf
+ * Savg He
+ * Mark Heily
+ * Maxime Henrion
+ * Michael Herf
+ * Greg Hewgill
+ * Andrew Hochhaus
+ * Aaron Hopkins
+ * Tani Hosokawa
+ * Jamie Iles
+ * Xiuqiang Jiang
+ * Claudio Jeker
+ * Evan Jones
+ * Marcin Juszkiewicz
+ * George Kadianakis
+ * Makoto Kato
+ * Phua Keat
+ * Azat Khuzhin
+ * Alexander Klauer
+ * Kevin Ko
+ * Brian Koehmstedt
+ * Marko Kreen
+ * Ondřej Kuzník
+ * Valery Kyholodov
+ * Ross Lagerwall
+ * Scott Lamb
+ * Christopher Layne
+ * Adam Langley
+ * Graham Leggett
+ * Volker Lendecke
+ * Philip Lewis
+ * Zhou Li
+ * David Libenzi
+ * Yan Lin
+ * Moshe Litvin
+ * Simon Liu
+ * Mitchell Livingston
+ * Hagne Mahre
+ * Lubomir Marinov
+ * Abilio Marques
+ * Nicolas Martyanoff
+ * Abel Mathew
+ * Nick Mathewson
+ * James Mansion
+ * Nicholas Marriott
+ * Andrey Matveev
+ * Caitlin Mercer
+ * Dagobert Michelsen
+ * Andrea Montefusco
+ * Mansour Moufid
+ * Mina Naguib
+ * Felix Nawothnig
+ * Trond Norbye
+ * Linus Nordberg
+ * Richard Nyberg
+ * Jon Oberheide
+ * John Ohl
+ * Phil Oleson
+ * Alexey Ozeritsky
+ * Dave Pacheco
+ * Derrick Pallas
+ * Tassilo von Parseval
+ * Catalin Patulea
+ * Patrick Pelletier
+ * Simon Perreault
+ * Dan Petro
+ * Pierre Phaneuf
+ * Amarin Phaosawasdi
+ * Ryan Phillips
+ * Dimitre Piskyulev
+ * Pavel Plesov
+ * Jon Poland
+ * Roman Puls
+ * Nate R
+ * Robert Ransom
+ * Balint Reczey
+ * Bert JW Regeer
+ * Nate Rosenblum
+ * Peter Rosin
+ * Maseeb Abdul Qadir
+ * Wang Qin
+ * Alex S
+ * Gyepi Sam
+ * Hanna Schroeter
+ * Ralf Schmitt
+ * Mike Smellie
+ * Steve Snyder
+ * Nir Soffer
+ * Dug Song
+ * Dongsheng Song
+ * Hannes Sowa
+ * Joakim Soderberg
+ * Joseph Spadavecchia
+ * Kevin Springborn
+ * Harlan Stenn
+ * Andrew Sweeney
+ * Ferenc Szalai
+ * Brodie Thiesfield
+ * Jason Toffaletti
+ * Brian Utterback
+ * Gisle Vanem
+ * Bas Verhoeven
+ * Constantine Verutin
+ * Colin Watt
+ * Zack Weinberg
+ * Jardel Weyrich
+ * Jay R. Wren
+ * Zack Weinberg
+ * Mobai Zhang
+ * Alejo
+ * Alex
+ * Taral
+ * propanbutan
+ * masksqwe
+ * mmadia
+ * yangacer
+ * Andrey Skriabin
+ * basavesh.as
+ * billsegall
+ * Bill Vaughan
+ * Christopher Wiley
+ * David Paschich
+ * Ed Schouten
+ * Eduardo Panisset
+ * Jan Heylen
+ * jer-gentoo
+ * Joakim Söderberg
+ * kirillDanshin
+ * lzmths
+ * Marcus Sundberg
+ * Mark Mentovai
+ * Mattes D
+ * Matyas Dolak
+ * Neeraj Badlani
+ * Nick Mathewson
+ * Rainer Keller
+ * Seungmo Koo
+ * Thomas Bernard
+ * Xiao Bao Clark
+ * zeliard
+ * Zonr Chang
+ * Kurt Roeckx
+ * Seven
+ * Simone Basso
+ * Vlad Shcherban
+ * Tim Hentenaar
+ * Breaker
+ * johnsonlee
+ * Philip Prindeville
+ * Vis Virial
+ * Andreas Gustafsson
+ * Andrey Okoshkin
+ * an-tao
+ * baixiangcpp
+ * Bernard Spil
+ * Bogdan Harjoc
+ * Carlo Marcelo Arenas Belón
+ * David Benjamin
+ * David Disseldorp
+ * Dmitry Alimov
+ * Dominic Chen
+ * dpayne
+ * ejurgensen
+ * Fredrik Strupe
+ * Gonçalo Ribeiro
+ * James Synge
+ * Jan Beich
+ * Jesse Fang
+ * Jiri Luznicky
+ * José Luis Millán
+ * Kiyoshi Aman
+ * Leo Zhang
+ * lightningkay
+ * Luke Dashjr
+ * Marcin Szewczyk
+ * Maximilian Brunner
+ * Maya Rashish
+ * Murat Demirten
+ * Nathan French
+ * Nikolay Edigaryev
+ * Philip Herron
+ * Redfoxmoon
+ * stenn
+ * SuckShit
+ * The Gitter Badger
+ * tim-le
+ * Vincent JARDIN
+ * Xiang Zhang
+ * Xiaozhou Liu
+ * yongqing.jiao
+ * Enji Cooper
+ * linxiaohui
+ * Seong-Joong Kim
+ * Tobias Stoeckmann
+ * Yury Korzhetsky
+ * zhuizhuhaomeng
+ * Pierce Lopez
+ * yuangongji
+ * Keith Smiley
+ * jeremyerb
+ * Fabrice Fontaine
+ * wenyg
+ * Aleksandr-Melnikov
+ * ayuseleznev
+ * chenguolong
+ * Dimo Markov
+ * dota17
+ * fanquake
+ * Jan Kasiak
+ * Kamil Rytarowski
+ * Mario Emmenlauer
+ * Michael Davidsaver
+ * mohuang
+ * Nick Grifka
+ * Nicolas J. Bouliane
+ * Paul Osborne
+ * Philip Homburg
+ * Wataru Ashihara
+ * William A Rowe Jr
+ * yangyongsheng
+
+
+If we have forgotten your name, please contact us.
diff --git a/contrib/ntp/sntp/libevent/WIN32-Code/getopt.c b/contrib/ntp/sntp/libevent/WIN32-Code/getopt.c
new file mode 100644
index 000000000000..0fcba5d91529
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/WIN32-Code/getopt.c
@@ -0,0 +1,149 @@
+/* $NetBSD: getopt.c,v 1.16 1999/12/02 13:15:56 kleink Exp $ */
+
+/*
+ * Copyright (c) 1987, 1993, 1994, 1995
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if 0
+static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95";
+#endif
+
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+
+#define __P(x) x
+#define _DIAGASSERT(x) assert(x)
+
+#ifdef __weak_alias
+__weak_alias(getopt,_getopt);
+#endif
+
+
+int opterr = 1, /* if error message should be printed */
+ optind = 1, /* index into parent argv vector */
+ optopt, /* character checked for validity */
+ optreset; /* reset getopt */
+char *optarg; /* argument associated with option */
+
+static char * _progname __P((char *));
+int getopt_internal __P((int, char * const *, const char *));
+
+static char *
+_progname(nargv0)
+ char * nargv0;
+{
+ char * tmp;
+
+ _DIAGASSERT(nargv0 != NULL);
+
+ tmp = strrchr(nargv0, '/');
+ if (tmp)
+ tmp++;
+ else
+ tmp = nargv0;
+ return(tmp);
+}
+
+#define BADCH (int)'?'
+#define BADARG (int)':'
+#define EMSG ""
+
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt(nargc, nargv, ostr)
+ int nargc;
+ char * const nargv[];
+ const char *ostr;
+{
+ static char *__progname = 0;
+ static char *place = EMSG; /* option letter processing */
+ char *oli; /* option letter list index */
+ __progname = __progname?__progname:_progname(*nargv);
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(ostr != NULL);
+
+ if (optreset || !*place) { /* update scanning pointer */
+ optreset = 0;
+ if (optind >= nargc || *(place = nargv[optind]) != '-') {
+ place = EMSG;
+ return (-1);
+ }
+ if (place[1] && *++place == '-' /* found "--" */
+ && place[1] == '\0') {
+ ++optind;
+ place = EMSG;
+ return (-1);
+ }
+ } /* option letter okay? */
+ if ((optopt = (int)*place++) == (int)':' ||
+ !(oli = strchr(ostr, optopt))) {
+ /*
+ * if the user didn't specify '-' as an option,
+ * assume it means -1.
+ */
+ if (optopt == (int)'-')
+ return (-1);
+ if (!*place)
+ ++optind;
+ if (opterr && *ostr != ':')
+ (void)fprintf(stderr,
+ "%s: illegal option -- %c\n", __progname, optopt);
+ return (BADCH);
+ }
+ if (*++oli != ':') { /* don't need argument */
+ optarg = NULL;
+ if (!*place)
+ ++optind;
+ }
+ else { /* need an argument */
+ if (*place) /* no white space */
+ optarg = place;
+ else if (nargc <= ++optind) { /* no arg */
+ place = EMSG;
+ if (*ostr == ':')
+ return (BADARG);
+ if (opterr)
+ (void)fprintf(stderr,
+ "%s: option requires an argument -- %c\n",
+ __progname, optopt);
+ return (BADCH);
+ }
+ else /* white space */
+ optarg = nargv[optind];
+ place = EMSG;
+ ++optind;
+ }
+ return (optopt); /* dump back option letter */
+}
+
diff --git a/contrib/ntp/sntp/libevent/WIN32-Code/getopt.h b/contrib/ntp/sntp/libevent/WIN32-Code/getopt.h
new file mode 100644
index 000000000000..796f4550509d
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/WIN32-Code/getopt.h
@@ -0,0 +1,33 @@
+#ifndef __GETOPT_H__
+#define __GETOPT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int opterr; /* if error message should be printed */
+extern int optind; /* index into parent argv vector */
+extern int optopt; /* character checked for validity */
+extern int optreset; /* reset getopt */
+extern char *optarg; /* argument associated with option */
+
+struct option
+{
+ const char *name;
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+int getopt(int, char**, const char*);
+int getopt_long(int, char**, const char*, const struct option*, int*);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GETOPT_H__ */
diff --git a/contrib/ntp/sntp/libevent/WIN32-Code/getopt_long.c b/contrib/ntp/sntp/libevent/WIN32-Code/getopt_long.c
new file mode 100644
index 000000000000..092defbc4bed
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/WIN32-Code/getopt_long.c
@@ -0,0 +1,234 @@
+
+/*
+ * Copyright (c) 1987, 1993, 1994, 1996
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "getopt.h"
+
+extern int opterr; /* if error message should be printed */
+extern int optind; /* index into parent argv vector */
+extern int optopt; /* character checked for validity */
+extern int optreset; /* reset getopt */
+extern char *optarg; /* argument associated with option */
+
+#define __P(x) x
+#define _DIAGASSERT(x) assert(x)
+
+static char * __progname __P((char *));
+int getopt_internal __P((int, char * const *, const char *));
+
+static char *
+__progname(nargv0)
+ char * nargv0;
+{
+ char * tmp;
+
+ _DIAGASSERT(nargv0 != NULL);
+
+ tmp = strrchr(nargv0, '/');
+ if (tmp)
+ tmp++;
+ else
+ tmp = nargv0;
+ return(tmp);
+}
+
+#define BADCH (int)'?'
+#define BADARG (int)':'
+#define EMSG ""
+
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_internal(nargc, nargv, ostr)
+ int nargc;
+ char * const *nargv;
+ const char *ostr;
+{
+ static char *place = EMSG; /* option letter processing */
+ char *oli; /* option letter list index */
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(ostr != NULL);
+
+ if (optreset || !*place) { /* update scanning pointer */
+ optreset = 0;
+ if (optind >= nargc || *(place = nargv[optind]) != '-') {
+ place = EMSG;
+ return (-1);
+ }
+ if (place[1] && *++place == '-') { /* found "--" */
+ /* ++optind; */
+ place = EMSG;
+ return (-2);
+ }
+ } /* option letter okay? */
+ if ((optopt = (int)*place++) == (int)':' ||
+ !(oli = strchr(ostr, optopt))) {
+ /*
+ * if the user didn't specify '-' as an option,
+ * assume it means -1.
+ */
+ if (optopt == (int)'-')
+ return (-1);
+ if (!*place)
+ ++optind;
+ if (opterr && *ostr != ':')
+ (void)fprintf(stderr,
+ "%s: illegal option -- %c\n", __progname(nargv[0]), optopt);
+ return (BADCH);
+ }
+ if (*++oli != ':') { /* don't need argument */
+ optarg = NULL;
+ if (!*place)
+ ++optind;
+ } else { /* need an argument */
+ if (*place) /* no white space */
+ optarg = place;
+ else if (nargc <= ++optind) { /* no arg */
+ place = EMSG;
+ if ((opterr) && (*ostr != ':'))
+ (void)fprintf(stderr,
+ "%s: option requires an argument -- %c\n",
+ __progname(nargv[0]), optopt);
+ return (BADARG);
+ } else /* white space */
+ optarg = nargv[optind];
+ place = EMSG;
+ ++optind;
+ }
+ return (optopt); /* dump back option letter */
+}
+
+#if 0
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt2(nargc, nargv, ostr)
+ int nargc;
+ char * const *nargv;
+ const char *ostr;
+{
+ int retval;
+
+ if ((retval = getopt_internal(nargc, nargv, ostr)) == -2) {
+ retval = -1;
+ ++optind;
+ }
+ return(retval);
+}
+#endif
+
+/*
+ * getopt_long --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_long(nargc, nargv, options, long_options, index)
+ int nargc;
+ char ** nargv;
+ const char * options;
+ const struct option * long_options;
+ int * index;
+{
+ int retval;
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(options != NULL);
+ _DIAGASSERT(long_options != NULL);
+ /* index may be NULL */
+
+ if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
+ char *current_argv = nargv[optind++] + 2, *has_equal;
+ int i, match = -1;
+ size_t current_argv_len;
+
+ if (*current_argv == '\0') {
+ return(-1);
+ }
+ if ((has_equal = strchr(current_argv, '=')) != NULL) {
+ current_argv_len = has_equal - current_argv;
+ has_equal++;
+ } else
+ current_argv_len = strlen(current_argv);
+
+ for (i = 0; long_options[i].name; i++) {
+ if (strncmp(current_argv, long_options[i].name, current_argv_len))
+ continue;
+
+ if (strlen(long_options[i].name) == current_argv_len) {
+ match = i;
+ break;
+ }
+ if (match == -1)
+ match = i;
+ }
+ if (match != -1) {
+ if (long_options[match].has_arg == required_argument ||
+ long_options[match].has_arg == optional_argument) {
+ if (has_equal)
+ optarg = has_equal;
+ else
+ optarg = nargv[optind++];
+ }
+ if ((long_options[match].has_arg == required_argument)
+ && (optarg == NULL)) {
+ /*
+ * Missing argument, leading :
+ * indicates no error should be generated
+ */
+ if ((opterr) && (*options != ':'))
+ (void)fprintf(stderr,
+ "%s: option requires an argument -- %s\n",
+ __progname(nargv[0]), current_argv);
+ return (BADARG);
+ }
+ } else { /* No matching argument */
+ if ((opterr) && (*options != ':'))
+ (void)fprintf(stderr,
+ "%s: illegal option -- %s\n", __progname(nargv[0]), current_argv);
+ return (BADCH);
+ }
+ if (long_options[match].flag) {
+ *long_options[match].flag = long_options[match].val;
+ retval = 0;
+ } else
+ retval = long_options[match].val;
+ if (index)
+ *index = match;
+ }
+ return(retval);
+}
diff --git a/contrib/ntp/sntp/libevent/WIN32-Code/nmake/event2/event-config.h b/contrib/ntp/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
index 8cbf1902891f..3f3a0d2968dc 100644
--- a/contrib/ntp/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
+++ b/contrib/ntp/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
@@ -192,9 +192,6 @@
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
-/* Define to 1 if you have the <sys/devpoll.h> header file. */
-/* #undef EVENT__HAVE_SYS_DEVPOLL_H */
-
/* Define to 1 if you have the <sys/epoll.h> header file. */
/* #undef EVENT__HAVE_SYS_EPOLL_H */
@@ -274,7 +271,7 @@
/* #undef EVENT__HAVE_WORKING_KQUEUE */
/* Numeric representation of the version */
-#define EVENT__NUMERIC_VERSION 0x02010500
+#define EVENT__NUMERIC_VERSION 0x02010c00
/* Name of package */
#define EVENT__PACKAGE "libevent"
@@ -324,29 +321,22 @@
#define EVENT__SIZEOF_VOID_P 4
#endif
-/* Define to 1 if you have the ANSI C header files. */
-#define EVENT__STDC_HEADERS 1
+/* The size of `time_t`, as computed by sizeof. */
+#ifdef _WIN64
+#define EVENT__SIZEOF_TIME_T 8
+#else
+#define EVENT__SIZEOF_TIME_T 4
+#endif
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define EVENT__TIME_WITH_SYS_TIME 1
/* Version number of package */
-#define EVENT__VERSION "2.1.5-beta"
-
-/* Define to appropriate substitue if compiler doesnt have __func__ */
-#define EVENT____func__ __FUNCTION__
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef EVENT__const */
+#define EVENT__VERSION "2.1.12-stable"
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef _EVENT___cplusplus
#define EVENT__inline __inline
-#endif
-
-/* Define to `int' if <sys/types.h> does not define. */
-/* #undef EVENT__pid_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef EVENT__size_t */
diff --git a/contrib/ntp/sntp/libevent/aclocal.m4 b/contrib/ntp/sntp/libevent/aclocal.m4
index f869b9265d87..197f5758945b 100644
--- a/contrib/ntp/sntp/libevent/aclocal.m4
+++ b/contrib/ntp/sntp/libevent/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,13 +14,13 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.15.1], [],
+m4_if([$1], [1.16.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -332,13 +332,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -346,49 +345,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "$am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -397,18 +390,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -436,6 +428,10 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -472,7 +468,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
- m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@@ -495,8 +491,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
@@ -524,6 +520,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
AC_REQUIRE([AM_SILENT_RULES])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
@@ -563,7 +573,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -605,7 +615,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -626,7 +636,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -647,7 +657,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -655,49 +665,42 @@ AC_SUBST([am__leading_dot])])
# AM_MAKE_INCLUDE()
# -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -718,12 +721,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
@@ -736,7 +734,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -765,7 +763,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -812,7 +810,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -831,7 +829,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -912,7 +910,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -972,7 +970,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1000,7 +998,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1019,7 +1017,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2017 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1152,6 +1150,8 @@ AC_SUBST([am__untar])
m4_include([m4/ac_backport_259_ssizet.m4])
m4_include([m4/acx_pthread.m4])
+m4_include([m4/ax_check_funcs_ex.m4])
+m4_include([m4/ax_prog_doxygen.m4])
m4_include([m4/libevent_openssl.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
diff --git a/contrib/ntp/sntp/libevent/arc4random.c b/contrib/ntp/sntp/libevent/arc4random.c
index a2338e692a10..8729f6b92fe7 100644
--- a/contrib/ntp/sntp/libevent/arc4random.c
+++ b/contrib/ntp/sntp/libevent/arc4random.c
@@ -54,6 +54,7 @@
#ifdef _WIN32
#include <wincrypt.h>
#include <process.h>
+#include <winerror.h>
#else
#include <fcntl.h>
#include <unistd.h>
@@ -62,6 +63,9 @@
#ifdef EVENT__HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif
+#ifdef EVENT__HAVE_SYS_RANDOM_H
+#include <sys/random.h>
+#endif
#endif
#include <limits.h>
#include <stdlib.h>
@@ -89,7 +93,6 @@ static int rs_initialized;
static struct arc4_stream rs;
static pid_t arc4_stir_pid;
static int arc4_count;
-static int arc4_seeded_ok;
static inline unsigned char arc4_getbyte(void);
@@ -163,22 +166,15 @@ arc4_seed_win32(void)
return -1;
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
- arc4_seeded_ok = 1;
return 0;
}
#endif
-#if defined(EVENT__HAVE_SYS_SYSCTL_H) && defined(EVENT__HAVE_SYSCTL)
-#if EVENT__HAVE_DECL_CTL_KERN && EVENT__HAVE_DECL_KERN_RANDOM && EVENT__HAVE_DECL_RANDOM_UUID
-#define TRY_SEED_SYSCTL_LINUX
+#if defined(EVENT__HAVE_GETRANDOM)
+#define TRY_SEED_GETRANDOM
static int
-arc4_seed_sysctl_linux(void)
+arc4_seed_getrandom(void)
{
- /* Based on code by William Ahern, this function tries to use the
- * RANDOM_UUID sysctl to get entropy from the kernel. This can work
- * even if /dev/urandom is inaccessible for some reason (e.g., we're
- * running in a chroot). */
- int mib[] = { CTL_KERN, KERN_RANDOM, RANDOM_UUID };
unsigned char buf[ADD_ENTROPY];
size_t len, n;
unsigned i;
@@ -189,7 +185,7 @@ arc4_seed_sysctl_linux(void)
for (len = 0; len < sizeof(buf); len += n) {
n = sizeof(buf) - len;
- if (0 != sysctl(mib, 3, &buf[len], &n, NULL, 0))
+ if (0 == getrandom(&buf[len], n, 0))
return -1;
}
/* make sure that the buffer actually got set. */
@@ -201,11 +197,11 @@ arc4_seed_sysctl_linux(void)
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
- arc4_seeded_ok = 1;
return 0;
}
-#endif
+#endif /* EVENT__HAVE_GETRANDOM */
+#if defined(EVENT__HAVE_SYS_SYSCTL_H) && defined(EVENT__HAVE_SYSCTL)
#if EVENT__HAVE_DECL_CTL_KERN && EVENT__HAVE_DECL_KERN_ARND
#define TRY_SEED_SYSCTL_BSD
static int
@@ -241,7 +237,6 @@ arc4_seed_sysctl_bsd(void)
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
- arc4_seeded_ok = 1;
return 0;
}
#endif
@@ -287,7 +282,6 @@ arc4_seed_proc_sys_kernel_random_uuid(void)
}
evutil_memclear_(entropy, sizeof(entropy));
evutil_memclear_(buf, sizeof(buf));
- arc4_seeded_ok = 1;
return 0;
}
#endif
@@ -311,7 +305,6 @@ static int arc4_seed_urandom_helper_(const char *fname)
return -1;
arc4_addrandom(buf, sizeof(buf));
evutil_memclear_(buf, sizeof(buf));
- arc4_seeded_ok = 1;
return 0;
}
@@ -347,6 +340,10 @@ arc4_seed(void)
if (0 == arc4_seed_win32())
ok = 1;
#endif
+#ifdef TRY_SEED_GETRANDOM
+ if (0 == arc4_seed_getrandom())
+ ok = 1;
+#endif
#ifdef TRY_SEED_URANDOM
if (0 == arc4_seed_urandom())
ok = 1;
@@ -356,12 +353,6 @@ arc4_seed(void)
0 == arc4_seed_proc_sys_kernel_random_uuid())
ok = 1;
#endif
-#ifdef TRY_SEED_SYSCTL_LINUX
- /* Apparently Linux is deprecating sysctl, and spewing warning
- * messages when you try to use it. */
- if (!ok && 0 == arc4_seed_sysctl_linux())
- ok = 1;
-#endif
#ifdef TRY_SEED_SYSCTL_BSD
if (0 == arc4_seed_sysctl_bsd())
ok = 1;
@@ -379,8 +370,7 @@ arc4_stir(void)
rs_initialized = 1;
}
- arc4_seed();
- if (!arc4_seeded_ok)
+ if (0 != arc4_seed())
return -1;
/*
diff --git a/contrib/ntp/sntp/libevent/autogen.sh b/contrib/ntp/sntp/libevent/autogen.sh
index 57eeb940b911..bcfe937a60ce 100755
--- a/contrib/ntp/sntp/libevent/autogen.sh
+++ b/contrib/ntp/sntp/libevent/autogen.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+
+MAKE=make
+if command -v gmake >/dev/null 2>/dev/null; then
+ MAKE=gmake
+fi
+$MAKE maintainer-clean >/dev/null 2>/dev/null
+
if [ -x "`which autoreconf 2>/dev/null`" ] ; then
exec autoreconf -ivf
fi
diff --git a/contrib/ntp/sntp/libevent/buffer.c b/contrib/ntp/sntp/libevent/buffer.c
index a1a2b988c13a..3524b3504d43 100644
--- a/contrib/ntp/sntp/libevent/buffer.c
+++ b/contrib/ntp/sntp/libevent/buffer.c
@@ -95,6 +95,7 @@
#include "evthread-internal.h"
#include "evbuffer-internal.h"
#include "bufferevent-internal.h"
+#include "event-internal.h"
/* some systems do not have MAP_FAILED */
#ifndef MAP_FAILED
@@ -184,7 +185,7 @@ evbuffer_chain_new(size_t size)
/* this way we can manipulate the buffer to different addresses,
* which is required for mmap for example.
*/
- chain->buffer = EVBUFFER_CHAIN_EXTRA(u_char, chain);
+ chain->buffer = EVBUFFER_CHAIN_EXTRA(unsigned char, chain);
chain->refcnt = 1;
@@ -522,8 +523,8 @@ evbuffer_invoke_callbacks_(struct evbuffer *buffer)
evbuffer_incref_and_lock_(buffer);
if (buffer->parent)
bufferevent_incref_(buffer->parent);
+ EVBUFFER_UNLOCK(buffer);
}
- EVBUFFER_UNLOCK(buffer);
}
evbuffer_run_callbacks(buffer, 0);
@@ -682,8 +683,8 @@ evbuffer_reserve_space(struct evbuffer *buf, ev_ssize_t size,
if ((chain = evbuffer_expand_singlechain(buf, size)) == NULL)
goto done;
- vec[0].iov_base = CHAIN_SPACE_PTR(chain);
- vec[0].iov_len = (size_t) CHAIN_SPACE_LEN(chain);
+ vec[0].iov_base = (void *)CHAIN_SPACE_PTR(chain);
+ vec[0].iov_len = (size_t)CHAIN_SPACE_LEN(chain);
EVUTIL_ASSERT(size<0 || (size_t)vec[0].iov_len >= (size_t)size);
n = 1;
} else {
@@ -703,13 +704,17 @@ static int
advance_last_with_data(struct evbuffer *buf)
{
int n = 0;
+ struct evbuffer_chain **chainp = buf->last_with_datap;
+
ASSERT_EVBUFFER_LOCKED(buf);
- if (!*buf->last_with_datap)
+ if (!*chainp)
return 0;
- while ((*buf->last_with_datap)->next && (*buf->last_with_datap)->next->off) {
- buf->last_with_datap = &(*buf->last_with_datap)->next;
+ while ((*chainp)->next) {
+ chainp = &(*chainp)->next;
+ if ((*chainp)->off)
+ buf->last_with_datap = chainp;
++n;
}
return n;
@@ -732,7 +737,7 @@ evbuffer_commit_space(struct evbuffer *buf,
result = 0;
goto done;
} else if (n_vecs == 1 &&
- (buf->last && vec[0].iov_base == (void*)CHAIN_SPACE_PTR(buf->last))) {
+ (buf->last && vec[0].iov_base == (void *)CHAIN_SPACE_PTR(buf->last))) {
/* The user only got or used one chain; it might not
* be the first one with space in it. */
if ((size_t)vec[0].iov_len > (size_t)CHAIN_SPACE_LEN(buf->last))
@@ -758,7 +763,7 @@ evbuffer_commit_space(struct evbuffer *buf,
for (i=0; i<n_vecs; ++i) {
if (!chain)
goto done;
- if (vec[i].iov_base != (void*)CHAIN_SPACE_PTR(chain) ||
+ if (vec[i].iov_base != (void *)CHAIN_SPACE_PTR(chain) ||
(size_t)vec[i].iov_len > CHAIN_SPACE_LEN(chain))
goto done;
chain = chain->next;
@@ -883,11 +888,16 @@ COPY_CHAIN(struct evbuffer *dst, struct evbuffer *src)
static void
APPEND_CHAIN(struct evbuffer *dst, struct evbuffer *src)
{
+ struct evbuffer_chain **chp;
+
ASSERT_EVBUFFER_LOCKED(dst);
ASSERT_EVBUFFER_LOCKED(src);
- dst->last->next = src->first;
+
+ chp = evbuffer_free_trailing_empty_chains(dst);
+ *chp = src->first;
+
if (src->last_with_datap == &src->first)
- dst->last_with_datap = &dst->last->next;
+ dst->last_with_datap = chp;
else
dst->last_with_datap = src->last_with_datap;
dst->last = src->last;
@@ -1141,7 +1151,7 @@ evbuffer_drain(struct evbuffer *buf, size_t len)
}
buf->first = chain;
- EVUTIL_ASSERT(chain && remaining <= chain->off);
+ EVUTIL_ASSERT(remaining <= chain->off);
chain->misalign += remaining;
chain->off -= remaining;
}
@@ -1293,7 +1303,7 @@ evbuffer_remove_buffer(struct evbuffer *src, struct evbuffer *dst,
chain = chain->next;
}
- if (nread) {
+ if (chain != src->first) {
/* we can remove the chain */
struct evbuffer_chain **chp;
chp = evbuffer_free_trailing_empty_chains(dst);
@@ -1411,9 +1421,11 @@ evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size)
for (; chain != NULL && (size_t)size >= chain->off; chain = next) {
next = chain->next;
- memcpy(buffer, chain->buffer + chain->misalign, chain->off);
- size -= chain->off;
- buffer += chain->off;
+ if (chain->buffer) {
+ memcpy(buffer, chain->buffer + chain->misalign, chain->off);
+ size -= chain->off;
+ buffer += chain->off;
+ }
if (chain == last_with_data)
removed_last_with_data = 1;
if (&chain->next == buf->last_with_datap)
@@ -1529,11 +1541,11 @@ evbuffer_find_eol_char(struct evbuffer_ptr *it)
return (-1);
}
-static inline int
+static inline size_t
evbuffer_strspn(
struct evbuffer_ptr *ptr, const char *chrset)
{
- int count = 0;
+ size_t count = 0;
struct evbuffer_chain *chain = ptr->internal_.chain;
size_t i = ptr->internal_.pos_in_chain;
@@ -1732,7 +1744,11 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
goto done;
}
- chain = buf->last;
+ if (*buf->last_with_datap == NULL) {
+ chain = buf->last;
+ } else {
+ chain = *buf->last_with_datap;
+ }
/* If there are no chains allocated for this buffer, allocate one
* big enough to hold all the data. */
@@ -1815,6 +1831,10 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
EVBUFFER_LOCK(buf);
+ if (datlen == 0) {
+ result = 0;
+ goto done;
+ }
if (buf->freeze_start) {
goto done;
}
@@ -1868,7 +1888,7 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
if ((tmp = evbuffer_chain_new(datlen)) == NULL)
goto done;
buf->first = tmp;
- if (buf->last_with_datap == &buf->first)
+ if (buf->last_with_datap == &buf->first && chain->off)
buf->last_with_datap = &tmp->next;
tmp->next = chain;
@@ -1879,7 +1899,7 @@ evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
memcpy(tmp->buffer + tmp->misalign, data, datlen);
buf->total_len += datlen;
- buf->n_add_for_cb += (size_t)chain->misalign;
+ buf->n_add_for_cb += datlen;
out:
evbuffer_invoke_callbacks_(buf);
@@ -1974,8 +1994,7 @@ evbuffer_expand_singlechain(struct evbuffer *buf, size_t datlen)
/* Would expanding this chunk be affordable and worthwhile? */
if (CHAIN_SPACE_LEN(chain) < chain->buffer_len / 8 ||
chain->off > MAX_TO_COPY_IN_EXPAND ||
- (datlen < EVBUFFER_CHAIN_MAX &&
- EVBUFFER_CHAIN_MAX - datlen >= chain->off)) {
+ datlen >= (EVBUFFER_CHAIN_MAX - chain->off)) {
/* It's not worth resizing this chain. Can the next one be
* used? */
if (chain->next && CHAIN_SPACE_LEN(chain->next) >= datlen) {
@@ -2219,16 +2238,18 @@ evbuffer_read_setup_vecs_(struct evbuffer *buf, ev_ssize_t howmuch,
so_far = 0;
/* Let firstchain be the first chain with any space on it */
firstchainp = buf->last_with_datap;
+ EVUTIL_ASSERT(*firstchainp);
if (CHAIN_SPACE_LEN(*firstchainp) == 0) {
firstchainp = &(*firstchainp)->next;
}
chain = *firstchainp;
+ EVUTIL_ASSERT(chain);
for (i = 0; i < n_vecs_avail && so_far < (size_t)howmuch; ++i) {
size_t avail = (size_t) CHAIN_SPACE_LEN(chain);
if (avail > (howmuch - so_far) && exact)
avail = howmuch - so_far;
- vecs[i].iov_base = CHAIN_SPACE_PTR(chain);
+ vecs[i].iov_base = (void *)CHAIN_SPACE_PTR(chain);
vecs[i].iov_len = avail;
so_far += avail;
chain = chain->next;
@@ -2457,7 +2478,7 @@ evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t dest_fd,
ev_off_t len = chain->off;
#elif defined(SENDFILE_IS_LINUX) || defined(SENDFILE_IS_SOLARIS)
ev_ssize_t res;
- ev_off_t offset = chain->misalign;
+ off_t offset = chain->misalign;
#endif
ASSERT_EVBUFFER_LOCKED(buffer);
@@ -2781,8 +2802,8 @@ evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
- start_at->internal_.pos_in_chain;
idx = 1;
if (n_vec > 0) {
- vec[0].iov_base = chain->buffer + chain->misalign
- + start_at->internal_.pos_in_chain;
+ vec[0].iov_base = (void *)(chain->buffer + chain->misalign
+ + start_at->internal_.pos_in_chain);
vec[0].iov_len = len_so_far;
}
chain = chain->next;
@@ -2803,7 +2824,7 @@ evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
if (len >= 0 && len_so_far >= len)
break;
if (idx<n_vec) {
- vec[idx].iov_base = chain->buffer + chain->misalign;
+ vec[idx].iov_base = (void *)(chain->buffer + chain->misalign);
vec[idx].iov_len = chain->off;
} else if (len<0) {
break;
@@ -2909,7 +2930,7 @@ evbuffer_add_reference(struct evbuffer *outbuf,
if (!chain)
return (-1);
chain->flags |= EVBUFFER_REFERENCE | EVBUFFER_IMMUTABLE;
- chain->buffer = (u_char *)data;
+ chain->buffer = (unsigned char *)data;
chain->buffer_len = datlen;
chain->off = datlen;
@@ -3190,7 +3211,6 @@ evbuffer_add_file_segment(struct evbuffer *buf,
}
}
}
- ++seg->refcnt;
EVLOCK_UNLOCK(seg->lock, 0);
if (buf->freeze_end)
@@ -3254,6 +3274,9 @@ evbuffer_add_file_segment(struct evbuffer *buf,
chain->off = length;
}
+ EVLOCK_LOCK(seg->lock, 0);
+ ++seg->refcnt;
+ EVLOCK_UNLOCK(seg->lock, 0);
extra->segment = seg;
buf->n_add_for_cb += length;
evbuffer_chain_insert(buf, chain);
@@ -3285,7 +3308,7 @@ evbuffer_add_file(struct evbuffer *buf, int fd, ev_off_t offset, ev_off_t length
return r;
}
-void
+int
evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg)
{
EVBUFFER_LOCK(buffer);
@@ -3296,10 +3319,15 @@ evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg)
if (cb) {
struct evbuffer_cb_entry *ent =
evbuffer_add_cb(buffer, NULL, cbarg);
+ if (!ent) {
+ EVBUFFER_UNLOCK(buffer);
+ return -1;
+ }
ent->cb.cb_obsolete = cb;
ent->flags |= EVBUFFER_CB_OBSOLETE;
}
EVBUFFER_UNLOCK(buffer);
+ return 0;
}
struct evbuffer_cb_entry *
diff --git a/contrib/ntp/sntp/libevent/buffer_iocp.c b/contrib/ntp/sntp/libevent/buffer_iocp.c
index 2d76a90e7702..2af0c49cc64b 100644
--- a/contrib/ntp/sntp/libevent/buffer_iocp.c
+++ b/contrib/ntp/sntp/libevent/buffer_iocp.c
@@ -44,6 +44,7 @@
#include "mm-internal.h"
#include <winsock2.h>
+#include <winerror.h>
#include <windows.h>
#include <stdio.h>
diff --git a/contrib/ntp/sntp/libevent/bufferevent-internal.h b/contrib/ntp/sntp/libevent/bufferevent-internal.h
index 134bb337521c..87ab9ad9c0f7 100644
--- a/contrib/ntp/sntp/libevent/bufferevent-internal.h
+++ b/contrib/ntp/sntp/libevent/bufferevent-internal.h
@@ -40,6 +40,17 @@ extern "C" {
#include "ratelim-internal.h"
#include "event2/bufferevent_struct.h"
+#include "ipv6-internal.h"
+#ifdef _WIN32
+#include <ws2tcpip.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+
/* These flags are reasons that we might be declining to actually enable
reading or writing on a bufferevent.
*/
@@ -205,6 +216,20 @@ struct bufferevent_private {
/** Rate-limiting information for this bufferevent */
struct bufferevent_rate_limit *rate_limiting;
+
+ /* Saved conn_addr, to extract IP address from it.
+ *
+ * Because some servers may reset/close connection without waiting clients,
+ * in that case we can't extract IP address even in close_cb.
+ * So we need to save it, just after we connected to remote server, or
+ * after resolving (to avoid extra dns requests during retrying, since UDP
+ * is slow) */
+ union {
+ struct sockaddr_in6 in6;
+ struct sockaddr_in in;
+ } conn_address;
+
+ struct evdns_getaddrinfo_request *dns_request;
};
/** Possible operations for a control callback. */
@@ -281,6 +306,13 @@ extern const struct bufferevent_ops bufferevent_ops_pair;
#define BEV_IS_FILTER(bevp) ((bevp)->be_ops == &bufferevent_ops_filter)
#define BEV_IS_PAIR(bevp) ((bevp)->be_ops == &bufferevent_ops_pair)
+#if defined(EVENT__HAVE_OPENSSL)
+extern const struct bufferevent_ops bufferevent_ops_openssl;
+#define BEV_IS_OPENSSL(bevp) ((bevp)->be_ops == &bufferevent_ops_openssl)
+#else
+#define BEV_IS_OPENSSL(bevp) 0
+#endif
+
#ifdef _WIN32
extern const struct bufferevent_ops bufferevent_ops_async;
#define BEV_IS_ASYNC(bevp) ((bevp)->be_ops == &bufferevent_ops_async)
@@ -289,13 +321,16 @@ extern const struct bufferevent_ops bufferevent_ops_async;
#endif
/** Initialize the shared parts of a bufferevent. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_init_common_(struct bufferevent_private *, struct event_base *, const struct bufferevent_ops *, enum bufferevent_options options);
/** For internal use: temporarily stop all reads on bufev, until the conditions
* in 'what' are over. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
/** For internal use: clear the conditions 'what' on bufev, and re-enable
* reading if there are no conditions left. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
/** For internal use: temporarily stop all writes on bufev, until the conditions
@@ -322,32 +357,42 @@ void bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend
@return 0 if successful, or -1 if an error occurred
@see bufferevent_disable()
*/
+EVENT2_EXPORT_SYMBOL
int bufferevent_disable_hard_(struct bufferevent *bufev, short event);
/** Internal: Set up locking on a bufferevent. If lock is set, use it.
* Otherwise, use a new lock. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_enable_locking_(struct bufferevent *bufev, void *lock);
-/** Internal: Increment the reference count on bufev. */
-void bufferevent_incref_(struct bufferevent *bufev);
+/** Internal: backwards compat macro for the now public function
+ * Increment the reference count on bufev. */
+#define bufferevent_incref_(bufev) bufferevent_incref(bufev)
/** Internal: Lock bufev and increase its reference count.
* unlocking it otherwise. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_incref_and_lock_(struct bufferevent *bufev);
-/** Internal: Decrement the reference count on bufev. Returns 1 if it freed
+/** Internal: backwards compat macro for the now public function
+ * Decrement the reference count on bufev. Returns 1 if it freed
* the bufferevent.*/
-int bufferevent_decref_(struct bufferevent *bufev);
+#define bufferevent_decref_(bufev) bufferevent_decref(bufev)
+
/** Internal: Drop the reference count on bufev, freeing as necessary, and
* unlocking it otherwise. Returns 1 if it freed the bufferevent. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
/** Internal: If callbacks are deferred and we have a read callback, schedule
* a readcb. Otherwise just run the readcb. Ignores watermarks. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_run_readcb_(struct bufferevent *bufev, int options);
/** Internal: If callbacks are deferred and we have a write callback, schedule
* a writecb. Otherwise just run the writecb. Ignores watermarks. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_run_writecb_(struct bufferevent *bufev, int options);
/** Internal: If callbacks are deferred and we have an eventcb, schedule
* it to run with events "what". Otherwise just run the eventcb.
* See bufferevent_trigger_event for meaning of "options". */
+EVENT2_EXPORT_SYMBOL
void bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options);
/** Internal: Run or schedule (if deferred or options contain
@@ -371,6 +416,7 @@ bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options
/** Internal: Add the event 'ev' with timeout tv, unless tv is set to 0, in
* which case add ev with no timeout. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_add_event_(struct event *ev, const struct timeval *tv);
/* =========
@@ -380,15 +426,33 @@ int bufferevent_add_event_(struct event *ev, const struct timeval *tv);
/** Internal use: Set up the ev_read and ev_write callbacks so that
* the other "generic_timeout" functions will work on it. Call this from
* the constructor function. */
+EVENT2_EXPORT_SYMBOL
void bufferevent_init_generic_timeout_cbs_(struct bufferevent *bev);
/** Internal use: Add or delete the generic timeout events as appropriate.
* (If an event is enabled and a timeout is set, we add the event. Otherwise
* we delete it.) Call this from anything that changes the timeout values,
* that enabled EV_READ or EV_WRITE, or that disables EV_READ or EV_WRITE. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_generic_adj_timeouts_(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
+int bufferevent_generic_adj_existing_timeouts_(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
enum bufferevent_options bufferevent_get_options_(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
+const struct sockaddr*
+bufferevent_socket_get_conn_address_(struct bufferevent *bev);
+
+EVENT2_EXPORT_SYMBOL
+void
+bufferevent_socket_set_conn_address_fd_(struct bufferevent *bev, evutil_socket_t fd);
+
+EVENT2_EXPORT_SYMBOL
+void
+bufferevent_socket_set_conn_address_(struct bufferevent *bev, struct sockaddr *addr, size_t addrlen);
+
+
/** Internal use: We have just successfully read data into an inbuf, so
* reset the read timeout (if any). */
#define BEV_RESET_GENERIC_READ_TIMEOUT(bev) \
@@ -433,11 +497,15 @@ enum bufferevent_options bufferevent_get_options_(struct bufferevent *bev);
/* ==== For rate-limiting. */
+EVENT2_EXPORT_SYMBOL
int bufferevent_decrement_write_buckets_(struct bufferevent_private *bev,
ev_ssize_t bytes);
+EVENT2_EXPORT_SYMBOL
int bufferevent_decrement_read_buckets_(struct bufferevent_private *bev,
ev_ssize_t bytes);
+EVENT2_EXPORT_SYMBOL
ev_ssize_t bufferevent_get_read_max_(struct bufferevent_private *bev);
+EVENT2_EXPORT_SYMBOL
ev_ssize_t bufferevent_get_write_max_(struct bufferevent_private *bev);
int bufferevent_ratelim_init_(struct bufferevent_private *bev);
diff --git a/contrib/ntp/sntp/libevent/bufferevent.c b/contrib/ntp/sntp/libevent/bufferevent.c
index d298d0b3f013..08c0486c087d 100644
--- a/contrib/ntp/sntp/libevent/bufferevent.c
+++ b/contrib/ntp/sntp/libevent/bufferevent.c
@@ -45,7 +45,6 @@
#ifdef _WIN32
#include <winsock2.h>
#endif
-#include <errno.h>
#include "event2/util.h"
#include "event2/buffer.h"
@@ -67,8 +66,7 @@ static void bufferevent_finalize_cb_(struct event_callback *evcb, void *arg_);
void
bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
if (!bufev_private->read_suspended)
bufev->be_ops->disable(bufev, EV_READ);
@@ -79,8 +77,7 @@ bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags w
void
bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
bufev_private->read_suspended &= ~what;
if (!bufev_private->read_suspended && (bufev->enabled & EV_READ))
@@ -91,8 +88,7 @@ bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags
void
bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
if (!bufev_private->write_suspended)
bufev->be_ops->disable(bufev, EV_WRITE);
@@ -103,8 +99,7 @@ bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags
void
bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
bufev_private->write_suspended &= ~what;
if (!bufev_private->write_suspended && (bufev->enabled & EV_WRITE))
@@ -112,6 +107,28 @@ bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flag
BEV_UNLOCK(bufev);
}
+/**
+ * Sometimes bufferevent's implementation can overrun high watermarks
+ * (one of examples is openssl) and in this case if the read callback
+ * will not handle enough data do over condition above the read
+ * callback will never be called again (due to suspend above).
+ *
+ * To avoid this we are scheduling read callback again here, but only
+ * from the user callback to avoid multiple scheduling:
+ * - when the data had been added to it
+ * - when the data had been drained from it (user specified read callback)
+ */
+static void bufferevent_inbuf_wm_check(struct bufferevent *bev)
+{
+ if (!bev->wm_read.high)
+ return;
+ if (!(bev->enabled & EV_READ))
+ return;
+ if (evbuffer_get_length(bev->input) < bev->wm_read.high)
+ return;
+
+ bufferevent_trigger(bev, EV_READ, BEV_OPT_DEFER_CALLBACKS);
+}
/* Callback to implement watermarks on the input buffer. Only enabled
* if the watermark is set. */
@@ -148,6 +165,7 @@ bufferevent_run_deferred_callbacks_locked(struct event_callback *cb, void *arg)
if (bufev_private->readcb_pending && bufev->readcb) {
bufev_private->readcb_pending = 0;
bufev->readcb(bufev, bufev->cbarg);
+ bufferevent_inbuf_wm_check(bufev);
}
if (bufev_private->writecb_pending && bufev->writecb) {
bufev_private->writecb_pending = 0;
@@ -188,6 +206,7 @@ bufferevent_run_deferred_callbacks_unlocked(struct event_callback *cb, void *arg
void *cbarg = bufev->cbarg;
bufev_private->readcb_pending = 0;
UNLOCKED(readcb(bufev, cbarg));
+ bufferevent_inbuf_wm_check(bufev);
}
if (bufev_private->writecb_pending && bufev->writecb) {
bufferevent_data_cb writecb = bufev->writecb;
@@ -222,8 +241,7 @@ void
bufferevent_run_readcb_(struct bufferevent *bufev, int options)
{
/* Requires that we hold the lock and a reference */
- struct bufferevent_private *p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *p = BEV_UPCAST(bufev);
if (bufev->readcb == NULL)
return;
if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
@@ -231,6 +249,7 @@ bufferevent_run_readcb_(struct bufferevent *bufev, int options)
SCHEDULE_DEFERRED(p);
} else {
bufev->readcb(bufev, bufev->cbarg);
+ bufferevent_inbuf_wm_check(bufev);
}
}
@@ -238,8 +257,7 @@ void
bufferevent_run_writecb_(struct bufferevent *bufev, int options)
{
/* Requires that we hold the lock and a reference */
- struct bufferevent_private *p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *p = BEV_UPCAST(bufev);
if (bufev->writecb == NULL)
return;
if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
@@ -267,8 +285,7 @@ void
bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options)
{
/* Requires that we hold the lock and a reference */
- struct bufferevent_private *p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *p = BEV_UPCAST(bufev);
if (bufev->errorcb == NULL)
return;
if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
@@ -298,14 +315,12 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
if (!bufev->input) {
if ((bufev->input = evbuffer_new()) == NULL)
- return -1;
+ goto err;
}
if (!bufev->output) {
- if ((bufev->output = evbuffer_new()) == NULL) {
- evbuffer_free(bufev->input);
- return -1;
- }
+ if ((bufev->output = evbuffer_new()) == NULL)
+ goto err;
}
bufev_private->refcnt = 1;
@@ -317,7 +332,8 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
bufev->be_ops = ops;
- bufferevent_ratelim_init_(bufev_private);
+ if (bufferevent_ratelim_init_(bufev_private))
+ goto err;
/*
* Set to EV_WRITE so that using bufferevent_write is going to
@@ -328,20 +344,14 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (options & BEV_OPT_THREADSAFE) {
- if (bufferevent_enable_locking_(bufev, NULL) < 0) {
- /* cleanup */
- evbuffer_free(bufev->input);
- evbuffer_free(bufev->output);
- bufev->input = NULL;
- bufev->output = NULL;
- return -1;
- }
+ if (bufferevent_enable_locking_(bufev, NULL) < 0)
+ goto err;
}
#endif
if ((options & (BEV_OPT_DEFER_CALLBACKS|BEV_OPT_UNLOCK_CALLBACKS))
== BEV_OPT_UNLOCK_CALLBACKS) {
event_warnx("UNLOCK_CALLBACKS requires DEFER_CALLBACKS");
- return -1;
+ goto err;
}
if (options & BEV_OPT_UNLOCK_CALLBACKS)
event_deferred_cb_init_(
@@ -362,6 +372,17 @@ bufferevent_init_common_(struct bufferevent_private *bufev_private,
evbuffer_set_parent_(bufev->output, bufev);
return 0;
+
+err:
+ if (bufev->input) {
+ evbuffer_free(bufev->input);
+ bufev->input = NULL;
+ }
+ if (bufev->output) {
+ evbuffer_free(bufev->output);
+ bufev->output = NULL;
+ }
+ return -1;
}
void
@@ -460,8 +481,7 @@ bufferevent_read_buffer(struct bufferevent *bufev, struct evbuffer *buf)
int
bufferevent_enable(struct bufferevent *bufev, short event)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
short impl_events = event;
int r = 0;
@@ -475,6 +495,8 @@ bufferevent_enable(struct bufferevent *bufev, short event)
if (impl_events && bufev->be_ops->enable(bufev, impl_events) < 0)
r = -1;
+ if (r)
+ event_debug(("%s: cannot enable 0x%hx on %p", __func__, event, bufev));
bufferevent_decref_and_unlock_(bufev);
return r;
@@ -534,8 +556,7 @@ int
bufferevent_disable_hard_(struct bufferevent *bufev, short event)
{
int r = 0;
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
bufev->enabled &= ~event;
@@ -558,6 +579,8 @@ bufferevent_disable(struct bufferevent *bufev, short event)
if (bufev->be_ops->disable(bufev, event) < 0)
r = -1;
+ if (r)
+ event_debug(("%s: cannot disable 0x%hx on %p", __func__, event, bufev));
BEV_UNLOCK(bufev);
return r;
@@ -571,8 +594,7 @@ void
bufferevent_setwatermark(struct bufferevent *bufev, short events,
size_t lowmark, size_t highmark)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
if (events & EV_WRITE) {
@@ -657,8 +679,7 @@ bufferevent_flush(struct bufferevent *bufev,
void
bufferevent_incref_and_lock_(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_private =
- BEV_UPCAST(bufev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
++bufev_private->refcnt;
}
@@ -684,8 +705,7 @@ bufferevent_transfer_lock_ownership_(struct bufferevent *donor,
int
bufferevent_decref_and_unlock_(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
int n_cbs = 0;
#define MAX_CBS 16
struct event_callback *cbs[MAX_CBS];
@@ -728,8 +748,7 @@ bufferevent_finalize_cb_(struct event_callback *evcb, void *arg_)
{
struct bufferevent *bufev = arg_;
struct bufferevent *underlying;
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
underlying = bufferevent_get_underlying(bufev);
@@ -777,7 +796,7 @@ bufferevent_finalize_cb_(struct event_callback *evcb, void *arg_)
}
int
-bufferevent_decref_(struct bufferevent *bufev)
+bufferevent_decref(struct bufferevent *bufev)
{
BEV_LOCK(bufev);
return bufferevent_decref_and_unlock_(bufev);
@@ -793,11 +812,14 @@ bufferevent_free(struct bufferevent *bufev)
}
void
-bufferevent_incref_(struct bufferevent *bufev)
+bufferevent_incref(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_private =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
+ /* XXX: now that this function is public, we might want to
+ * - return the count from this function
+ * - create a new function to atomically grab the current refcount
+ */
BEV_LOCK(bufev);
++bufev_private->refcnt;
BEV_UNLOCK(bufev);
@@ -848,6 +870,8 @@ bufferevent_setfd(struct bufferevent *bev, evutil_socket_t fd)
BEV_LOCK(bev);
if (bev->be_ops->ctrl)
res = bev->be_ops->ctrl(bev, BEV_CTRL_SET_FD, &d);
+ if (res)
+ event_debug(("%s: cannot set fd for %p to "EV_SOCK_FMT, __func__, bev, fd));
BEV_UNLOCK(bev);
return res;
}
@@ -861,6 +885,8 @@ bufferevent_getfd(struct bufferevent *bev)
BEV_LOCK(bev);
if (bev->be_ops->ctrl)
res = bev->be_ops->ctrl(bev, BEV_CTRL_GET_FD, &d);
+ if (res)
+ event_debug(("%s: cannot get fd for %p", __func__, bev));
BEV_UNLOCK(bev);
return (res<0) ? -1 : d.fd;
}
@@ -868,8 +894,7 @@ bufferevent_getfd(struct bufferevent *bev)
enum bufferevent_options
bufferevent_get_options_(struct bufferevent *bev)
{
- struct bufferevent_private *bev_p =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
enum bufferevent_options options;
BEV_LOCK(bev);
@@ -945,8 +970,7 @@ int
bufferevent_generic_adj_timeouts_(struct bufferevent *bev)
{
const short enabled = bev->enabled;
- struct bufferevent_private *bev_p =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
int r1=0, r2=0;
if ((enabled & EV_READ) && !bev_p->read_suspended &&
evutil_timerisset(&bev->timeout_read))
@@ -966,9 +990,32 @@ bufferevent_generic_adj_timeouts_(struct bufferevent *bev)
}
int
+bufferevent_generic_adj_existing_timeouts_(struct bufferevent *bev)
+{
+ int r = 0;
+ if (event_pending(&bev->ev_read, EV_READ, NULL)) {
+ if (evutil_timerisset(&bev->timeout_read)) {
+ if (bufferevent_add_event_(&bev->ev_read, &bev->timeout_read) < 0)
+ r = -1;
+ } else {
+ event_remove_timer(&bev->ev_read);
+ }
+ }
+ if (event_pending(&bev->ev_write, EV_WRITE, NULL)) {
+ if (evutil_timerisset(&bev->timeout_write)) {
+ if (bufferevent_add_event_(&bev->ev_write, &bev->timeout_write) < 0)
+ r = -1;
+ } else {
+ event_remove_timer(&bev->ev_write);
+ }
+ }
+ return r;
+}
+
+int
bufferevent_add_event_(struct event *ev, const struct timeval *tv)
{
- if (tv->tv_sec == 0 && tv->tv_usec == 0)
+ if (!evutil_timerisset(tv))
return event_add(ev, NULL);
else
return event_add(ev, tv);
diff --git a/contrib/ntp/sntp/libevent/bufferevent_async.c b/contrib/ntp/sntp/libevent/bufferevent_async.c
index 6395e57a9f0c..40c7c5e8d0d3 100644
--- a/contrib/ntp/sntp/libevent/bufferevent_async.c
+++ b/contrib/ntp/sntp/libevent/bufferevent_async.c
@@ -46,6 +46,7 @@
#ifdef _WIN32
#include <winsock2.h>
+#include <winerror.h>
#include <ws2tcpip.h>
#endif
@@ -100,11 +101,32 @@ const struct bufferevent_ops bufferevent_ops_async = {
be_async_ctrl,
};
+static inline void
+be_async_run_eventcb(struct bufferevent *bev, short what, int options)
+{ bufferevent_run_eventcb_(bev, what, options|BEV_TRIG_DEFER_CALLBACKS); }
+
+static inline void
+be_async_trigger_nolock(struct bufferevent *bev, short what, int options)
+{ bufferevent_trigger_nolock_(bev, what, options|BEV_TRIG_DEFER_CALLBACKS); }
+
+static inline int
+fatal_error(int err)
+{
+ switch (err) {
+ /* We may have already associated this fd with a port.
+ * Let's hope it's this port, and that the error code
+ * for doing this neer changes. */
+ case ERROR_INVALID_PARAMETER:
+ return 0;
+ }
+ return 1;
+}
+
static inline struct bufferevent_async *
upcast(struct bufferevent *bev)
{
struct bufferevent_async *bev_a;
- if (bev->be_ops != &bufferevent_ops_async)
+ if (!BEV_IS_ASYNC(bev))
return NULL;
bev_a = EVUTIL_UPCAST(bev, struct bufferevent_async, bev.bev);
return bev_a;
@@ -217,7 +239,7 @@ bev_async_consider_writing(struct bufferevent_async *beva)
&beva->write_overlapped)) {
bufferevent_decref_(bev);
beva->ok = 0;
- bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
+ be_async_run_eventcb(bev, BEV_EVENT_ERROR, 0);
} else {
beva->write_in_progress = at_most;
bufferevent_decrement_write_buckets_(&beva->bev, at_most);
@@ -270,7 +292,7 @@ bev_async_consider_reading(struct bufferevent_async *beva)
bufferevent_incref_(bev);
if (evbuffer_launch_read_(bev->input, at_most, &beva->read_overlapped)) {
beva->ok = 0;
- bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
+ be_async_run_eventcb(bev, BEV_EVENT_ERROR, 0);
bufferevent_decref_(bev);
} else {
beva->read_in_progress = at_most;
@@ -381,10 +403,10 @@ be_async_destruct(struct bufferevent *bev)
bev_async_del_write(bev_async);
fd = evbuffer_overlapped_get_fd_(bev->input);
- if (fd != (evutil_socket_t)INVALID_SOCKET &&
+ if (fd != (evutil_socket_t)EVUTIL_INVALID_SOCKET &&
(bev_p->options & BEV_OPT_CLOSE_ON_FREE)) {
evutil_closesocket(fd);
- evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
+ evbuffer_overlapped_set_fd_(bev->input, EVUTIL_INVALID_SOCKET);
}
}
@@ -428,8 +450,7 @@ connect_complete(struct event_overlapped *eo, ev_uintptr_t key,
else
bev_async_set_wsa_error(bev, eo);
- bufferevent_run_eventcb_(bev,
- ok? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR, 0);
+ be_async_run_eventcb(bev, ok ? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR, 0);
event_base_del_virtual_(bev->ev_base);
@@ -459,16 +480,16 @@ read_complete(struct event_overlapped *eo, ev_uintptr_t key,
if (bev_a->ok) {
if (ok && nbytes) {
BEV_RESET_GENERIC_READ_TIMEOUT(bev);
- bufferevent_trigger_nolock_(bev, EV_READ, 0);
+ be_async_trigger_nolock(bev, EV_READ, 0);
bev_async_consider_reading(bev_a);
} else if (!ok) {
what |= BEV_EVENT_ERROR;
bev_a->ok = 0;
- bufferevent_run_eventcb_(bev, what, 0);
+ be_async_run_eventcb(bev, what, 0);
} else if (!nbytes) {
what |= BEV_EVENT_EOF;
bev_a->ok = 0;
- bufferevent_run_eventcb_(bev, what, 0);
+ be_async_run_eventcb(bev, what, 0);
}
}
@@ -502,16 +523,16 @@ write_complete(struct event_overlapped *eo, ev_uintptr_t key,
if (bev_a->ok) {
if (ok && nbytes) {
BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
- bufferevent_trigger_nolock_(bev, EV_WRITE, 0);
+ be_async_trigger_nolock(bev, EV_WRITE, 0);
bev_async_consider_writing(bev_a);
} else if (!ok) {
what |= BEV_EVENT_ERROR;
bev_a->ok = 0;
- bufferevent_run_eventcb_(bev, what, 0);
+ be_async_run_eventcb(bev, what, 0);
} else if (!nbytes) {
what |= BEV_EVENT_EOF;
bev_a->ok = 0;
- bufferevent_run_eventcb_(bev, what, 0);
+ be_async_run_eventcb(bev, what, 0);
}
}
@@ -532,11 +553,7 @@ bufferevent_async_new_(struct event_base *base,
return NULL;
if (fd >= 0 && event_iocp_port_associate_(iocp, fd, 1)<0) {
- int err = GetLastError();
- /* We may have alrady associated this fd with a port.
- * Let's hope it's this port, and that the error code
- * for doing this neer changes. */
- if (err != ERROR_INVALID_PARAMETER)
+ if (fatal_error(GetLastError()))
return NULL;
}
@@ -580,7 +597,6 @@ bufferevent_async_set_connected_(struct bufferevent *bev)
{
struct bufferevent_async *bev_async = upcast(bev);
bev_async->ok = 1;
- bufferevent_init_generic_timeout_cbs_(bev);
/* Now's a good time to consider reading/writing */
be_async_enable(bev, bev->enabled);
}
@@ -654,25 +670,29 @@ be_async_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
data->fd = evbuffer_overlapped_get_fd_(bev->input);
return 0;
case BEV_CTRL_SET_FD: {
+ struct bufferevent_async *bev_a = upcast(bev);
struct event_iocp_port *iocp;
if (data->fd == evbuffer_overlapped_get_fd_(bev->input))
return 0;
if (!(iocp = event_base_get_iocp_(bev->ev_base)))
return -1;
- if (event_iocp_port_associate_(iocp, data->fd, 1) < 0)
- return -1;
+ if (event_iocp_port_associate_(iocp, data->fd, 1) < 0) {
+ if (fatal_error(GetLastError()))
+ return -1;
+ }
evbuffer_overlapped_set_fd_(bev->input, data->fd);
evbuffer_overlapped_set_fd_(bev->output, data->fd);
+ bev_a->ok = data->fd >= 0;
return 0;
}
case BEV_CTRL_CANCEL_ALL: {
struct bufferevent_async *bev_a = upcast(bev);
evutil_socket_t fd = evbuffer_overlapped_get_fd_(bev->input);
- if (fd != (evutil_socket_t)INVALID_SOCKET &&
+ if (fd != (evutil_socket_t)EVUTIL_INVALID_SOCKET &&
(bev_a->bev.options & BEV_OPT_CLOSE_ON_FREE)) {
closesocket(fd);
- evbuffer_overlapped_set_fd_(bev->input, INVALID_SOCKET);
+ evbuffer_overlapped_set_fd_(bev->input, EVUTIL_INVALID_SOCKET);
}
bev_a->ok = 0;
return 0;
diff --git a/contrib/ntp/sntp/libevent/bufferevent_filter.c b/contrib/ntp/sntp/libevent/bufferevent_filter.c
index 4d9be43e25db..a7bdedddfe1d 100644
--- a/contrib/ntp/sntp/libevent/bufferevent_filter.c
+++ b/contrib/ntp/sntp/libevent/bufferevent_filter.c
@@ -71,6 +71,9 @@ static int be_filter_flush(struct bufferevent *bufev,
short iotype, enum bufferevent_flush_mode mode);
static int be_filter_ctrl(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
+static void bufferevent_filtered_inbuf_cb(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo, void *arg);
+
static void bufferevent_filtered_outbuf_cb(struct evbuffer *buf,
const struct evbuffer_cb_info *info, void *arg);
@@ -79,6 +82,8 @@ struct bufferevent_filtered {
/** The bufferevent that we read/write filtered data from/to. */
struct bufferevent *underlying;
+ /** A callback on our inbuf to notice somebory removes data */
+ struct evbuffer_cb_entry *inbuf_cb;
/** A callback on our outbuf to notice when somebody adds data */
struct evbuffer_cb_entry *outbuf_cb;
/** True iff we have received an EOF callback from the underlying
@@ -113,11 +118,11 @@ static inline struct bufferevent_filtered *
upcast(struct bufferevent *bev)
{
struct bufferevent_filtered *bev_f;
- if (bev->be_ops != &bufferevent_ops_filter)
+ if (!BEV_IS_FILTER(bev))
return NULL;
bev_f = (void*)( ((char*)bev) -
evutil_offsetof(struct bufferevent_filtered, bev.bev));
- EVUTIL_ASSERT(bev_f->bev.bev.be_ops == &bufferevent_ops_filter);
+ EVUTIL_ASSERT(BEV_IS_FILTER(&bev_f->bev.bev));
return bev_f;
}
@@ -155,7 +160,7 @@ be_null_filter(struct evbuffer *src, struct evbuffer *dst, ev_ssize_t lim,
enum bufferevent_flush_mode state, void *ctx)
{
(void)state;
- if (evbuffer_remove_buffer(src, dst, lim) == 0)
+ if (evbuffer_remove_buffer(src, dst, lim) >= 0)
return BEV_OK;
else
return BEV_ERROR;
@@ -203,6 +208,11 @@ bufferevent_filter_new(struct bufferevent *underlying,
bufferevent_setcb(bufev_f->underlying,
be_filter_readcb, be_filter_writecb, be_filter_eventcb, bufev_f);
+ bufev_f->inbuf_cb = evbuffer_add_cb(downcast(bufev_f)->input,
+ bufferevent_filtered_inbuf_cb, bufev_f);
+ evbuffer_cb_clear_flags(downcast(bufev_f)->input, bufev_f->inbuf_cb,
+ EVBUFFER_CB_ENABLED);
+
bufev_f->outbuf_cb = evbuffer_add_cb(downcast(bufev_f)->output,
bufferevent_filtered_outbuf_cb, bufev_f);
@@ -251,6 +261,12 @@ be_filter_destruct(struct bufferevent *bev)
EVUTIL_ASSERT(bevf);
if (bevf->free_context)
bevf->free_context(bevf->context);
+
+ if (bevf->inbuf_cb)
+ evbuffer_remove_cb_entry(bev->input, bevf->inbuf_cb);
+
+ if (bevf->outbuf_cb)
+ evbuffer_remove_cb_entry(bev->output, bevf->outbuf_cb);
}
static int
@@ -345,7 +361,8 @@ be_filter_process_output(struct bufferevent_filtered *bevf,
/* disable the callback that calls this function
when the user adds to the output buffer. */
- evbuffer_cb_set_flags(bufev->output, bevf->outbuf_cb, 0);
+ evbuffer_cb_clear_flags(bufev->output, bevf->outbuf_cb,
+ EVBUFFER_CB_ENABLED);
do {
int processed = 0;
@@ -417,9 +434,8 @@ bufferevent_filtered_outbuf_cb(struct evbuffer *buf,
}
}
-/* Called when the underlying socket has read. */
static void
-be_filter_readcb(struct bufferevent *underlying, void *me_)
+be_filter_read_nolock_(struct bufferevent *underlying, void *me_)
{
struct bufferevent_filtered *bevf = me_;
enum bufferevent_filter_result res;
@@ -428,8 +444,6 @@ be_filter_readcb(struct bufferevent *underlying, void *me_)
struct bufferevent_private *bufev_private = BEV_UPCAST(bufev);
int processed_any = 0;
- BEV_LOCK(bufev);
-
// It's possible our refcount is 0 at this point if another thread free'd our filterevent
EVUTIL_ASSERT(bufev_private->refcnt >= 0);
@@ -448,11 +462,65 @@ be_filter_readcb(struct bufferevent *underlying, void *me_)
/* XXX This should be in process_input, not here. There are
* other places that can call process-input, and they should
* force readcb calls as needed. */
- if (processed_any)
+ if (processed_any) {
bufferevent_trigger_nolock_(bufev, EV_READ, 0);
+ if (evbuffer_get_length(underlying->input) > 0 &&
+ be_readbuf_full(bevf, state)) {
+ /* data left in underlying buffer and filter input buffer
+ * hit its read high watermark.
+ * Schedule callback to avoid data gets stuck in underlying
+ * input buffer.
+ */
+ evbuffer_cb_set_flags(bufev->input, bevf->inbuf_cb,
+ EVBUFFER_CB_ENABLED);
+ }
+ }
}
+}
+
+/* Called when the size of our inbuf changes. */
+static void
+bufferevent_filtered_inbuf_cb(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo, void *arg)
+{
+ struct bufferevent_filtered *bevf = arg;
+ enum bufferevent_flush_mode state;
+ struct bufferevent *bev = downcast(bevf);
- BEV_UNLOCK(bufev);
+ BEV_LOCK(bev);
+
+ if (bevf->got_eof)
+ state = BEV_FINISHED;
+ else
+ state = BEV_NORMAL;
+
+
+ if (!be_readbuf_full(bevf, state)) {
+ /* opportunity to read data which was left in underlying
+ * input buffer because filter input buffer hit read
+ * high watermark.
+ */
+ evbuffer_cb_clear_flags(bev->input, bevf->inbuf_cb,
+ EVBUFFER_CB_ENABLED);
+ if (evbuffer_get_length(bevf->underlying->input) > 0)
+ be_filter_read_nolock_(bevf->underlying, bevf);
+ }
+
+ BEV_UNLOCK(bev);
+}
+
+/* Called when the underlying socket has read. */
+static void
+be_filter_readcb(struct bufferevent *underlying, void *me_)
+{
+ struct bufferevent_filtered *bevf = me_;
+ struct bufferevent *bev = downcast(bevf);
+
+ BEV_LOCK(bev);
+
+ be_filter_read_nolock_(underlying, me_);
+
+ BEV_UNLOCK(bev);
}
/* Called when the underlying socket has drained enough that we can write to
@@ -536,10 +604,22 @@ be_filter_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
bevf = upcast(bev);
data->ptr = bevf->underlying;
return 0;
- case BEV_CTRL_GET_FD:
case BEV_CTRL_SET_FD:
+ case BEV_CTRL_GET_FD:
+ bevf = upcast(bev);
+
+ if (bevf->underlying &&
+ bevf->underlying->be_ops &&
+ bevf->underlying->be_ops->ctrl) {
+ return (bevf->underlying->be_ops->ctrl)(bevf->underlying, op, data);
+ }
+ EVUTIL_FALLTHROUGH;
+
case BEV_CTRL_CANCEL_ALL:
+ EVUTIL_FALLTHROUGH;
default:
return -1;
}
+
+ return -1;
}
diff --git a/contrib/ntp/sntp/libevent/bufferevent_openssl.c b/contrib/ntp/sntp/libevent/bufferevent_openssl.c
index b30f90ff2e94..b51b834bca7f 100644
--- a/contrib/ntp/sntp/libevent/bufferevent_openssl.c
+++ b/contrib/ntp/sntp/libevent/bufferevent_openssl.c
@@ -63,9 +63,9 @@
#include "bufferevent-internal.h"
#include "log-internal.h"
-#include <openssl/bio.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
+#include "openssl-compat.h"
/*
* Define an OpenSSL bio that targets a bufferevent.
@@ -109,10 +109,8 @@ print_err(int val)
static int
bio_bufferevent_new(BIO *b)
{
- b->init = 0;
- b->num = -1;
- b->ptr = NULL; /* We'll be putting the bufferevent in this field.*/
- b->flags = 0;
+ BIO_set_init(b, 0);
+ BIO_set_data(b, NULL); /* We'll be putting the bufferevent in this field.*/
return 1;
}
@@ -122,12 +120,10 @@ bio_bufferevent_free(BIO *b)
{
if (!b)
return 0;
- if (b->shutdown) {
- if (b->init && b->ptr)
- bufferevent_free(b->ptr);
- b->init = 0;
- b->flags = 0;
- b->ptr = NULL;
+ if (BIO_get_shutdown(b)) {
+ if (BIO_get_init(b) && BIO_get_data(b))
+ bufferevent_free(BIO_get_data(b));
+ BIO_free(b);
}
return 1;
}
@@ -143,10 +139,10 @@ bio_bufferevent_read(BIO *b, char *out, int outlen)
if (!out)
return 0;
- if (!b->ptr)
+ if (!BIO_get_data(b))
return -1;
- input = bufferevent_get_input(b->ptr);
+ input = bufferevent_get_input(BIO_get_data(b));
if (evbuffer_get_length(input) == 0) {
/* If there's no data to read, say so. */
BIO_set_retry_read(b);
@@ -158,17 +154,17 @@ bio_bufferevent_read(BIO *b, char *out, int outlen)
return r;
}
-/* Called to write data info the BIO */
+/* Called to write data into the BIO */
static int
bio_bufferevent_write(BIO *b, const char *in, int inlen)
{
- struct bufferevent *bufev = b->ptr;
+ struct bufferevent *bufev = BIO_get_data(b);
struct evbuffer *output;
size_t outlen;
BIO_clear_retry_flags(b);
- if (!b->ptr)
+ if (!BIO_get_data(b))
return -1;
output = bufferevent_get_output(bufev);
@@ -194,15 +190,15 @@ bio_bufferevent_write(BIO *b, const char *in, int inlen)
static long
bio_bufferevent_ctrl(BIO *b, int cmd, long num, void *ptr)
{
- struct bufferevent *bufev = b->ptr;
+ struct bufferevent *bufev = BIO_get_data(b);
long ret = 1;
switch (cmd) {
case BIO_CTRL_GET_CLOSE:
- ret = b->shutdown;
+ ret = BIO_get_shutdown(b);
break;
case BIO_CTRL_SET_CLOSE:
- b->shutdown = (int)num;
+ BIO_set_shutdown(b, (int)num);
break;
case BIO_CTRL_PENDING:
ret = evbuffer_get_length(bufferevent_get_input(bufev)) != 0;
@@ -231,38 +227,41 @@ bio_bufferevent_puts(BIO *b, const char *s)
}
/* Method table for the bufferevent BIO */
-static BIO_METHOD methods_bufferevent = {
- BIO_TYPE_LIBEVENT, "bufferevent",
- bio_bufferevent_write,
- bio_bufferevent_read,
- bio_bufferevent_puts,
- NULL /* bio_bufferevent_gets */,
- bio_bufferevent_ctrl,
- bio_bufferevent_new,
- bio_bufferevent_free,
- NULL /* callback_ctrl */,
-};
+static BIO_METHOD *methods_bufferevent;
/* Return the method table for the bufferevents BIO */
static BIO_METHOD *
BIO_s_bufferevent(void)
{
- return &methods_bufferevent;
+ if (methods_bufferevent == NULL) {
+ methods_bufferevent = BIO_meth_new(BIO_TYPE_LIBEVENT, "bufferevent");
+ if (methods_bufferevent == NULL)
+ return NULL;
+ BIO_meth_set_write(methods_bufferevent, bio_bufferevent_write);
+ BIO_meth_set_read(methods_bufferevent, bio_bufferevent_read);
+ BIO_meth_set_puts(methods_bufferevent, bio_bufferevent_puts);
+ BIO_meth_set_ctrl(methods_bufferevent, bio_bufferevent_ctrl);
+ BIO_meth_set_create(methods_bufferevent, bio_bufferevent_new);
+ BIO_meth_set_destroy(methods_bufferevent, bio_bufferevent_free);
+ }
+ return methods_bufferevent;
}
/* Create a new BIO to wrap communication around a bufferevent. If close_flag
* is true, the bufferevent will be freed when the BIO is closed. */
static BIO *
-BIO_new_bufferevent(struct bufferevent *bufferevent, int close_flag)
+BIO_new_bufferevent(struct bufferevent *bufferevent)
{
BIO *result;
if (!bufferevent)
return NULL;
if (!(result = BIO_new(BIO_s_bufferevent())))
return NULL;
- result->init = 1;
- result->ptr = bufferevent;
- result->shutdown = close_flag ? 1 : 0;
+ BIO_set_init(result, 1);
+ BIO_set_data(result, bufferevent);
+ /* We don't tell the BIO to close the bufferevent; we do it ourselves on
+ * be_openssl_destruct() */
+ BIO_set_shutdown(result, 0);
return result;
}
@@ -320,13 +319,13 @@ struct bufferevent_openssl {
unsigned write_blocked_on_read : 1;
/* Treat TCP close before SSL close on SSL >= v3 as clean EOF. */
unsigned allow_dirty_shutdown : 1;
- /* XXXX */
- unsigned fd_is_set : 1;
/* XXX */
unsigned n_errors : 2;
/* Are we currently connecting, accepting, or doing IO? */
unsigned state : 2;
+ /* If we reset fd, we sould reset state too */
+ unsigned old_state : 2;
};
static int be_openssl_enable(struct bufferevent *, short);
@@ -356,11 +355,11 @@ static inline struct bufferevent_openssl *
upcast(struct bufferevent *bev)
{
struct bufferevent_openssl *bev_o;
- if (bev->be_ops != &bufferevent_ops_openssl)
+ if (!BEV_IS_OPENSSL(bev))
return NULL;
bev_o = (void*)( ((char*)bev) -
evutil_offsetof(struct bufferevent_openssl, bev.bev));
- EVUTIL_ASSERT(bev_o->bev.bev.be_ops == &bufferevent_ops_openssl);
+ EVUTIL_ASSERT(BEV_IS_OPENSSL(&bev_o->bev.bev));
return bev_o;
}
@@ -406,7 +405,10 @@ start_writing(struct bufferevent_openssl *bev_ssl)
{
int r = 0;
if (bev_ssl->underlying) {
- ;
+ if (bev_ssl->write_blocked_on_read) {
+ bufferevent_unsuspend_read_(bev_ssl->underlying,
+ BEV_SUSPEND_FILT_READ);
+ }
} else {
struct bufferevent *bev = &bev_ssl->bev.bev;
r = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
@@ -437,7 +439,8 @@ stop_writing(struct bufferevent_openssl *bev_ssl)
if (bev_ssl->read_blocked_on_write)
return;
if (bev_ssl->underlying) {
- ;
+ bufferevent_unsuspend_read_(bev_ssl->underlying,
+ BEV_SUSPEND_FILT_READ);
} else {
struct bufferevent *bev = &bev_ssl->bev.bev;
event_del(&bev->ev_write);
@@ -506,14 +509,17 @@ conn_closed(struct bufferevent_openssl *bev_ssl, int when, int errcode, int ret)
break;
case SSL_ERROR_SYSCALL:
/* IO error; possibly a dirty shutdown. */
- if (ret == 0 && ERR_peek_error() == 0)
+ if ((ret == 0 || ret == -1) && ERR_peek_error() == 0)
dirty_shutdown = 1;
+ put_error(bev_ssl, errcode);
break;
case SSL_ERROR_SSL:
/* Protocol error. */
+ put_error(bev_ssl, errcode);
break;
case SSL_ERROR_WANT_X509_LOOKUP:
/* XXXX handle this. */
+ put_error(bev_ssl, errcode);
break;
case SSL_ERROR_NONE:
case SSL_ERROR_WANT_READ:
@@ -544,10 +550,12 @@ conn_closed(struct bufferevent_openssl *bev_ssl, int when, int errcode, int ret)
static void
init_bio_counts(struct bufferevent_openssl *bev_ssl)
{
- bev_ssl->counts.n_written =
- BIO_number_written(SSL_get_wbio(bev_ssl->ssl));
- bev_ssl->counts.n_read =
- BIO_number_read(SSL_get_rbio(bev_ssl->ssl));
+ BIO *rbio, *wbio;
+
+ wbio = SSL_get_wbio(bev_ssl->ssl);
+ bev_ssl->counts.n_written = wbio ? BIO_number_written(wbio) : 0;
+ rbio = SSL_get_rbio(bev_ssl->ssl);
+ bev_ssl->counts.n_read = rbio ? BIO_number_read(rbio) : 0;
}
static inline void
@@ -595,6 +603,7 @@ do_read(struct bufferevent_openssl *bev_ssl, int n_to_read) {
for (i=0; i<n; ++i) {
if (bev_ssl->bev.read_suspended)
break;
+ ERR_clear_error();
r = SSL_read(bev_ssl->ssl, space[i].iov_base, space[i].iov_len);
if (r>0) {
result |= OP_MADE_PROGRESS;
@@ -671,6 +680,7 @@ do_write(struct bufferevent_openssl *bev_ssl, int atmost)
if (space[i].iov_len == 0)
continue;
+ ERR_clear_error();
r = SSL_write(bev_ssl->ssl, space[i].iov_base,
space[i].iov_len);
if (r > 0) {
@@ -714,7 +724,7 @@ do_write(struct bufferevent_openssl *bev_ssl, int atmost)
if (bev_ssl->underlying)
BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
- bufferevent_trigger_nolock_(bev, EV_WRITE, 0);
+ bufferevent_trigger_nolock_(bev, EV_WRITE, BEV_OPT_DEFER_CALLBACKS);
}
return result;
}
@@ -797,7 +807,7 @@ consider_reading(struct bufferevent_openssl *bev_ssl)
if (bev_ssl->bev.read_suspended)
break;
-
+
/* Read all pending data. This won't hit the network
* again, and will (most importantly) put us in a state
* where we don't need to read anything else until the
@@ -957,6 +967,18 @@ be_openssl_writeeventcb(evutil_socket_t fd, short what, void *ptr)
bufferevent_decref_and_unlock_(&bev_ssl->bev.bev);
}
+static evutil_socket_t
+be_openssl_auto_fd(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
+{
+ if (!bev_ssl->underlying) {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ if (event_initialized(&bev->ev_read) && fd < 0) {
+ fd = event_get_fd(&bev->ev_read);
+ }
+ }
+ return fd;
+}
+
static int
set_open_callbacks(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
{
@@ -968,27 +990,27 @@ set_open_callbacks(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
} else {
struct bufferevent *bev = &bev_ssl->bev.bev;
int rpending=0, wpending=0, r1=0, r2=0;
- if (fd < 0 && bev_ssl->fd_is_set)
- fd = event_get_fd(&bev->ev_read);
- if (bev_ssl->fd_is_set) {
+
+ if (event_initialized(&bev->ev_read)) {
rpending = event_pending(&bev->ev_read, EV_READ, NULL);
wpending = event_pending(&bev->ev_write, EV_WRITE, NULL);
+
event_del(&bev->ev_read);
event_del(&bev->ev_write);
}
+
event_assign(&bev->ev_read, bev->ev_base, fd,
EV_READ|EV_PERSIST|EV_FINALIZE,
be_openssl_readeventcb, bev_ssl);
event_assign(&bev->ev_write, bev->ev_base, fd,
EV_WRITE|EV_PERSIST|EV_FINALIZE,
be_openssl_writeeventcb, bev_ssl);
+
if (rpending)
r1 = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read);
if (wpending)
r2 = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
- if (fd >= 0) {
- bev_ssl->fd_is_set = 1;
- }
+
return (r1<0 || r2<0) ? -1 : 0;
}
}
@@ -1005,15 +1027,17 @@ do_handshake(struct bufferevent_openssl *bev_ssl)
return -1;
case BUFFEREVENT_SSL_CONNECTING:
case BUFFEREVENT_SSL_ACCEPTING:
+ ERR_clear_error();
r = SSL_do_handshake(bev_ssl->ssl);
break;
}
decrement_buckets(bev_ssl);
if (r==1) {
+ evutil_socket_t fd = event_get_fd(&bev_ssl->bev.bev.ev_read);
/* We're done! */
bev_ssl->state = BUFFEREVENT_SSL_OPEN;
- set_open_callbacks(bev_ssl, -1); /* XXXX handle failure */
+ set_open_callbacks(bev_ssl, fd); /* XXXX handle failure */
/* Call do_read and do_write as needed */
bufferevent_enable(&bev_ssl->bev.bev, bev_ssl->bev.bev.enabled);
bufferevent_run_eventcb_(&bev_ssl->bev.bev,
@@ -1024,17 +1048,11 @@ do_handshake(struct bufferevent_openssl *bev_ssl)
print_err(err);
switch (err) {
case SSL_ERROR_WANT_WRITE:
- if (!bev_ssl->underlying) {
- stop_reading(bev_ssl);
- return start_writing(bev_ssl);
- }
- return 0;
+ stop_reading(bev_ssl);
+ return start_writing(bev_ssl);
case SSL_ERROR_WANT_READ:
- if (!bev_ssl->underlying) {
- stop_writing(bev_ssl);
- return start_reading(bev_ssl);
- }
- return 0;
+ stop_writing(bev_ssl);
+ return start_reading(bev_ssl);
default:
conn_closed(bev_ssl, BEV_EVENT_READING, err, r);
return -1;
@@ -1070,28 +1088,31 @@ set_handshake_callbacks(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
be_openssl_handshakecb, be_openssl_handshakecb,
be_openssl_eventcb,
bev_ssl);
+
+ if (fd < 0)
+ return 0;
+
+ if (bufferevent_setfd(bev_ssl->underlying, fd))
+ return 1;
+
return do_handshake(bev_ssl);
} else {
struct bufferevent *bev = &bev_ssl->bev.bev;
- int r1=0, r2=0;
- if (fd < 0 && bev_ssl->fd_is_set)
- fd = event_get_fd(&bev->ev_read);
- if (bev_ssl->fd_is_set) {
+
+ if (event_initialized(&bev->ev_read)) {
event_del(&bev->ev_read);
event_del(&bev->ev_write);
}
+
event_assign(&bev->ev_read, bev->ev_base, fd,
EV_READ|EV_PERSIST|EV_FINALIZE,
be_openssl_handshakeeventcb, bev_ssl);
event_assign(&bev->ev_write, bev->ev_base, fd,
EV_WRITE|EV_PERSIST|EV_FINALIZE,
be_openssl_handshakeeventcb, bev_ssl);
- if (fd >= 0) {
- r1 = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read);
- r2 = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
- bev_ssl->fd_is_set = 1;
- }
- return (r1<0 || r2<0) ? -1 : 0;
+ if (fd >= 0)
+ bufferevent_enable(bev, bev->enabled);
+ return 0;
}
}
@@ -1104,7 +1125,7 @@ bufferevent_ssl_renegotiate(struct bufferevent *bev)
if (SSL_renegotiate(bev_ssl->ssl) < 0)
return -1;
bev_ssl->state = BUFFEREVENT_SSL_CONNECTING;
- if (set_handshake_callbacks(bev_ssl, -1) < 0)
+ if (set_handshake_callbacks(bev_ssl, be_openssl_auto_fd(bev_ssl, -1)) < 0)
return -1;
if (!bev_ssl->underlying)
return do_handshake(bev_ssl);
@@ -1123,10 +1144,12 @@ be_openssl_outbuf_cb(struct evbuffer *buf,
if (cbinfo->orig_size == 0)
r = bufferevent_add_event_(&bev_ssl->bev.bev.ev_write,
&bev_ssl->bev.bev.timeout_write);
- consider_writing(bev_ssl);
+
+ if (bev_ssl->underlying)
+ consider_writing(bev_ssl);
}
/* XXX Handle r < 0 */
- (void)r;
+ (void)r;
}
@@ -1136,9 +1159,6 @@ be_openssl_enable(struct bufferevent *bev, short events)
struct bufferevent_openssl *bev_ssl = upcast(bev);
int r1 = 0, r2 = 0;
- if (bev_ssl->state != BUFFEREVENT_SSL_OPEN)
- return 0;
-
if (events & EV_READ)
r1 = start_reading(bev_ssl);
if (events & EV_WRITE)
@@ -1162,8 +1182,6 @@ static int
be_openssl_disable(struct bufferevent *bev, short events)
{
struct bufferevent_openssl *bev_ssl = upcast(bev);
- if (bev_ssl->state != BUFFEREVENT_SSL_OPEN)
- return 0;
if (events & EV_READ)
stop_reading(bev_ssl);
@@ -1214,7 +1232,7 @@ be_openssl_destruct(struct bufferevent *bev)
if (bev_ssl->bev.options & BEV_OPT_CLOSE_ON_FREE) {
if (! bev_ssl->underlying) {
- evutil_socket_t fd = -1;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
BIO *bio = SSL_get_wbio(bev_ssl->ssl);
if (bio)
fd = BIO_get_fd(bio, NULL);
@@ -1233,23 +1251,7 @@ be_openssl_adj_timeouts(struct bufferevent *bev)
if (bev_ssl->underlying) {
return bufferevent_generic_adj_timeouts_(bev);
} else {
- int r1=0, r2=0;
- if (event_pending(&bev->ev_read, EV_READ, NULL)) {
- if (evutil_timerisset(&bev->timeout_read)) {
- r1 = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read);
- } else {
- event_remove_timer(&bev->ev_read);
- }
- }
- if (event_pending(&bev->ev_write, EV_WRITE, NULL)) {
- if (evutil_timerisset(&bev->timeout_write)) {
- r2 = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
- } else {
- event_remove_timer(&bev->ev_write);
- }
- }
-
- return (r1<0 || r2<0) ? -1 : 0;
+ return bufferevent_generic_adj_existing_timeouts_(bev);
}
}
@@ -1262,37 +1264,64 @@ be_openssl_flush(struct bufferevent *bufev,
}
static int
+be_openssl_set_fd(struct bufferevent_openssl *bev_ssl,
+ enum bufferevent_ssl_state state, evutil_socket_t fd)
+{
+ bev_ssl->state = state;
+
+ switch (state) {
+ case BUFFEREVENT_SSL_ACCEPTING:
+ if (!SSL_clear(bev_ssl->ssl))
+ return -1;
+ SSL_set_accept_state(bev_ssl->ssl);
+ if (set_handshake_callbacks(bev_ssl, fd) < 0)
+ return -1;
+ break;
+ case BUFFEREVENT_SSL_CONNECTING:
+ if (!SSL_clear(bev_ssl->ssl))
+ return -1;
+ SSL_set_connect_state(bev_ssl->ssl);
+ if (set_handshake_callbacks(bev_ssl, fd) < 0)
+ return -1;
+ break;
+ case BUFFEREVENT_SSL_OPEN:
+ if (set_open_callbacks(bev_ssl, fd) < 0)
+ return -1;
+ break;
+ default:
+ return -1;
+ }
+
+ return 0;
+}
+
+static int
be_openssl_ctrl(struct bufferevent *bev,
enum bufferevent_ctrl_op op, union bufferevent_ctrl_data *data)
{
struct bufferevent_openssl *bev_ssl = upcast(bev);
switch (op) {
case BEV_CTRL_SET_FD:
- if (bev_ssl->underlying)
- return -1;
- {
+ if (!bev_ssl->underlying) {
BIO *bio;
- bio = BIO_new_socket(data->fd, 0);
+ bio = BIO_new_socket((int)data->fd, 0);
+ SSL_set_bio(bev_ssl->ssl, bio, bio);
+ } else {
+ BIO *bio;
+ if (!(bio = BIO_new_bufferevent(bev_ssl->underlying)))
+ return -1;
SSL_set_bio(bev_ssl->ssl, bio, bio);
- bev_ssl->fd_is_set = 1;
- }
- if (data->fd == -1)
- bev_ssl->fd_is_set = 0;
- if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
- return set_open_callbacks(bev_ssl, data->fd);
- else {
- return set_handshake_callbacks(bev_ssl, data->fd);
}
+
+ return be_openssl_set_fd(bev_ssl, bev_ssl->old_state, data->fd);
case BEV_CTRL_GET_FD:
- if (bev_ssl->underlying)
- return -1;
- if (!bev_ssl->fd_is_set)
- return -1;
- data->fd = event_get_fd(&bev->ev_read);
+ if (bev_ssl->underlying) {
+ data->fd = event_get_fd(&bev_ssl->underlying->ev_read);
+ } else {
+ data->fd = event_get_fd(&bev->ev_read);
+ }
return 0;
case BEV_CTRL_GET_UNDERLYING:
- if (!bev_ssl->underlying)
- return -1;
data->ptr = bev_ssl->underlying;
return 0;
case BEV_CTRL_CANCEL_ALL:
@@ -1322,8 +1351,9 @@ bufferevent_openssl_new_impl(struct event_base *base,
struct bufferevent_private *bev_p = NULL;
int tmp_options = options & ~BEV_OPT_THREADSAFE;
+ /* Only one can be set. */
if (underlying != NULL && fd >= 0)
- return NULL; /* Only one can be set. */
+ goto err;
if (!(bev_ssl = mm_calloc(1, sizeof(struct bufferevent_openssl))))
goto err;
@@ -1352,29 +1382,14 @@ bufferevent_openssl_new_impl(struct event_base *base,
bufferevent_incref_(underlying);
}
- bev_ssl->state = state;
+ bev_ssl->old_state = state;
bev_ssl->last_write = -1;
init_bio_counts(bev_ssl);
- switch (state) {
- case BUFFEREVENT_SSL_ACCEPTING:
- SSL_set_accept_state(bev_ssl->ssl);
- if (set_handshake_callbacks(bev_ssl, fd) < 0)
- goto err;
- break;
- case BUFFEREVENT_SSL_CONNECTING:
- SSL_set_connect_state(bev_ssl->ssl);
- if (set_handshake_callbacks(bev_ssl, fd) < 0)
- goto err;
- break;
- case BUFFEREVENT_SSL_OPEN:
- if (set_open_callbacks(bev_ssl, fd) < 0)
- goto err;
- break;
- default:
+ fd = be_openssl_auto_fd(bev_ssl, fd);
+ if (be_openssl_set_fd(bev_ssl, state, fd))
goto err;
- }
if (underlying) {
bufferevent_setwatermark(underlying, EV_READ, 0, 0);
@@ -1382,21 +1397,16 @@ bufferevent_openssl_new_impl(struct event_base *base,
if (state == BUFFEREVENT_SSL_OPEN)
bufferevent_suspend_read_(underlying,
BEV_SUSPEND_FILT_READ);
- } else {
- bev_ssl->bev.bev.enabled = EV_READ|EV_WRITE;
- if (bev_ssl->fd_is_set) {
- if (state != BUFFEREVENT_SSL_OPEN)
- if (event_add(&bev_ssl->bev.bev.ev_read, NULL) < 0)
- goto err;
- if (event_add(&bev_ssl->bev.bev.ev_write, NULL) < 0)
- goto err;
- }
}
return &bev_ssl->bev.bev;
err:
- if (bev_ssl)
+ if (options & BEV_OPT_CLOSE_ON_FREE)
+ SSL_free(ssl);
+ if (bev_ssl) {
+ bev_ssl->ssl = NULL;
bufferevent_free(&bev_ssl->bev.bev);
+ }
return NULL;
}
@@ -1407,19 +1417,24 @@ bufferevent_openssl_filter_new(struct event_base *base,
enum bufferevent_ssl_state state,
int options)
{
- /* We don't tell the BIO to close the bufferevent; we do it ourselves
- * on be_openssl_destruct */
- int close_flag = 0; /* options & BEV_OPT_CLOSE_ON_FREE; */
BIO *bio;
+ struct bufferevent *bev;
+
if (!underlying)
- return NULL;
- if (!(bio = BIO_new_bufferevent(underlying, close_flag)))
- return NULL;
+ goto err;
+ if (!(bio = BIO_new_bufferevent(underlying)))
+ goto err;
SSL_set_bio(ssl, bio, bio);
- return bufferevent_openssl_new_impl(
+ bev = bufferevent_openssl_new_impl(
base, underlying, -1, ssl, state, options);
+ return bev;
+
+err:
+ if (options & BEV_OPT_CLOSE_ON_FREE)
+ SSL_free(ssl);
+ return NULL;
}
struct bufferevent *
@@ -1446,14 +1461,14 @@ bufferevent_openssl_socket_new(struct event_base *base,
} else {
/* We specified an fd different from that of the SSL.
This is probably an error on our part. Fail. */
- return NULL;
+ goto err;
}
- (void) BIO_set_close(bio, 0);
+ BIO_set_close(bio, 0);
} else {
/* The SSL isn't configured with a BIO with an fd. */
if (fd >= 0) {
/* ... and we have an fd we want to use. */
- bio = BIO_new_socket(fd, 0);
+ bio = BIO_new_socket((int)fd, 0);
SSL_set_bio(ssl, bio, bio);
} else {
/* Leave the fd unset. */
@@ -1462,6 +1477,11 @@ bufferevent_openssl_socket_new(struct event_base *base,
return bufferevent_openssl_new_impl(
base, NULL, fd, ssl, state, options);
+
+err:
+ if (options & BEV_OPT_CLOSE_ON_FREE)
+ SSL_free(ssl);
+ return NULL;
}
int
diff --git a/contrib/ntp/sntp/libevent/bufferevent_pair.c b/contrib/ntp/sntp/libevent/bufferevent_pair.c
index 8154e17be732..f88cd751de1b 100644
--- a/contrib/ntp/sntp/libevent/bufferevent_pair.c
+++ b/contrib/ntp/sntp/libevent/bufferevent_pair.c
@@ -56,10 +56,10 @@ static inline struct bufferevent_pair *
upcast(struct bufferevent *bev)
{
struct bufferevent_pair *bev_p;
- if (bev->be_ops != &bufferevent_ops_pair)
+ if (!BEV_IS_PAIR(bev))
return NULL;
bev_p = EVUTIL_UPCAST(bev, struct bufferevent_pair, bev.bev);
- EVUTIL_ASSERT(bev_p->bev.bev.be_ops == &bufferevent_ops_pair);
+ EVUTIL_ASSERT(BEV_IS_PAIR(&bev_p->bev.bev));
return bev_p;
}
@@ -307,15 +307,17 @@ be_pair_flush(struct bufferevent *bev, short iotype,
{
struct bufferevent_pair *bev_p = upcast(bev);
struct bufferevent *partner;
- incref_and_lock(bev);
+
if (!bev_p->partner)
return -1;
- partner = downcast(bev_p->partner);
-
if (mode == BEV_NORMAL)
return 0;
+ incref_and_lock(bev);
+
+ partner = downcast(bev_p->partner);
+
if ((iotype & EV_READ) != 0)
be_pair_transfer(partner, bev, 1);
@@ -323,7 +325,12 @@ be_pair_flush(struct bufferevent *bev, short iotype,
be_pair_transfer(bev, partner, 1);
if (mode == BEV_FINISHED) {
- bufferevent_run_eventcb_(partner, iotype|BEV_EVENT_EOF, 0);
+ short what = BEV_EVENT_EOF;
+ if (iotype & EV_READ)
+ what |= BEV_EVENT_WRITING;
+ if (iotype & EV_WRITE)
+ what |= BEV_EVENT_READING;
+ bufferevent_run_eventcb_(partner, what, 0);
}
decref_and_unlock(bev);
return 0;
diff --git a/contrib/ntp/sntp/libevent/bufferevent_ratelim.c b/contrib/ntp/sntp/libevent/bufferevent_ratelim.c
index bde192021be1..258749685353 100644
--- a/contrib/ntp/sntp/libevent/bufferevent_ratelim.c
+++ b/contrib/ntp/sntp/libevent/bufferevent_ratelim.c
@@ -560,8 +560,7 @@ int
bufferevent_set_rate_limit(struct bufferevent *bev,
struct ev_token_bucket_cfg *cfg)
{
- struct bufferevent_private *bevp =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bevp = BEV_UPCAST(bev);
int r = -1;
struct bufferevent_rate_limit *rlim;
struct timeval now;
@@ -737,8 +736,7 @@ bufferevent_add_to_rate_limit_group(struct bufferevent *bev,
struct bufferevent_rate_limit_group *g)
{
int wsuspend, rsuspend;
- struct bufferevent_private *bevp =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bevp = BEV_UPCAST(bev);
BEV_LOCK(bev);
if (!bevp->rate_limiting) {
@@ -789,8 +787,7 @@ int
bufferevent_remove_from_rate_limit_group_internal_(struct bufferevent *bev,
int unsuspend)
{
- struct bufferevent_private *bevp =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bevp = BEV_UPCAST(bev);
BEV_LOCK(bev);
if (bevp->rate_limiting && bevp->rate_limiting->group) {
struct bufferevent_rate_limit_group *g =
diff --git a/contrib/ntp/sntp/libevent/bufferevent_sock.c b/contrib/ntp/sntp/libevent/bufferevent_sock.c
index 49ebc0bef8ff..f40a8d9c57d8 100644
--- a/contrib/ntp/sntp/libevent/bufferevent_sock.c
+++ b/contrib/ntp/sntp/libevent/bufferevent_sock.c
@@ -79,7 +79,6 @@
static int be_socket_enable(struct bufferevent *, short);
static int be_socket_disable(struct bufferevent *, short);
static void be_socket_destruct(struct bufferevent *);
-static int be_socket_adj_timeouts(struct bufferevent *);
static int be_socket_flush(struct bufferevent *, short, enum bufferevent_flush_mode);
static int be_socket_ctrl(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
@@ -92,13 +91,39 @@ const struct bufferevent_ops bufferevent_ops_socket = {
be_socket_disable,
NULL, /* unlink */
be_socket_destruct,
- be_socket_adj_timeouts,
+ bufferevent_generic_adj_existing_timeouts_,
be_socket_flush,
be_socket_ctrl,
};
-#define be_socket_add(ev, t) \
- bufferevent_add_event_((ev), (t))
+const struct sockaddr*
+bufferevent_socket_get_conn_address_(struct bufferevent *bev)
+{
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ return (struct sockaddr *)&bev_p->conn_address;
+}
+
+void
+bufferevent_socket_set_conn_address_fd_(struct bufferevent *bev,
+ evutil_socket_t fd)
+{
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+
+ socklen_t len = sizeof(bev_p->conn_address);
+
+ struct sockaddr *addr = (struct sockaddr *)&bev_p->conn_address;
+ if (addr->sa_family != AF_UNSPEC)
+ getpeername(fd, addr, &len);
+}
+
+void
+bufferevent_socket_set_conn_address_(struct bufferevent *bev,
+ struct sockaddr *addr, size_t addrlen)
+{
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ EVUTIL_ASSERT(addrlen <= sizeof(bev_p->conn_address));
+ memcpy(&bev_p->conn_address, addr, addrlen);
+}
static void
bufferevent_socket_outbuf_cb(struct evbuffer *buf,
@@ -106,8 +131,7 @@ bufferevent_socket_outbuf_cb(struct evbuffer *buf,
void *arg)
{
struct bufferevent *bufev = arg;
- struct bufferevent_private *bufev_p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
if (cbinfo->n_added &&
(bufev->enabled & EV_WRITE) &&
@@ -115,7 +139,7 @@ bufferevent_socket_outbuf_cb(struct evbuffer *buf,
!bufev_p->write_suspended) {
/* Somebody added data to the buffer, and we would like to
* write, and we were not writing. So, start writing. */
- if (be_socket_add(&bufev->ev_write, &bufev->timeout_write) == -1) {
+ if (bufferevent_add_event_(&bufev->ev_write, &bufev->timeout_write) == -1) {
/* Should we log this? */
}
}
@@ -125,8 +149,7 @@ static void
bufferevent_readcb(evutil_socket_t fd, short event, void *arg)
{
struct bufferevent *bufev = arg;
- struct bufferevent_private *bufev_p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
struct evbuffer *input;
int res = 0;
short what = BEV_EVENT_READING;
@@ -171,6 +194,10 @@ bufferevent_readcb(evutil_socket_t fd, short event, void *arg)
int err = evutil_socket_geterror(fd);
if (EVUTIL_ERR_RW_RETRIABLE(err))
goto reschedule;
+ if (EVUTIL_ERR_CONNECT_REFUSED(err)) {
+ bufev_p->connection_refused = 1;
+ goto done;
+ }
/* error case */
what |= BEV_EVENT_ERROR;
} else if (res == 0) {
@@ -203,8 +230,7 @@ static void
bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
{
struct bufferevent *bufev = arg;
- struct bufferevent_private *bufev_p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
int res = 0;
short what = BEV_EVENT_WRITING;
int connected = 0;
@@ -224,8 +250,8 @@ bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
/* we need to fake the error if the connection was refused
* immediately - usually connection to localhost on BSD */
if (bufev_p->connection_refused) {
- bufev_p->connection_refused = 0;
- c = -1;
+ bufev_p->connection_refused = 0;
+ c = -1;
}
if (c == 0)
@@ -239,6 +265,7 @@ bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
goto done;
} else {
connected = 1;
+ bufferevent_socket_set_conn_address_fd_(bufev, fd);
#ifdef _WIN32
if (BEV_IS_ASYNC(bufev)) {
event_del(&bufev->ev_write);
@@ -351,10 +378,9 @@ bufferevent_socket_new(struct event_base *base, evutil_socket_t fd,
int
bufferevent_socket_connect(struct bufferevent *bev,
- struct sockaddr *sa, int socklen)
+ const struct sockaddr *sa, int socklen)
{
- struct bufferevent_private *bufev_p =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bev);
evutil_socket_t fd;
int r = 0;
@@ -363,9 +389,6 @@ bufferevent_socket_connect(struct bufferevent *bev,
bufferevent_incref_and_lock_(bev);
- if (!bufev_p)
- goto done;
-
fd = bufferevent_getfd(bev);
if (fd < 0) {
if (!sa)
@@ -373,7 +396,7 @@ bufferevent_socket_connect(struct bufferevent *bev,
fd = evutil_socket_(sa->sa_family,
SOCK_STREAM|EVUTIL_SOCK_NONBLOCK, 0);
if (fd < 0)
- goto done;
+ goto freesock;
ownfd = 1;
}
if (sa) {
@@ -412,22 +435,19 @@ bufferevent_socket_connect(struct bufferevent *bev,
/* The connect succeeded already. How very BSD of it. */
result = 0;
bufev_p->connecting = 1;
- event_active(&bev->ev_write, EV_WRITE, 1);
+ bufferevent_trigger_nolock_(bev, EV_WRITE, BEV_OPT_DEFER_CALLBACKS);
} else {
/* The connect failed already. How very BSD of it. */
- bufev_p->connection_refused = 1;
- bufev_p->connecting = 1;
result = 0;
- event_active(&bev->ev_write, EV_WRITE, 1);
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, BEV_OPT_DEFER_CALLBACKS);
+ bufferevent_disable(bev, EV_WRITE|EV_READ);
}
goto done;
freesock:
- bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
if (ownfd)
evutil_closesocket(fd);
- /* do something about the error? */
done:
bufferevent_decref_and_unlock_(bev);
return result;
@@ -438,14 +458,20 @@ bufferevent_connect_getaddrinfo_cb(int result, struct evutil_addrinfo *ai,
void *arg)
{
struct bufferevent *bev = arg;
- struct bufferevent_private *bev_p =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
int r;
BEV_LOCK(bev);
bufferevent_unsuspend_write_(bev, BEV_SUSPEND_LOOKUP);
bufferevent_unsuspend_read_(bev, BEV_SUSPEND_LOOKUP);
+ bev_p->dns_request = NULL;
+
+ if (result == EVUTIL_EAI_CANCEL) {
+ bev_p->dns_error = result;
+ bufferevent_decref_and_unlock_(bev);
+ return;
+ }
if (result != 0) {
bev_p->dns_error = result;
bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
@@ -456,9 +482,10 @@ bufferevent_connect_getaddrinfo_cb(int result, struct evutil_addrinfo *ai,
}
/* XXX use the other addrinfos? */
- /* XXX use this return value */
+ bufferevent_socket_set_conn_address_(bev, ai->ai_addr, (int)ai->ai_addrlen);
r = bufferevent_socket_connect(bev, ai->ai_addr, (int)ai->ai_addrlen);
- (void)r;
+ if (r < 0)
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
bufferevent_decref_and_unlock_(bev);
evutil_freeaddrinfo(ai);
}
@@ -469,49 +496,39 @@ bufferevent_socket_connect_hostname(struct bufferevent *bev,
{
char portbuf[10];
struct evutil_addrinfo hint;
- int err;
- struct bufferevent_private *bev_p =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
if (family != AF_INET && family != AF_INET6 && family != AF_UNSPEC)
return -1;
if (port < 1 || port > 65535)
return -1;
- BEV_LOCK(bev);
- bev_p->dns_error = 0;
- BEV_UNLOCK(bev);
-
- evutil_snprintf(portbuf, sizeof(portbuf), "%d", port);
-
memset(&hint, 0, sizeof(hint));
hint.ai_family = family;
hint.ai_protocol = IPPROTO_TCP;
hint.ai_socktype = SOCK_STREAM;
+ evutil_snprintf(portbuf, sizeof(portbuf), "%d", port);
+
+ BEV_LOCK(bev);
+ bev_p->dns_error = 0;
+
bufferevent_suspend_write_(bev, BEV_SUSPEND_LOOKUP);
bufferevent_suspend_read_(bev, BEV_SUSPEND_LOOKUP);
bufferevent_incref_(bev);
- err = evutil_getaddrinfo_async_(evdns_base, hostname, portbuf,
- &hint, bufferevent_connect_getaddrinfo_cb, bev);
+ bev_p->dns_request = evutil_getaddrinfo_async_(evdns_base, hostname,
+ portbuf, &hint, bufferevent_connect_getaddrinfo_cb, bev);
+ BEV_UNLOCK(bev);
- if (err == 0) {
- return 0;
- } else {
- bufferevent_unsuspend_write_(bev, BEV_SUSPEND_LOOKUP);
- bufferevent_unsuspend_read_(bev, BEV_SUSPEND_LOOKUP);
- bufferevent_decref_(bev);
- return -1;
- }
+ return 0;
}
int
bufferevent_socket_get_dns_error(struct bufferevent *bev)
{
int rv;
- struct bufferevent_private *bev_p =
- EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
BEV_LOCK(bev);
rv = bev_p->dns_error;
@@ -550,22 +567,19 @@ bufferevent_new(evutil_socket_t fd,
static int
be_socket_enable(struct bufferevent *bufev, short event)
{
- if (event & EV_READ) {
- if (be_socket_add(&bufev->ev_read,&bufev->timeout_read) == -1)
+ if (event & EV_READ &&
+ bufferevent_add_event_(&bufev->ev_read, &bufev->timeout_read) == -1)
return -1;
- }
- if (event & EV_WRITE) {
- if (be_socket_add(&bufev->ev_write,&bufev->timeout_write) == -1)
+ if (event & EV_WRITE &&
+ bufferevent_add_event_(&bufev->ev_write, &bufev->timeout_write) == -1)
return -1;
- }
return 0;
}
static int
be_socket_disable(struct bufferevent *bufev, short event)
{
- struct bufferevent_private *bufev_p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
if (event & EV_READ) {
if (event_del(&bufev->ev_read) == -1)
return -1;
@@ -581,38 +595,16 @@ be_socket_disable(struct bufferevent *bufev, short event)
static void
be_socket_destruct(struct bufferevent *bufev)
{
- struct bufferevent_private *bufev_p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
evutil_socket_t fd;
- EVUTIL_ASSERT(bufev->be_ops == &bufferevent_ops_socket);
+ EVUTIL_ASSERT(BEV_IS_SOCKET(bufev));
fd = event_get_fd(&bufev->ev_read);
if ((bufev_p->options & BEV_OPT_CLOSE_ON_FREE) && fd >= 0)
EVUTIL_CLOSESOCKET(fd);
-}
-static int
-be_socket_adj_timeouts(struct bufferevent *bufev)
-{
- int r = 0;
- if (event_pending(&bufev->ev_read, EV_READ, NULL)) {
- if (evutil_timerisset(&bufev->timeout_read)) {
- if (be_socket_add(&bufev->ev_read, &bufev->timeout_read) < 0)
- r = -1;
- } else {
- event_remove_timer(&bufev->ev_read);
- }
- }
- if (event_pending(&bufev->ev_write, EV_WRITE, NULL)) {
- if (evutil_timerisset(&bufev->timeout_write)) {
- if (be_socket_add(&bufev->ev_write, &bufev->timeout_write) < 0)
- r = -1;
- } else {
- event_remove_timer(&bufev->ev_write);
- }
- }
- return r;
+ evutil_getaddrinfo_cancel_async_(bufev_p->dns_request);
}
static int
@@ -626,12 +618,17 @@ be_socket_flush(struct bufferevent *bev, short iotype,
static void
be_socket_setfd(struct bufferevent *bufev, evutil_socket_t fd)
{
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
+
BEV_LOCK(bufev);
- EVUTIL_ASSERT(bufev->be_ops == &bufferevent_ops_socket);
+ EVUTIL_ASSERT(BEV_IS_SOCKET(bufev));
event_del(&bufev->ev_read);
event_del(&bufev->ev_write);
+ evbuffer_unfreeze(bufev->input, 0);
+ evbuffer_unfreeze(bufev->output, 1);
+
event_assign(&bufev->ev_read, bufev->ev_base, fd,
EV_READ|EV_PERSIST|EV_FINALIZE, bufferevent_readcb, bufev);
event_assign(&bufev->ev_write, bufev->ev_base, fd,
@@ -640,6 +637,8 @@ be_socket_setfd(struct bufferevent *bufev, evutil_socket_t fd)
if (fd >= 0)
bufferevent_enable(bufev, bufev->enabled);
+ evutil_getaddrinfo_cancel_async_(bufev_p->dns_request);
+
BEV_UNLOCK(bufev);
}
@@ -648,11 +647,10 @@ int
bufferevent_priority_set(struct bufferevent *bufev, int priority)
{
int r = -1;
- struct bufferevent_private *bufev_p =
- EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct bufferevent_private *bufev_p = BEV_UPCAST(bufev);
BEV_LOCK(bufev);
- if (bufev->be_ops != &bufferevent_ops_socket)
+ if (BEV_IS_ASYNC(bufev) || BEV_IS_FILTER(bufev) || BEV_IS_PAIR(bufev))
goto done;
if (event_priority_set(&bufev->ev_read, priority) == -1)
@@ -675,7 +673,7 @@ bufferevent_base_set(struct event_base *base, struct bufferevent *bufev)
int res = -1;
BEV_LOCK(bufev);
- if (bufev->be_ops != &bufferevent_ops_socket)
+ if (!BEV_IS_SOCKET(bufev))
goto done;
bufev->ev_base = base;
diff --git a/contrib/ntp/sntp/libevent/build-aux/ltmain.sh b/contrib/ntp/sntp/libevent/build-aux/ltmain.sh
index 0f0a2da3f9dd..0f0a2da3f9dd 100755..100644
--- a/contrib/ntp/sntp/libevent/build-aux/ltmain.sh
+++ b/contrib/ntp/sntp/libevent/build-aux/ltmain.sh
diff --git a/contrib/ntp/sntp/libevent/cmake/AddCompilerFlags.cmake b/contrib/ntp/sntp/libevent/cmake/AddCompilerFlags.cmake
new file mode 100644
index 000000000000..9dc21d03adc5
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/AddCompilerFlags.cmake
@@ -0,0 +1,13 @@
+include(CheckCCompilerFlag)
+
+macro(add_compiler_flags)
+ foreach(flag ${ARGN})
+ string(REGEX REPLACE "[-.+/:= ]" "_" _flag_esc "${flag}")
+
+ check_c_compiler_flag("${flag}" check_c_compiler_flag_${_flag_esc})
+
+ if (check_c_compiler_flag_${_flag_esc})
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+ endif()
+ endforeach()
+endmacro()
diff --git a/contrib/ntp/sntp/libevent/cmake/AddEventLibrary.cmake b/contrib/ntp/sntp/libevent/cmake/AddEventLibrary.cmake
new file mode 100644
index 000000000000..04f5837e9860
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/AddEventLibrary.cmake
@@ -0,0 +1,193 @@
+include(CMakeParseArguments)
+
+set(LIBEVENT_SHARED_LIBRARIES "")
+set(LIBEVENT_STATIC_LIBRARIES "")
+
+macro(set_event_shared_lib_flags LIB_NAME)
+ set_target_properties("${LIB_NAME}_shared" PROPERTIES
+ COMPILE_FLAGS ${ARGN})
+ set_target_properties("${LIB_NAME}_shared" PROPERTIES
+ LINK_FLAGS ${ARGN})
+endmacro()
+
+macro(generate_pkgconfig LIB_NAME)
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(exec_prefix ${CMAKE_INSTALL_PREFIX})
+ set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
+ set(includedir ${CMAKE_INSTALL_PREFIX}/include)
+
+ set(VERSION ${EVENT_ABI_LIBVERSION})
+
+ set(LIBS "")
+ foreach (LIB ${LIB_PLATFORM})
+ set(LIBS "${LIBS} -L${LIB}")
+ endforeach()
+
+ set(OPENSSL_LIBS "")
+ foreach(LIB ${OPENSSL_LIBRARIES})
+ set(OPENSSL_LIBS "${OPENSSL_LIBS} -L${LIB}")
+ endforeach()
+
+ configure_file("lib${LIB_NAME}.pc.in" "lib${LIB_NAME}.pc" @ONLY)
+ install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${LIB_NAME}.pc"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig"
+ )
+endmacro()
+
+# LIB_NAME maybe event_core, event_extra, event_openssl, event_pthreads or event.
+# Targets whose LIB_NAME is not 'event' should be exported and installed.
+macro(export_install_target TYPE LIB_NAME OUTER_INCLUDES)
+ if("${LIB_NAME}" STREQUAL "event")
+ install(TARGETS "${LIB_NAME}_${TYPE}"
+ LIBRARY DESTINATION "lib" COMPONENT lib
+ ARCHIVE DESTINATION "lib" COMPONENT lib
+ RUNTIME DESTINATION "lib" COMPONENT lib
+ COMPONENT dev
+ )
+ else()
+ string(REPLACE "event_" "" PURE_NAME ${LIB_NAME})
+ string(TOUPPER ${TYPE} UPPER_TYPE)
+ list(APPEND LIBEVENT_${UPPER_TYPE}_LIBRARIES "${PURE_NAME}")
+ set(OUTER_INCS)
+ if (NOT "${OUTER_INCLUDES}" STREQUAL "NONE")
+ set(OUTER_INCS ${OUTER_INCLUDES})
+ endif()
+ target_include_directories("${LIB_NAME}_${TYPE}"
+ PUBLIC "$<INSTALL_INTERFACE:include>"
+ "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
+ "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>"
+ ${OUTER_INCS}
+ )
+ set_target_properties("${LIB_NAME}_${TYPE}" PROPERTIES EXPORT_NAME ${PURE_NAME})
+ export(TARGETS "${LIB_NAME}_${TYPE}"
+ NAMESPACE ${PROJECT_NAME}::
+ FILE "${PROJECT_BINARY_DIR}/LibeventTargets-${TYPE}.cmake"
+ APPEND
+ )
+ install(TARGETS "${LIB_NAME}_${TYPE}"
+ EXPORT LibeventTargets-${TYPE}
+ LIBRARY DESTINATION "lib" COMPONENT lib
+ ARCHIVE DESTINATION "lib" COMPONENT lib
+ RUNTIME DESTINATION "lib" COMPONENT lib
+ COMPONENT dev
+ )
+ endif()
+endmacro()
+
+# Global variables that it uses:
+# - EVENT_ABI_LIBVERSION
+# - EVENT_ABI_LIBVERSION_CURRENT
+# - EVENT_ABI_LIBVERSION_REVISION
+# - EVENT_ABI_LIBVERSION_AGE
+# - EVENT_PACKAGE_RELEASE
+# - CMAKE_THREAD_LIBS_INIT LIB_PLATFORM
+# - OPENSSL_LIBRARIES
+# - EVENT_SHARED_FLAGS
+# - EVENT_LIBRARY_STATIC
+# - EVENT_LIBRARY_SHARED
+#
+# Exported variables:
+# - LIBEVENT_SHARED_LIBRARIES
+# - LIBEVENT_STATIC_LIBRARIES
+macro(add_event_library LIB_NAME)
+ cmake_parse_arguments(LIB
+ "" # Options
+ "VERSION" # One val
+ "SOURCES;LIBRARIES;INNER_LIBRARIES;OUTER_INCLUDES" # Multi val
+ ${ARGN}
+ )
+
+ if ("${LIB_OUTER_INCLUDES}" STREQUAL "")
+ set(LIB_OUTER_INCLUDES NONE)
+ endif()
+ set(ADD_EVENT_LIBRARY_INTERFACE)
+
+ if (${EVENT_LIBRARY_STATIC})
+ add_library("${LIB_NAME}_static" STATIC ${LIB_SOURCES})
+ set_target_properties("${LIB_NAME}_static" PROPERTIES
+ OUTPUT_NAME "${LIB_NAME}"
+ CLEAN_DIRECT_OUTPUT 1)
+
+ if(LIB_INNER_LIBRARIES)
+ set(INNER_LIBRARIES "${LIB_INNER_LIBRARIES}_static")
+ endif()
+ target_link_libraries("${LIB_NAME}_static"
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${LIB_PLATFORM}
+ ${INNER_LIBRARIES}
+ ${LIB_LIBRARIES})
+
+ export_install_target(static "${LIB_NAME}" "${LIB_OUTER_INCLUDES}")
+
+ set(ADD_EVENT_LIBRARY_INTERFACE "${LIB_NAME}_static")
+ endif()
+
+ if (${EVENT_LIBRARY_SHARED})
+ add_library("${LIB_NAME}_shared" SHARED ${LIB_SOURCES})
+
+ if(LIB_INNER_LIBRARIES)
+ set(INNER_LIBRARIES "${LIB_INNER_LIBRARIES}_shared")
+ endif()
+ target_link_libraries("${LIB_NAME}_shared"
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${LIB_PLATFORM}
+ ${INNER_LIBRARIES}
+ ${LIB_LIBRARIES})
+
+ if (EVENT_SHARED_FLAGS)
+ set_event_shared_lib_flags("${LIB_NAME}" "${EVENT_SHARED_FLAGS}")
+ endif()
+
+ if (WIN32)
+ set_target_properties(
+ "${LIB_NAME}_shared" PROPERTIES
+ OUTPUT_NAME "${LIB_NAME}"
+ SOVERSION ${EVENT_ABI_LIBVERSION})
+ elseif (APPLE)
+ math(EXPR COMPATIBILITY_VERSION "${EVENT_ABI_LIBVERSION_CURRENT}+1")
+ math(EXPR CURRENT_MINUS_AGE "${EVENT_ABI_LIBVERSION_CURRENT}-${EVENT_ABI_LIBVERSION_AGE}")
+ set_target_properties(
+ "${LIB_NAME}_shared" PROPERTIES
+ OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}.${CURRENT_MINUS_AGE}"
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+ LINK_FLAGS "-compatibility_version ${COMPATIBILITY_VERSION} -current_version ${COMPATIBILITY_VERSION}.${EVENT_ABI_LIBVERSION_REVISION}")
+ else()
+ math(EXPR CURRENT_MINUS_AGE "${EVENT_ABI_LIBVERSION_CURRENT}-${EVENT_ABI_LIBVERSION_AGE}")
+ set_target_properties(
+ "${LIB_NAME}_shared" PROPERTIES
+ OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}"
+ VERSION "${CURRENT_MINUS_AGE}.${EVENT_ABI_LIBVERSION_AGE}.${EVENT_ABI_LIBVERSION_REVISION}"
+ SOVERSION "${CURRENT_MINUS_AGE}"
+ INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+ endif()
+
+ if (NOT WIN32)
+ set(LIB_LINK_NAME
+ "${CMAKE_SHARED_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
+
+ add_custom_command(TARGET ${LIB_NAME}_shared
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ "$<TARGET_FILE_NAME:${LIB_NAME}_shared>"
+ "${LIB_LINK_NAME}"
+ WORKING_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+ endif()
+
+ export_install_target(shared "${LIB_NAME}" "${LIB_OUTER_INCLUDES}")
+
+ set(ADD_EVENT_LIBRARY_INTERFACE "${LIB_NAME}_shared")
+
+ if (NOT WIN32)
+ install(FILES
+ "$<TARGET_FILE_DIR:${LIB_NAME}_shared>/${LIB_LINK_NAME}"
+ DESTINATION "lib"
+ COMPONENT lib)
+ endif()
+ endif()
+
+ add_library(${LIB_NAME} INTERFACE)
+ target_link_libraries(${LIB_NAME} INTERFACE ${ADD_EVENT_LIBRARY_INTERFACE})
+
+ generate_pkgconfig("${LIB_NAME}")
+endmacro()
diff --git a/contrib/ntp/sntp/libevent/cmake/COPYING-CMAKE-SCRIPTS b/contrib/ntp/sntp/libevent/cmake/COPYING-CMAKE-SCRIPTS
new file mode 100644
index 000000000000..ab3c4d25d164
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/COPYING-CMAKE-SCRIPTS
@@ -0,0 +1,22 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/contrib/ntp/sntp/libevent/cmake/CheckConstExists.cmake b/contrib/ntp/sntp/libevent/cmake/CheckConstExists.cmake
new file mode 100644
index 000000000000..de074581df4c
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CheckConstExists.cmake
@@ -0,0 +1,25 @@
+include(CheckCSourceCompiles)
+
+macro(check_const_exists CONST FILES VARIABLE)
+ if (NOT DEFINED ${VARIABLE})
+ set(check_const_exists_source "")
+ foreach(file ${FILES})
+ set(check_const_exists_source
+ "${check_const_exists_source}
+ #include <${file}>")
+ endforeach()
+ set(check_const_exists_source
+ "${check_const_exists_source}
+ int main() { (void)${CONST}; return 0; }")
+
+ check_c_source_compiles("${check_const_exists_source}" ${VARIABLE})
+
+ if (${${VARIABLE}})
+ set(${VARIABLE} 1 CACHE INTERNAL "Have const ${CONST}")
+ message(STATUS "Looking for ${CONST} - found")
+ else()
+ set(${VARIABLE} 0 CACHE INTERNAL "Have const ${CONST}")
+ message(STATUS "Looking for ${CONST} - not found")
+ endif()
+ endif()
+endmacro(check_const_exists)
diff --git a/contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.c b/contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.c
new file mode 100644
index 000000000000..d948fecf2b4e
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.c
@@ -0,0 +1,14 @@
+#include <sys/types.h>
+
+#define KB ((off_t)1024)
+#define MB ((off_t)1024 * KB)
+#define GB ((off_t)1024 * MB)
+#define TB ((off_t)1024 * GB)
+int t2[(((64 * GB -1) % 671088649) == 268434537)
+ && (((TB - (64 * GB -1) + 255) % 1792151290) == 305159546)? 1: -1];
+
+int main()
+{
+ ;
+ return 0;
+}
diff --git a/contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.cmake b/contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.cmake
new file mode 100644
index 000000000000..12534401605c
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CheckFileOffsetBits.cmake
@@ -0,0 +1,43 @@
+# - Check if _FILE_OFFSET_BITS macro needed for large files
+# CHECK_FILE_OFFSET_BITS ()
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+# CMAKE_REQUIRED_FLAGS = string of compile command line flags
+# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+# CMAKE_REQUIRED_INCLUDES = list of include directories
+# Copyright (c) 2009, Michihiro NAKAJIMA
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+#INCLUDE(CheckCSourceCompiles)
+
+GET_FILENAME_COMPONENT(_selfdir_CheckFileOffsetBits
+ "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+MACRO (CHECK_FILE_OFFSET_BITS)
+ IF(NOT DEFINED _FILE_OFFSET_BITS)
+ MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files")
+ TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
+ COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
+ IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
+ TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
+ COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
+ ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
+
+ IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
+ SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
+ MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - needed")
+ ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
+ SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
+ MESSAGE(STATUS "Cheking _FILE_OFFSET_BITS for large files - not needed")
+ ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
+ ENDIF(NOT DEFINED _FILE_OFFSET_BITS)
+
+ENDMACRO (CHECK_FILE_OFFSET_BITS)
diff --git a/contrib/ntp/sntp/libevent/cmake/CheckFunctionKeywords.cmake b/contrib/ntp/sntp/libevent/cmake/CheckFunctionKeywords.cmake
new file mode 100644
index 000000000000..3d968b8a6b1a
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CheckFunctionKeywords.cmake
@@ -0,0 +1,14 @@
+include(CheckCSourceCompiles)
+
+macro(check_function_keywords _wordlist)
+ set(${_result} "")
+ foreach(flag ${_wordlist})
+ string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}")
+ string(TOUPPER "${flagname}" flagname)
+ set(have_flag "HAVE_${flagname}")
+ check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag})
+ if(${have_flag} AND NOT ${_result})
+ set(${_result} "${flag}")
+ endif(${have_flag} AND NOT ${_result})
+ endforeach(flag)
+endmacro(check_function_keywords)
diff --git a/contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.c.in b/contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.c.in
new file mode 100644
index 000000000000..a97344ac3e10
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.c.in
@@ -0,0 +1,29 @@
+@CHECK_PROTOTYPE_DEFINITION_HEADER@
+
+static void cmakeRequireSymbol(int dummy, ...) {
+ (void) dummy;
+}
+
+static void checkSymbol(void) {
+#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
+ cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
+#endif
+}
+
+@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
+ return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
+}
+
+#ifdef __CLASSIC_C__
+int main() {
+ int ac;
+ char*av[];
+#else
+int main(int ac, char *av[]) {
+#endif
+ checkSymbol();
+ if (ac > 1000) {
+ return *av[0];
+ }
+ return 0;
+}
diff --git a/contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.cmake b/contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.cmake
new file mode 100644
index 000000000000..940d1ff0ce38
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CheckPrototypeDefinition.cmake
@@ -0,0 +1,82 @@
+# - Check if the protoype we expect is correct.
+# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
+#
+# FUNCTION - The name of the function (used to check if prototype exists)
+# PROTOTYPE- The prototype to check.
+# RETURN - The return value of the function.
+# HEADER - The header files required.
+# VARIABLE - The variable to store the result.
+#
+# Example:
+#
+# check_prototype_definition(getpwent_r
+# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
+# "NULL"
+# "unistd.h;pwd.h"
+# SOLARIS_GETPWENT_R)
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+# CMAKE_REQUIRED_FLAGS = string of compile command line flags
+# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+# CMAKE_REQUIRED_INCLUDES = list of include directories
+# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+
+
+function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
+ if (${_VARIABLE} MATCHES "^${_VARIABLE}$")
+ set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
+
+ set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ if (CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_PROTOTYPE_DEFINITION_LIBS
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_PROTOTYPE_DEFINITION_LIBS)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ if (CMAKE_REQUIRED_INCLUDES)
+ set(CMAKE_SYMBOL_EXISTS_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CMAKE_SYMBOL_EXISTS_INCLUDES)
+ endif(CMAKE_REQUIRED_INCLUDES)
+
+ foreach(_FILE ${_HEADER})
+ set(CHECK_PROTOTYPE_DEFINITION_HEADER
+ "${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
+ endforeach(_FILE)
+
+ set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
+ set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
+ set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
+
+ configure_file("${PROJECT_SOURCE_DIR}/cmake/CheckPrototypeDefinition.c.in"
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
+
+ file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
+
+ try_compile(${_VARIABLE}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
+ COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
+ "${CHECK_PROTOTYPE_DEFINITION_LIBS}"
+ "${CMAKE_SYMBOL_EXISTS_INCLUDES}"
+ OUTPUT_VARIABLE OUTPUT)
+
+ if (${_VARIABLE})
+ set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
+ message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
+ "${OUTPUT}\n\n")
+ else (${_VARIABLE})
+ message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
+ set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
+ "${OUTPUT}\n\n${_SOURCE}\n\n")
+ endif (${_VARIABLE})
+ endif()
+endfunction(CHECK_PROTOTYPE_DEFINITION)
diff --git a/contrib/ntp/sntp/libevent/cmake/CheckWorkingKqueue.cmake b/contrib/ntp/sntp/libevent/cmake/CheckWorkingKqueue.cmake
new file mode 100644
index 000000000000..f22f011b5875
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CheckWorkingKqueue.cmake
@@ -0,0 +1,52 @@
+include(CheckCSourceRuns)
+
+check_c_source_runs(
+"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/event.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int
+main(int argc, char **argv)
+{
+ int kq;
+ int n;
+ int fd[2];
+ struct kevent ev;
+ struct timespec ts;
+ char buf[80000];
+
+ if (pipe(fd) == -1)
+ exit(1);
+ if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
+ exit(1);
+
+ while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf))
+ ;
+
+ if ((kq = kqueue()) == -1)
+ exit(1);
+
+ memset(&ev, 0, sizeof(ev));
+ ev.ident = fd[1];
+ ev.filter = EVFILT_WRITE;
+ ev.flags = EV_ADD | EV_ENABLE;
+ n = kevent(kq, &ev, 1, NULL, 0, NULL);
+ if (n == -1)
+ exit(1);
+
+ read(fd[0], buf, sizeof(buf));
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+ n = kevent(kq, NULL, 0, &ev, 1, &ts);
+ if (n == -1 || n == 0)
+ exit(1);
+
+ exit(0);
+}
+
+" EVENT__HAVE_WORKING_KQUEUE)
diff --git a/contrib/ntp/sntp/libevent/cmake/CodeCoverage.cmake b/contrib/ntp/sntp/libevent/cmake/CodeCoverage.cmake
new file mode 100644
index 000000000000..eba85b3fb77e
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/CodeCoverage.cmake
@@ -0,0 +1,165 @@
+#
+# Boost Software License - Version 1.0 - August 17th, 2003
+#
+# Permission is hereby granted, free of charge, to any person or organization
+# obtaining a copy of the software and accompanying documentation covered by
+# this license (the "Software") to use, reproduce, display, distribute,
+# execute, and transmit the Software, and to prepare derivative works of the
+# Software, and to permit third-parties to whom the Software is furnished to
+# do so, all subject to the following:
+#
+# The copyright notices in the Software and this entire statement, including
+# the above license grant, this restriction and the following disclaimer,
+# must be included in all copies of the Software, in whole or in part, and
+# all derivative works of the Software, unless such copies or derivative
+# works are solely in the form of machine-executable object code generated by
+# a source language processor.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+# SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+# FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+# 2012-01-31, Lars Bilke
+# - Enable Code Coverage
+#
+# 2013-09-17, Joakim Söderberg
+# - Added support for Clang.
+# - Some additional usage instructions.
+#
+# 2016-11-02, Azat Khuzhin
+# - Adopt for C compiler only (libevent)
+#
+# USAGE:
+# 1. Copy this file into your cmake modules path.
+#
+# 2. Add the following line to your CMakeLists.txt:
+# INCLUDE(CodeCoverage)
+#
+# 3. Set compiler flags to turn off optimization and enable coverage:
+# SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+# SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+#
+# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
+# which runs your test executable and produces a lcov code coverage report:
+# Example:
+# SETUP_TARGET_FOR_COVERAGE(
+# my_coverage_target # Name for custom target.
+# test_driver # Name of the test driver executable that runs the tests.
+# # NOTE! This should always have a ZERO as exit code
+# # otherwise the coverage generation will not complete.
+# coverage # Name of output directory.
+# )
+#
+# 4. Build a Debug build:
+# cmake -DCMAKE_BUILD_TYPE=Debug ..
+# make
+# make my_coverage_target
+#
+#
+
+# Check prereqs
+FIND_PROGRAM( GCOV_PATH gcov )
+FIND_PROGRAM( LCOV_PATH lcov )
+FIND_PROGRAM( GENHTML_PATH genhtml )
+FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
+
+IF(NOT GCOV_PATH)
+ MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
+ENDIF() # NOT GCOV_PATH
+
+IF(NOT CMAKE_COMPILER_IS_GNUCC)
+ # Clang version 3.0.0 and greater now supports gcov as well.
+ MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
+
+ IF(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+ MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
+ ENDIF()
+ENDIF() # NOT CMAKE_COMPILER_IS_GNUCC
+
+IF ( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
+ MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
+ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
+
+
+# Param _targetname The name of new the custom make target
+# Param _testrunner The name of the target which runs the tests.
+# MUST return ZERO always, even on errors.
+# If not, no coverage report will be created!
+# Param _outputname lcov output is generated as _outputname.info
+# HTML report is generated in _outputname/index.html
+# Optional fourth parameter is passed as arguments to _testrunner
+# Pass them in list form, e.g.: "-j;2" for -j 2
+FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
+
+ IF(NOT LCOV_PATH)
+ MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
+ ENDIF() # NOT LCOV_PATH
+
+ IF(NOT GENHTML_PATH)
+ MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
+ ENDIF() # NOT GENHTML_PATH
+
+ # Setup target
+ ADD_CUSTOM_TARGET(${_targetname}
+
+ # Cleanup lcov
+ ${LCOV_PATH} --directory . --zerocounters
+
+ # Run tests
+ COMMAND ${_testrunner} ${ARGV3}
+
+ # Capturing lcov counters and generating report
+ COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
+ COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+ COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
+ COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
+
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
+ )
+
+ # Show info where to find the report
+ ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
+ COMMAND ;
+ COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
+ )
+
+ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
+
+# Param _targetname The name of new the custom make target
+# Param _testrunner The name of the target which runs the tests
+# Param _outputname cobertura output is generated as _outputname.xml
+# Optional fourth parameter is passed as arguments to _testrunner
+# Pass them in list form, e.g.: "-j;2" for -j 2
+FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
+
+ IF(NOT PYTHON_EXECUTABLE)
+ MESSAGE(FATAL_ERROR "Python not found! Aborting...")
+ ENDIF() # NOT PYTHON_EXECUTABLE
+
+ IF(NOT GCOVR_PATH)
+ MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
+ ENDIF() # NOT GCOVR_PATH
+
+ ADD_CUSTOM_TARGET(${_targetname}
+
+ # Run tests
+ ${_testrunner} ${ARGV3}
+
+ # Running gcovr
+ COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMENT "Running gcovr to produce Cobertura code coverage report."
+ )
+
+ # Show info where to find the report
+ ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
+ COMMAND ;
+ COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
+ )
+
+ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
diff --git a/contrib/ntp/sntp/libevent/cmake/Copyright.txt b/contrib/ntp/sntp/libevent/cmake/Copyright.txt
new file mode 100644
index 000000000000..813124f02eef
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/Copyright.txt
@@ -0,0 +1,57 @@
+CMake - Cross Platform Makefile Generator
+Copyright 2000-2013 Kitware, Inc.
+Copyright 2000-2011 Insight Software Consortium
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+* Neither the names of Kitware, Inc., the Insight Software Consortium,
+ nor the names of their contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+------------------------------------------------------------------------------
+
+The above copyright and license notice applies to distributions of
+CMake in source and binary form. Some source files contain additional
+notices of original copyright by their contributors; see each source
+for details. Third-party software packages supplied with CMake under
+compatible licenses provide their own copyright notices documented in
+corresponding subdirectories.
+
+------------------------------------------------------------------------------
+
+CMake was initially developed by Kitware with the following sponsorship:
+
+ * National Library of Medicine at the National Institutes of Health
+ as part of the Insight Segmentation and Registration Toolkit (ITK).
+
+ * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
+ Visualization Initiative.
+
+ * National Alliance for Medical Image Computing (NAMIC) is funded by the
+ National Institutes of Health through the NIH Roadmap for Medical Research,
+ Grant U54 EB005149.
+
+ * Kitware, Inc. \ No newline at end of file
diff --git a/contrib/ntp/sntp/libevent/cmake/LibeventConfig.cmake.in b/contrib/ntp/sntp/libevent/cmake/LibeventConfig.cmake.in
new file mode 100644
index 000000000000..7b808c324543
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/LibeventConfig.cmake.in
@@ -0,0 +1,183 @@
+# - Config file for the Libevent package
+# It defines the following variables
+# LIBEVENT_FOUND - true if libevent and all required components found on the system
+# LIBEVENT_xxx_FOUND - true if component xxx(see available components) found on the system
+# LIBEVENT_VERSION - libevent version in format Major.Minor.Patch
+# LIBEVENT_INCLUDE_DIRS - directories where libevent header is located.
+# LIBEVENT_INCLUDE_DIR - same as DIRS
+# LIBEVENT_LIBRARIES - libevent library to link against.
+# LIBEVENT_LIBRARY - same as LIBRARIES
+#
+# These variables are deprecated, don't use them.
+# LIBEVENT_STATIC_LIBRARIES - libraries to link against (archive/static)
+# LIBEVENT_SHARED_LIBRARIES - libraries to link against (shared)
+#
+# When you try to locate the libevent libraries, you should specify which components you want to use.
+# The following table lists all available components. If none is given, all imported targets will used.
+# core - the core functons of libevent
+# extra - extra functions, contains http, dns and rpc
+# pthreads - multiple threads for libevent, not exists on Windows
+# openssl - openssl support for libevent
+#
+# By default, the shared libraries of libevent will be found. To find the static ones instead,
+# you must set the LIBEVENT_STATIC_LINK variable to TRUE before calling find_package(Libevent ...).
+# If no component provided, all components will be used.
+# example:
+# set(LIBEVENT_STATIC_LINK TRUE)
+# find_package(Libevent 2.2 REQUIRED COMPONENTS core)
+# include_directories(${LIBEVENT_INCLUDE_DIRS}) # Can be omitted
+# target_link_libraries(myapp ${LIBEVENT_LIBRARIES})
+# or target_link_libraries(myapp libevent::core)
+#
+# find_package() can handle dependencies automatically. For example, given the 'openssl' component,
+# all dependencies (libevent_core, libssl, libcrypto and openssl include directories) will be found.
+
+set(CONFIG_FOR_INSTALL_TREE @CONFIG_FOR_INSTALL_TREE@)
+
+set(LIBEVENT_VERSION @EVENT_PACKAGE_VERSION@)
+
+# IMPORTED targets from LibeventTargets.cmake
+set(LIBEVENT_STATIC_LIBRARIES "@LIBEVENT_STATIC_LIBRARIES@")
+set(LIBEVENT_SHARED_LIBRARIES "@LIBEVENT_SHARED_LIBRARIES@")
+
+# Default to the same type as libevent was built:
+if(NOT DEFINED LIBEVENT_STATIC_LINK)
+ set(LIBEVENT_STATIC_LINK NOT @EVENT_LIBRARY_SHARED@)
+endif()
+
+set(CMAKE_FIND_LIBRARY_SUFFIXES_SAVE "${CMAKE_FIND_LIBRARY_SUFFIXES}")
+if(${LIBEVENT_STATIC_LINK})
+ set(_LIB_TYPE static)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
+ set(_AVAILABLE_LIBS "${LIBEVENT_STATIC_LIBRARIES}")
+else()
+ set(_LIB_TYPE shared)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
+ set(_AVAILABLE_LIBS "${LIBEVENT_SHARED_LIBRARIES}")
+endif()
+
+# Get the path of the current file.
+get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../../.." ABSOLUTE)
+
+macro(message_if_needed _flag _msg)
+ if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
+ message(${_flag} "${_msg}")
+ endif()
+endmacro()
+
+macro(no_component_msg _comp)
+ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${_comp})
+ set(pthreadlib)
+ if(NOT WIN32)
+ set(pthreadlib ", pthreads")
+ endif()
+ message(FATAL_ERROR "Your libevent library does not contain a ${_comp} component!\n"
+ "The valid components are core, extra${pthreadlib} and openssl.")
+ else()
+ message_if_needed(WARNING "Your libevent library does not contain a ${_comp} component!")
+ endif()
+endmacro()
+
+set(_EVENT_COMPONENTS)
+if(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
+ list(REMOVE_DUPLICATES ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
+ foreach(_comp ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
+ list(FIND _AVAILABLE_LIBS ${_comp} _INDEX)
+ if(_INDEX GREATER -1)
+ list(APPEND _EVENT_COMPONENTS ${_comp})
+ else()
+ no_component_msg(${_comp})
+ endif()
+ endforeach()
+else()
+ set(_EVENT_COMPONENTS ${_AVAILABLE_LIBS})
+endif()
+
+set(_POSSIBLE_PKG_NAMES)
+list(APPEND _POSSIBLE_PKG_NAMES ${CMAKE_FIND_PACKAGE_NAME} LIBEVENT Libevent libevent)
+list(REMOVE_DUPLICATES _POSSIBLE_PKG_NAMES)
+
+macro(set_case_insensitive_found _comp)
+ foreach(name ${_POSSIBLE_PKG_NAMES})
+ if("${_comp}" STREQUAL "")
+ set(${name}_FOUND TRUE)
+ set(${name}_NOTFOUND FALSE)
+ else()
+ set(${name}_${_comp}_FOUND TRUE)
+ set(${name}_${_comp}_NOTFOUND FALSE)
+ endif()
+ endforeach()
+endmacro()
+
+if(CONFIG_FOR_INSTALL_TREE)
+ ## Config for install tree ----------------------------------------
+ # Find includes
+ unset(_event_h CACHE)
+ find_path(_event_h
+ NAMES event2/event.h
+ PATHS "${_INSTALL_PREFIX}/include"
+ NO_DEFAULT_PATH)
+ if(_event_h)
+ set(LIBEVENT_INCLUDE_DIRS "${_event_h}")
+ message_if_needed(STATUS "Found libevent include directory: ${_event_h}")
+ else()
+ message_if_needed(WARNING "Your libevent library does not contain header files!")
+ endif()
+
+ # Find libraries
+ macro(find_event_lib _comp)
+ unset(_event_lib CACHE)
+ find_library(_event_lib
+ NAMES "event_${_comp}"
+ PATHS "${_INSTALL_PREFIX}/lib"
+ NO_DEFAULT_PATH)
+ if(_event_lib)
+ list(APPEND LIBEVENT_LIBRARIES "libevent::${_comp}")
+ set_case_insensitive_found(${_comp})
+ message_if_needed(STATUS "Found libevent component: ${_event_lib}")
+ else()
+ no_component_msg(${_comp})
+ endif()
+ endmacro()
+
+ foreach(comp ${_EVENT_COMPONENTS})
+ find_event_lib(${comp})
+ endforeach()
+else()
+ ## Config for build tree ----------------------------------------
+ set(LIBEVENT_INCLUDE_DIRS "@EVENT__INCLUDE_DIRS@")
+ foreach(_comp ${_EVENT_COMPONENTS})
+ list(APPEND LIBEVENT_LIBRARIES "libevent::${_comp}")
+ set_case_insensitive_found(${_comp})
+ endforeach()
+endif()
+
+set(LIBEVENT_INCLUDE_DIR ${LIBEVENT_INCLUDE_DIRS})
+if(LIBEVENT_LIBRARIES)
+ set(LIBEVENT_LIBRARY ${LIBEVENT_LIBRARIES})
+ if(CONFIG_FOR_INSTALL_TREE)
+ message_if_needed(STATUS "Found libevent ${LIBEVENT_VERSION} in ${_INSTALL_PREFIX}")
+ else()
+ message_if_needed(STATUS "Found libevent ${LIBEVENT_VERSION} in ${LIBEVENT_CMAKE_DIR}")
+ endif()
+
+ # Avoid including targets more than one times
+ if(NOT TARGET event_core_${_LIB_TYPE})
+ # Include the project Targets file, this contains definitions for IMPORTED targets.
+ include(${LIBEVENT_CMAKE_DIR}/LibeventTargets-${_LIB_TYPE}.cmake)
+ endif()
+else()
+ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
+ message(FATAL_ERROR "Can not find any libraries for libevent.")
+ else()
+ message_if_needed(WARNING "Can not find any libraries for libevent.")
+ endif()
+endif()
+
+set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES_SAVE}")
+unset(_LIB_TYPE)
+unset(_AVAILABLE_LIBS)
+unset(_EVENT_COMPONENTS)
+unset(_POSSIBLE_PKG_NAMES)
+unset(_INSTALL_PREFIX)
diff --git a/contrib/ntp/sntp/libevent/cmake/LibeventConfigVersion.cmake.in b/contrib/ntp/sntp/libevent/cmake/LibeventConfigVersion.cmake.in
new file mode 100644
index 000000000000..56371a8fee77
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/LibeventConfigVersion.cmake.in
@@ -0,0 +1,11 @@
+set(PACKAGE_VERSION "@EVENT_PACKAGE_VERSION@")
+
+# Check whether the requested PACKAGE_FIND_VERSION is compatible
+if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
diff --git a/contrib/ntp/sntp/libevent/cmake/Macros.cmake b/contrib/ntp/sntp/libevent/cmake/Macros.cmake
new file mode 100644
index 000000000000..e480bbfdca8a
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/Macros.cmake
@@ -0,0 +1,36 @@
+include(CheckSymbolExists)
+include(CheckIncludeFiles)
+
+# Check if each symbol in the symbol list exists,
+# and define PREFIX__HAVE_SYMNAME to 1 if yes.
+#
+# SYMLIST: list of symbols to check
+# HEADERS: header files to be included in check code
+# PREFIX: the prefix of definition
+macro(CHECK_SYMBOLS_EXIST SYMLIST HEADERS PREFIX)
+ foreach(SYMNAME ${SYMLIST})
+ string(TOUPPER "${SYMNAME}" SYMNAME_UPPER)
+ if ("${PREFIX}" STREQUAL "")
+ set(HAVE_SYM_DEF "HAVE_${SYMNAME_UPPER}")
+ else()
+ set(HAVE_SYM_DEF "${PREFIX}__HAVE_${SYMNAME_UPPER}")
+ endif()
+ CHECK_SYMBOL_EXISTS(${SYMNAME} "${HEADERS}" ${HAVE_SYM_DEF})
+ endforeach()
+endmacro()
+
+# Check if file exists, define PREFIX__HAVE_FILE to 1 if yes,
+# and collect file to EVENT_INCLUDES
+macro(CHECK_INCLUDE_FILE_CONCAT FILE PREFIX)
+ string(REGEX REPLACE "[./]" "_" FILE_UL ${FILE})
+ string(TOUPPER "${FILE_UL}" FILE_UL_UPPER)
+ if ("${PREFIX}" STREQUAL "")
+ set(HAVE_FILE_DEF "HAVE_${FILE_UL_UPPER}")
+ else()
+ set(HAVE_FILE_DEF "${PREFIX}__HAVE_${FILE_UL_UPPER}")
+ endif()
+ CHECK_INCLUDE_FILES("${EVENT_INCLUDES};${FILE}" ${HAVE_FILE_DEF})
+ if(${HAVE_FILE_DEF})
+ set(EVENT_INCLUDES ${EVENT_INCLUDES} ${FILE})
+ endif()
+endmacro()
diff --git a/contrib/ntp/sntp/libevent/cmake/Uninstall.cmake.in b/contrib/ntp/sntp/libevent/cmake/Uninstall.cmake.in
new file mode 100644
index 000000000000..c6dc09efe109
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/Uninstall.cmake.in
@@ -0,0 +1,23 @@
+# https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake
+
+if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
+ message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
+endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
+
+file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+foreach(file ${files})
+ message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
+ if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+ exec_program(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ if(NOT "${rm_retval}" STREQUAL 0)
+ message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
+ endif(NOT "${rm_retval}" STREQUAL 0)
+ else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+ message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
+ endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+endforeach(file)
diff --git a/contrib/ntp/sntp/libevent/cmake/UseDoxygen.cmake b/contrib/ntp/sntp/libevent/cmake/UseDoxygen.cmake
new file mode 100644
index 000000000000..3b60d5a0f58b
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/UseDoxygen.cmake
@@ -0,0 +1,111 @@
+# Use FindDoxygen.cmake to generate documentation.
+
+option(DOXYGEN_GENERATE_HTML "Generate HTML" ON)
+option(DOXYGEN_GENERATE_MAN "Generate man pages" OFF)
+option(DOXYGEN_MAN_LINKS "Generate man links" ON)
+option(DOXYGEN_GENERATE_LATEX "Generate LaTeX" OFF)
+
+# If the case-insensitive value of the cmake option is one of
+# "off, no, false" or 0, it is equal to false, otherwise true.
+# And the values of the doxygen config does not exactly match it.
+# So we need to convert the cmake option to a doxygen config.
+macro(_convert_to_dx_cfg CMK_OPTION)
+ if (${CMK_OPTION})
+ set(${CMK_OPTION} YES)
+ else()
+ set(${CMK_OPTION} NO)
+ endif()
+endmacro()
+
+macro(UseDoxygen)
+ if (${CMAKE_VERSION} VERSION_LESS "3.9")
+ # Old versions of cmake have poor support for Doxygen generation.
+ message(FATAL_ERROR "Doxygen generation only enabled for cmake 3.9 and higher")
+ else()
+ find_package(Doxygen)
+ if (DOXYGEN_FOUND)
+ set(DOXYGEN_PROJECT_NAME ${PROJECT_NAME})
+ set(DOXYGEN_PROJECT_NUMBER ${EVENT_PACKAGE_VERSION})
+ set(DOXYGEN_PROJECT_BRIEF "Event notification library")
+ set(DOXYGEN_OUTPUT_DIRECTORY doxygen)
+ set(DOXYGEN_STRIP_FROM_PATH include)
+ set(DOXYGEN_JAVADOC_AUTOBRIEF YES)
+ set(DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES)
+ set(DOXYGEN_SORT_BRIEF_DOCS YES)
+ set(DOXYGEN_RECURSIVE NO)
+
+ _convert_to_dx_cfg(DOXYGEN_GENERATE_HTML)
+ _convert_to_dx_cfg(DOXYGEN_GENERATE_MAN)
+ _convert_to_dx_cfg(DOXYGEN_MAN_LINKS)
+ _convert_to_dx_cfg(DOXYGEN_GENERATE_LATEX)
+
+ set(DOXYGEN_LATEX_CMD_NAME latex)
+ set(DOXYGEN_PAPER_TYPE a4wide)
+ set(DOXYGEN_PDF_HYPERLINKS NO)
+
+ set(DOXYGEN_GENERATE_RTF NO)
+ set(DOXYGEN_GENERATE_XML NO)
+ set(DOXYGEN_GENERATE_CHI NO)
+
+ set(DOXYGEN_PREDEFINED TAILQ_ENTRY
+ RB_ENTRY
+ EVENT_DEFINED_TQENTRY_
+ EVENT_IN_DOXYGEN_
+ )
+
+ set(DOX_INPUT include/event2/buffer.h
+ include/event2/buffer_compat.h
+ include/event2/bufferevent.h
+ include/event2/bufferevent_compat.h
+ include/event2/bufferevent_ssl.h
+ include/event2/dns.h
+ include/event2/dns_compat.h
+ include/event2/event.h
+ include/event2/event_compat.h
+ include/event2/http.h
+ include/event2/http_compat.h
+ include/event2/listener.h
+ include/event2/rpc.h
+ include/event2/rpc_compat.h
+ include/event2/tag.h
+ include/event2/tag_compat.h
+ include/event2/thread.h
+ include/event2/util.h
+ )
+ # Add 'doxygen' target
+ doxygen_add_docs(doxygen
+ ${DOX_INPUT}
+ ALL
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMENT "Generating doxygen documentation for ${PROJECT_NAME}..."
+ )
+
+ # Use 'make clean' to remove the generated directory
+ set_property(DIRECTORY
+ PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
+ "${PROJECT_BINARY_DIR}/${DOXYGEN_OUTPUT_DIRECTORY}"
+ )
+
+ # Install html into <prefix>/share/doc/<project>
+ if ("${DOXYGEN_GENERATE_HTML}" STREQUAL "YES")
+ install(DIRECTORY
+ ${PROJECT_BINARY_DIR}/${DOXYGEN_OUTPUT_DIRECTORY}/html
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}
+ COMPONENT doc
+ )
+ endif()
+
+ # Install manual into <prefix>/share/man/man3
+ if ("${DOXYGEN_GENERATE_MAN}" STREQUAL "YES")
+ install(DIRECTORY
+ ${PROJECT_BINARY_DIR}/${DOXYGEN_OUTPUT_DIRECTORY}/man/man3
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man
+ COMPONENT doc
+ )
+ endif()
+
+ else(DOXYGEN_FOUND)
+ message(FATAL_ERROR "Doxygen command not found, set EVENT__DOXYGEN to disable")
+ endif (DOXYGEN_FOUND)
+ endif()
+endmacro()
diff --git a/contrib/ntp/sntp/libevent/cmake/VersionViaGit.cmake b/contrib/ntp/sntp/libevent/cmake/VersionViaGit.cmake
new file mode 100644
index 000000000000..24eb6af9b7de
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/cmake/VersionViaGit.cmake
@@ -0,0 +1,66 @@
+# This module defines the following variables utilizing
+# git to determine the parent tag. And if found the macro
+# will attempt to parse them in the github tag fomat
+#
+# Useful for auto-versioning in our CMakeLists
+#
+# EVENT_GIT___VERSION_MAJOR - Major version.
+# EVENT_GIT___VERSION_MINOR - Minor version
+# EVENT_GIT___VERSION_STAGE - Stage version
+#
+# Example usage:
+#
+# event_fuzzy_version_from_git()
+# message("Libvent major=${EVENT_GIT___VERSION_MAJOR}")
+# message(" minor=${EVENT_GIT___VERSION_MINOR}")
+# message(" patch=${EVENT_GIT___VERSION_PATCH}")
+# message(" stage=${EVENT_GIT___VERSION_STAGE}")
+# endif()
+
+include(FindGit)
+
+macro(event_fuzzy_version_from_git)
+ # set our defaults.
+ set(EVENT_GIT___VERSION_MAJOR 2)
+ set(EVENT_GIT___VERSION_MINOR 1)
+ set(EVENT_GIT___VERSION_PATCH 12)
+ set(EVENT_GIT___VERSION_STAGE "stable")
+
+ find_package(Git)
+
+ if (GIT_FOUND)
+ execute_process(
+ COMMAND
+ ${GIT_EXECUTABLE} describe --abbrev=0 --always
+ WORKING_DIRECTORY
+ ${PROJECT_SOURCE_DIR}
+ RESULT_VARIABLE
+ GITRET
+ OUTPUT_VARIABLE
+ GITVERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ string(REGEX REPLACE "[\\._-]" ";" VERSION_LIST "${GITVERSION}")
+ if(VERSION_LIST)
+ list(LENGTH VERSION_LIST VERSION_LIST_LENGTH)
+ endif()
+
+ if ((GITRET EQUAL 0) AND (VERSION_LIST_LENGTH EQUAL 5))
+ list(GET VERSION_LIST 1 _MAJOR)
+ list(GET VERSION_LIST 2 _MINOR)
+ list(GET VERSION_LIST 3 _PATCH)
+ list(GET VERSION_LIST 4 _STAGE)
+
+ set(_DEFAULT_VERSION "${EVENT_GIT___VERSION_MAJOR}.${EVENT_GIT___VERSION_MINOR}.${EVENT_GIT___VERSION_PATCH}-${EVENT_GIT___VERSION_STAGE}")
+ set(_GIT_VERSION "${_MAJOR}.${_MINOR}.${_PATCH}-${_STAGE}")
+
+ if (${_DEFAULT_VERSION} VERSION_LESS ${_GIT_VERSION})
+ set(EVENT_GIT___VERSION_MAJOR ${_MAJOR})
+ set(EVENT_GIT___VERSION_MINOR ${_MINOR})
+ set(EVENT_GIT___VERSION_PATCH ${_PATCH})
+ set(EVENT_GIT___VERSION_STAGE ${_STAGE})
+ endif()
+ endif()
+ endif()
+endmacro()
diff --git a/contrib/ntp/sntp/libevent/compile b/contrib/ntp/sntp/libevent/compile
new file mode 100755
index 000000000000..a85b723c7e67
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/contrib/ntp/sntp/libevent/config.guess b/contrib/ntp/sntp/libevent/config.guess
new file mode 100755
index 000000000000..0bb53aebf96d
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/config.guess
@@ -0,0 +1,1433 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2015 Free Software Foundation, Inc.
+
+timestamp='2015-03-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2015 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}${abi}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/contrib/ntp/sntp/libevent/config.h.in b/contrib/ntp/sntp/libevent/config.h.in
index e425aa16882b..80775e975aea 100644
--- a/contrib/ntp/sntp/libevent/config.h.in
+++ b/contrib/ntp/sntp/libevent/config.h.in
@@ -12,9 +12,15 @@
/* Define to 1 if you have the `accept4' function. */
#undef HAVE_ACCEPT4
+/* Define to 1 if you have the <afunix.h> header file. */
+#undef HAVE_AFUNIX_H
+
/* Define to 1 if you have the `arc4random' function. */
#undef HAVE_ARC4RANDOM
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+#undef HAVE_ARC4RANDOM_ADDRANDOM
+
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
@@ -32,14 +38,6 @@
don't. */
#undef HAVE_DECL_KERN_ARND
-/* Define to 1 if you have the declaration of `KERN_RANDOM', and to 0 if you
- don't. */
-#undef HAVE_DECL_KERN_RANDOM
-
-/* Define to 1 if you have the declaration of `RANDOM_UUID', and to 0 if you
- don't. */
-#undef HAVE_DECL_RANDOM_UUID
-
/* Define if /dev/poll is available */
#undef HAVE_DEVPOLL
@@ -55,6 +53,9 @@
/* Define to 1 if you have the `epoll_ctl' function. */
#undef HAVE_EPOLL_CTL
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
/* Define to 1 if you have the `eventfd' function. */
#undef HAVE_EVENTFD
@@ -100,6 +101,9 @@
/* Define to 1 if you have the `getprotobynumber' function. */
#undef HAVE_GETPROTOBYNUMBER
+/* Define to 1 if you have the `getrandom' function. */
+#undef HAVE_GETRANDOM
+
/* Define to 1 if you have the `getservbyname' function. */
#undef HAVE_GETSERVBYNAME
@@ -124,17 +128,23 @@
/* Define to 1 if you have the `kqueue' function. */
#undef HAVE_KQUEUE
+/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
+#undef HAVE_LIBWS2_32
+
/* Define if the system has zlib */
#undef HAVE_LIBZ
/* Define to 1 if you have the `mach_absolute_time' function. */
#undef HAVE_MACH_ABSOLUTE_TIME
+/* Define to 1 if you have the <mach/mach.h> header file. */
+#undef HAVE_MACH_MACH_H
+
/* Define to 1 if you have the <mach/mach_time.h> header file. */
#undef HAVE_MACH_MACH_TIME_H
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
/* Define to 1 if you have the `mmap' function. */
#undef HAVE_MMAP
@@ -157,6 +167,9 @@
/* Define if the system has openssl */
#undef HAVE_OPENSSL
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#undef HAVE_OPENSSL_SSL_H
+
/* Define to 1 if you have the `pipe' function. */
#undef HAVE_PIPE
@@ -220,6 +233,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -253,6 +269,9 @@
/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */
#undef HAVE_STRUCT_IN6_ADDR_S6_ADDR32
+/* Define to 1 if the system has the type `struct linger'. */
+#undef HAVE_STRUCT_LINGER
+
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
#undef HAVE_STRUCT_SOCKADDR_IN6
@@ -271,8 +290,8 @@
/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
#undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
-/* Define to 1 if the system has the type `struct so_linger'. */
-#undef HAVE_STRUCT_SO_LINGER
+/* Define to 1 if the system has the type `struct sockaddr_un'. */
+#undef HAVE_STRUCT_SOCKADDR_UN
/* Define to 1 if you have the `sysctl' function. */
#undef HAVE_SYSCTL
@@ -301,6 +320,9 @@
/* Define to 1 if you have the <sys/queue.h> header file. */
#undef HAVE_SYS_QUEUE_H
+/* Define to 1 if you have the <sys/random.h> header file. */
+#undef HAVE_SYS_RANDOM_H
+
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
@@ -331,6 +353,9 @@
/* Define to 1 if you have the <sys/uio.h> header file. */
#undef HAVE_SYS_UIO_H
+/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H
+
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
@@ -382,12 +407,27 @@
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
/* Define if kqueue works correctly with pipes */
#undef HAVE_WORKING_KQUEUE
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
+/* Define to 1 if you have the `_gmtime64' function. */
+#undef HAVE__GMTIME64
+
+/* Define to 1 if you have the `_gmtime64_s' function. */
+#undef HAVE__GMTIME64_S
+
+/* Define to 1 if compiler have __FUNCTION__ */
+#undef HAVE___FUNCTION__
+
+/* Define to 1 if compiler have __func__ */
+#undef HAVE___func__
+
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
@@ -440,64 +480,118 @@
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
+/* The size of `time_t', as computed by sizeof. */
+#undef SIZEOF_TIME_T
+
/* The size of `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
#undef STDC_HEADERS
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
+ macro is obsolete. */
#undef TIME_WITH_SYS_TIME
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
-/* Enable threading extensions on Solaris. */
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+/* Enable X/Open extensions. Define to 500 only if necessary
+ to make mbstate_t available. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
#endif
/* Version number of package */
#undef VERSION
-/* Enable large inode numbers on Mac OS X 10.5. */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define to appropriate substitue if compiler doesnt have __func__ */
-#undef __func__
-
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
@@ -507,7 +601,7 @@
#undef inline
#endif
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
#undef pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
diff --git a/contrib/ntp/sntp/libevent/config.sub b/contrib/ntp/sntp/libevent/config.sub
new file mode 100755
index 000000000000..a5eae2584943
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/config.sub
@@ -0,0 +1,1804 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2015 Free Software Foundation, Inc.
+
+timestamp='2015-03-08'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2015 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | e2k-* | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | k1om-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | or1k*-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* | -cloudabi* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/contrib/ntp/sntp/libevent/configure b/contrib/ntp/sntp/libevent/configure
index 0d9dcdd01f18..c497e6dfd28c 100755
--- a/contrib/ntp/sntp/libevent/configure
+++ b/contrib/ntp/sntp/libevent/configure
@@ -1,9 +1,10 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libevent 2.1.5-beta.
+# Generated by GNU Autoconf 2.71 for libevent 2.1.12-stable.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -14,14 +15,16 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -31,46 +34,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -79,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -94,8 +90,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -107,30 +107,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
@@ -152,20 +132,22 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else
+else \$as_nop
case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
@@ -185,12 +167,15 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
-else
+else \$as_nop
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
@@ -205,30 +190,38 @@ test \$(( 1 + 1 )) = 2 || exit 1
PATH=/empty FPATH=/empty; export PATH FPATH
test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
|| test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
-else
+else $as_nop
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
-else
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
break 2
fi
fi
@@ -236,14 +229,21 @@ fi
esac
as_found=false
done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -261,18 +261,19 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
@@ -299,6 +300,7 @@ as_fn_unset ()
}
as_unset=as_fn_unset
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -316,6 +318,14 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -330,7 +340,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -339,7 +349,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -378,12 +388,13 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -395,18 +406,27 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -418,9 +438,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -447,7 +467,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -491,7 +511,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -505,6 +525,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
exit
}
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -518,6 +542,13 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -587,59 +618,98 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libevent'
PACKAGE_TARNAME='libevent'
-PACKAGE_VERSION='2.1.5-beta'
-PACKAGE_STRING='libevent 2.1.5-beta'
+PACKAGE_VERSION='2.1.12-stable'
+PACKAGE_STRING='libevent 2.1.12-stable'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
ac_unique_file="event.c"
+ac_default_prefix=/usr/local
# Factoring default headers for most tests.
ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
#endif
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
#endif
#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
+ac_header_c_list=
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
-LEP_LDFLAGS
-LEP_CPPFLAGS
-LEP_CFLAGS
+ENABLE_DOXYGEN_MAN_FALSE
+ENABLE_DOXYGEN_MAN_TRUE
+ENABLE_DOXYGEN_FALSE
+ENABLE_DOXYGEN_TRUE
+DX_RULES
+PAPER_SIZE
+DOXYGEN_PAPER_SIZE
+GENERATE_LATEX
+DX_PDFLATEX
+DX_FLAG_pdf
+DX_EGREP
+DX_DVIPS
+DX_MAKEINDEX
+DX_LATEX
+DX_FLAG_ps
+DX_FLAG_html
+GENERATE_CHI
+DX_FLAG_chi
+GENERATE_HTMLHELP
+GENERATE_HTML
+HHC_PATH
+DX_HHC
+DX_FLAG_chm
+GENERATE_XML
+DX_FLAG_xml
+GENERATE_RTF
+DX_FLAG_rtf
+GENERATE_MAN
+DX_FLAG_man
+DOT_PATH
+HAVE_DOT
+DX_DOT
+DX_FLAG_dot
+PERL_PATH
+DX_PERL
+DX_DOXYGEN
+DX_FLAG_doc
+PROJECT
+SRCDIR
+DX_ENV
+DX_DOCDIR
+DX_CONFIG
+DX_PROJECT
INSTALL_LIBEVENT_FALSE
INSTALL_LIBEVENT_TRUE
LIBEVENT_GC_SECTIONS
PTHREADS_FALSE
PTHREADS_TRUE
+THREADS_FALSE
+THREADS_TRUE
PTHREAD_CFLAGS
PTHREAD_LIBS
PTHREAD_CC
@@ -663,6 +733,8 @@ STRLCPY_IMPL_FALSE
STRLCPY_IMPL_TRUE
BUILD_WITH_NO_UNDEFINED_FALSE
BUILD_WITH_NO_UNDEFINED_TRUE
+BUILD_MIDIPIX_FALSE
+BUILD_MIDIPIX_TRUE
BUILD_CYGWIN_FALSE
BUILD_CYGWIN_TRUE
BUILD_WIN32_FALSE
@@ -701,6 +773,9 @@ DUMPBIN
LD
FGREP
LIBTOOL
+EGREP
+GREP
+CPP
SED
LN_S
host_os
@@ -711,9 +786,6 @@ build_os
build_vendor
build_cpu
build
-EGREP
-GREP
-CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -721,7 +793,6 @@ am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
-am__quote
am__include
DEPDIR
OBJEXT
@@ -735,6 +806,9 @@ AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
+CSCOPE
+ETAGS
+CTAGS
am__untar
am__tar
AMTAR
@@ -777,6 +851,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -795,7 +870,8 @@ PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
@@ -812,6 +888,7 @@ enable_libevent_regress
enable_samples
enable_function_sections
enable_verbose_debug
+enable_clock_gettime
enable_shared
enable_static
with_pic
@@ -821,6 +898,16 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
enable_largefile
+enable_doxygen_doc
+enable_doxygen_dot
+enable_doxygen_man
+enable_doxygen_rtf
+enable_doxygen_xml
+enable_doxygen_chm
+enable_doxygen_chi
+enable_doxygen_html
+enable_doxygen_ps
+enable_doxygen_pdf
'
ac_precious_vars='build_alias
host_alias
@@ -831,7 +918,8 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-LT_SYS_LIBRARY_PATH'
+LT_SYS_LIBRARY_PATH
+DOXYGEN_PAPER_SIZE'
# Initialize some variables set by options.
@@ -870,6 +958,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -899,8 +988,6 @@ do
*) ac_optarg=yes ;;
esac
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
case $ac_dashdash$ac_option in
--)
ac_dashdash=yes ;;
@@ -941,9 +1028,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -967,9 +1054,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1122,6 +1209,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1171,9 +1267,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1187,9 +1283,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1233,9 +1329,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1251,7 +1347,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1259,7 +1355,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1315,7 +1411,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1372,7 +1468,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libevent 2.1.5-beta to adapt to many kinds of systems.
+\`configure' configures libevent 2.1.12-stable to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1412,6 +1508,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1442,7 +1539,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libevent 2.1.5-beta:";;
+ short | recursive ) echo "Configuration of libevent 2.1.12-stable:";;
esac
cat <<\_ACEOF
@@ -1475,12 +1572,24 @@ Optional Features:
--enable-verbose-debug, verbose debug logging
+ --disable-clock-gettime do not use clock_gettime even if it is available
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-largefile omit support for large files
+ --enable-doxygen-doc generate any doxygen documentation
+ --enable-doxygen-dot generate graphics for doxygen documentation
+ --enable-doxygen-man generate doxygen manual pages
+ --enable-doxygen-rtf generate doxygen RTF documentation
+ --enable-doxygen-xml generate doxygen XML documentation
+ --enable-doxygen-chm generate doxygen compressed HTML help documentation
+ --enable-doxygen-chi generate doxygen separate compressed HTML help index
+ file
+ --disable-doxygen-html don't generate doxygen plain HTML documentation
+ --enable-doxygen-ps generate doxygen PostScript documentation
+ --enable-doxygen-pdf generate doxygen PDF documentation
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1505,6 +1614,8 @@ Some influential environment variables:
CPP C preprocessor
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
+ DOXYGEN_PAPER_SIZE
+ a4wide (default), a4, letter, legal or executive
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1525,9 +1636,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1555,7 +1666,8 @@ esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
if test -f "$ac_srcdir/configure.gnu"; then
echo &&
$SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -1563,7 +1675,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1572,10 +1684,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libevent configure 2.1.5-beta
-generated by GNU Autoconf 2.69
+libevent configure 2.1.12-stable
+generated by GNU Autoconf 2.71
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1592,14 +1704,14 @@ fi
ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
+ rm -f conftest.$ac_objext conftest.beam
if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1607,14 +1719,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1624,6 +1737,39 @@ fi
} # ac_fn_c_try_compile
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1636,7 +1782,7 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1644,14 +1790,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1661,180 +1808,20 @@ fi
} # ac_fn_c_try_cpp
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -1842,17 +1829,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -1873,11 +1861,12 @@ fi
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -1885,16 +1874,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ which can conflict with char $2 (); below. */
+#include <limits.h>
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -1912,47 +1894,51 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
@@ -1966,19 +1952,65 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
-else
+else $as_nop
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_decl
+} # ac_fn_check_decl
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
@@ -1987,17 +2019,18 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -2005,12 +2038,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -2018,18 +2052,19 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
eval "$3=yes"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -2048,7 +2083,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
@@ -2058,14 +2093,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=0 ac_mid=0
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2075,9 +2111,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid; break
-else
+else $as_nop
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
@@ -2085,14 +2122,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
@@ -2102,14 +2139,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=-1 ac_mid=-1
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
@@ -2119,9 +2157,10 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=$ac_mid; break
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
@@ -2129,14 +2168,14 @@ else
fi
as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else
+else $as_nop
ac_lo= ac_hi=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
@@ -2144,7 +2183,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2154,12 +2193,13 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid
-else
+else $as_nop
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
@@ -2169,12 +2209,12 @@ esac
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.val", "w");
@@ -2202,9 +2242,10 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
+else $as_nop
ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -2224,16 +2265,17 @@ rm -f conftest.val
ac_fn_c_check_member ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
@@ -2242,14 +2284,15 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
@@ -2258,29 +2301,50 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
-else
+else $as_nop
eval "$4=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$4
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libevent $as_me 2.1.5-beta, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by libevent $as_me 2.1.12-stable, which was
+generated by GNU Autoconf 2.71. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -2313,8 +2377,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -2349,7 +2417,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2384,11 +2452,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -2399,8 +2469,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -2424,7 +2494,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -2432,14 +2502,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -2447,15 +2517,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -2463,8 +2533,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -2478,63 +2548,48 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
+ ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -2544,19 +2599,437 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="ltmain.sh config.guess config.sub compile missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/build-aux"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2567,12 +3040,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -2581,24 +3054,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -2608,11 +3081,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2629,38 +3103,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
-fi
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+am__api_version='1.16'
-am__api_version='1.15'
-# Find a good install program. We prefer a C program (faster),
+ # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
@@ -2674,20 +3122,25 @@ am__api_version='1.15'
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -2697,13 +3150,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -2711,12 +3164,12 @@ case $as_dir/ in #((
echo one > conftest.one
echo two > conftest.two
mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
test -s conftest.one && test -s conftest.two &&
test -s conftest.dir/conftest.one &&
test -s conftest.dir/conftest.two
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -2732,7 +3185,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -2742,8 +3195,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -2753,8 +3206,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -2808,8 +3261,8 @@ else
as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
@@ -2828,26 +3281,23 @@ test "$program_suffix" != NONE &&
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
am_missing_run="$MISSING "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh+set}" != xset; then
@@ -2867,11 +3317,12 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -2879,11 +3330,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2894,11 +3349,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -2907,11 +3362,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -2919,11 +3375,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2934,11 +3394,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -2946,8 +3406,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -2959,25 +3419,31 @@ fi
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
esac
done
@@ -2988,7 +3454,7 @@ IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
+ if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
@@ -2998,18 +3464,19 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
@@ -3017,11 +3484,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3032,24 +3503,25 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -n "$AWK" && break
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@@ -3065,12 +3537,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -3084,7 +3556,8 @@ fi
rmdir .tst 2>/dev/null
# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
enableval=$enable_silent_rules;
fi
@@ -3094,12 +3567,13 @@ case $enable_silent_rules in # (((
*) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3111,8 +3585,8 @@ else
am_cv_make_support_nested_variables=no
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -3144,17 +3618,13 @@ fi
# Define the identity of the package.
PACKAGE='libevent'
- VERSION='2.1.5-beta'
+ VERSION='2.1.12-stable'
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
# Some tools Automake needs.
@@ -3174,8 +3644,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
# We need awk for the "check" target (and possibly the TAP driver). The
@@ -3194,6 +3664,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+
+
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
@@ -3226,7 +3710,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -3238,7 +3722,8 @@ END
fi
# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
+if test ${enable_silent_rules+y}
+then :
enableval=$enable_silent_rules;
fi
@@ -3248,12 +3733,13 @@ case $enable_silent_rules in # (((
*) AM_DEFAULT_VERBOSITY=0;;
esac
am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if $as_echo 'TRUE=$(BAR$(V))
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3265,8 +3751,8 @@ else
am_cv_make_support_nested_variables=no
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
@@ -3279,60 +3765,67 @@ AM_BACKSLASH='\'
ac_config_headers="$ac_config_headers config.h evconfig-private.h:evconfig-private.h.in"
-$as_echo "#define NUMERIC_VERSION 0x02010500" >>confdefs.h
+printf "%s\n" "#define NUMERIC_VERSION 0x02010c00" >>confdefs.h
+
+
+
+
+
+
+
+
+
-if test "$prefix" = "NONE"; then
- prefix="/usr/local"
-fi
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
+if test ${enable_dependency_tracking+y}
+then :
enableval=$enable_dependency_tracking;
fi
@@ -3358,11 +3851,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3370,11 +3864,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3385,11 +3883,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3398,11 +3896,12 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -3410,11 +3909,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3425,11 +3928,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -3437,8 +3940,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -3451,11 +3954,12 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3463,11 +3967,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3478,11 +3986,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3491,11 +3999,12 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3504,15 +4013,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3528,18 +4041,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3550,11 +4063,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
@@ -3562,11 +4076,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3577,11 +4095,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3594,11 +4112,12 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
@@ -3606,11 +4125,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3621,11 +4144,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3637,34 +4160,138 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
fi
+else
+ CC="$ac_cv_prog_CC"
fi
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -3674,7 +4301,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -3682,7 +4309,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3694,9 +4321,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -3717,11 +4344,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -3738,7 +4366,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -3754,44 +4382,46 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else
+else $as_nop
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -3805,15 +4435,15 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -3822,7 +4452,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -3834,8 +4464,8 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
@@ -3843,10 +4473,10 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -3854,39 +4484,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -3900,11 +4531,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -3913,31 +4545,32 @@ $as_echo "$ac_try_echo"; } >&5
break;;
esac
done
-else
- $as_echo "$as_me: failed program was:" >&5
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -3947,29 +4580,33 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
-else
+else $as_nop
ac_compiler_gnu=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
@@ -3978,57 +4615,60 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
-else
+else $as_nop
CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
-else
+else $as_nop
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -4043,94 +4683,144 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
-
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
fi
ac_ext=c
@@ -4139,21 +4829,23 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_ext=c
+
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4181,8 +4873,8 @@ _ACEOF
rm -f core conftest*
unset am_i
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
@@ -4200,11 +4892,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CC" am_compiler_list=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
@@ -4311,8 +5004,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -4327,45 +5020,386 @@ fi
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_should_define__xopen_source=no
+ if test $ac_cv_header_wchar_h = yes
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
+
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+ if test $ac_cv_header_minix_config_h = yes
+then :
+ MINIX=yes
+ printf "%s\n" "#define _MINIX 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else $as_nop
+ MINIX=
+fi
+ if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+ if test $ac_cv_should_define__xopen_source = yes
+then :
+ printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+fi
+
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+#case "$host_os" in
+#
+# osf5*)
+# CFLAGS="$CFLAGS -D_OSF_SOURCE"
+# ;;
+#esac
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
+fi
+
+# AC_PROG_MKDIR_P - $(MKDIR_P) should be defined by AM_INIT_AUTOMAKE
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -4377,10 +5411,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -4390,7 +5425,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -4402,29 +5438,24 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
-else
+else $as_nop
# Broken: fails on valid input.
continue
fi
@@ -4436,10 +5467,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
-else
+else $as_nop
# Passes both tests.
ac_preproc_ok=:
break
@@ -4449,11 +5481,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -4465,11 +5498,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
@@ -4477,10 +5511,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
@@ -4489,13 +5528,13 @@ case `"$ac_path_GREP" --version 2>&1` in
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4523,16 +5562,17 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
@@ -4543,10 +5583,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
@@ -4555,13 +5600,13 @@ case `"$ac_path_EGREP" --version 2>&1` in
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -4590,375 +5635,18 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
- MINIX=yes
-else
- MINIX=
-fi
-
-
- if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
- fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# define __EXTENSIONS__ 1
- $ac_includes_default
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_safe_to_define___extensions__=yes
-else
- ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
- test $ac_cv_safe_to_define___extensions__ = yes &&
- $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
- $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-#case "$host_os" in
-#
-# osf5*)
-# CFLAGS="$CFLAGS -D_OSF_SOURCE"
-# ;;
-#esac
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-# AC_PROG_MKDIR_P - $(MKDIR_P) should be defined by AM_INIT_AUTOMAKE
-
-# AC_PROG_SED is only available in Autoconf >= 2.59b; workaround for older
-# versions
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_SED" || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
-else
- ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-
-
if test $ac_cv_c_compiler_gnu = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
-if ${ac_cv_prog_gcc_traditional+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+printf %s "checking whether $CC needs -traditional... " >&6; }
+if test ${ac_cv_prog_gcc_traditional+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_pattern="Autoconf.*'x'"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4966,12 +5654,13 @@ else
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
-else
+else $as_nop
ac_cv_prog_gcc_traditional=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $ac_cv_prog_gcc_traditional = no; then
@@ -4981,15 +5670,16 @@ rm -f conftest*
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ $EGREP "$ac_pattern" >/dev/null 2>&1
+then :
ac_cv_prog_gcc_traditional=yes
fi
-rm -f conftest*
+rm -rf conftest*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional"
fi
@@ -5002,7 +5692,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#if !defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
@@ -5012,12 +5702,13 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
have_gcc295=yes
-else
+else $as_nop
have_gcc295=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
if test "$GCC" = "yes" ; then
# Enable many gcc warnings by default...
@@ -5030,22 +5721,25 @@ if test "$GCC" = "yes" ; then
fi
# OS X Lion started deprecating the system openssl. Let's just disable
-# all deprecation warnings on OS X.
-case "$host_os" in
-
- darwin*)
- CFLAGS="$CFLAGS -Wno-deprecated-declarations"
- ;;
-esac
+# all deprecation warnings on OS X; but do so only for gcc...
+if test "$GCC" = "yes" ; then
+ case "$host_os" in
+ darwin*)
+ CFLAGS="$CFLAGS -Wno-deprecated-declarations"
+ ;;
+ esac
+fi
# Check whether --enable-gcc-warnings was given.
-if test "${enable_gcc_warnings+set}" = set; then :
+if test ${enable_gcc_warnings+y}
+then :
enableval=$enable_gcc_warnings;
fi
# Check whether --enable-gcc-hardening was given.
-if test "${enable_gcc_hardening+set}" = set; then :
+if test ${enable_gcc_hardening+y}
+then :
enableval=$enable_gcc_hardening; if test x$enableval = xyes; then
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
@@ -5055,74 +5749,92 @@ fi
# Check whether --enable-thread-support was given.
-if test "${enable_thread_support+set}" = set; then :
+if test ${enable_thread_support+y}
+then :
enableval=$enable_thread_support;
-else
+else $as_nop
enable_thread_support=yes
fi
# Check whether --enable-malloc-replacement was given.
-if test "${enable_malloc_replacement+set}" = set; then :
+if test ${enable_malloc_replacement+y}
+then :
enableval=$enable_malloc_replacement;
-else
+else $as_nop
enable_malloc_replacement=yes
fi
# Check whether --enable-openssl was given.
-if test "${enable_openssl+set}" = set; then :
+if test ${enable_openssl+y}
+then :
enableval=$enable_openssl;
-else
+else $as_nop
enable_openssl=yes
fi
# Check whether --enable-debug-mode was given.
-if test "${enable_debug_mode+set}" = set; then :
+if test ${enable_debug_mode+y}
+then :
enableval=$enable_debug_mode;
-else
+else $as_nop
enable_debug_mode=yes
fi
# Check whether --enable-libevent-install was given.
-if test "${enable_libevent_install+set}" = set; then :
+if test ${enable_libevent_install+y}
+then :
enableval=$enable_libevent_install;
-else
+else $as_nop
enable_libevent_install=yes
fi
# Check whether --enable-libevent-regress was given.
-if test "${enable_libevent_regress+set}" = set; then :
+if test ${enable_libevent_regress+y}
+then :
enableval=$enable_libevent_regress;
-else
+else $as_nop
enable_libevent_regress=yes
fi
# Check whether --enable-samples was given.
-if test "${enable_samples+set}" = set; then :
+if test ${enable_samples+y}
+then :
enableval=$enable_samples;
-else
+else $as_nop
enable_samples=yes
fi
# Check whether --enable-function-sections was given.
-if test "${enable_function_sections+set}" = set; then :
+if test ${enable_function_sections+y}
+then :
enableval=$enable_function_sections;
-else
+else $as_nop
enable_function_sections=no
fi
# Check whether --enable-verbose-debug was given.
-if test "${enable_verbose_debug+set}" = set; then :
+if test ${enable_verbose_debug+y}
+then :
enableval=$enable_verbose_debug;
-else
+else $as_nop
enable_verbose_debug=no
fi
+# Check whether --enable-clock-gettime was given.
+if test ${enable_clock_gettime+y}
+then :
+ enableval=$enable_clock_gettime;
+else $as_nop
+ enable_clock_gettime=yes
+fi
+
+
case `pwd` in
*\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
esac
@@ -5142,6 +5854,7 @@ macro_revision='2.4.6'
+
ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
@@ -5165,8 +5878,8 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
@@ -5192,12 +5905,12 @@ func_echo_all ()
}
case $ECHO in
- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
+ printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+ print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
esac
@@ -5213,11 +5926,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
@@ -5231,10 +5945,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
@@ -5243,13 +5962,13 @@ case `"$ac_path_SED" --version 2>&1` in
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
"$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -5277,8 +5996,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
SED="$ac_cv_path_SED"
rm -f conftest.sed
@@ -5295,11 +6014,12 @@ Xsed="$SED -e 1s/^X//"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
then ac_cv_path_FGREP="$GREP -F"
else
@@ -5310,10 +6030,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in fgrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
@@ -5322,13 +6047,13 @@ case `"$ac_path_FGREP" --version 2>&1` in
ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
+ printf "%s\n" 'FGREP' >> "conftest.nl"
"$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -5357,8 +6082,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
FGREP="$ac_cv_path_FGREP"
@@ -5383,17 +6108,18 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
+if test ${with_gnu_ld+y}
+then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else
+else $as_nop
with_gnu_ld=no
fi
ac_prog=ld
if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return, which upsets mingw
@@ -5422,15 +6148,16 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
;;
esac
elif test yes = "$with_gnu_ld"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
fi
-if ${lt_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
@@ -5459,18 +6186,19 @@ fi
LD=$lt_cv_path_LD
if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
@@ -5481,8 +6209,8 @@ case `$LD -v 2>&1 </dev/null` in
;;
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -5493,11 +6221,12 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM=$NM
@@ -5547,8 +6276,8 @@ else
: ${lt_cv_path_NM=no}
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
if test no != "$lt_cv_path_NM"; then
NM=$lt_cv_path_NM
else
@@ -5561,11 +6290,12 @@ else
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DUMPBIN"; then
ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
else
@@ -5573,11 +6303,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5588,11 +6322,11 @@ fi
fi
DUMPBIN=$ac_cv_prog_DUMPBIN
if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5605,11 +6339,12 @@ if test -z "$DUMPBIN"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DUMPBIN"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
@@ -5617,11 +6352,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5632,11 +6371,11 @@ fi
fi
ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5648,8 +6387,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DUMPBIN=$ac_ct_DUMPBIN
@@ -5677,11 +6416,12 @@ test -z "$NM" && NM=nm
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
@@ -5697,15 +6437,16 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
i=0
teststring=ABCD
@@ -5832,11 +6573,11 @@ else
fi
if test -n "$lt_cv_sys_max_cmd_len"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
fi
max_cmd_len=$lt_cv_sys_max_cmd_len
@@ -5880,11 +6621,12 @@ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $host in
*-*-mingw* )
case $build in
@@ -5920,18 +6662,19 @@ esac
fi
to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
@@ -5947,22 +6690,23 @@ esac
fi
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_reload_flag='-r'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
@@ -5995,11 +6739,12 @@ esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
@@ -6007,11 +6752,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6022,11 +6771,11 @@ fi
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6035,11 +6784,12 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
ac_ct_OBJDUMP=$OBJDUMP
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OBJDUMP"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
else
@@ -6047,11 +6797,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6062,11 +6816,11 @@ fi
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OBJDUMP" = x; then
@@ -6074,8 +6828,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OBJDUMP=$ac_ct_OBJDUMP
@@ -6094,11 +6848,12 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
@@ -6294,8 +7049,8 @@ os2*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
file_magic_glob=
want_nocaseglob=no
@@ -6339,11 +7094,12 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
@@ -6351,11 +7107,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6366,11 +7126,11 @@ fi
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6379,11 +7139,12 @@ if test -z "$ac_cv_prog_DLLTOOL"; then
ac_ct_DLLTOOL=$DLLTOOL
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DLLTOOL"; then
ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
@@ -6391,11 +7152,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6406,11 +7171,11 @@ fi
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DLLTOOL" = x; then
@@ -6418,8 +7183,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DLLTOOL=$ac_ct_DLLTOOL
@@ -6439,11 +7204,12 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
@@ -6466,8 +7232,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
@@ -6482,11 +7248,12 @@ if test -n "$ac_tool_prefix"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
@@ -6494,11 +7261,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6509,11 +7280,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6526,11 +7297,12 @@ if test -z "$AR"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
@@ -6538,11 +7310,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6553,11 +7329,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6569,8 +7345,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
@@ -6590,30 +7366,32 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ar_at_file=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
@@ -6621,7 +7399,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
(eval $lt_ar_try) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
@@ -6630,11 +7408,11 @@ if ac_fn_c_try_compile "$LINENO"; then :
rm -f conftest.* libconftest.a
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
@@ -6651,11 +7429,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
@@ -6663,11 +7442,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6678,11 +7461,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6691,11 +7474,12 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
@@ -6703,11 +7487,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6718,11 +7506,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -6730,8 +7518,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
@@ -6750,11 +7538,12 @@ test -z "$STRIP" && STRIP=:
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
@@ -6762,11 +7551,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6777,11 +7570,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -6790,11 +7583,12 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
@@ -6802,11 +7596,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6817,11 +7615,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -6829,8 +7627,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -6919,11 +7717,12 @@ compiler=$CC
# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
@@ -7075,14 +7874,14 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
# Now try to grab the symbols.
nlist=conftest.nm
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
(eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -7151,7 +7950,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
@@ -7186,11 +7985,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
fi
# Response file support.
@@ -7236,13 +8035,14 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
# Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
+if test ${with_sysroot+y}
+then :
withval=$with_sysroot;
-else
+else $as_nop
with_sysroot=no
fi
@@ -7260,24 +8060,25 @@ case $with_sysroot in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
: ${lt_DD:=$DD}
@@ -7288,10 +8089,15 @@ if test -z "$lt_DD"; then
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in dd; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in dd
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_lt_DD" || continue
if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cmp -s conftest.i conftest.out \
@@ -7311,15 +8117,16 @@ fi
rm -f conftest.i conftest2.i conftest.out
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
lt_cv_truncate_bin=
@@ -7330,8 +8137,8 @@ fi
rm -f conftest.i conftest2.i conftest.out
test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
@@ -7354,7 +8161,8 @@ func_cc_basename ()
}
# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
+if test ${enable_libtool_lock+y}
+then :
enableval=$enable_libtool_lock;
fi
@@ -7370,7 +8178,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
@@ -7390,7 +8198,7 @@ ia64-*-hpux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
@@ -7428,7 +8236,7 @@ mips64*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
emul=elf
case `/usr/bin/file conftest.$ac_objext` in
@@ -7469,7 +8277,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
@@ -7532,11 +8340,12 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7547,19 +8356,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_cc_needs_belf=yes
-else
+else $as_nop
lt_cv_cc_needs_belf=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -7568,8 +8378,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS=$SAVE_CFLAGS
@@ -7582,7 +8392,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
case `/usr/bin/file conftest.o` in
*64-bit*)
@@ -7619,11 +8429,12 @@ need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$MANIFEST_TOOL"; then
ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
@@ -7631,11 +8442,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7646,11 +8461,11 @@ fi
fi
MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
if test -n "$MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7659,11 +8474,12 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
# Extract the first word of "mt", so it can be a program name with args.
set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_MANIFEST_TOOL"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
else
@@ -7671,11 +8487,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7686,11 +8506,11 @@ fi
fi
ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
if test -n "$ac_ct_MANIFEST_TOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_MANIFEST_TOOL" = x; then
@@ -7698,8 +8518,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
@@ -7709,11 +8529,12 @@ else
fi
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_path_mainfest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
@@ -7723,8 +8544,8 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -7739,11 +8560,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$DSYMUTIL"; then
ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
@@ -7751,11 +8573,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7766,11 +8592,11 @@ fi
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7779,11 +8605,12 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
ac_ct_DSYMUTIL=$DSYMUTIL
# Extract the first word of "dsymutil", so it can be a program name with args.
set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_DSYMUTIL"; then
ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
else
@@ -7791,11 +8618,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7806,11 +8637,11 @@ fi
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_DSYMUTIL" = x; then
@@ -7818,8 +8649,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
DSYMUTIL=$ac_ct_DSYMUTIL
@@ -7831,11 +8662,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$NMEDIT"; then
ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
@@ -7843,11 +8675,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7858,11 +8694,11 @@ fi
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7871,11 +8707,12 @@ if test -z "$ac_cv_prog_NMEDIT"; then
ac_ct_NMEDIT=$NMEDIT
# Extract the first word of "nmedit", so it can be a program name with args.
set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_NMEDIT"; then
ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
@@ -7883,11 +8720,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7898,11 +8739,11 @@ fi
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_NMEDIT" = x; then
@@ -7910,8 +8751,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
NMEDIT=$ac_ct_NMEDIT
@@ -7923,11 +8764,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
else
@@ -7935,11 +8777,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7950,11 +8796,11 @@ fi
fi
LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -7963,11 +8809,12 @@ if test -z "$ac_cv_prog_LIPO"; then
ac_ct_LIPO=$LIPO
# Extract the first word of "lipo", so it can be a program name with args.
set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_LIPO"; then
ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
else
@@ -7975,11 +8822,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -7990,11 +8841,11 @@ fi
fi
ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_LIPO" = x; then
@@ -8002,8 +8853,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
LIPO=$ac_ct_LIPO
@@ -8015,11 +8866,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
@@ -8027,11 +8879,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8042,11 +8898,11 @@ fi
fi
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8055,11 +8911,12 @@ if test -z "$ac_cv_prog_OTOOL"; then
ac_ct_OTOOL=$OTOOL
# Extract the first word of "otool", so it can be a program name with args.
set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL"; then
ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
else
@@ -8067,11 +8924,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8082,11 +8943,11 @@ fi
fi
ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL" = x; then
@@ -8094,8 +8955,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL=$ac_ct_OTOOL
@@ -8107,11 +8968,12 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$OTOOL64"; then
ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
else
@@ -8119,11 +8981,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8134,11 +9000,11 @@ fi
fi
OTOOL64=$ac_cv_prog_OTOOL64
if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8147,11 +9013,12 @@ if test -z "$ac_cv_prog_OTOOL64"; then
ac_ct_OTOOL64=$OTOOL64
# Extract the first word of "otool64", so it can be a program name with args.
set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$ac_ct_OTOOL64"; then
ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
else
@@ -8159,11 +9026,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -8174,11 +9045,11 @@ fi
fi
ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_OTOOL64" = x; then
@@ -8186,8 +9057,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
OTOOL64=$ac_ct_OTOOL64
@@ -8222,11 +9093,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_apple_cc_single_mod=no
if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
@@ -8255,14 +9127,15 @@ else
rm -f conftest.*
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_exported_symbols_list=no
save_LDFLAGS=$LDFLAGS
echo "_main" > conftest.sym
@@ -8271,31 +9144,33 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_ld_exported_symbols_list=yes
-else
+else $as_nop
lt_cv_ld_exported_symbols_list=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
int forced_loaded() { return 2;}
@@ -8323,8 +9198,8 @@ _LT_EOF
rm -rf conftest.dSYM
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
@@ -8395,19 +9270,14 @@ func_munge_path_list ()
esac
}
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
fi
-done
-
@@ -8423,7 +9293,8 @@ done
# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
+if test ${enable_shared+y}
+then :
enableval=$enable_shared; p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
@@ -8441,7 +9312,7 @@ if test "${enable_shared+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_shared=yes
fi
@@ -8454,7 +9325,8 @@ fi
# Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
+if test ${enable_static+y}
+then :
enableval=$enable_static; p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
@@ -8472,7 +9344,7 @@ if test "${enable_static+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_static=yes
fi
@@ -8486,7 +9358,8 @@ fi
# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
+if test ${with_pic+y}
+then :
withval=$with_pic; lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
@@ -8503,7 +9376,7 @@ if test "${with_pic+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
pic_mode=default
fi
@@ -8515,7 +9388,8 @@ fi
# Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
+if test ${enable_fast_install+y}
+then :
enableval=$enable_fast_install; p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
@@ -8533,7 +9407,7 @@ if test "${enable_fast_install+set}" = set; then :
IFS=$lt_save_ifs
;;
esac
-else
+else $as_nop
enable_fast_install=yes
fi
@@ -8547,11 +9421,12 @@ fi
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[5-9]*,yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
# Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
+if test ${with_aix_soname+y}
+then :
withval=$with_aix_soname; case $withval in
aix|svr4|both)
;;
@@ -8560,18 +9435,19 @@ if test "${with_aix_soname+set}" = set; then :
;;
esac
lt_cv_with_aix_soname=$with_aix_soname
-else
- if ${lt_cv_with_aix_soname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ if test ${lt_cv_with_aix_soname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_with_aix_soname=aix
fi
with_aix_soname=$lt_cv_with_aix_soname
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
@@ -8653,11 +9529,12 @@ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
@@ -8668,17 +9545,15 @@ else
fi
rmdir .libs 2>/dev/null
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
objdir=$lt_cv_objdir
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
@@ -8724,11 +9599,12 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -8777,11 +9653,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8790,11 +9666,12 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
@@ -8843,11 +9720,11 @@ fi
MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -8932,11 +9809,12 @@ if test yes = "$GCC"; then
lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -8967,8 +9845,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
@@ -9325,26 +10203,28 @@ case $host_os in
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
@@ -9375,8 +10255,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
@@ -9404,11 +10284,12 @@ fi
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_static_works=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
@@ -9432,8 +10313,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
if test yes = "$lt_cv_prog_compiler_static_works"; then
:
@@ -9447,11 +10328,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -9494,19 +10376,20 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
@@ -9549,8 +10432,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -9558,19 +10441,19 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
hard_links=nottested
if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
hard_links=yes
$RM conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -9582,8 +10465,8 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
runpath_var=
allow_undefined_flag=
@@ -10138,21 +11021,23 @@ _LT_EOF
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -10167,7 +11052,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -10191,21 +11076,23 @@ fi
if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
- if ${lt_cv_aix_libpath_+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_aix_libpath_sed='
/Import File Strings/,/^$/ {
@@ -10220,7 +11107,7 @@ if ac_fn_c_try_link "$LINENO"; then :
lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
@@ -10471,11 +11358,12 @@ fi
# Older versions of the 11.00 compiler do not understand -b yet
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_prog_compiler__b=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
@@ -10499,8 +11387,8 @@ else
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
if test yes = "$lt_cv_prog_compiler__b"; then
archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
@@ -10540,28 +11428,30 @@ fi
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
# This should be the same for all languages, so no per-tag cache variable.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
lt_cv_irix_exported_symbol=yes
-else
+else $as_nop
lt_cv_irix_exported_symbol=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
if test yes = "$lt_cv_irix_exported_symbol"; then
archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
@@ -10841,8 +11731,8 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -10878,18 +11768,19 @@ x|xyes)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
$RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } 2>conftest.err; then
soname=conftest
lib=conftest
@@ -10907,7 +11798,7 @@ else
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
(eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then
lt_cv_archive_cmds_need_lc=no
@@ -10921,8 +11812,8 @@ else
$RM conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
;;
esac
@@ -11081,8 +11972,8 @@ esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
if test yes = "$GCC"; then
case $host_os in
@@ -11643,9 +12534,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
shlibpath_overrides_runpath=no
# Some binutils ld are patched to set DT_RUNPATH
- if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
@@ -11655,19 +12547,21 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+if ac_fn_c_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
lt_cv_shlibpath_overrides_runpath=yes
fi
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
@@ -11899,8 +12793,8 @@ uts4*)
dynamic_linker=no
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -12021,8 +12915,8 @@ configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
@@ -12046,8 +12940,8 @@ else
# directories.
hardcode_action=unsupported
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
if test relink = "$hardcode_action" ||
test yes = "$inherit_rpath"; then
@@ -12091,11 +12985,12 @@ else
darwin*)
# if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12104,32 +12999,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
+else $as_nop
lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
@@ -12149,14 +13043,16 @@ fi
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
+if test "x$ac_cv_func_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12165,41 +13061,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char shl_load ();
int
-main ()
+main (void)
{
return shl_load ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_shl_load=yes
-else
+else $as_nop
ac_cv_lib_dld_shl_load=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else
+else $as_nop
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
+if test "x$ac_cv_func_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12208,37 +13105,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dl_dlopen=yes
-else
+else $as_nop
ac_cv_lib_dl_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12247,37 +13144,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dlopen ();
int
-main ()
+main (void)
{
return dlopen ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_svld_dlopen=yes
-else
+else $as_nop
ac_cv_lib_svld_dlopen=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12286,30 +13183,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char dld_link ();
int
-main ()
+main (void)
{
return dld_link ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_dld_dld_link=yes
-else
+else $as_nop
ac_cv_lib_dld_dld_link=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -12348,11 +13244,12 @@ fi
save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
@@ -12431,7 +13328,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -12449,16 +13346,17 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
@@ -12537,7 +13435,7 @@ _LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
@@ -12555,8 +13453,8 @@ rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS=$save_CPPFLAGS
@@ -12594,13 +13492,13 @@ fi
striplib=
old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
@@ -12608,16 +13506,16 @@ else
if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
;;
esac
fi
@@ -12634,13 +13532,13 @@ fi
# Report what library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
@@ -12664,15 +13562,15 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
fi
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test yes = "$enable_shared" || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
@@ -12728,11 +13626,12 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5
-$as_echo_n "checking for library containing inet_ntoa... " >&6; }
-if ${ac_cv_search_inet_ntoa+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5
+printf %s "checking for library containing inet_ntoa... " >&6; }
+if test ${ac_cv_search_inet_ntoa+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12740,55 +13639,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inet_ntoa ();
int
-main ()
+main (void)
{
return inet_ntoa ();
;
return 0;
}
_ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' nsl
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inet_ntoa=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inet_ntoa+:} false; then :
+ if test ${ac_cv_search_inet_ntoa+y}
+then :
break
fi
done
-if ${ac_cv_search_inet_ntoa+:} false; then :
+if test ${ac_cv_search_inet_ntoa+y}
+then :
-else
+else $as_nop
ac_cv_search_inet_ntoa=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5
-$as_echo "$ac_cv_search_inet_ntoa" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5
+printf "%s\n" "$ac_cv_search_inet_ntoa" >&6; }
ac_res=$ac_cv_search_inet_ntoa
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
-$as_echo_n "checking for library containing socket... " >&6; }
-if ${ac_cv_search_socket+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+printf %s "checking for library containing socket... " >&6; }
+if test ${ac_cv_search_socket+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12796,55 +13698,58 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char socket ();
int
-main ()
+main (void)
{
return socket ();
;
return 0;
}
_ACEOF
-for ac_lib in '' socket; do
+for ac_lib in '' socket
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_socket=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_socket+:} false; then :
+ if test ${ac_cv_search_socket+y}
+then :
break
fi
done
-if ${ac_cv_search_socket+:} false; then :
+if test ${ac_cv_search_socket+y}
+then :
-else
+else $as_nop
ac_cv_search_socket=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
-$as_echo "$ac_cv_search_socket" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+printf "%s\n" "$ac_cv_search_socket" >&6; }
ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_aton" >&5
-$as_echo_n "checking for library containing inet_aton... " >&6; }
-if ${ac_cv_search_inet_aton+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_aton" >&5
+printf %s "checking for library containing inet_aton... " >&6; }
+if test ${ac_cv_search_inet_aton+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12852,55 +13757,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inet_aton ();
int
-main ()
+main (void)
{
return inet_aton ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' resolv
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inet_aton=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inet_aton+:} false; then :
+ if test ${ac_cv_search_inet_aton+y}
+then :
break
fi
done
-if ${ac_cv_search_inet_aton+:} false; then :
+if test ${ac_cv_search_inet_aton+y}
+then :
-else
+else $as_nop
ac_cv_search_inet_aton=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_aton" >&5
-$as_echo "$ac_cv_search_inet_aton" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_aton" >&5
+printf "%s\n" "$ac_cv_search_inet_aton" >&6; }
ac_res=$ac_cv_search_inet_aton
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+if test "x$enable_clock_gettime" = "xyes"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12908,55 +13817,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char clock_gettime ();
int
-main ()
+main (void)
{
return clock_gettime ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt; do
+for ac_lib in '' rt
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_clock_gettime=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
+ if test ${ac_cv_search_clock_gettime+y}
+then :
break
fi
done
-if ${ac_cv_search_clock_gettime+:} false; then :
+if test ${ac_cv_search_clock_gettime+y}
+then :
-else
+else $as_nop
ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sendfile" >&5
-$as_echo_n "checking for library containing sendfile... " >&6; }
-if ${ac_cv_search_sendfile+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sendfile" >&5
+printf %s "checking for library containing sendfile... " >&6; }
+if test ${ac_cv_search_sendfile+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12964,114 +13884,146 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char sendfile ();
int
-main ()
+main (void)
{
return sendfile ();
;
return 0;
}
_ACEOF
-for ac_lib in '' sendfile; do
+for ac_lib in '' sendfile
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_sendfile=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_sendfile+:} false; then :
+ if test ${ac_cv_search_sendfile+y}
+then :
break
fi
done
-if ${ac_cv_search_sendfile+:} false; then :
+if test ${ac_cv_search_sendfile+y}
+then :
-else
+else $as_nop
ac_cv_search_sendfile=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sendfile" >&5
-$as_echo "$ac_cv_search_sendfile" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sendfile" >&5
+printf "%s\n" "$ac_cv_search_sendfile" >&6; }
ac_res=$ac_cv_search_sendfile
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WIN32" >&5
-$as_echo_n "checking for WIN32... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WIN32" >&5
+printf %s "checking for WIN32... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef _WIN32
die horribly
#endif
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bwin32=true; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- bwin32=false; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if ac_fn_c_try_compile "$LINENO"
+then :
+ bwin32=true; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ bwin32=false; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN" >&5
-$as_echo_n "checking for CYGWIN... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MIDIPIX" >&5
+printf %s "checking for MIDIPIX... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
-#ifndef __CYGWIN__
+#ifndef __midipix__
die horribly
#endif
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cygwin=true; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- cygwin=false; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if ac_fn_c_try_compile "$LINENO"
+then :
+ midipix=true; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ midipix=false; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-for ac_header in zlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ZLIB_H 1
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN" >&5
+printf %s "checking for CYGWIN... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+#ifndef __CYGWIN__
+die horribly
+#endif
+
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cygwin=true; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ cygwin=false; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-done
+ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h
+
+fi
if test "x$ac_cv_header_zlib_h" = "xyes"; then
@@ -13079,11 +14031,12 @@ save_LIBS="$LIBS"
LIBS=""
ZLIB_LIBS=""
have_zlib=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
-$as_echo_n "checking for library containing inflateEnd... " >&6; }
-if ${ac_cv_search_inflateEnd+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
+printf %s "checking for library containing inflateEnd... " >&6; }
+if test ${ac_cv_search_inflateEnd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13091,51 +14044,53 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char inflateEnd ();
int
-main ()
+main (void)
{
return inflateEnd ();
;
return 0;
}
_ACEOF
-for ac_lib in '' z; do
+for ac_lib in '' z
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_inflateEnd=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_inflateEnd+:} false; then :
+ if test ${ac_cv_search_inflateEnd+y}
+then :
break
fi
done
-if ${ac_cv_search_inflateEnd+:} false; then :
+if test ${ac_cv_search_inflateEnd+y}
+then :
-else
+else $as_nop
ac_cv_search_inflateEnd=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
-$as_echo "$ac_cv_search_inflateEnd" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
+printf "%s\n" "$ac_cv_search_inflateEnd" >&6; }
ac_res=$ac_cv_search_inflateEnd
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
have_zlib=yes
ZLIB_LIBS="$LIBS"
-$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
fi
@@ -13163,17 +14118,19 @@ fi
# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
+if test ${enable_largefile+y}
+then :
enableval=$enable_largefile;
fi
if test "$enable_largefile" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if ${ac_cv_sys_largefile_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+printf %s "checking for special C compiler options needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
ac_save_CC=$CC
@@ -13187,44 +14144,47 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
break
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
CC="$CC -n32"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_largefile_CC=' -n32'; break
fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
break
done
CC=$ac_save_CC
rm -f conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if ${ac_cv_sys_file_offset_bits+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test ${ac_cv_sys_file_offset_bits+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13233,22 +14193,23 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_file_offset_bits=no; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _FILE_OFFSET_BITS 64
@@ -13257,43 +14218,43 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_file_offset_bits=64; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_sys_file_offset_bits=unknown
break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
+printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
;;
esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if ${ac_cv_sys_large_files+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test ${ac_cv_sys_large_files+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13302,22 +14263,23 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_large_files=no; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGE_FILES 1
@@ -13326,40 +14288,37 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_large_files=1; break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_sys_large_files=unknown
break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+printf "%s\n" "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
+printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
;;
esac
rm -rf conftest*
fi
-
-
fi
@@ -13369,11 +14328,12 @@ ntp_pkgconfig_min_version='0.15.0'
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
@@ -13383,11 +14343,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -13399,11 +14363,11 @@ esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -13412,11 +14376,12 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
@@ -13426,11 +14391,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -13442,11 +14411,11 @@ esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
@@ -13454,8 +14423,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
@@ -13469,14 +14438,14 @@ fi
case "$PKG_CONFIG" in
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
-$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
PKG_CONFIG=""
fi
;;
@@ -13508,11 +14477,15 @@ case "$enable_openssl" in
save_LIBS="$LIBS"
LIBS=""
OPENSSL_LIBS=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
-$as_echo_n "checking for library containing SSL_new... " >&6; }
-if ${ac_cv_search_SSL_new+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ for lib in crypto eay32; do
+ # clear cache
+ unset ac_cv_search_SSL_new
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
+printf %s "checking for library containing SSL_new... " >&6; }
+if test ${ac_cv_search_SSL_new+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13520,62 +14493,86 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char SSL_new ();
int
-main ()
+main (void)
{
return SSL_new ();
;
return 0;
}
_ACEOF
-for ac_lib in '' ssl; do
+for ac_lib in '' ssl ssl32
+do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
- LIBS="-l$ac_lib -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD $ac_func_search_save_LIBS"
+ LIBS="-l$ac_lib -l$lib $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD $ac_func_search_save_LIBS"
fi
- if ac_fn_c_try_link "$LINENO"; then :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_SSL_new=$ac_res
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
- if ${ac_cv_search_SSL_new+:} false; then :
+ if test ${ac_cv_search_SSL_new+y}
+then :
break
fi
done
-if ${ac_cv_search_SSL_new+:} false; then :
+if test ${ac_cv_search_SSL_new+y}
+then :
-else
+else $as_nop
ac_cv_search_SSL_new=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
-$as_echo "$ac_cv_search_SSL_new" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
+printf "%s\n" "$ac_cv_search_SSL_new" >&6; }
ac_res=$ac_cv_search_SSL_new
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
have_openssl=yes
- OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"
-else
+ OPENSSL_LIBS="$LIBS -l$lib $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"
+else $as_nop
have_openssl=no
fi
- LIBS="$save_LIBS"
+ LIBS="$save_LIBS"
+ test "$have_openssl" = "yes" && break
+ done
;;
esac
+ CPPFLAGS_SAVE=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $OPENSSL_INCS"
+ for ac_header in openssl/ssl.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
+
+else $as_nop
+ have_openssl=no
+fi
+
+done
+ CPPFLAGS=$CPPFLAGS_SAVE
case "$have_openssl" in
yes)
-$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_OPENSSL 1" >>confdefs.h
;;
+ *) as_fn_error $? "openssl is a must but can not be found. You should add the \
+directory containing \`openssl.pc' to the \`PKG_CONFIG_PATH' environment variable, \
+or set \`CFLAGS' and \`LDFLAGS' directly for openssl, or use \`--disable-openssl' \
+to disable support for openssl encryption" "$LINENO" 5
+ ;;
esac
;;
esac
@@ -13591,70 +14588,232 @@ fi
-for ac_header in \
- arpa/inet.h \
- fcntl.h \
- ifaddrs.h \
- mach/mach_time.h \
- netdb.h \
- netinet/in.h \
- netinet/in6.h \
- netinet/tcp.h \
- poll.h \
- port.h \
- stdarg.h \
- stddef.h \
- sys/devpoll.h \
- sys/epoll.h \
- sys/event.h \
- sys/eventfd.h \
- sys/ioctl.h \
- sys/mman.h \
- sys/param.h \
- sys/queue.h \
- sys/resource.h \
- sys/select.h \
- sys/sendfile.h \
- sys/socket.h \
- sys/stat.h \
- sys/time.h \
- sys/timerfd.h \
- sys/uio.h \
- sys/wait.h \
+ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
+if test "x$ac_cv_header_arpa_inet_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcntl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
+if test "x$ac_cv_header_ifaddrs_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h
-done
+fi
+ac_fn_c_check_header_compile "$LINENO" "mach/mach_time.h" "ac_cv_header_mach_mach_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_mach_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACH_MACH_TIME_H 1" >>confdefs.h
+fi
+ac_fn_c_check_header_compile "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_mach_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACH_MACH_H 1" >>confdefs.h
-for ac_header in sys/sysctl.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
+fi
+ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
+if test "x$ac_cv_header_netdb_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/in6.h" "ac_cv_header_netinet_in6_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_in6_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_IN6_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_tcp_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_un_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
+if test "x$ac_cv_header_poll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "port.h" "ac_cv_header_port_h" "$ac_includes_default"
+if test "x$ac_cv_header_port_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_PORT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdarg_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
+if test "x$ac_cv_header_stddef_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_devpoll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_epoll_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_event_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_eventfd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_EVENTFD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ioctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mman_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/queue.h" "ac_cv_header_sys_queue_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_queue_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_QUEUE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_resource_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_select_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/sendfile.h" "ac_cv_header_sys_sendfile_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sendfile_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SENDFILE_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stat_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/timerfd.h" "ac_cv_header_sys_timerfd_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timerfd_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_TIMERFD_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_uio_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_wait_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_random_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "afunix.h" "ac_cv_header_afunix_h" "$ac_includes_default"
+if test "x$ac_cv_header_afunix_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_AFUNIX_H 1" >>confdefs.h
+
+fi
+
+
+case "${host_os}" in
+ linux*) ;;
+ *)
+ ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
"
-if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SYSCTL_H 1
-_ACEOF
+if test "x$ac_cv_header_sys_sysctl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
fi
-done
+esac
if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAILQ_FOREACH in sys/queue.h" >&5
-$as_echo_n "checking for TAILQ_FOREACH in sys/queue.h... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TAILQ_FOREACH in sys/queue.h" >&5
+printf %s "checking for TAILQ_FOREACH in sys/queue.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13665,24 +14824,25 @@ $as_echo_n "checking for TAILQ_FOREACH in sys/queue.h... " >&6; }
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ $EGREP "yes" >/dev/null 2>&1
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_TAILQFOREACH 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TAILQFOREACH 1" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f conftest*
+rm -rf conftest*
fi
if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timeradd in sys/time.h" >&5
-$as_echo_n "checking for timeradd in sys/time.h... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timeradd in sys/time.h" >&5
+printf %s "checking for timeradd in sys/time.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13693,24 +14853,25 @@ $as_echo_n "checking for timeradd in sys/time.h... " >&6; }
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
-$as_echo "#define HAVE_TIMERADD 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TIMERADD 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f conftest*
+rm -rf conftest*
fi
if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timercmp in sys/time.h" >&5
-$as_echo_n "checking for timercmp in sys/time.h... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timercmp in sys/time.h" >&5
+printf %s "checking for timercmp in sys/time.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13721,24 +14882,25 @@ $as_echo_n "checking for timercmp in sys/time.h... " >&6; }
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
-$as_echo "#define HAVE_TIMERCMP 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TIMERCMP 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f conftest*
+rm -rf conftest*
fi
if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerclear in sys/time.h" >&5
-$as_echo_n "checking for timerclear in sys/time.h... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timerclear in sys/time.h" >&5
+printf %s "checking for timerclear in sys/time.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13749,24 +14911,25 @@ $as_echo_n "checking for timerclear in sys/time.h... " >&6; }
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
-$as_echo "#define HAVE_TIMERCLEAR 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TIMERCLEAR 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f conftest*
+rm -rf conftest*
fi
if test "x$ac_cv_header_sys_time_h" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerisset in sys/time.h" >&5
-$as_echo_n "checking for timerisset in sys/time.h... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timerisset in sys/time.h" >&5
+printf %s "checking for timerisset in sys/time.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13777,74 +14940,125 @@ $as_echo_n "checking for timerisset in sys/time.h... " >&6; }
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
-$as_echo "#define HAVE_TIMERISSET 1" >>confdefs.h
+printf "%s\n" "#define HAVE_TIMERISSET 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f conftest*
+rm -rf conftest*
fi
if test "x$ac_cv_header_sys_sysctl_h" = "xyes"; then
- ac_fn_c_check_decl "$LINENO" "CTL_KERN" "ac_cv_have_decl_CTL_KERN" "#include <sys/types.h>
- #include <sys/sysctl.h>
-
-"
-if test "x$ac_cv_have_decl_CTL_KERN" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_CTL_KERN $ac_have_decl
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
_ACEOF
-ac_fn_c_check_decl "$LINENO" "KERN_RANDOM" "ac_cv_have_decl_KERN_RANDOM" "#include <sys/types.h>
- #include <sys/sysctl.h>
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
-"
-if test "x$ac_cv_have_decl_KERN_RANDOM" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_KERN_RANDOM $ac_have_decl
+ ;
+ return 0;
+}
_ACEOF
-ac_fn_c_check_decl "$LINENO" "RANDOM_UUID" "ac_cv_have_decl_RANDOM_UUID" "#include <sys/types.h>
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+ac_fn_check_decl "$LINENO" "CTL_KERN" "ac_cv_have_decl_CTL_KERN" "#include <sys/types.h>
#include <sys/sysctl.h>
-"
-if test "x$ac_cv_have_decl_RANDOM_UUID" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_CTL_KERN" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_RANDOM_UUID $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "KERN_ARND" "ac_cv_have_decl_KERN_ARND" "#include <sys/types.h>
+printf "%s\n" "#define HAVE_DECL_CTL_KERN $ac_have_decl" >>confdefs.h
+ac_fn_check_decl "$LINENO" "KERN_ARND" "ac_cv_have_decl_KERN_ARND" "#include <sys/types.h>
#include <sys/sysctl.h>
-"
-if test "x$ac_cv_have_decl_KERN_ARND" = xyes; then :
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_KERN_ARND" = xyes
+then :
ac_have_decl=1
-else
+else $as_nop
ac_have_decl=0
fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_KERN_ARND $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_KERN_ARND $ac_have_decl" >>confdefs.h
fi
@@ -13864,7 +15078,15 @@ else
BUILD_CYGWIN_FALSE=
fi
- if test x$bwin32 = xtrue || test x$cygwin = xtrue; then
+ if test x$midipix = xtrue; then
+ BUILD_MIDIPIX_TRUE=
+ BUILD_MIDIPIX_FALSE='#'
+else
+ BUILD_MIDIPIX_TRUE='#'
+ BUILD_MIDIPIX_FALSE=
+fi
+
+ if test x$bwin32 = xtrue || test x$cygwin = xtrue || test x$midipix = xtrue; then
BUILD_WITH_NO_UNDEFINED_TRUE=
BUILD_WITH_NO_UNDEFINED_FALSE='#'
else
@@ -13874,74 +15096,60 @@ fi
if test x$bwin32 = xtrue; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
-$as_echo_n "checking for library containing getservbyname... " >&6; }
-if ${ac_cv_search_getservbyname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5
+printf %s "checking for main in -lws2_32... " >&6; }
+if test ${ac_cv_lib_ws2_32_main+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lws2_32 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getservbyname ();
+
int
-main ()
+main (void)
{
-return getservbyname ();
+return main ();
;
return 0;
}
_ACEOF
-for ac_lib in '' ws2_32; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_getservbyname=$ac_res
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_ws2_32_main=yes
+else $as_nop
+ ac_cv_lib_ws2_32_main=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_getservbyname+:} false; then :
- break
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-done
-if ${ac_cv_search_getservbyname+:} false; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5
+printf "%s\n" "$ac_cv_lib_ws2_32_main" >&6; }
+if test "x$ac_cv_lib_ws2_32_main" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h
-else
- ac_cv_search_getservbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
-$as_echo "$ac_cv_search_getservbyname" >&6; }
-ac_res=$ac_cv_search_getservbyname
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ LIBS="-lws2_32 $LIBS"
fi
+ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -13954,7 +15162,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -13982,7 +15190,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -13998,47 +15206,50 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
-else
+else $as_nop
ac_cv_c_const=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_inline=$ac_kw
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
test "$ac_cv_c_inline" != no && break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -14055,93 +15266,253 @@ _ACEOF
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
-else
- ac_cv_header_time=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-
-fi
-
-
-for ac_func in \
- accept4 \
- arc4random \
- arc4random_buf \
- clock_gettime \
- eventfd \
- epoll_create1 \
- fcntl \
- getegid \
- geteuid \
- getifaddrs \
- getnameinfo \
- getprotobynumber \
- gettimeofday \
- inet_ntop \
- inet_pton \
- issetugid \
- mach_absolute_time \
- mmap \
- nanosleep \
- pipe \
- pipe2 \
- putenv \
- sendfile \
- setenv \
- setrlimit \
- sigaction \
- signal \
- splice \
- strlcpy \
- strsep \
- strtok_r \
- strtoll \
- sysctl \
- timerfd_create \
- umask \
- unsetenv \
- usleep \
- vasprintf \
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+
+printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+# End of obsolete code.
+
+
+ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
+if test "x$ac_cv_func_accept4" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
+if test "x$ac_cv_func_arc4random" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
+if test "x$ac_cv_func_arc4random_buf" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "arc4random_addrandom" "ac_cv_func_arc4random_addrandom"
+if test "x$ac_cv_func_arc4random_addrandom" = xyes
+then :
+ printf "%s\n" "#define HAVE_ARC4RANDOM_ADDRANDOM 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "eventfd" "ac_cv_func_eventfd"
+if test "x$ac_cv_func_eventfd" = xyes
+then :
+ printf "%s\n" "#define HAVE_EVENTFD 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "epoll_create1" "ac_cv_func_epoll_create1"
+if test "x$ac_cv_func_epoll_create1" = xyes
+then :
+ printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
+if test "x$ac_cv_func_fcntl" = xyes
+then :
+ printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid"
+if test "x$ac_cv_func_getegid" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETEGID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid"
+if test "x$ac_cv_func_geteuid" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
+if test "x$ac_cv_func_gettimeofday" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
+if test "x$ac_cv_func_issetugid" = xyes
+then :
+ printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mach_absolute_time" "ac_cv_func_mach_absolute_time"
+if test "x$ac_cv_func_mach_absolute_time" = xyes
+then :
+ printf "%s\n" "#define HAVE_MACH_ABSOLUTE_TIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+ printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
+if test "x$ac_cv_func_nanosleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pipe" "ac_cv_func_pipe"
+if test "x$ac_cv_func_pipe" = xyes
+then :
+ printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
+if test "x$ac_cv_func_pipe2" = xyes
+then :
+ printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
+if test "x$ac_cv_func_putenv" = xyes
+then :
+ printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile"
+if test "x$ac_cv_func_sendfile" = xyes
+then :
+ printf "%s\n" "#define HAVE_SENDFILE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
+if test "x$ac_cv_func_setenv" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
+if test "x$ac_cv_func_setrlimit" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
+if test "x$ac_cv_func_sigaction" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "signal" "ac_cv_func_signal"
+if test "x$ac_cv_func_signal" = xyes
+then :
+ printf "%s\n" "#define HAVE_SIGNAL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "splice" "ac_cv_func_splice"
+if test "x$ac_cv_func_splice" = xyes
+then :
+ printf "%s\n" "#define HAVE_SPLICE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
+if test "x$ac_cv_func_strsep" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
+if test "x$ac_cv_func_strtok_r" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
+if test "x$ac_cv_func_strtoll" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "sysctl" "ac_cv_func_sysctl"
+if test "x$ac_cv_func_sysctl" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "timerfd_create" "ac_cv_func_timerfd_create"
+if test "x$ac_cv_func_timerfd_create" = xyes
+then :
+ printf "%s\n" "#define HAVE_TIMERFD_CREATE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "umask" "ac_cv_func_umask"
+if test "x$ac_cv_func_umask" = xyes
+then :
+ printf "%s\n" "#define HAVE_UMASK 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
+if test "x$ac_cv_func_usleep" = xyes
+then :
+ printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = xyes
+then :
+ printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
+if test "x$ac_cv_func_getrandom" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
+
+fi
+
+
+if test x$bwin32 = xtrue
+then :
+
+ for ac_func in _gmtime64_s
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "_gmtime64_s" "ac_cv_func__gmtime64_s"
+if test "x$ac_cv_func__gmtime64_s" = xyes
+then :
+ printf "%s\n" "#define HAVE__GMTIME64_S 1" >>confdefs.h
+
+else $as_nop
+ ac_fn_c_check_func "$LINENO" "_gmtime64" "ac_cv_func__gmtime64"
+if test "x$ac_cv_func__gmtime64" = xyes
+then :
+ printf "%s\n" "#define HAVE__GMTIME64 1" >>confdefs.h
+
+fi
fi
+
done
+fi
+
if test x"$ac_cv_func_strlcpy" = xno; then
STRLCPY_IMPL_TRUE=
STRLCPY_IMPL_FALSE='#'
@@ -14151,11 +15522,179 @@ else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
-$as_echo_n "checking for getaddrinfo... " >&6; }
-if ${libevent_cv_getaddrinfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+
+
+if test x$bwin32 = xtrue
+then :
+ if test "x#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif" = "x"
+then :
+ as_fn_error $? "header not privided" "$LINENO" 5
+fi
+ if test "x#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif" = "x"
+then :
+ as_fn_error $? "header not privided" "$LINENO" 5
+fi
+
+ ac_fn_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_decl" " #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_decl" = xyes
+then :
+
+printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h
+
+fi
+ if test "x#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif" = "x"
+then :
+ as_fn_error $? "header not privided" "$LINENO" 5
+fi
+
+ ac_fn_check_decl "$LINENO" "getprotobynumber" "ac_cv_have_decl_decl" " #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_decl" = xyes
+then :
+
+printf "%s\n" "#define HAVE_GETPROTOBYNUMBER 1" >>confdefs.h
+
+fi
+ if test "x#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif" = "x"
+then :
+ as_fn_error $? "header not privided" "$LINENO" 5
+fi
+
+ ac_fn_check_decl "$LINENO" "getservbyname" "ac_cv_have_decl_decl" " #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_decl" = xyes
+then :
+
+printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
+
+fi
+ if test "x#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif" = "x"
+then :
+ as_fn_error $? "header not privided" "$LINENO" 5
+fi
+
+ ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_decl" " #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_decl" = xyes
+then :
+
+printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
+
+fi
+ if test "x#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif" = "x"
+then :
+ as_fn_error $? "header not privided" "$LINENO" 5
+fi
+
+ ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_decl" " #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_decl" = xyes
+then :
+
+printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
+
+fi
+ if test "x#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif" = "x"
+then :
+ as_fn_error $? "header not privided" "$LINENO" 5
+fi
+
+ ac_fn_check_decl "$LINENO" "getaddrinfo" "ac_cv_have_decl_decl" " #ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_decl" = xyes
+then :
+
+printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
+
+fi
+
+
+else $as_nop
+ ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
+if test "x$ac_cv_func_getnameinfo" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getprotobynumber" "ac_cv_func_getprotobynumber"
+if test "x$ac_cv_func_getprotobynumber" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPROTOBYNUMBER 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
+if test "x$ac_cv_func_getservbyname" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
+if test "x$ac_cv_func_inet_ntop" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
+if test "x$ac_cv_func_inet_pton" = xyes
+then :
+ printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
+
+fi
+
+
+fi
+
+
+
+if test x$bwin32 = xfalse
+then :
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
+printf %s "checking for getaddrinfo... " >&6; }
+if test ${libevent_cv_getaddrinfo+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14164,7 +15703,7 @@ else
#endif
int
-main ()
+main (void)
{
getaddrinfo;
@@ -14174,45 +15713,36 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
libevent_cv_getaddrinfo=yes
-else
+else $as_nop
libevent_cv_getaddrinfo=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libevent_cv_getaddrinfo" >&5
-$as_echo "$libevent_cv_getaddrinfo" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libevent_cv_getaddrinfo" >&5
+printf "%s\n" "$libevent_cv_getaddrinfo" >&6; }
if test "$libevent_cv_getaddrinfo" = "yes" ; then
-$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
else
-for ac_func in getservbyname
-do :
- ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
-if test "x$ac_cv_func_getservbyname" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETSERVBYNAME 1
-_ACEOF
-
-fi
-done
-
# Check for gethostbyname_r in all its glorious incompatible versions.
# (This is cut-and-pasted from Tor, which based its logic on
# Python's configure.in.)
ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
-if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
+if test "x$ac_cv_func_gethostbyname_r" = xyes
+then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() wants" >&5
-$as_echo_n "checking how many arguments gethostbyname_r() wants... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() wants" >&5
+printf %s "checking how many arguments gethostbyname_r() wants... " >&6; }
OLD_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14221,7 +15751,7 @@ $as_echo_n "checking how many arguments gethostbyname_r() wants... " >&6; }
#include <netdb.h>
int
-main ()
+main (void)
{
char *cp1, *cp2;
@@ -14233,17 +15763,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
- $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
-$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6" >&5
-$as_echo "6" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 6" >&5
+printf "%s\n" "6" >&6; }
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14251,7 +15782,7 @@ else
#include <netdb.h>
int
-main ()
+main (void)
{
char *cp1, *cp2;
@@ -14263,17 +15794,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
- $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
-$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 5" >&5
-$as_echo "5" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 5" >&5
+printf "%s\n" "5" >&6; }
-else
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14281,7 +15813,7 @@ else
#include <netdb.h>
int
-main ()
+main (void)
{
char *cp1;
@@ -14293,29 +15825,30 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
- $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
+ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
-$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 3" >&5
-$as_echo "3" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 3" >&5
+printf "%s\n" "3" >&6; }
-else
+else $as_nop
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0" >&5
-$as_echo "0" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 0" >&5
+printf "%s\n" "0" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$OLD_CFLAGS
fi
@@ -14323,12 +15856,13 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETFD in fcntl.h" >&5
-$as_echo_n "checking for F_SETFD in fcntl.h... " >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for F_SETFD in fcntl.h" >&5
+printf %s "checking for F_SETFD in fcntl.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define _GNU_SOURCE
+#define _GNU_SOURCE 1
#include <fcntl.h>
#ifdef F_SETFD
yes
@@ -14336,33 +15870,34 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
-$as_echo "#define HAVE_SETFD 1" >>confdefs.h
+printf "%s\n" "#define HAVE_SETFD 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f conftest*
+rm -rf conftest*
needsignal=no
haveselect=no
if test x$bwin32 != xtrue; then
- for ac_func in select
+
+ for ac_func in select
do :
ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
-if test "x$ac_cv_func_select" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SELECT 1
-_ACEOF
+if test "x$ac_cv_func_select" = xyes
+then :
+ printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
haveselect=yes
fi
-done
+done
if test "x$haveselect" = "xyes" ; then
needsignal=yes
fi
@@ -14377,17 +15912,17 @@ fi
havepoll=no
-for ac_func in poll
+
+ for ac_func in poll
do :
ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
-if test "x$ac_cv_func_poll" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_POLL 1
-_ACEOF
+if test "x$ac_cv_func_poll" = xyes
+then :
+ printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
havepoll=yes
fi
-done
+done
if test "x$havepoll" = "xyes" ; then
needsignal=yes
fi
@@ -14403,7 +15938,7 @@ fi
havedevpoll=no
if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
-$as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DEVPOLL 1" >>confdefs.h
fi
if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
@@ -14417,26 +15952,35 @@ fi
havekqueue=no
if test "x$ac_cv_header_sys_event_h" = "xyes"; then
- for ac_func in kqueue
+
+ for ac_func in kqueue
do :
ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue"
-if test "x$ac_cv_func_kqueue" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_KQUEUE 1
-_ACEOF
+if test "x$ac_cv_func_kqueue" = xyes
+then :
+ printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h
havekqueue=yes
fi
-done
+done
if test "x$havekqueue" = "xyes" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working kqueue" >&5
-$as_echo_n "checking for working kqueue... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working kqueue" >&5
+printf %s "checking for working kqueue... " >&6; }
+ if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#include <sys/types.h>
#include <sys/time.h>
#include <sys/event.h>
@@ -14445,25 +15989,26 @@ else
#include <fcntl.h>
int
-main(int argc, char **argv)
+main (void)
{
+
int kq;
int n;
int fd[2];
struct kevent ev;
struct timespec ts;
- char buf[8000];
+ char buf[80000];
if (pipe(fd) == -1)
- exit(1);
+ return 1;
if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
- exit(1);
+ return 1;
while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf))
;
- if ((kq = kqueue()) == -1)
- exit(1);
+ if ((kq = kqueue()) == -1)
+ return 1;
memset(&ev, 0, sizeof(ev));
ev.ident = fd[1];
@@ -14471,7 +16016,7 @@ main(int argc, char **argv)
ev.flags = EV_ADD | EV_ENABLE;
n = kevent(kq, &ev, 1, NULL, 0, NULL);
if (n == -1)
- exit(1);
+ return 1;
read(fd[0], buf, sizeof(buf));
@@ -14479,22 +16024,27 @@ main(int argc, char **argv)
ts.tv_nsec = 0;
n = kevent(kq, NULL, 0, &ev, 1, &ts);
if (n == -1 || n == 0)
- exit(1);
+ return 1;
+
+ return 0;
- exit(0);
+
+ ;
+ return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_WORKING_KQUEUE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WORKING_KQUEUE 1" >>confdefs.h
- havekqueue=yes
+ havekqueue=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -14513,33 +16063,36 @@ fi
haveepollsyscall=no
haveepoll=no
-for ac_func in epoll_ctl
+
+ for ac_func in epoll_ctl
do :
ac_fn_c_check_func "$LINENO" "epoll_ctl" "ac_cv_func_epoll_ctl"
-if test "x$ac_cv_func_epoll_ctl" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_EPOLL_CTL 1
-_ACEOF
+if test "x$ac_cv_func_epoll_ctl" = xyes
+then :
+ printf "%s\n" "#define HAVE_EPOLL_CTL 1" >>confdefs.h
haveepoll=yes
fi
-done
+done
if test "x$haveepoll" = "xyes" ; then
-$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h
needsignal=yes
fi
if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
if test "x$haveepoll" = "xno" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
-$as_echo_n "checking for epoll system call... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
+printf %s "checking for epoll system call... " >&6; }
+ if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <stdint.h>
#include <sys/param.h>
#include <sys/types.h>
@@ -14554,32 +16107,38 @@ epoll_create(int size)
}
int
-main(int argc, char **argv)
+main (void)
{
+
int epfd;
epfd = epoll_create(256);
- exit (epfd == -1 ? 1 : 0);
+ return (epfd == -1 ? 1 : 0);
+
+
+ ;
+ return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h
- needsignal=yes
- have_epoll=yes
- case " $LIBOBJS " in
+ needsignal=yes
+ have_epoll=yes
+ case " $LIBOBJS " in
*" epoll_sub.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS epoll_sub.$ac_objext"
;;
esac
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -14597,20 +16156,20 @@ fi
haveeventports=no
-for ac_func in port_create
+
+ for ac_func in port_create
do :
ac_fn_c_check_func "$LINENO" "port_create" "ac_cv_func_port_create"
-if test "x$ac_cv_func_port_create" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PORT_CREATE 1
-_ACEOF
+if test "x$ac_cv_func_port_create" = xyes
+then :
+ printf "%s\n" "#define HAVE_PORT_CREATE 1" >>confdefs.h
haveeventports=yes
fi
-done
+done
if test "x$haveeventports" = "xyes" ; then
-$as_echo "#define HAVE_EVENT_PORTS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_EVENT_PORTS 1" >>confdefs.h
needsignal=yes
fi
@@ -14636,36 +16195,60 @@ else
fi
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-else
+ ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
+if test "x$ac_cv_type_pid_t" = xyes
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if defined _WIN64 && !defined __CYGWIN__
+ LLP64
+ #endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_pid_type='int'
+else $as_nop
+ ac_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
+
fi
+
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-if test "x$ac_cv_type_ssize_t" = xyes; then :
+if test "x$ac_cv_type_ssize_t" = xyes
+then :
-else
+else $as_nop
-cat >>confdefs.h <<_ACEOF
-#define ssize_t int
-_ACEOF
+printf "%s\n" "#define ssize_t int" >>confdefs.h
fi
@@ -14679,11 +16262,10 @@ ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#ifdef HAVE_STDIN
#include <sys/types.h>
#endif
"
-if test "x$ac_cv_type_uint64_t" = xyes; then :
+if test "x$ac_cv_type_uint64_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT64_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT64_T 1" >>confdefs.h
fi
@@ -14696,11 +16278,10 @@ ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#ifdef HAVE_STDIN
#include <sys/types.h>
#endif
"
-if test "x$ac_cv_type_uint32_t" = xyes; then :
+if test "x$ac_cv_type_uint32_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT32_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT32_T 1" >>confdefs.h
fi
@@ -14713,11 +16294,10 @@ ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "#ifdef HAVE_STDIN
#include <sys/types.h>
#endif
"
-if test "x$ac_cv_type_uint16_t" = xyes; then :
+if test "x$ac_cv_type_uint16_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT16_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT16_T 1" >>confdefs.h
fi
@@ -14730,11 +16310,10 @@ ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "#ifdef HAVE_STDINT_
#include <sys/types.h>
#endif
"
-if test "x$ac_cv_type_uint8_t" = xyes; then :
+if test "x$ac_cv_type_uint8_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINT8_T 1" >>confdefs.h
fi
@@ -14747,11 +16326,10 @@ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STD
#include <sys/types.h>
#endif
"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
fi
@@ -14764,11 +16342,10 @@ ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "#ifdef HAVE_SYS_TYP
#include <sys/select.h>
#endif
"
-if test "x$ac_cv_type_fd_mask" = xyes; then :
+if test "x$ac_cv_type_fd_mask" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_FD_MASK 1
-_ACEOF
+printf "%s\n" "#define HAVE_FD_MASK 1" >>confdefs.h
fi
@@ -14778,17 +16355,19 @@ fi
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if ${ac_cv_sizeof_long_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+printf %s "checking size of long long... " >&6; }
+if test ${ac_cv_sizeof_long_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14797,31 +16376,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+printf %s "checking size of long... " >&6; }
+if test ${ac_cv_sizeof_long+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14830,31 +16409,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+printf "%s\n" "$ac_cv_sizeof_long" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
+printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+printf %s "checking size of int... " >&6; }
+if test ${ac_cv_sizeof_int+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14863,31 +16442,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+printf "%s\n" "$ac_cv_sizeof_int" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
+printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+printf %s "checking size of short... " >&6; }
+if test ${ac_cv_sizeof_short+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14896,31 +16475,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+printf "%s\n" "$ac_cv_sizeof_short" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
+printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
-if ${ac_cv_sizeof_size_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+printf %s "checking size of size_t... " >&6; }
+if test ${ac_cv_sizeof_size_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_size_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (size_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14929,31 +16508,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
-$as_echo_n "checking size of void *... " >&6; }
-if ${ac_cv_sizeof_void_p+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+printf %s "checking size of void *... " >&6; }
+if test ${ac_cv_sizeof_void_p+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_void_p" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (void *)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14962,31 +16541,31 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
-$as_echo "$ac_cv_sizeof_void_p" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
-_ACEOF
+printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
-$as_echo_n "checking size of off_t... " >&6; }
-if ${ac_cv_sizeof_off_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
-
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
+printf %s "checking size of off_t... " >&6; }
+if test ${ac_cv_sizeof_off_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
+then :
+
+else $as_nop
if test "$ac_cv_type_off_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (off_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -14995,18 +16574,49 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
-$as_echo "$ac_cv_sizeof_off_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
+printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+printf %s "checking size of time_t... " >&6; }
+if test ${ac_cv_sizeof_time_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_time_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (time_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
-ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#define _GNU_SOURCE
+ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#define _GNU_SOURCE 1
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15014,6 +16624,9 @@ ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#de
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15033,15 +16646,14 @@ ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#de
#endif
"
-if test "x$ac_cv_type_struct_in6_addr" = xyes; then :
+if test "x$ac_cv_type_struct_in6_addr" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IN6_ADDR 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#define _GNU_SOURCE
+ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#define _GNU_SOURCE 1
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15049,6 +16661,9 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_i
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15068,15 +16683,14 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_i
#endif
"
-if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
+if test "x$ac_cv_type_struct_sockaddr_in6" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_IN6 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "#define _GNU_SOURCE
+ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#define _GNU_SOURCE 1
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15084,6 +16698,9 @@ ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "#define _GN
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15103,15 +16720,14 @@ ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "#define _GN
#endif
"
-if test "x$ac_cv_type_sa_family_t" = xyes; then :
+if test "x$ac_cv_type_struct_sockaddr_un" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SA_FAMILY_T 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN 1" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#define _GNU_SOURCE
+ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "#define _GNU_SOURCE 1
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15119,6 +16735,9 @@ ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#de
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15138,15 +16757,14 @@ ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#de
#endif
"
-if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
+if test "x$ac_cv_type_sa_family_t" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_ADDRINFO 1
-_ACEOF
+printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#define _GNU_SOURCE
+ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#define _GNU_SOURCE 1
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -15154,6 +16772,9 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockad
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -15173,11 +16794,47 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockad
#endif
"
-if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
+if test "x$ac_cv_type_struct_addrinfo" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#define _GNU_SOURCE 1
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
fi
@@ -15205,11 +16862,10 @@ ac_fn_c_check_member "$LINENO" "struct in6_addr" "s6_addr32" "ac_cv_member_struc
#endif
"
-if test "x$ac_cv_member_struct_in6_addr_s6_addr32" = xyes; then :
+if test "x$ac_cv_member_struct_in6_addr_s6_addr32" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1" >>confdefs.h
fi
@@ -15236,11 +16892,10 @@ ac_fn_c_check_member "$LINENO" "struct in6_addr" "s6_addr16" "ac_cv_member_struc
#endif
"
-if test "x$ac_cv_member_struct_in6_addr_s6_addr16" = xyes; then :
+if test "x$ac_cv_member_struct_in6_addr_s6_addr16" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1" >>confdefs.h
fi
@@ -15267,11 +16922,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_stru
#endif
"
-if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1" >>confdefs.h
fi
@@ -15298,11 +16952,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_len" "ac_cv_member_st
#endif
"
-if test "x$ac_cv_member_struct_sockaddr_in6_sin6_len" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_in6_sin6_len" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1" >>confdefs.h
fi
@@ -15329,11 +16982,10 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_memb
#endif
"
-if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
fi
@@ -15360,109 +17012,125 @@ ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_me
#endif
"
-if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
+if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "struct so_linger" "ac_cv_type_struct_so_linger" "
+ac_fn_c_check_type "$LINENO" "struct linger" "ac_cv_type_struct_linger" "
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
"
-if test "x$ac_cv_type_struct_so_linger" = xyes; then :
+if test "x$ac_cv_type_struct_linger" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_LINGER 1" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SO_LINGER 1
-_ACEOF
-#define HAVE_SO_LINGER
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
-$as_echo_n "checking for socklen_t... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
+printf %s "checking for socklen_t... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
+ #ifdef _WIN32
+ #include <ws2tcpip.h>
+ #else
#include <sys/socket.h>
+ #endif
+
int
-main ()
+main (void)
{
socklen_t x;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+if ac_fn_c_try_compile "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
-$as_echo "#define socklen_t unsigned int" >>confdefs.h
+printf "%s\n" "#define socklen_t unsigned int" >>confdefs.h
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __func__" >&5
-$as_echo_n "checking whether our compiler supports __func__... " >&6; }
+# __func__/__FUNCTION__ is not a macros in general
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __func__" >&5
+printf %s "checking whether our compiler supports __func__... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
const char *cp = __func__;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __FUNCTION__" >&5
-$as_echo_n "checking whether our compiler supports __FUNCTION__... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+printf "%s\n" "#define HAVE___func__ 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __FUNCTION__" >&5
+printf %s "checking whether our compiler supports __FUNCTION__... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
const char *cp = __FUNCTION__;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+if ac_fn_c_try_compile "$LINENO"
+then :
-$as_echo "#define __func__ __FUNCTION__" >>confdefs.h
+printf "%s\n" "#define HAVE___FUNCTION__ 1" >>confdefs.h
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
-$as_echo "#define __func__ __FILE__" >>confdefs.h
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# check if we can compile with pthreads
have_pthreads=no
@@ -15490,33 +17158,31 @@ if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
char pthread_join ();
int
-main ()
+main (void)
{
return pthread_join ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
acx_pthread_ok=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+printf "%s\n" "$acx_pthread_ok" >&6; }
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
@@ -15577,24 +17243,25 @@ for flag in $acx_pthread_flags; do
case $flag in
none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+printf %s "checking whether pthreads work without any flags... " >&6; }
;;
-*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+printf %s "checking whether pthreads work with $flag... " >&6; }
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
# Extract the first word of "pthread-config", so it can be a program name with args.
set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_acx_pthread_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_acx_pthread_config+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$acx_pthread_config"; then
ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
else
@@ -15602,11 +17269,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_acx_pthread_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -15618,11 +17289,11 @@ fi
fi
acx_pthread_config=$ac_cv_prog_acx_pthread_config
if test -n "$acx_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
+printf "%s\n" "$acx_pthread_config" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -15632,8 +17303,8 @@ fi
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+printf %s "checking for the pthreads library -l$flag... " >&6; }
PTHREAD_LIBS="-l$flag"
;;
esac
@@ -15656,7 +17327,7 @@ $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
/* end confdefs.h. */
#include <pthread.h>
int
-main ()
+main (void)
{
pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
@@ -15665,17 +17336,18 @@ pthread_t th; pthread_join(th, 0);
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
acx_pthread_ok=yes
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+printf "%s\n" "$acx_pthread_ok" >&6; }
if test "x$acx_pthread_ok" = xyes; then
break;
fi
@@ -15693,46 +17365,45 @@ if test "x$acx_pthread_ok" = xyes; then
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+printf %s "checking for joinable pthread attribute... " >&6; }
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
-main ()
+main (void)
{
int attr=$attr; return attr;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
attr_name=$attr; break
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+printf "%s\n" "$attr_name" >&6; }
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
+printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+printf %s "checking if more special flags are required for pthreads... " >&6; }
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
-$as_echo "${flag}" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
+printf "%s\n" "${flag}" >&6; }
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
@@ -15746,11 +17417,12 @@ $as_echo "${flag}" >&6; }
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PTHREAD_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if test -n "$PTHREAD_CC"; then
ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
else
@@ -15758,11 +17430,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_PTHREAD_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -15773,11 +17449,11 @@ fi
fi
PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+printf "%s\n" "$PTHREAD_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -15800,7 +17476,7 @@ fi
if test x"$acx_pthread_ok" = xyes; then
-$as_echo "#define HAVE_PTHREADS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_PTHREADS 1" >>confdefs.h
have_pthreads=yes
:
@@ -15820,20 +17496,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
-$as_echo_n "checking size of pthread_t... " >&6; }
-if ${ac_cv_sizeof_pthread_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+printf %s "checking size of pthread_t... " >&6; }
+if test ${ac_cv_sizeof_pthread_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "$ac_includes_default
#include <pthread.h>
-"; then :
+"
+then :
-else
+else $as_nop
if test "$ac_cv_type_pthread_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (pthread_t)
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -15842,17 +17520,23 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
-$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
-_ACEOF
+printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
fi
+ if test "$enable_thread_support" != "no"; then
+ THREADS_TRUE=
+ THREADS_FALSE='#'
+else
+ THREADS_TRUE='#'
+ THREADS_FALSE=
+fi
+
if test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"; then
PTHREADS_TRUE=
PTHREADS_FALSE='#'
@@ -15865,21 +17549,21 @@ fi
# check if we should compile locking into the library
if test x$enable_thread_support = xno; then
-$as_echo "#define DISABLE_THREAD_SUPPORT 1" >>confdefs.h
+printf "%s\n" "#define DISABLE_THREAD_SUPPORT 1" >>confdefs.h
fi
# check if we should hard-code the mm functions.
if test x$enable_malloc_replacement = xno; then
-$as_echo "#define DISABLE_MM_REPLACEMENT 1" >>confdefs.h
+printf "%s\n" "#define DISABLE_MM_REPLACEMENT 1" >>confdefs.h
fi
# check if we should hard-code debugging out
if test x$enable_debug_mode = xno; then
-$as_echo "#define DISABLE_DEBUG_MODE 1" >>confdefs.h
+printf "%s\n" "#define DISABLE_DEBUG_MODE 1" >>confdefs.h
fi
@@ -15906,7 +17590,7 @@ if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then
/* end confdefs.h. */
int
-main ()
+main (void)
{
#if !defined(__GNUC__) || (__GNUC__ < 4)
@@ -15916,18 +17600,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
have_gcc4=yes
-else
+else $as_nop
have_gcc4=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
@@ -15937,18 +17622,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
have_gcc42=yes
-else
+else $as_nop
have_gcc42=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
@@ -15958,18 +17644,19 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
have_gcc45=yes
-else
+else $as_nop
have_gcc45=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#if !defined(__clang__)
@@ -15979,14 +17666,16 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
have_clang=yes
-else
+else $as_nop
have_clang=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum"
+ # -W is the same as -Wextra
+ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wmissing-declarations -Wnested-externs -Wbad-function-cast"
if test x$enable_gcc_warnings = xyes; then
CFLAGS="$CFLAGS -Werror"
fi
@@ -16019,7 +17708,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# for minheap-internal.h related code.
CFLAGS="$CFLAGS -Wno-unused-function"
- # clang on macosx emits warnigns for each directory specified which
+ # clang on macosx emits warnings for each directory specified which
# isn't "used" generating a lot of build noise (typically 3 warnings
# per file
case "$host_os" in
@@ -16036,11 +17725,12 @@ fi
LIBEVENT_GC_SECTIONS=
if test "$GCC" = yes && test "$enable_function_sections" = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
-$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
-if ${libevent_cv_gc_sections_runs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
+printf %s "checking if linker supports omitting unused code and data... " >&6; }
+if test ${libevent_cv_gc_sections_runs+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
origCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wl,--gc-sections"
@@ -16051,7 +17741,7 @@ else
#include <stdio.h>
int
-main ()
+main (void)
{
FILE * fpC;
@@ -16080,7 +17770,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
libevent_cv_gc_sections_runs=no
@@ -16089,19 +17780,19 @@ if ac_fn_c_try_link "$LINENO"; then :
./conftest >/dev/null 2>&1 && libevent_cv_gc_sections_runs=yes
fi
-else
+else $as_nop
libevent_cv_gc_sections_runs=no
fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$origCFLAGS"
{ origCFLAGS=; unset origCFLAGS;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libevent_cv_gc_sections_runs" >&5
-$as_echo "$libevent_cv_gc_sections_runs" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libevent_cv_gc_sections_runs" >&5
+printf "%s\n" "$libevent_cv_gc_sections_runs" >&6; }
case "$libevent_cv_gc_sections_runs" in
yes)
CFLAGS="-ffunction-sections -fdata-sections $CFLAGS"
@@ -16120,11 +17811,2177 @@ else
fi
+# Doxygen support
+
+
+
+
+
+
+
+
+
+
+# Files:
+DX_PROJECT=libevent
+
+DX_CONFIG='${top_srcdir}/Doxyfile'
+
+DX_DOCDIR='doxygen'
+
+
+# Environment variables used inside doxygen.cfg:
+DX_ENV="$DX_ENV SRCDIR='$srcdir'"
+SRCDIR=$srcdir
+
+DX_ENV="$DX_ENV PROJECT='$DX_PROJECT'"
+PROJECT=$DX_PROJECT
+
+DX_ENV="$DX_ENV VERSION='$PACKAGE_VERSION'"
+
+
+# Doxygen itself:
+
+
+
+ # Check whether --enable-doxygen-doc was given.
+if test ${enable_doxygen_doc+y}
+then :
+ enableval=$enable_doxygen_doc;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_doc=1
+
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_doc=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-doc" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_doc=0
+
+
+
+fi
+
+if test "$DX_FLAG_doc" = 1; then
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args.
+set dummy ${ac_tool_prefix}doxygen; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_DOXYGEN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_DOXYGEN in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_DOXYGEN="$DX_DOXYGEN" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_DOXYGEN="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_DOXYGEN=$ac_cv_path_DX_DOXYGEN
+if test -n "$DX_DOXYGEN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_DOXYGEN" >&5
+printf "%s\n" "$DX_DOXYGEN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_DOXYGEN"; then
+ ac_pt_DX_DOXYGEN=$DX_DOXYGEN
+ # Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_DOXYGEN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_DOXYGEN in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_DOXYGEN="$ac_pt_DX_DOXYGEN" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_DOXYGEN="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_DOXYGEN=$ac_cv_path_ac_pt_DX_DOXYGEN
+if test -n "$ac_pt_DX_DOXYGEN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOXYGEN" >&5
+printf "%s\n" "$ac_pt_DX_DOXYGEN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_DOXYGEN" = x; then
+ DX_DOXYGEN=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_DOXYGEN=$ac_pt_DX_DOXYGEN
+ fi
+else
+ DX_DOXYGEN="$ac_cv_path_DX_DOXYGEN"
+fi
+
+if test "$DX_FLAG_doc$DX_DOXYGEN" = 1; then
+ if test "xdoxygen" = "xdoxygen"; then
+ as_fn_error $? "doxygen not found - will not generate any doxygen documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - will not generate any doxygen documentation" >&5
+printf "%s\n" "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;}
+ fi
+ DX_FLAG_doc=0
+
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args.
+set dummy ${ac_tool_prefix}perl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_PERL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_PERL="$DX_PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_PERL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_PERL=$ac_cv_path_DX_PERL
+if test -n "$DX_PERL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_PERL" >&5
+printf "%s\n" "$DX_PERL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_PERL"; then
+ ac_pt_DX_PERL=$DX_PERL
+ # Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_PERL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_PERL="$ac_pt_DX_PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_PERL="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_PERL=$ac_cv_path_ac_pt_DX_PERL
+if test -n "$ac_pt_DX_PERL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PERL" >&5
+printf "%s\n" "$ac_pt_DX_PERL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_PERL" = x; then
+ DX_PERL=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_PERL=$ac_pt_DX_PERL
+ fi
+else
+ DX_PERL="$ac_cv_path_DX_PERL"
+fi
+
+if test "$DX_FLAG_doc$DX_PERL" = 1; then
+ if test "xperl" = "xdoxygen"; then
+ as_fn_error $? "perl not found - will not generate any doxygen documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - will not generate any doxygen documentation" >&5
+printf "%s\n" "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;}
+ fi
+ DX_FLAG_doc=0
+
+fi
+
+ :
+fi
+if test "$DX_FLAG_doc" = 1; then
+ DX_ENV="$DX_ENV PERL_PATH='$DX_PERL'"
+PERL_PATH=$DX_PERL
+
+ :
+else
+
+ :
+fi
+
+
+# Dot for graphics:
+
+
+
+ # Check whether --enable-doxygen-dot was given.
+if test ${enable_doxygen_dot+y}
+then :
+ enableval=$enable_doxygen_dot;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_dot=1
+
+
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-dot requires doxygen-doc" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_dot=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-dot" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_dot=0
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_dot=0
+
+
+
+fi
+
+if test "$DX_FLAG_dot" = 1; then
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dot", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dot; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_DOT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_DOT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_DOT="$DX_DOT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_DOT="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_DOT=$ac_cv_path_DX_DOT
+if test -n "$DX_DOT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_DOT" >&5
+printf "%s\n" "$DX_DOT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_DOT"; then
+ ac_pt_DX_DOT=$DX_DOT
+ # Extract the first word of "dot", so it can be a program name with args.
+set dummy dot; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_DOT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_DOT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_DOT="$ac_pt_DX_DOT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_DOT="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_DOT=$ac_cv_path_ac_pt_DX_DOT
+if test -n "$ac_pt_DX_DOT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOT" >&5
+printf "%s\n" "$ac_pt_DX_DOT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_DOT" = x; then
+ DX_DOT=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_DOT=$ac_pt_DX_DOT
+ fi
+else
+ DX_DOT="$ac_cv_path_DX_DOT"
+fi
+
+if test "$DX_FLAG_dot$DX_DOT" = 1; then
+ if test "xdot" = "xdoxygen"; then
+ as_fn_error $? "dot not found - will not generate graphics for doxygen documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5
+printf "%s\n" "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;}
+ fi
+ DX_FLAG_dot=0
+
+fi
+
+ :
+fi
+if test "$DX_FLAG_dot" = 1; then
+ DX_ENV="$DX_ENV HAVE_DOT='YES'"
+HAVE_DOT=YES
+
+ DX_ENV="$DX_ENV DOT_PATH='`expr ".$DX_DOT" : '\(\.\)[^/]*$' \| "x$DX_DOT" : 'x\(.*\)/[^/]*$'`'"
+DOT_PATH=`expr ".$DX_DOT" : '\(\.\)[^/]*$' \| "x$DX_DOT" : 'x\(.*\)/[^/]*$'`
+
+ :
+else
+ DX_ENV="$DX_ENV HAVE_DOT='NO'"
+HAVE_DOT=NO
+
+ :
+fi
+
+
+# Man pages generation:
+
+
+
+ # Check whether --enable-doxygen-man was given.
+if test ${enable_doxygen_man+y}
+then :
+ enableval=$enable_doxygen_man;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_man=1
+
+
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-man requires doxygen-doc" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_man=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-man" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_man=0
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_man=0
+
+
+
+fi
+
+if test "$DX_FLAG_man" = 1; then
+
+ :
+fi
+if test "$DX_FLAG_man" = 1; then
+ DX_ENV="$DX_ENV GENERATE_MAN='YES'"
+GENERATE_MAN=YES
+
+ :
+else
+ DX_ENV="$DX_ENV GENERATE_MAN='NO'"
+GENERATE_MAN=NO
+
+ :
+fi
+
+
+# RTF file generation:
+
+
+
+ # Check whether --enable-doxygen-rtf was given.
+if test ${enable_doxygen_rtf+y}
+then :
+ enableval=$enable_doxygen_rtf;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_rtf=1
+
+
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-rtf requires doxygen-doc" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_rtf=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-rtf" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_rtf=0
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_rtf=0
+
+
+
+fi
+
+if test "$DX_FLAG_rtf" = 1; then
+
+ :
+fi
+if test "$DX_FLAG_rtf" = 1; then
+ DX_ENV="$DX_ENV GENERATE_RTF='YES'"
+GENERATE_RTF=YES
+
+ :
+else
+ DX_ENV="$DX_ENV GENERATE_RTF='NO'"
+GENERATE_RTF=NO
+
+ :
+fi
+
+
+# XML file generation:
+
+
+
+ # Check whether --enable-doxygen-xml was given.
+if test ${enable_doxygen_xml+y}
+then :
+ enableval=$enable_doxygen_xml;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_xml=1
+
+
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-xml requires doxygen-doc" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_xml=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-xml" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_xml=0
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_xml=0
+
+
+
+fi
+
+if test "$DX_FLAG_xml" = 1; then
+
+ :
+fi
+if test "$DX_FLAG_xml" = 1; then
+ DX_ENV="$DX_ENV GENERATE_XML='YES'"
+GENERATE_XML=YES
+
+ :
+else
+ DX_ENV="$DX_ENV GENERATE_XML='NO'"
+GENERATE_XML=NO
+
+ :
+fi
+
+
+# (Compressed) HTML help generation:
+
+ # Check whether --enable-doxygen-chm was given.
+if test ${enable_doxygen_chm+y}
+then :
+ enableval=$enable_doxygen_chm;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_chm=1
-ac_config_files="$ac_config_files libevent.pc libevent_openssl.pc libevent_pthreads.pc"
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-chm requires doxygen-doc" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_chm=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-chm" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_chm=0
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_chm=0
+
+
+
+fi
+
+if test "$DX_FLAG_chm" = 1; then
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}hhc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}hhc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_HHC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_HHC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_HHC="$DX_HHC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_HHC="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_HHC=$ac_cv_path_DX_HHC
+if test -n "$DX_HHC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_HHC" >&5
+printf "%s\n" "$DX_HHC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_HHC"; then
+ ac_pt_DX_HHC=$DX_HHC
+ # Extract the first word of "hhc", so it can be a program name with args.
+set dummy hhc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_HHC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_HHC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_HHC="$ac_pt_DX_HHC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_HHC="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_HHC=$ac_cv_path_ac_pt_DX_HHC
+if test -n "$ac_pt_DX_HHC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_HHC" >&5
+printf "%s\n" "$ac_pt_DX_HHC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_HHC" = x; then
+ DX_HHC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_HHC=$ac_pt_DX_HHC
+ fi
+else
+ DX_HHC="$ac_cv_path_DX_HHC"
+fi
+
+if test "$DX_FLAG_chm$DX_HHC" = 1; then
+ if test "xhhc" = "xdoxygen"; then
+ as_fn_error $? "hhc not found - will not generate doxygen compressed HTML help documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5
+printf "%s\n" "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;}
+ fi
+ DX_FLAG_chm=0
+
+fi
+
+ :
+fi
+if test "$DX_FLAG_chm" = 1; then
+ DX_ENV="$DX_ENV HHC_PATH='$DX_HHC'"
+HHC_PATH=$DX_HHC
+
+ DX_ENV="$DX_ENV GENERATE_HTML='YES'"
+GENERATE_HTML=YES
+
+ DX_ENV="$DX_ENV GENERATE_HTMLHELP='YES'"
+GENERATE_HTMLHELP=YES
+
+ :
+else
+ DX_ENV="$DX_ENV GENERATE_HTMLHELP='NO'"
+GENERATE_HTMLHELP=NO
+
+ :
+fi
+
+
+# Separate CHI file generation.
+
+
+
+ # Check whether --enable-doxygen-chi was given.
+if test ${enable_doxygen_chi+y}
+then :
+ enableval=$enable_doxygen_chi;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_chi=1
+
+
+test "$DX_FLAG_chm" = "1" \
+|| as_fn_error $? "doxygen-chi requires doxygen-chm" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_chi=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-chi" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_chi=0
+
+
+test "$DX_FLAG_chm" = "1" || DX_FLAG_chi=0
+
+
+
+fi
+
+if test "$DX_FLAG_chi" = 1; then
+
+ :
+fi
+if test "$DX_FLAG_chi" = 1; then
+ DX_ENV="$DX_ENV GENERATE_CHI='YES'"
+GENERATE_CHI=YES
+
+ :
+else
+ DX_ENV="$DX_ENV GENERATE_CHI='NO'"
+GENERATE_CHI=NO
+
+ :
+fi
+
+
+# Plain HTML pages generation:
+
+
+
+ # Check whether --enable-doxygen-html was given.
+if test ${enable_doxygen_html+y}
+then :
+ enableval=$enable_doxygen_html;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_html=1
+
+
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-html requires doxygen-doc" "$LINENO" 5
+
+test "$DX_FLAG_chm" = "0" \
+|| as_fn_error $? "doxygen-html contradicts doxygen-chm" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_html=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-html" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_html=1
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_html=0
+
+
+test "$DX_FLAG_chm" = "0" || DX_FLAG_html=0
+
+
+
+fi
+
+if test "$DX_FLAG_html" = 1; then
+
+ :
+fi
+if test "$DX_FLAG_html" = 1; then
+ DX_ENV="$DX_ENV GENERATE_HTML='YES'"
+GENERATE_HTML=YES
+
+ :
+else
+ test "$DX_FLAG_chm" = 1 || DX_ENV="$DX_ENV GENERATE_HTML='NO'"
+GENERATE_HTML=NO
+
+ :
+fi
+
+
+# PostScript file generation:
+
+
+
+ # Check whether --enable-doxygen-ps was given.
+if test ${enable_doxygen_ps+y}
+then :
+ enableval=$enable_doxygen_ps;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_ps=1
+
+
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-ps requires doxygen-doc" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_ps=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-ps" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_ps=0
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_ps=0
+
+
+
+fi
+
+if test "$DX_FLAG_ps" = 1; then
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}latex", so it can be a program name with args.
+set dummy ${ac_tool_prefix}latex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_LATEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_LATEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_LATEX="$DX_LATEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_LATEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_LATEX=$ac_cv_path_DX_LATEX
+if test -n "$DX_LATEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_LATEX" >&5
+printf "%s\n" "$DX_LATEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_LATEX"; then
+ ac_pt_DX_LATEX=$DX_LATEX
+ # Extract the first word of "latex", so it can be a program name with args.
+set dummy latex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_LATEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_LATEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_LATEX="$ac_pt_DX_LATEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_LATEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_LATEX=$ac_cv_path_ac_pt_DX_LATEX
+if test -n "$ac_pt_DX_LATEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_LATEX" >&5
+printf "%s\n" "$ac_pt_DX_LATEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_LATEX" = x; then
+ DX_LATEX=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_LATEX=$ac_pt_DX_LATEX
+ fi
+else
+ DX_LATEX="$ac_cv_path_DX_LATEX"
+fi
+
+if test "$DX_FLAG_ps$DX_LATEX" = 1; then
+ if test "xlatex" = "xdoxygen"; then
+ as_fn_error $? "latex not found - will not generate doxygen PostScript documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: latex not found - will not generate doxygen PostScript documentation" >&5
+printf "%s\n" "$as_me: WARNING: latex not found - will not generate doxygen PostScript documentation" >&2;}
+ fi
+ DX_FLAG_ps=0
+
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args.
+set dummy ${ac_tool_prefix}makeindex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_MAKEINDEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_MAKEINDEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX
+if test -n "$DX_MAKEINDEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5
+printf "%s\n" "$DX_MAKEINDEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_MAKEINDEX"; then
+ ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX
+ # Extract the first word of "makeindex", so it can be a program name with args.
+set dummy makeindex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_MAKEINDEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_MAKEINDEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX
+if test -n "$ac_pt_DX_MAKEINDEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5
+printf "%s\n" "$ac_pt_DX_MAKEINDEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_MAKEINDEX" = x; then
+ DX_MAKEINDEX=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX
+ fi
+else
+ DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX"
+fi
+
+if test "$DX_FLAG_ps$DX_MAKEINDEX" = 1; then
+ if test "xmakeindex" = "xdoxygen"; then
+ as_fn_error $? "makeindex not found - will not generate doxygen PostScript documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5
+printf "%s\n" "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;}
+ fi
+ DX_FLAG_ps=0
+
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dvips", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dvips; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_DVIPS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_DVIPS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_DVIPS="$DX_DVIPS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_DVIPS="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_DVIPS=$ac_cv_path_DX_DVIPS
+if test -n "$DX_DVIPS"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_DVIPS" >&5
+printf "%s\n" "$DX_DVIPS" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_DVIPS"; then
+ ac_pt_DX_DVIPS=$DX_DVIPS
+ # Extract the first word of "dvips", so it can be a program name with args.
+set dummy dvips; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_DVIPS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_DVIPS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_DVIPS="$ac_pt_DX_DVIPS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_DVIPS="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_DVIPS=$ac_cv_path_ac_pt_DX_DVIPS
+if test -n "$ac_pt_DX_DVIPS"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DVIPS" >&5
+printf "%s\n" "$ac_pt_DX_DVIPS" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_DVIPS" = x; then
+ DX_DVIPS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_DVIPS=$ac_pt_DX_DVIPS
+ fi
+else
+ DX_DVIPS="$ac_cv_path_DX_DVIPS"
+fi
+
+if test "$DX_FLAG_ps$DX_DVIPS" = 1; then
+ if test "xdvips" = "xdoxygen"; then
+ as_fn_error $? "dvips not found - will not generate doxygen PostScript documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5
+printf "%s\n" "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;}
+ fi
+ DX_FLAG_ps=0
+
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args.
+set dummy ${ac_tool_prefix}egrep; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_EGREP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_EGREP="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_EGREP=$ac_cv_path_DX_EGREP
+if test -n "$DX_EGREP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5
+printf "%s\n" "$DX_EGREP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_EGREP"; then
+ ac_pt_DX_EGREP=$DX_EGREP
+ # Extract the first word of "egrep", so it can be a program name with args.
+set dummy egrep; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_EGREP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_EGREP="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP
+if test -n "$ac_pt_DX_EGREP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5
+printf "%s\n" "$ac_pt_DX_EGREP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_EGREP" = x; then
+ DX_EGREP=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_EGREP=$ac_pt_DX_EGREP
+ fi
+else
+ DX_EGREP="$ac_cv_path_DX_EGREP"
+fi
+
+if test "$DX_FLAG_ps$DX_EGREP" = 1; then
+ if test "xegrep" = "xdoxygen"; then
+ as_fn_error $? "egrep not found - will not generate doxygen PostScript documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5
+printf "%s\n" "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;}
+ fi
+ DX_FLAG_ps=0
+
+fi
+
+ :
+fi
+if test "$DX_FLAG_ps" = 1; then
+
+ :
+else
+
+ :
+fi
+
+
+# PDF file generation:
+
+
+
+ # Check whether --enable-doxygen-pdf was given.
+if test ${enable_doxygen_pdf+y}
+then :
+ enableval=$enable_doxygen_pdf;
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ DX_FLAG_pdf=1
+
+
+test "$DX_FLAG_doc" = "1" \
+|| as_fn_error $? "doxygen-pdf requires doxygen-doc" "$LINENO" 5
+
+;; #(
+n|N|no|No|NO)
+ DX_FLAG_pdf=0
+
+;; #(
+*)
+ as_fn_error $? "invalid value '$enableval' given to doxygen-pdf" "$LINENO" 5
+;;
+esac
+
+else $as_nop
+
+DX_FLAG_pdf=0
+
+
+test "$DX_FLAG_doc" = "1" || DX_FLAG_pdf=0
+
+
+
+fi
+
+if test "$DX_FLAG_pdf" = 1; then
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pdflatex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_PDFLATEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_PDFLATEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_PDFLATEX="$DX_PDFLATEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_PDFLATEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_PDFLATEX=$ac_cv_path_DX_PDFLATEX
+if test -n "$DX_PDFLATEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_PDFLATEX" >&5
+printf "%s\n" "$DX_PDFLATEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_PDFLATEX"; then
+ ac_pt_DX_PDFLATEX=$DX_PDFLATEX
+ # Extract the first word of "pdflatex", so it can be a program name with args.
+set dummy pdflatex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_PDFLATEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_PDFLATEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_PDFLATEX="$ac_pt_DX_PDFLATEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_PDFLATEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_PDFLATEX=$ac_cv_path_ac_pt_DX_PDFLATEX
+if test -n "$ac_pt_DX_PDFLATEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PDFLATEX" >&5
+printf "%s\n" "$ac_pt_DX_PDFLATEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_PDFLATEX" = x; then
+ DX_PDFLATEX=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_PDFLATEX=$ac_pt_DX_PDFLATEX
+ fi
+else
+ DX_PDFLATEX="$ac_cv_path_DX_PDFLATEX"
+fi
+
+if test "$DX_FLAG_pdf$DX_PDFLATEX" = 1; then
+ if test "xpdflatex" = "xdoxygen"; then
+ as_fn_error $? "pdflatex not found - will not generate doxygen PDF documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5
+printf "%s\n" "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;}
+ fi
+ DX_FLAG_pdf=0
+
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args.
+set dummy ${ac_tool_prefix}makeindex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_MAKEINDEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_MAKEINDEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX
+if test -n "$DX_MAKEINDEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5
+printf "%s\n" "$DX_MAKEINDEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_MAKEINDEX"; then
+ ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX
+ # Extract the first word of "makeindex", so it can be a program name with args.
+set dummy makeindex; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_MAKEINDEX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_MAKEINDEX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX
+if test -n "$ac_pt_DX_MAKEINDEX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5
+printf "%s\n" "$ac_pt_DX_MAKEINDEX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_MAKEINDEX" = x; then
+ DX_MAKEINDEX=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX
+ fi
+else
+ DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX"
+fi
+
+if test "$DX_FLAG_pdf$DX_MAKEINDEX" = 1; then
+ if test "xmakeindex" = "xdoxygen"; then
+ as_fn_error $? "makeindex not found - will not generate doxygen PDF documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5
+printf "%s\n" "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;}
+ fi
+ DX_FLAG_pdf=0
+
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args.
+set dummy ${ac_tool_prefix}egrep; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_DX_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $DX_EGREP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_DX_EGREP="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DX_EGREP=$ac_cv_path_DX_EGREP
+if test -n "$DX_EGREP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5
+printf "%s\n" "$DX_EGREP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_DX_EGREP"; then
+ ac_pt_DX_EGREP=$DX_EGREP
+ # Extract the first word of "egrep", so it can be a program name with args.
+set dummy egrep; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_DX_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_DX_EGREP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_DX_EGREP="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP
+if test -n "$ac_pt_DX_EGREP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5
+printf "%s\n" "$ac_pt_DX_EGREP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_DX_EGREP" = x; then
+ DX_EGREP=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DX_EGREP=$ac_pt_DX_EGREP
+ fi
+else
+ DX_EGREP="$ac_cv_path_DX_EGREP"
+fi
+
+if test "$DX_FLAG_pdf$DX_EGREP" = 1; then
+ if test "xegrep" = "xdoxygen"; then
+ as_fn_error $? "egrep not found - will not generate doxygen PDF documentation" "$LINENO" 5
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5
+printf "%s\n" "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;}
+ fi
+ DX_FLAG_pdf=0
+
+fi
+
+ :
+fi
+if test "$DX_FLAG_pdf" = 1; then
+
+ :
+else
+
+ :
+fi
+
+
+# LaTeX generation for PS and/or PDF:
+if test "$DX_FLAG_ps" = 1 || test "$DX_FLAG_pdf" = 1; then
+ DX_ENV="$DX_ENV GENERATE_LATEX='YES'"
+GENERATE_LATEX=YES
+
+else
+ DX_ENV="$DX_ENV GENERATE_LATEX='NO'"
+GENERATE_LATEX=NO
+
+fi
+
+# Paper size for PS and/or PDF:
+
+case "$DOXYGEN_PAPER_SIZE" in
+#(
+"")
+ DOXYGEN_PAPER_SIZE=""
+
+;; #(
+a4wide|a4|letter|legal|executive)
+ DX_ENV="$DX_ENV PAPER_SIZE='$DOXYGEN_PAPER_SIZE'"
+PAPER_SIZE=$DOXYGEN_PAPER_SIZE
+
+;; #(
+*)
+ as_fn_error $? "unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" "$LINENO" 5
+;;
+esac
+
+# Rules:
+if test $DX_FLAG_html -eq 1
+then :
+ DX_SNIPPET_html="## ------------------------------- ##
+## Rules specific for HTML output. ##
+## ------------------------------- ##
+
+DX_CLEAN_HTML = \$(DX_DOCDIR)/html\\
+ \$(DX_DOCDIR)/html
+
+"
+else $as_nop
+ DX_SNIPPET_html=""
+fi
+if test $DX_FLAG_chi -eq 1
+then :
+ DX_SNIPPET_chi="
+DX_CLEAN_CHI = \$(DX_DOCDIR)/\$(PACKAGE).chi\\
+ \$(DX_DOCDIR)/\$(PACKAGE).chi"
+else $as_nop
+ DX_SNIPPET_chi=""
+fi
+if test $DX_FLAG_chm -eq 1
+then :
+ DX_SNIPPET_chm="## ------------------------------ ##
+## Rules specific for CHM output. ##
+## ------------------------------ ##
+
+DX_CLEAN_CHM = \$(DX_DOCDIR)/chm\\
+ \$(DX_DOCDIR)/chm\
+${DX_SNIPPET_chi}
+
+"
+else $as_nop
+ DX_SNIPPET_chm=""
+fi
+if test $DX_FLAG_man -eq 1
+then :
+ DX_SNIPPET_man="## ------------------------------ ##
+## Rules specific for MAN output. ##
+## ------------------------------ ##
+
+DX_CLEAN_MAN = \$(DX_DOCDIR)/man\\
+ \$(DX_DOCDIR)/man
+
+"
+else $as_nop
+ DX_SNIPPET_man=""
+fi
+if test $DX_FLAG_rtf -eq 1
+then :
+ DX_SNIPPET_rtf="## ------------------------------ ##
+## Rules specific for RTF output. ##
+## ------------------------------ ##
+
+DX_CLEAN_RTF = \$(DX_DOCDIR)/rtf\\
+ \$(DX_DOCDIR)/rtf
+
+"
+else $as_nop
+ DX_SNIPPET_rtf=""
+fi
+if test $DX_FLAG_xml -eq 1
+then :
+ DX_SNIPPET_xml="## ------------------------------ ##
+## Rules specific for XML output. ##
+## ------------------------------ ##
+
+DX_CLEAN_XML = \$(DX_DOCDIR)/xml\\
+ \$(DX_DOCDIR)/xml
+
+"
+else $as_nop
+ DX_SNIPPET_xml=""
+fi
+if test $DX_FLAG_ps -eq 1
+then :
+ DX_SNIPPET_ps="## ----------------------------- ##
+## Rules specific for PS output. ##
+## ----------------------------- ##
+
+DX_CLEAN_PS = \$(DX_DOCDIR)/\$(PACKAGE).ps\\
+ \$(DX_DOCDIR)/\$(PACKAGE).ps
+
+DX_PS_GOAL = doxygen-ps
+
+doxygen-ps: \$(DX_CLEAN_PS)
+
+\$(DX_DOCDIR)/\$(PACKAGE).ps: \$(DX_DOCDIR)/\$(PACKAGE).tag
+ \$(DX_V_LATEX)cd \$(DX_DOCDIR)/latex; \\
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\
+ \$(DX_LATEX) refman.tex; \\
+ \$(DX_MAKEINDEX) refman.idx; \\
+ \$(DX_LATEX) refman.tex; \\
+ countdown=5; \\
+ while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\
+ refman.log > /dev/null 2>&1 \\
+ && test \$\$countdown -gt 0; do \\
+ \$(DX_LATEX) refman.tex; \\
+ countdown=\`expr \$\$countdown - 1\`; \\
+ done; \\
+ \$(DX_DVIPS) -o ../\$(PACKAGE).ps refman.dvi
+
+"
+else $as_nop
+ DX_SNIPPET_ps=""
+fi
+if test $DX_FLAG_pdf -eq 1
+then :
+ DX_SNIPPET_pdf="## ------------------------------ ##
+## Rules specific for PDF output. ##
+## ------------------------------ ##
+
+DX_CLEAN_PDF = \$(DX_DOCDIR)/\$(PACKAGE).pdf\\
+ \$(DX_DOCDIR)/\$(PACKAGE).pdf
+
+DX_PDF_GOAL = doxygen-pdf
+
+doxygen-pdf: \$(DX_CLEAN_PDF)
+
+\$(DX_DOCDIR)/\$(PACKAGE).pdf: \$(DX_DOCDIR)/\$(PACKAGE).tag
+ \$(DX_V_LATEX)cd \$(DX_DOCDIR)/latex; \\
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ \$(DX_MAKEINDEX) refman.idx; \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ countdown=5; \\
+ while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\
+ refman.log > /dev/null 2>&1 \\
+ && test \$\$countdown -gt 0; do \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ countdown=\`expr \$\$countdown - 1\`; \\
+ done; \\
+ mv refman.pdf ../\$(PACKAGE).pdf
+
+"
+else $as_nop
+ DX_SNIPPET_pdf=""
+fi
+if test $DX_FLAG_ps -eq 1 -o $DX_FLAG_pdf -eq 1
+then :
+ DX_SNIPPET_latex="## ------------------------------------------------- ##
+## Rules specific for LaTeX (shared for PS and PDF). ##
+## ------------------------------------------------- ##
+
+DX_V_LATEX = \$(_DX_v_LATEX_\$(V))
+_DX_v_LATEX_ = \$(_DX_v_LATEX_\$(AM_DEFAULT_VERBOSITY))
+_DX_v_LATEX_0 = @echo \" LATEX \" \$@;
+
+DX_CLEAN_LATEX = \$(DX_DOCDIR)/latex\\
+ \$(DX_DOCDIR)/latex
+
+"
+else $as_nop
+ DX_SNIPPET_latex=""
+fi
+
+if test $DX_FLAG_doc -eq 1
+then :
+ DX_SNIPPET_doc="## --------------------------------- ##
+## Format-independent Doxygen rules. ##
+## --------------------------------- ##
+
+${DX_SNIPPET_html}\
+${DX_SNIPPET_chm}\
+${DX_SNIPPET_man}\
+${DX_SNIPPET_rtf}\
+${DX_SNIPPET_xml}\
+${DX_SNIPPET_ps}\
+${DX_SNIPPET_pdf}\
+${DX_SNIPPET_latex}\
+DX_V_DXGEN = \$(_DX_v_DXGEN_\$(V))
+_DX_v_DXGEN_ = \$(_DX_v_DXGEN_\$(AM_DEFAULT_VERBOSITY))
+_DX_v_DXGEN_0 = @echo \" DXGEN \" \$<;
+
+.PHONY: doxygen-run doxygen-doc \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+.INTERMEDIATE: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+doxygen-run: \$(DX_DOCDIR)/\$(PACKAGE).tag
+
+doxygen-doc: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+\$(DX_DOCDIR)/\$(PACKAGE).tag: \$(DX_CONFIG) \$(pkginclude_HEADERS)
+ \$(A""M_V_at)rm -rf \$(DX_DOCDIR)
+ \$(DX_V_DXGEN)\$(DX_ENV) DOCDIR=\$(DX_DOCDIR) \$(DX_DOXYGEN) \$(DX_CONFIG)
+ \$(A""M_V_at)echo Timestamp >\$@
+
+DX_CLEANFILES = \\
+ \$(DX_DOCDIR)/doxygen_sqlite3.db \\
+ \$(DX_DOCDIR)/\$(PACKAGE).tag \\
+ -r \\
+ \$(DX_CLEAN_HTML) \\
+ \$(DX_CLEAN_CHM) \\
+ \$(DX_CLEAN_CHI) \\
+ \$(DX_CLEAN_MAN) \\
+ \$(DX_CLEAN_RTF) \\
+ \$(DX_CLEAN_XML) \\
+ \$(DX_CLEAN_PS) \\
+ \$(DX_CLEAN_PDF) \\
+ \$(DX_CLEAN_LATEX)
+DX_INSTALL_DOCS = \\
+ \$(DX_CLEAN_HTML) \\
+ \$(DX_CLEAN_CHM) \\
+ \$(DX_CLEAN_CHI) \\
+ \$(DX_CLEAN_RTF) \\
+ \$(DX_CLEAN_XML) \\
+ \$(DX_CLEAN_PS) \\
+ \$(DX_CLEAN_PDF) \\
+ \$(DX_CLEAN_LATEX)
+ "
+else $as_nop
+ DX_SNIPPET_doc=""
+fi
+DX_RULES="${DX_SNIPPET_doc}"
+
+
+#For debugging:
+#echo DX_FLAG_doc=$DX_FLAG_doc
+#echo DX_FLAG_dot=$DX_FLAG_dot
+#echo DX_FLAG_man=$DX_FLAG_man
+#echo DX_FLAG_html=$DX_FLAG_html
+#echo DX_FLAG_chm=$DX_FLAG_chm
+#echo DX_FLAG_chi=$DX_FLAG_chi
+#echo DX_FLAG_rtf=$DX_FLAG_rtf
+#echo DX_FLAG_xml=$DX_FLAG_xml
+#echo DX_FLAG_pdf=$DX_FLAG_pdf
+#echo DX_FLAG_ps=$DX_FLAG_ps
+#echo DX_ENV=$DX_ENV
+
+
+ if test "$DX_FLAG_doc" = "1"; then
+ ENABLE_DOXYGEN_TRUE=
+ ENABLE_DOXYGEN_FALSE='#'
+else
+ ENABLE_DOXYGEN_TRUE='#'
+ ENABLE_DOXYGEN_FALSE=
+fi
+
+ if test "$DX_FLAG_man" = "1"; then
+ ENABLE_DOXYGEN_MAN_TRUE=
+ ENABLE_DOXYGEN_MAN_FALSE='#'
+else
+ ENABLE_DOXYGEN_MAN_TRUE='#'
+ ENABLE_DOXYGEN_MAN_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files libevent.pc libevent_openssl.pc libevent_pthreads.pc libevent_core.pc libevent_extra.pc"
ac_config_files="$ac_config_files Makefile"
@@ -16155,8 +20012,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -16186,15 +20043,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -16208,8 +20065,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -16226,7 +20083,7 @@ U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -16237,14 +20094,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -16285,6 +20142,10 @@ if test -z "${BUILD_CYGWIN_TRUE}" && test -z "${BUILD_CYGWIN_FALSE}"; then
as_fn_error $? "conditional \"BUILD_CYGWIN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${BUILD_MIDIPIX_TRUE}" && test -z "${BUILD_MIDIPIX_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_MIDIPIX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_WITH_NO_UNDEFINED_TRUE}" && test -z "${BUILD_WITH_NO_UNDEFINED_FALSE}"; then
as_fn_error $? "conditional \"BUILD_WITH_NO_UNDEFINED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16321,6 +20182,10 @@ if test -z "${SIGNAL_SUPPORT_TRUE}" && test -z "${SIGNAL_SUPPORT_FALSE}"; then
as_fn_error $? "conditional \"SIGNAL_SUPPORT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${THREADS_TRUE}" && test -z "${THREADS_FALSE}"; then
+ as_fn_error $? "conditional \"THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
as_fn_error $? "conditional \"PTHREADS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16333,13 +20198,21 @@ if test -z "${INSTALL_LIBEVENT_TRUE}" && test -z "${INSTALL_LIBEVENT_FALSE}"; th
as_fn_error $? "conditional \"INSTALL_LIBEVENT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_DOXYGEN_TRUE}" && test -z "${ENABLE_DOXYGEN_FALSE}"; then
+ as_fn_error $? "conditional \"ENABLE_DOXYGEN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_DOXYGEN_MAN_TRUE}" && test -z "${ENABLE_DOXYGEN_MAN_FALSE}"; then
+ as_fn_error $? "conditional \"ENABLE_DOXYGEN_MAN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -16362,14 +20235,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else
+else $as_nop
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
@@ -16379,46 +20254,46 @@ esac
fi
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -16427,13 +20302,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
@@ -16442,8 +20310,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -16455,30 +20327,10 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -16491,13 +20343,14 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
+
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -16524,18 +20377,20 @@ as_fn_unset ()
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
+
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
-else
+else $as_nop
as_fn_append ()
{
eval $1=\$$1\$2
@@ -16547,12 +20402,13 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
-else
+else $as_nop
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
@@ -16583,7 +20439,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -16605,6 +20461,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
@@ -16618,6 +20478,12 @@ case `echo -n x` in #(((((
ECHO_N='-n';;
esac
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -16659,7 +20525,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -16668,7 +20534,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -16730,8 +20596,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libevent $as_me 2.1.5-beta, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by libevent $as_me 2.1.12-stable, which was
+generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -16793,14 +20659,16 @@ $config_commands
Report bugs to the package provider."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-libevent config.status 2.1.5-beta
-configured by $0, generated by GNU Autoconf 2.69,
+libevent config.status 2.1.12-stable
+configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -16840,15 +20708,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -16856,7 +20724,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -16865,7 +20733,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -16893,7 +20761,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -16907,7 +20775,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -16915,7 +20783,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -17215,6 +21083,8 @@ do
"libevent.pc") CONFIG_FILES="$CONFIG_FILES libevent.pc" ;;
"libevent_openssl.pc") CONFIG_FILES="$CONFIG_FILES libevent_openssl.pc" ;;
"libevent_pthreads.pc") CONFIG_FILES="$CONFIG_FILES libevent_pthreads.pc" ;;
+ "libevent_core.pc") CONFIG_FILES="$CONFIG_FILES libevent_core.pc" ;;
+ "libevent_extra.pc") CONFIG_FILES="$CONFIG_FILES libevent_extra.pc" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -17227,9 +21097,9 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -17565,7 +21435,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -17573,17 +21443,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -17600,7 +21470,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -17624,9 +21494,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -17688,8 +21558,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -17733,9 +21603,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -17751,20 +21621,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" >&1 \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
@@ -17784,7 +21654,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$_am_arg" : 'X\(//\)[^/]' \| \
X"$_am_arg" : 'X\(//\)$' \| \
X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
+printf "%s\n" X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -17804,8 +21674,8 @@ $as_echo X"$_am_arg" |
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -17815,29 +21685,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -17855,53 +21731,50 @@ $as_echo X"$mf" |
q
}
s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "$am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
- /^X\(\/\/\)$/{
+ /^X\/\(\/\/\)$/{
s//\1/
q
}
- /^X\(\/\).*/{
+ /^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
}
;;
"libtool":C)
@@ -18432,6 +22305,7 @@ _LT_EOF
esac
+
ltmain=$ac_aux_dir/ltmain.sh
@@ -18481,7 +22355,8 @@ if test "$no_create" != yes; then
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/contrib/ntp/sntp/libevent/configure.ac b/contrib/ntp/sntp/libevent/configure.ac
index 5cb7f678be00..d00e063a1474 100644
--- a/contrib/ntp/sntp/libevent/configure.ac
+++ b/contrib/ntp/sntp/libevent/configure.ac
@@ -5,31 +5,23 @@ dnl See LICENSE for copying information.
dnl
dnl Original version Dug Song <dugsong@monkey.org>
-AC_INIT(libevent,2.1.5-beta)
-AC_PREREQ(2.59)
+AC_INIT(libevent,2.1.12-stable)
+AC_PREREQ(2.67)
AC_CONFIG_SRCDIR(event.c)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
dnl AM_SILENT_RULES req. automake 1.11. [no] defaults V=1
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS(config.h evconfig-private.h:evconfig-private.h.in)
-AC_DEFINE(NUMERIC_VERSION, 0x02010500, [Numeric representation of the version])
+AC_DEFINE(NUMERIC_VERSION, 0x02010c00, [Numeric representation of the version])
dnl Initialize prefix.
-if test "$prefix" = "NONE"; then
- prefix="/usr/local"
-fi
+AC_PREFIX_DEFAULT([/usr/local])
dnl Try and get a full POSIX environment on obscure systems
-ifdef([AC_USE_SYSTEM_EXTENSIONS], [
AC_USE_SYSTEM_EXTENSIONS
-], [
-AC_AIX
-AC_GNU_SOURCE
-AC_MINIX
-])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
@@ -49,11 +41,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S
# AC_PROG_MKDIR_P - $(MKDIR_P) should be defined by AM_INIT_AUTOMAKE
-# AC_PROG_SED is only available in Autoconf >= 2.59b; workaround for older
-# versions
-ifdef([AC_PROG_SED], [AC_PROG_SED], [
-AC_CHECK_PROGS(SED, [gsed sed])
-])
+AC_PROG_SED
AC_PROG_GCC_TRADITIONAL
@@ -75,13 +63,14 @@ if test "$GCC" = "yes" ; then
fi
# OS X Lion started deprecating the system openssl. Let's just disable
-# all deprecation warnings on OS X.
-case "$host_os" in
-
- darwin*)
- CFLAGS="$CFLAGS -Wno-deprecated-declarations"
- ;;
-esac
+# all deprecation warnings on OS X; but do so only for gcc...
+if test "$GCC" = "yes" ; then
+ case "$host_os" in
+ darwin*)
+ CFLAGS="$CFLAGS -Wno-deprecated-declarations"
+ ;;
+ esac
+fi
AC_ARG_ENABLE(gcc-warnings,
AS_HELP_STRING(--disable-gcc-warnings, disable verbose warnings with GCC))
@@ -121,9 +110,13 @@ AC_ARG_ENABLE([function-sections],
AC_ARG_ENABLE([verbose-debug],
AS_HELP_STRING([--enable-verbose-debug, verbose debug logging]),
[], [enable_verbose_debug=no])
+AC_ARG_ENABLE([clock-gettime],
+ AS_HELP_STRING(--disable-clock-gettime, do not use clock_gettime even if it is available),
+ [], [enable_clock_gettime=yes])
-AC_PROG_LIBTOOL
+LT_PREREQ([2.4.2])
+LT_INIT
dnl Uncomment "AC_DISABLE_SHARED" to make shared libraries not get
dnl built by default. You can also turn shared libs on and off from
@@ -138,33 +131,55 @@ dnl Checks for libraries.
AC_SEARCH_LIBS([inet_ntoa], [nsl])
AC_SEARCH_LIBS([socket], [socket])
AC_SEARCH_LIBS([inet_aton], [resolv])
-AC_SEARCH_LIBS([clock_gettime], [rt])
+if test "x$enable_clock_gettime" = "xyes"; then
+ AC_SEARCH_LIBS([clock_gettime], [rt])
+ AC_CHECK_FUNCS([clock_gettime])
+fi
AC_SEARCH_LIBS([sendfile], [sendfile])
dnl - check if the macro _WIN32 is defined on this compiler.
dnl - (this is how we check for a windows compiler)
AC_MSG_CHECKING(for WIN32)
-AC_TRY_COMPILE(,
- [
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [
#ifndef _WIN32
die horribly
#endif
- ],
- bwin32=true; AC_MSG_RESULT(yes),
- bwin32=false; AC_MSG_RESULT(no),
+ ]
+ )],
+ [bwin32=true; AC_MSG_RESULT(yes)],
+ [bwin32=false; AC_MSG_RESULT(no)]
+)
+
+dnl - check if the macro __midipix__ is defined on this compiler.
+dnl - (this is how we check for a midipix version of GCC)
+AC_MSG_CHECKING(for MIDIPIX)
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [
+#ifndef __midipix__
+die horribly
+#endif
+ ]
+ )],
+ [midipix=true; AC_MSG_RESULT(yes)],
+ [midipix=false; AC_MSG_RESULT(no)]
)
dnl - check if the macro __CYGWIN__ is defined on this compiler.
dnl - (this is how we check for a cygwin version of GCC)
AC_MSG_CHECKING(for CYGWIN)
-AC_TRY_COMPILE(,
- [
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [
#ifndef __CYGWIN__
die horribly
#endif
- ],
- cygwin=true; AC_MSG_RESULT(yes),
- cygwin=false; AC_MSG_RESULT(no),
+ ]
+ )],
+ [cygwin=true; AC_MSG_RESULT(yes)],
+ [cygwin=false; AC_MSG_RESULT(no)]
)
AC_CHECK_HEADERS([zlib.h])
@@ -207,10 +222,12 @@ AC_CHECK_HEADERS([ \
fcntl.h \
ifaddrs.h \
mach/mach_time.h \
+ mach/mach.h \
netdb.h \
netinet/in.h \
netinet/in6.h \
netinet/tcp.h \
+ sys/un.h \
poll.h \
port.h \
stdarg.h \
@@ -232,13 +249,21 @@ AC_CHECK_HEADERS([ \
sys/timerfd.h \
sys/uio.h \
sys/wait.h \
+ sys/random.h \
+ errno.h \
+ afunix.h \
])
-AC_CHECK_HEADERS(sys/sysctl.h, [], [], [
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-])
+case "${host_os}" in
+ linux*) ;;
+ *)
+ AC_CHECK_HEADERS(sys/sysctl.h, [], [], [
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ ])
+esac
+
if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
AC_EGREP_CPP(yes,
@@ -311,7 +336,7 @@ if test "x$ac_cv_header_sys_time_h" = "xyes"; then
fi
if test "x$ac_cv_header_sys_sysctl_h" = "xyes"; then
- AC_CHECK_DECLS([CTL_KERN, KERN_RANDOM, RANDOM_UUID, KERN_ARND], [], [],
+ AC_CHECK_DECLS([CTL_KERN, KERN_ARND], [], [],
[[#include <sys/types.h>
#include <sys/sysctl.h>]]
)
@@ -319,10 +344,11 @@ fi
AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
AM_CONDITIONAL(BUILD_CYGWIN, test x$cygwin = xtrue)
-AM_CONDITIONAL(BUILD_WITH_NO_UNDEFINED, test x$bwin32 = xtrue || test x$cygwin = xtrue)
+AM_CONDITIONAL(BUILD_MIDIPIX, test x$midipix = xtrue)
+AM_CONDITIONAL(BUILD_WITH_NO_UNDEFINED, test x$bwin32 = xtrue || test x$cygwin = xtrue || test x$midipix = xtrue)
if test x$bwin32 = xtrue; then
- AC_SEARCH_LIBS([getservbyname],[ws2_32])
+ AC_HAVE_LIBRARY([ws2_32])
fi
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -335,18 +361,14 @@ AC_CHECK_FUNCS([ \
accept4 \
arc4random \
arc4random_buf \
- clock_gettime \
+ arc4random_addrandom \
eventfd \
epoll_create1 \
fcntl \
getegid \
geteuid \
getifaddrs \
- getnameinfo \
- getprotobynumber \
gettimeofday \
- inet_ntop \
- inet_pton \
issetugid \
mach_absolute_time \
mmap \
@@ -370,9 +392,36 @@ AC_CHECK_FUNCS([ \
unsetenv \
usleep \
vasprintf \
+ getrandom \
])
+
+AS_IF([test x$bwin32 = xtrue],
+ AC_CHECK_FUNCS(_gmtime64_s, , [AC_CHECK_FUNCS(_gmtime64)])
+)
+
AM_CONDITIONAL(STRLCPY_IMPL, [test x"$ac_cv_func_strlcpy" = xno])
+m4_define([funcstochk],
+ [getnameinfo
+ getprotobynumber
+ getservbyname
+ inet_ntop
+ inet_pton]
+)
+
+AS_IF([test x$bwin32 = xtrue],
+ [AX_CHECK_DECLS_EX([funcstochk getaddrinfo],
+ [#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif])],
+ [AC_CHECK_FUNCS(m4_normalize(funcstochk))]
+)
+
+m4_undefine([funcstochk])
+
+dnl check getaddrinfo and gethostbyname_r for non-windows
+AS_IF([test x$bwin32 = xfalse], [
AC_CACHE_CHECK(
[for getaddrinfo],
[libevent_cv_getaddrinfo],
@@ -395,7 +444,6 @@ if test "$libevent_cv_getaddrinfo" = "yes" ; then
AC_DEFINE([HAVE_GETADDRINFO], [1], [Do we have getaddrinfo()?])
else
-AC_CHECK_FUNCS([getservbyname])
# Check for gethostbyname_r in all its glorious incompatible versions.
# (This is cut-and-pasted from Tor, which based its logic on
# Python's configure.in.)
@@ -419,27 +467,27 @@ AC_CHECK_FUNC(gethostbyname_r, [
[Define this if gethostbyname_r takes 6 arguments])
AC_MSG_RESULT(6)
], [
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <netdb.h>
], [
char *cp1, *cp2;
struct hostent *h1;
int i1, i2;
(void)gethostbyname_r(cp1,h1,cp2,i1,&i2);
- ], [
+ ])], [
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
[Define this if gethostbyname_r takes 5 arguments])
AC_MSG_RESULT(5)
- ], [
- AC_TRY_COMPILE([
+ ], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <netdb.h>
], [
char *cp1;
struct hostent *h1;
struct hostent_data hd;
(void) gethostbyname_r(cp1,h1,&hd);
- ], [
+ ])], [
AC_DEFINE(HAVE_GETHOSTBYNAME_R)
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
[Define this if gethostbyname_r takes 3 arguments])
@@ -453,11 +501,12 @@ AC_CHECK_FUNC(gethostbyname_r, [
])
fi
+]) dnl end of checking getaddrinfo and gethostbyname_r
AC_MSG_CHECKING(for F_SETFD in fcntl.h)
AC_EGREP_CPP(yes,
[
-#define _GNU_SOURCE
+#define _GNU_SOURCE 1
#include <fcntl.h>
#ifdef F_SETFD
yes
@@ -495,57 +544,64 @@ if test "x$ac_cv_header_sys_event_h" = "xyes"; then
AC_CHECK_FUNCS(kqueue, [havekqueue=yes], )
if test "x$havekqueue" = "xyes" ; then
AC_MSG_CHECKING(for working kqueue)
- AC_TRY_RUN(
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#include <sys/types.h>
#include <sys/time.h>
#include <sys/event.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
-
-int
-main(int argc, char **argv)
-{
+ ], [[
int kq;
int n;
- int fd[[2]];
+ int fd[2];
struct kevent ev;
struct timespec ts;
- char buf[[8000]];
+ char buf[80000];
if (pipe(fd) == -1)
- exit(1);
- if (fcntl(fd[[1]], F_SETFL, O_NONBLOCK) == -1)
- exit(1);
+ return 1;
+ if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
+ return 1;
- while ((n = write(fd[[1]], buf, sizeof(buf))) == sizeof(buf))
+ while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf))
;
- if ((kq = kqueue()) == -1)
- exit(1);
+ if ((kq = kqueue()) == -1)
+ return 1;
memset(&ev, 0, sizeof(ev));
- ev.ident = fd[[1]];
+ ev.ident = fd[1];
ev.filter = EVFILT_WRITE;
ev.flags = EV_ADD | EV_ENABLE;
n = kevent(kq, &ev, 1, NULL, 0, NULL);
if (n == -1)
- exit(1);
+ return 1;
- read(fd[[0]], buf, sizeof(buf));
+ read(fd[0], buf, sizeof(buf));
ts.tv_sec = 0;
ts.tv_nsec = 0;
n = kevent(kq, NULL, 0, &ev, 1, &ts);
if (n == -1 || n == 0)
- exit(1);
-
- exit(0);
-}, [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
- [Define if kqueue works correctly with pipes])
- havekqueue=yes
- ], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
+ return 1;
+
+ return 0;
+ ]]
+ )],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
+ [Define if kqueue works correctly with pipes])
+ havekqueue=yes
+ ], [AC_MSG_RESULT(no)], [AC_MSG_RESULT(no)]
+ )
fi
fi
AM_CONDITIONAL(KQUEUE_BACKEND, [test "x$havekqueue" = "xyes"])
@@ -561,7 +617,8 @@ fi
if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
if test "x$haveepoll" = "xno" ; then
AC_MSG_CHECKING(for epoll system call)
- AC_TRY_RUN(
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[
#include <stdint.h>
#include <sys/param.h>
#include <sys/types.h>
@@ -574,21 +631,21 @@ epoll_create(int size)
{
return (syscall(__NR_epoll_create, size));
}
-
-int
-main(int argc, char **argv)
-{
+ ]],[[
int epfd;
epfd = epoll_create(256);
- exit (epfd == -1 ? 1 : 0);
-}, [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_EPOLL, 1,
- [Define if your system supports the epoll system calls])
- needsignal=yes
- have_epoll=yes
- AC_LIBOBJ(epoll_sub)
- ], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
+ return (epfd == -1 ? 1 : 0);
+ ]]
+ )],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_EPOLL, 1,
+ [Define if your system supports the epoll system calls])
+ needsignal=yes
+ have_epoll=yes
+ AC_LIBOBJ(epoll_sub)
+ ], [AC_MSG_RESULT(no)], [AC_MSG_RESULT(no)]
+ )
fi
fi
AM_CONDITIONAL(EPOLL_BACKEND, [test "x$haveepoll" = "xyes"])
@@ -637,9 +694,10 @@ AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(time_t)
-AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
-[#define _GNU_SOURCE
+AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, struct sockaddr_un, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
+[#define _GNU_SOURCE 1
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -647,6 +705,9 @@ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrin
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -689,40 +750,54 @@ AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct s
#endif
])
-AC_CHECK_TYPES([struct so_linger],
-[#define HAVE_SO_LINGER], ,
+AC_CHECK_TYPES([struct linger],,,
[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
])
AC_MSG_CHECKING([for socklen_t])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
#include <sys/types.h>
- #include <sys/socket.h>],
- [socklen_t x;],
- AC_MSG_RESULT([yes]),
+ #ifdef _WIN32
+ #include <ws2tcpip.h>
+ #else
+ #include <sys/socket.h>
+ #endif
+ ],[socklen_t x;]
+ )],
+ [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_DEFINE(socklen_t, unsigned int,
- [Define to unsigned int if you dont have it])]
+ [Define to unsigned int if you dont have it])]
)
+# __func__/__FUNCTION__ is not a macros in general
AC_MSG_CHECKING([whether our compiler supports __func__])
-AC_TRY_COMPILE([],
- [ const char *cp = __func__; ],
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
- AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
- AC_TRY_COMPILE([],
- [ const char *cp = __FUNCTION__; ],
- AC_MSG_RESULT([yes])
- AC_DEFINE(__func__, __FUNCTION__,
- [Define to appropriate substitue if compiler doesnt have __func__]),
- AC_MSG_RESULT([no])
- AC_DEFINE(__func__, __FILE__,
- [Define to appropriate substitue if compiler doesnt have __func__])))
-
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [ const char *cp = __func__; ]
+ )],
+ [ AC_DEFINE(HAVE___func__, 1, [Define to 1 if compiler have __func__])
+ AC_MSG_RESULT([yes])
+ ],
+ [AC_MSG_RESULT([no])]
+)
+AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [ const char *cp = __FUNCTION__; ]
+ )],
+ [ AC_DEFINE(HAVE___FUNCTION__, 1, [Define to 1 if compiler have __FUNCTION__])
+ AC_MSG_RESULT([yes])
+ ],
+ [AC_MSG_RESULT([no])]
+)
# check if we can compile with pthreads
have_pthreads=no
@@ -737,7 +812,8 @@ if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
#include <pthread.h> ]
)
fi
-AM_CONDITIONAL([PTHREADS], [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"])
+AM_CONDITIONAL(THREADS, [test "$enable_thread_support" != "no"])
+AM_CONDITIONAL(PTHREADS, [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"])
# check if we should compile locking into the library
if test x$enable_thread_support = xno; then
@@ -789,7 +865,8 @@ if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then
#error
#endif])], have_clang=yes, have_clang=no)
- CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum"
+ # -W is the same as -Wextra
+ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wmissing-declarations -Wnested-externs -Wbad-function-cast"
if test x$enable_gcc_warnings = xyes; then
CFLAGS="$CFLAGS -Werror"
fi
@@ -822,7 +899,7 @@ if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then
# for minheap-internal.h related code.
CFLAGS="$CFLAGS -Wno-unused-function"
- # clang on macosx emits warnigns for each directory specified which
+ # clang on macosx emits warnings for each directory specified which
# isn't "used" generating a lot of build noise (typically 3 warnings
# per file
case "$host_os" in
@@ -912,9 +989,19 @@ AC_SUBST([LIBEVENT_GC_SECTIONS])
AM_CONDITIONAL([INSTALL_LIBEVENT], [test "$enable_libevent_install" = "yes"])
-AC_SUBST([LEP_CFLAGS])
-AC_SUBST([LEP_CPPFLAGS])
-AC_SUBST([LEP_LDFLAGS])
-
-AC_CONFIG_FILES( [libevent.pc libevent_openssl.pc libevent_pthreads.pc] )
+# Doxygen support
+DX_HTML_FEATURE(ON)
+DX_MAN_FEATURE(OFF)
+DX_RTF_FEATURE(OFF)
+DX_XML_FEATURE(OFF)
+DX_PDF_FEATURE(OFF)
+DX_PS_FEATURE(OFF)
+DX_CHM_FEATURE(OFF)
+DX_CHI_FEATURE(OFF)
+DX_INIT_DOXYGEN([libevent], [${top_srcdir}/Doxyfile], [doxygen])
+
+AM_CONDITIONAL([ENABLE_DOXYGEN], [test "$DX_FLAG_doc" = "1"])
+AM_CONDITIONAL([ENABLE_DOXYGEN_MAN], [test "$DX_FLAG_man" = "1"])
+
+AC_CONFIG_FILES( [libevent.pc libevent_openssl.pc libevent_pthreads.pc libevent_core.pc libevent_extra.pc] )
AC_OUTPUT(Makefile)
diff --git a/contrib/ntp/sntp/libevent/defer-internal.h b/contrib/ntp/sntp/libevent/defer-internal.h
index d8cf32f443a1..d6f80a1180aa 100644
--- a/contrib/ntp/sntp/libevent/defer-internal.h
+++ b/contrib/ntp/sntp/libevent/defer-internal.h
@@ -46,6 +46,7 @@ typedef void (*deferred_cb_fn)(struct event_callback *, void *);
@param cb The function to run when the struct event_callback executes.
@param arg The function's second argument.
*/
+EVENT2_EXPORT_SYMBOL
void event_deferred_cb_init_(struct event_callback *, ev_uint8_t, deferred_cb_fn, void *);
/**
Change the priority of a non-pending event_callback.
@@ -54,12 +55,14 @@ void event_deferred_cb_set_priority_(struct event_callback *, ev_uint8_t);
/**
Cancel a struct event_callback if it is currently scheduled in an event_base.
*/
+EVENT2_EXPORT_SYMBOL
void event_deferred_cb_cancel_(struct event_base *, struct event_callback *);
/**
Activate a struct event_callback if it is not currently scheduled in an event_base.
- Return true iff it was not previously scheduled.
+ Return true if it was not previously scheduled.
*/
+EVENT2_EXPORT_SYMBOL
int event_deferred_cb_schedule_(struct event_base *, struct event_callback *);
#ifdef __cplusplus
diff --git a/contrib/ntp/sntp/libevent/depcomp b/contrib/ntp/sntp/libevent/depcomp
new file mode 100755
index 000000000000..fc98710e2a1d
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2014 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts '$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for ':'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+ "$@" $dashmflag |
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/contrib/ntp/sntp/libevent/doxygen.am b/contrib/ntp/sntp/libevent/doxygen.am
new file mode 100644
index 000000000000..916d7c4079b2
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/doxygen.am
@@ -0,0 +1,55 @@
+# Doxygen documentation will not be generated with default configuration,
+# unless '--enable-doxygen-doc' is configured.
+# The following targets are all about doxygen:
+# make # 'make doxygen' would be auto executed
+# make doxygen # generating doxygen documentation
+# make doxygen-doc # same as 'make doxygen'
+# make clean # clean docs generated by doxygen
+# make install # install doxygen documentation
+# make uninstall # uninstall doxygen documentation
+
+if ENABLE_DOXYGEN
+
+# Add all needed rules defined in ax_prog_doxygen.m4
+@DX_RULES@
+
+# Use 'make clean' to clean docs generated by doxygen.
+clean-local:
+ -rm -rf $(DX_CLEANFILES)
+
+# integrate doxygen with automake targets
+man3_MANS = @DX_DOCDIR@/man/man3/*
+$(man3_MANS): doxygen-doc
+
+# Docs will be installed. It may be one or more docs supported
+# by doxygen, but does not include 'man'.
+docdirs = $(DX_INSTALL_DOCS)
+
+# Rules for installing docs generated by doxygen into $(htmldir),
+# The typical value of $(htmldir) is '/usr/local/share/doc/$(PACKAGE)'
+install-data-local:
+ @if ! test -d "$(DESTDIR)$(htmldir)"; then \
+ echo "$(mkinstalldirs) '$(DESTDIR)$(htmldir)'"; \
+ $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \
+ fi
+ @for d in $(docdirs); do \
+ echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \
+ cp -pR $$d '$(DESTDIR)$(htmldir)/'; \
+ done
+
+# Rules for uninstalling docs generated by doxygen from $(htmldir)
+uninstall-local:
+ @for d in $(docdirs); do \
+ d=`basename $$d`; \
+ echo "test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
+ { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
+ rm -rf '$(DESTDIR)$(htmldir)/'$$d; }"; \
+ test ! -d '$(DESTDIR)$(htmldir)/'$$d || \
+ { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && \
+ rm -rf '$(DESTDIR)$(htmldir)/'$$d; }; \
+ done
+ rmdir "$(DESTDIR)$(htmldir)/" || true
+
+doxygen: doxygen-doc
+
+endif ENABLE_DOXYGEN
diff --git a/contrib/ntp/sntp/libevent/epoll.c b/contrib/ntp/sntp/libevent/epoll.c
index aa41f84e027e..bdec2e45695d 100644
--- a/contrib/ntp/sntp/libevent/epoll.c
+++ b/contrib/ntp/sntp/libevent/epoll.c
@@ -246,6 +246,23 @@ epoll_op_to_string(int op)
"???";
}
+#define PRINT_CHANGES(op, events, ch, status) \
+ "Epoll %s(%d) on fd %d " status ". " \
+ "Old events were %d; " \
+ "read change was %d (%s); " \
+ "write change was %d (%s); " \
+ "close change was %d (%s)", \
+ epoll_op_to_string(op), \
+ events, \
+ ch->fd, \
+ ch->old_events, \
+ ch->read_change, \
+ change_to_string(ch->read_change), \
+ ch->write_change, \
+ change_to_string(ch->write_change), \
+ ch->close_change, \
+ change_to_string(ch->close_change)
+
static int
epoll_apply_one_change(struct event_base *base,
struct epollop *epollop,
@@ -264,21 +281,14 @@ epoll_apply_one_change(struct event_base *base,
return 0;
}
- if ((ch->read_change|ch->write_change) & EV_CHANGE_ET)
+ if ((ch->read_change|ch->write_change|ch->close_change) & EV_CHANGE_ET)
events |= EPOLLET;
memset(&epev, 0, sizeof(epev));
epev.data.fd = ch->fd;
epev.events = events;
if (epoll_ctl(epollop->epfd, op, ch->fd, &epev) == 0) {
- event_debug(("Epoll %s(%d) on fd %d okay. [old events were %d; read change was %d; write change was %d; close change was %d]",
- epoll_op_to_string(op),
- (int)epev.events,
- (int)ch->fd,
- ch->old_events,
- ch->read_change,
- ch->write_change,
- ch->close_change));
+ event_debug((PRINT_CHANGES(op, epev.events, ch, "okay")));
return 0;
}
@@ -338,18 +348,7 @@ epoll_apply_one_change(struct event_base *base,
break;
}
- event_warn("Epoll %s(%d) on fd %d failed. Old events were %d; read change was %d (%s); write change was %d (%s); close change was %d (%s)",
- epoll_op_to_string(op),
- (int)epev.events,
- ch->fd,
- ch->old_events,
- ch->read_change,
- change_to_string(ch->read_change),
- ch->write_change,
- change_to_string(ch->write_change),
- ch->close_change,
- change_to_string(ch->close_change));
-
+ event_warn(PRINT_CHANGES(op, epev.events, ch, "failed"));
return -1;
}
@@ -402,11 +401,14 @@ epoll_nochangelist_del(struct event_base *base, evutil_socket_t fd,
ch.old_events = old;
ch.read_change = ch.write_change = ch.close_change = 0;
if (events & EV_WRITE)
- ch.write_change = EV_CHANGE_DEL;
+ ch.write_change = EV_CHANGE_DEL |
+ (events & EV_ET);
if (events & EV_READ)
- ch.read_change = EV_CHANGE_DEL;
+ ch.read_change = EV_CHANGE_DEL |
+ (events & EV_ET);
if (events & EV_CLOSED)
- ch.close_change = EV_CHANGE_DEL;
+ ch.close_change = EV_CHANGE_DEL |
+ (events & EV_ET);
return epoll_apply_one_change(base, base->evbase, &ch);
}
@@ -484,7 +486,9 @@ epoll_dispatch(struct event_base *base, struct timeval *tv)
continue;
#endif
- if (what & (EPOLLHUP|EPOLLERR)) {
+ if (what & EPOLLERR) {
+ ev = EV_READ | EV_WRITE;
+ } else if ((what & EPOLLHUP) && !(what & EPOLLRDHUP)) {
ev = EV_READ | EV_WRITE;
} else {
if (what & EPOLLIN)
diff --git a/contrib/ntp/sntp/libevent/epolltable-internal.h b/contrib/ntp/sntp/libevent/epolltable-internal.h
index da30e0973a27..73c2e3647e29 100644
--- a/contrib/ntp/sntp/libevent/epolltable-internal.h
+++ b/contrib/ntp/sntp/libevent/epolltable-internal.h
@@ -34,7 +34,7 @@
Note also that this table is a little sparse, since ADD+DEL is
nonsensical ("xxx" in the list below.)
- Note also also that we are shifting old_events by only 5 bits, since
+ Note also that we are shifting old_events by only 5 bits, since
EV_READ is 2 and EV_WRITE is 4.
The table was auto-generated with a python script, according to this
diff --git a/contrib/ntp/sntp/libevent/evbuffer-internal.h b/contrib/ntp/sntp/libevent/evbuffer-internal.h
index cf4bddc80ea8..d09b4f1ddd58 100644
--- a/contrib/ntp/sntp/libevent/evbuffer-internal.h
+++ b/contrib/ntp/sntp/libevent/evbuffer-internal.h
@@ -92,7 +92,7 @@ struct evbuffer {
* If the buffer has no chains, it is NULL.
*
* The last_with_datap pointer points at _whatever 'next' pointer_
- * points at the last_with_datap chain. If the last_with_data chain
+ * pointing at the last_with_data chain. If the last_with_data chain
* is the first chain, or it is NULL, then the last_with_datap pointer
* is &buf->first.
*/
diff --git a/contrib/ntp/sntp/libevent/evconfig-private.h b/contrib/ntp/sntp/libevent/evconfig-private.h
deleted file mode 100644
index f6b08e353e84..000000000000
--- a/contrib/ntp/sntp/libevent/evconfig-private.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* evconfig-private.h. Generated from evconfig-private.h.in by configure. */
-/* evconfig-private.h template - see "Configuration Header Templates" */
-/* in AC manual. Kevin Bowling <kevin.bowling@kev009.com */
-#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
-#define EVCONFIG_PRIVATE_H_INCLUDED_
-
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# define _ALL_SOURCE 1
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS 1
-#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-# define _TANDEM_SOURCE 1
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-/* Define to 1 if on MINIX. */
-#ifndef _MINIX
-/* #undef _MINIX */
-#endif
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-#ifndef _POSIX_1_SOURCE
-/* #undef _POSIX_1_SOURCE */
-#endif
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#ifndef _POSIX_SOURCE
-/* #undef _POSIX_SOURCE */
-#endif
-
-#endif
diff --git a/contrib/ntp/sntp/libevent/evconfig-private.h.cmake b/contrib/ntp/sntp/libevent/evconfig-private.h.cmake
new file mode 100644
index 000000000000..1adf9c03d1b4
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/evconfig-private.h.cmake
@@ -0,0 +1,40 @@
+
+#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
+#define EVCONFIG_PRIVATE_H_INCLUDED_
+
+/* Enable extensions on AIX 3, Interix. */
+#cmakedefine _ALL_SOURCE
+
+/* Enable GNU extensions on systems that have them. */
+#cmakedefine _GNU_SOURCE 1
+
+/* Enable threading extensions on Solaris. */
+#cmakedefine _POSIX_PTHREAD_SEMANTICS 1
+
+/* Enable extensions on HP NonStop. */
+#cmakedefine _TANDEM_SOURCE 1
+
+/* Enable general extensions on Solaris. */
+#cmakedefine __EXTENSIONS__
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#cmakedefine _FILE_OFFSET_BITS 1
+/* Define for large files, on AIX-style hosts. */
+#cmakedefine _LARGE_FILES 1
+
+/* Define to 1 if on MINIX. */
+#cmakedefine _MINIX 1
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#cmakedefine _POSIX_1_SOURCE 1
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#cmakedefine _POSIX_SOURCE 1
+
+/* Enable POSIX.2 extensions on QNX for getopt */
+#ifdef __QNX__
+#cmakedefine __EXT_POSIX2 1
+#endif
+
+#endif
diff --git a/contrib/ntp/sntp/libevent/evconfig-private.h.in b/contrib/ntp/sntp/libevent/evconfig-private.h.in
index 7b3dfdb10e90..8cd647874332 100644
--- a/contrib/ntp/sntp/libevent/evconfig-private.h.in
+++ b/contrib/ntp/sntp/libevent/evconfig-private.h.in
@@ -45,4 +45,11 @@
#undef _POSIX_SOURCE
#endif
+/* Enable POSIX.2 extensions on QNX for getopt */
+#ifdef __QNX__
+# ifndef __EXT_POSIX2
+# define __EXT_POSIX2
+# endif
+#endif
+
#endif
diff --git a/contrib/ntp/sntp/libevent/evdns.c b/contrib/ntp/sntp/libevent/evdns.c
index 60f4db5c5fba..a5b31a3c0017 100644
--- a/contrib/ntp/sntp/libevent/evdns.c
+++ b/contrib/ntp/sntp/libevent/evdns.c
@@ -77,6 +77,7 @@
#include <stdarg.h>
#ifdef _WIN32
#include <winsock2.h>
+#include <winerror.h>
#include <ws2tcpip.h>
#ifndef _WIN32_IE
#define _WIN32_IE 0x400
@@ -346,6 +347,9 @@ struct evdns_base {
struct timeval global_getaddrinfo_allow_skew;
+ int so_rcvbuf;
+ int so_sndbuf;
+
int getaddrinfo_ipv4_timeouts;
int getaddrinfo_ipv6_timeouts;
int getaddrinfo_ipv4_answered;
@@ -863,6 +867,19 @@ reply_schedule_callback(struct request *const req, u32 ttl, u32 err, struct repl
&d->deferred);
}
+
+#define _QR_MASK 0x8000U
+#define _OP_MASK 0x7800U
+#define _AA_MASK 0x0400U
+#define _TC_MASK 0x0200U
+#define _RD_MASK 0x0100U
+#define _RA_MASK 0x0080U
+#define _Z_MASK 0x0040U
+#define _AD_MASK 0x0020U
+#define _CD_MASK 0x0010U
+#define _RCODE_MASK 0x000fU
+#define _Z_MASK_DEPRECATED 0x0070U
+
/* this processes a parsed reply packet */
static void
reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply) {
@@ -876,12 +893,12 @@ reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply)
ASSERT_LOCKED(req->base);
ASSERT_VALID_REQUEST(req);
- if (flags & 0x020f || !reply || !reply->have_answer) {
+ if (flags & (_RCODE_MASK | _TC_MASK) || !reply || !reply->have_answer) {
/* there was an error */
- if (flags & 0x0200) {
+ if (flags & _TC_MASK) {
error = DNS_ERR_TRUNCATED;
- } else if (flags & 0x000f) {
- u16 error_code = (flags & 0x000f) - 1;
+ } else if (flags & _RCODE_MASK) {
+ u16 error_code = (flags & _RCODE_MASK) - 1;
if (error_code > 4) {
error = DNS_ERR_UNKNOWN;
} else {
@@ -976,7 +993,6 @@ name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) {
for (;;) {
u8 label_len;
- if (j >= length) return -1;
GET8(label_len);
if (!label_len) break;
if (label_len & 0xc0) {
@@ -997,6 +1013,7 @@ name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) {
*cp++ = '.';
}
if (cp + label_len >= end) return -1;
+ if (j + label_len > length) return -1;
memcpy(cp, packet + j, label_len);
cp += label_len;
j += label_len;
@@ -1046,8 +1063,8 @@ reply_parse(struct evdns_base *base, u8 *packet, int length) {
memset(&reply, 0, sizeof(reply));
/* If it's not an answer, it doesn't correspond to any request. */
- if (!(flags & 0x8000)) return -1; /* must be an answer */
- if ((flags & 0x020f) && (flags & 0x020f) != DNS_ERR_NOTEXIST) {
+ if (!(flags & _QR_MASK)) return -1; /* must be an answer */
+ if ((flags & (_RCODE_MASK|_TC_MASK)) && (flags & (_RCODE_MASK|_TC_MASK)) != DNS_ERR_NOTEXIST) {
/* there was an error and it's not NXDOMAIN */
goto err;
}
@@ -1060,24 +1077,6 @@ reply_parse(struct evdns_base *base, u8 *packet, int length) {
sizeof(tmp_name))<0) \
goto err; \
} while (0)
-#define TEST_NAME \
- do { tmp_name[0] = '\0'; \
- cmp_name[0] = '\0'; \
- k = j; \
- if (name_parse(packet, length, &j, tmp_name, \
- sizeof(tmp_name))<0) \
- goto err; \
- if (name_parse(req->request, req->request_len, &k, \
- cmp_name, sizeof(cmp_name))<0) \
- goto err; \
- if (base->global_randomize_case) { \
- if (strcmp(tmp_name, cmp_name) == 0) \
- name_matches = 1; \
- } else { \
- if (evutil_ascii_strcasecmp(tmp_name, cmp_name) == 0) \
- name_matches = 1; \
- } \
- } while (0)
reply.type = req->request_type;
@@ -1086,9 +1085,25 @@ reply_parse(struct evdns_base *base, u8 *packet, int length) {
/* the question looks like
* <label:name><u16:type><u16:class>
*/
- TEST_NAME;
+ tmp_name[0] = '\0';
+ cmp_name[0] = '\0';
+ k = j;
+ if (name_parse(packet, length, &j, tmp_name, sizeof(tmp_name)) < 0)
+ goto err;
+ if (name_parse(req->request, req->request_len, &k,
+ cmp_name, sizeof(cmp_name))<0)
+ goto err;
+ if (!base->global_randomize_case) {
+ if (strcmp(tmp_name, cmp_name) == 0)
+ name_matches = 1;
+ } else {
+ if (evutil_ascii_strcasecmp(tmp_name, cmp_name) == 0)
+ name_matches = 1;
+ }
+
j += 4;
- if (j > length) goto err;
+ if (j > length)
+ goto err;
}
if (!name_matches)
@@ -1238,8 +1253,8 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc
(void)additional;
(void)authority;
- if (flags & 0x8000) return -1; /* Must not be an answer. */
- flags &= 0x0110; /* Only RD and CD get preserved. */
+ if (flags & _QR_MASK) return -1; /* Must not be an answer. */
+ flags &= (_RD_MASK|_CD_MASK); /* Only RD and CD get preserved. */
server_req = mm_malloc(sizeof(struct server_request));
if (server_req == NULL) return -1;
@@ -1279,7 +1294,7 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc
port->refcnt++;
/* Only standard queries are supported. */
- if (flags & 0x7800) {
+ if (flags & _OP_MASK) {
evdns_server_request_respond(&(server_req->base), DNS_ERR_NOTIMPL);
return -1;
}
@@ -1288,14 +1303,12 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc
return 0;
err:
- if (server_req) {
- if (server_req->base.questions) {
- for (i = 0; i < server_req->base.nquestions; ++i)
- mm_free(server_req->base.questions[i]);
- mm_free(server_req->base.questions);
- }
- mm_free(server_req);
+ if (server_req->base.questions) {
+ for (i = 0; i < server_req->base.nquestions; ++i)
+ mm_free(server_req->base.questions[i]);
+ mm_free(server_req->base.questions);
}
+ mm_free(server_req);
return -1;
#undef SKIP_NAME
@@ -1753,6 +1766,7 @@ evdns_close_server_port(struct evdns_server_port *port)
server_port_free(port);
} else {
port->closing = 1;
+ EVDNS_UNLOCK(port);
}
}
@@ -1906,7 +1920,7 @@ evdns_server_request_format_response(struct server_request *req, int err)
/* Set response bit and error code; copy OPCODE and RD fields from
* question; copy RA and AA if set by caller. */
flags = req->base.flags;
- flags |= (0x8000 | err);
+ flags |= (_QR_MASK | err);
dnslabel_table_init(&table);
APPEND16(req->trans_id);
@@ -2267,10 +2281,11 @@ evdns_request_transmit(struct request *req) {
nameserver_write_waiting(req->ns, 1);
return 1;
case 2:
- /* failed to transmit the request entirely. */
+ /* failed to transmit the request entirely. we can fallthrough since
+ * we'll set a timeout, which will time out, and make us retransmit the
+ * request anyway. */
retcode = 1;
- /* fall through: we'll set a timeout, which will time out,
- * and make us retransmit the request anyway. */
+ EVUTIL_FALLTHROUGH;
default:
/* all ok */
log(EVDNS_LOG_DEBUG,
@@ -2527,6 +2542,23 @@ evdns_nameserver_add_impl_(struct evdns_base *base, const struct sockaddr *addre
}
}
+ if (base->so_rcvbuf) {
+ if (setsockopt(ns->socket, SOL_SOCKET, SO_RCVBUF,
+ (void *)&base->so_rcvbuf, sizeof(base->so_rcvbuf))) {
+ log(EVDNS_LOG_WARN, "Couldn't set SO_RCVBUF to %i", base->so_rcvbuf);
+ err = -SO_RCVBUF;
+ goto out2;
+ }
+ }
+ if (base->so_sndbuf) {
+ if (setsockopt(ns->socket, SOL_SOCKET, SO_SNDBUF,
+ (void *)&base->so_sndbuf, sizeof(base->so_sndbuf))) {
+ log(EVDNS_LOG_WARN, "Couldn't set SO_SNDBUF to %i", base->so_sndbuf);
+ err = -SO_SNDBUF;
+ goto out2;
+ }
+ }
+
memcpy(&ns->address, address, addrlen);
ns->addrlen = addrlen;
ns->state = 1;
@@ -3177,9 +3209,12 @@ search_set_from_hostname(struct evdns_base *base) {
static char *
search_make_new(const struct search_state *const state, int n, const char *const base_name) {
const size_t base_len = strlen(base_name);
- const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
+ char need_to_append_dot;
struct search_domain *dom;
+ if (!base_len) return NULL;
+ need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
+
for (dom = state->head; dom; dom = dom->next) {
if (!n--) {
/* this is the postfix we want */
@@ -3312,10 +3347,16 @@ search_request_finished(struct evdns_request *const handle) {
static void
evdns_resolv_set_defaults(struct evdns_base *base, int flags) {
+ int add_default = flags & DNS_OPTION_NAMESERVERS;
+ if (flags & DNS_OPTION_NAMESERVERS_NO_DEFAULT)
+ add_default = 0;
+
/* if the file isn't found then we assume a local resolver */
ASSERT_LOCKED(base);
- if (flags & DNS_OPTION_SEARCH) search_set_from_hostname(base);
- if (flags & DNS_OPTION_NAMESERVERS) evdns_base_nameserver_ip_add(base,"127.0.0.1");
+ if (flags & DNS_OPTION_SEARCH)
+ search_set_from_hostname(base);
+ if (add_default)
+ evdns_base_nameserver_ip_add(base, "127.0.0.1");
}
#ifndef EVENT__HAVE_STRTOK_R
@@ -3490,6 +3531,7 @@ evdns_base_set_option_impl(struct evdns_base *base,
base->global_max_retransmits = retries;
} else if (str_matches_option(option, "randomize-case:")) {
int randcase = strtoint(val);
+ if (randcase == -1) return -1;
if (!(flags & DNS_OPTION_MISC)) return 0;
base->global_randomize_case = randcase;
} else if (str_matches_option(option, "bind-to:")) {
@@ -3511,6 +3553,18 @@ evdns_base_set_option_impl(struct evdns_base *base,
val);
memcpy(&base->global_nameserver_probe_initial_timeout, &tv,
sizeof(tv));
+ } else if (str_matches_option(option, "so-rcvbuf:")) {
+ int buf = strtoint(val);
+ if (buf == -1) return -1;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting SO_RCVBUF to %s", val);
+ base->so_rcvbuf = buf;
+ } else if (str_matches_option(option, "so-sndbuf:")) {
+ int buf = strtoint(val);
+ if (buf == -1) return -1;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting SO_SNDBUF to %s", val);
+ base->so_sndbuf = buf;
}
return 0;
}
@@ -3611,9 +3665,14 @@ evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char
char *resolv;
char *start;
int err = 0;
+ int add_default;
log(EVDNS_LOG_DEBUG, "Parsing resolv.conf file %s", filename);
+ add_default = flags & DNS_OPTION_NAMESERVERS;
+ if (flags & DNS_OPTION_NAMESERVERS_NO_DEFAULT)
+ add_default = 0;
+
if (flags & DNS_OPTION_HOSTSFILE) {
char *fname = evdns_get_default_hosts_filename();
evdns_base_load_hosts(base, fname);
@@ -3621,6 +3680,11 @@ evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char
mm_free(fname);
}
+ if (!filename) {
+ evdns_resolv_set_defaults(base, flags);
+ return 1;
+ }
+
if ((err = evutil_read_file_(filename, &resolv, &n, 0)) < 0) {
if (err == -1) {
/* No file. */
@@ -3644,7 +3708,7 @@ evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char
}
}
- if (!base->server_head && (flags & DNS_OPTION_NAMESERVERS)) {
+ if (!base->server_head && add_default) {
/* no nameservers were configured. */
evdns_base_nameserver_ip_add(base, "127.0.0.1");
err = 6;
@@ -3910,6 +3974,7 @@ evdns_base_new(struct event_base *event_base, int flags)
* functionality. We can't just call evdns_getaddrinfo directly or
* else libevent-core will depend on libevent-extras. */
evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo);
+ evutil_set_evdns_getaddrinfo_cancel_fn_(evdns_getaddrinfo_cancel);
base = mm_malloc(sizeof(struct evdns_base));
if (base == NULL)
@@ -3944,7 +4009,12 @@ evdns_base_new(struct event_base *event_base, int flags)
TAILQ_INIT(&base->hostsdb);
-#define EVDNS_BASE_ALL_FLAGS (0x8001)
+#define EVDNS_BASE_ALL_FLAGS ( \
+ EVDNS_BASE_INITIALIZE_NAMESERVERS | \
+ EVDNS_BASE_DISABLE_WHEN_INACTIVE | \
+ EVDNS_BASE_NAMESERVERS_NO_DEFAULT | \
+ 0)
+
if (flags & ~EVDNS_BASE_ALL_FLAGS) {
flags = EVDNS_BASE_INITIALIZE_NAMESERVERS;
log(EVDNS_LOG_WARN,
@@ -3955,12 +4025,17 @@ evdns_base_new(struct event_base *event_base, int flags)
if (flags & EVDNS_BASE_INITIALIZE_NAMESERVERS) {
int r;
+ int opts = DNS_OPTIONS_ALL;
+ if (flags & EVDNS_BASE_NAMESERVERS_NO_DEFAULT) {
+ opts |= DNS_OPTION_NAMESERVERS_NO_DEFAULT;
+ }
+
#ifdef _WIN32
r = evdns_base_config_windows_nameservers(base);
#else
- r = evdns_base_resolv_conf_parse(base, DNS_OPTIONS_ALL, "/etc/resolv.conf");
+ r = evdns_base_resolv_conf_parse(base, opts, "/etc/resolv.conf");
#endif
- if (r == -1) {
+ if (r) {
evdns_base_free_and_unlock(base, 0);
return NULL;
}
@@ -4010,7 +4085,7 @@ static void
evdns_nameserver_free(struct nameserver *server)
{
if (server->socket >= 0)
- evutil_closesocket(server->socket);
+ evutil_closesocket(server->socket);
(void) event_del(&server->event);
event_debug_unassign(&server->event);
if (server->state == 0)
@@ -4034,15 +4109,11 @@ evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests)
/* TODO(nickm) we might need to refcount here. */
- for (server = base->server_head; server; server = server_next) {
- server_next = server->next;
- evdns_nameserver_free(server);
- if (server_next == base->server_head)
- break;
+ while (base->req_waiting_head) {
+ if (fail_requests)
+ reply_schedule_callback(base->req_waiting_head, 0, DNS_ERR_SHUTDOWN, NULL);
+ request_finished(base->req_waiting_head, &base->req_waiting_head, 1);
}
- base->server_head = NULL;
- base->global_good_nameservers = 0;
-
for (i = 0; i < base->n_req_heads; ++i) {
while (base->req_heads[i]) {
if (fail_requests)
@@ -4050,13 +4121,18 @@ evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests)
request_finished(base->req_heads[i], &REQ_HEAD(base, base->req_heads[i]->trans_id), 1);
}
}
- while (base->req_waiting_head) {
- if (fail_requests)
- reply_schedule_callback(base->req_waiting_head, 0, DNS_ERR_SHUTDOWN, NULL);
- request_finished(base->req_waiting_head, &base->req_waiting_head, 1);
- }
base->global_requests_inflight = base->global_requests_waiting = 0;
+ for (server = base->server_head; server; server = server_next) {
+ server_next = server->next;
+ /** already done something before */
+ server->probe_request = NULL;
+ evdns_nameserver_free(server);
+ if (server_next == base->server_head)
+ break;
+ }
+ base->server_head = NULL;
+ base->global_good_nameservers = 0;
if (base->global_search_state) {
for (dom = base->global_search_state->head; dom; dom = dom_next) {
@@ -4406,17 +4482,23 @@ evdns_getaddrinfo_gotresolve(int result, char type, int count,
other_req = &data->ipv4_request;
}
- EVDNS_LOCK(data->evdns_base);
- if (evdns_result_is_answer(result)) {
- if (req->type == DNS_IPv4_A)
- ++data->evdns_base->getaddrinfo_ipv4_answered;
- else
- ++data->evdns_base->getaddrinfo_ipv6_answered;
+ /** Called from evdns_base_free() with @fail_requests == 1 */
+ if (result != DNS_ERR_SHUTDOWN) {
+ EVDNS_LOCK(data->evdns_base);
+ if (evdns_result_is_answer(result)) {
+ if (req->type == DNS_IPv4_A)
+ ++data->evdns_base->getaddrinfo_ipv4_answered;
+ else
+ ++data->evdns_base->getaddrinfo_ipv6_answered;
+ }
+ user_canceled = data->user_canceled;
+ if (other_req->r == NULL)
+ data->request_done = 1;
+ EVDNS_UNLOCK(data->evdns_base);
+ } else {
+ data->evdns_base = NULL;
+ user_canceled = data->user_canceled;
}
- user_canceled = data->user_canceled;
- if (other_req->r == NULL)
- data->request_done = 1;
- EVDNS_UNLOCK(data->evdns_base);
req->r = NULL;
@@ -4450,7 +4532,9 @@ evdns_getaddrinfo_gotresolve(int result, char type, int count,
/* The other request is still working; maybe it will
* succeed. */
/* XXXX handle failure from set_timeout */
- evdns_getaddrinfo_set_timeout(data->evdns_base, data);
+ if (result != DNS_ERR_SHUTDOWN) {
+ evdns_getaddrinfo_set_timeout(data->evdns_base, data);
+ }
data->pending_error = err;
return;
}
@@ -4625,6 +4709,7 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
int err;
int port = 0;
int want_cname = 0;
+ int started = 0;
if (!dns_base) {
dns_base = current_base;
@@ -4703,6 +4788,8 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
* launching those requests. (XXX we don't do that yet.)
*/
+ EVDNS_LOCK(dns_base);
+
if (hints.ai_family != PF_INET6) {
log(EVDNS_LOG_DEBUG, "Sending request for %s on ipv4 as %p",
nodename, &data->ipv4_request);
@@ -4729,7 +4816,11 @@ evdns_getaddrinfo(struct evdns_base *dns_base,
evtimer_assign(&data->timeout, dns_base->event_base,
evdns_getaddrinfo_timeout_cb, data);
- if (data->ipv4_request.r || data->ipv6_request.r) {
+ started = (data->ipv4_request.r || data->ipv6_request.r);
+
+ EVDNS_UNLOCK(dns_base);
+
+ if (started) {
return data;
} else {
mm_free(data);
diff --git a/contrib/ntp/sntp/libevent/event-config.h.cmake b/contrib/ntp/sntp/libevent/event-config.h.cmake
new file mode 100644
index 000000000000..fccf0cf05970
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/event-config.h.cmake
@@ -0,0 +1,513 @@
+/* event-config.h
+ *
+ * This file was generated by cmake when the makefiles were generated.
+ *
+ * DO NOT EDIT THIS FILE.
+ *
+ * Do not rely on macros in this file existing in later versions.
+ */
+#ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_
+#define EVENT2_EVENT_CONFIG_H_INCLUDED_
+
+/* Numeric representation of the version */
+#define EVENT__NUMERIC_VERSION @EVENT_NUMERIC_VERSION@
+#define EVENT__PACKAGE_VERSION "@EVENT_PACKAGE_VERSION@"
+
+#define EVENT__VERSION_MAJOR @EVENT_VERSION_MAJOR@
+#define EVENT__VERSION_MINOR @EVENT_VERSION_MINOR@
+#define EVENT__VERSION_PATCH @EVENT_VERSION_PATCH@
+
+/* Version number of package */
+#define EVENT__VERSION "@EVENT_VERSION@"
+
+/* Name of package */
+#define EVENT__PACKAGE "libevent"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define EVENT__PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define EVENT__PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define EVENT__PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define EVENT__PACKAGE_TARNAME ""
+
+/* Define if libevent should build without support for a debug mode */
+#cmakedefine EVENT__DISABLE_DEBUG_MODE 1
+
+/* Define if libevent should not allow replacing the mm functions */
+#cmakedefine EVENT__DISABLE_MM_REPLACEMENT 1
+
+/* Define if libevent should not be compiled with thread support */
+#cmakedefine EVENT__DISABLE_THREAD_SUPPORT 1
+
+/* Define to 1 if you have the `accept4' function. */
+#cmakedefine EVENT__HAVE_ACCEPT4 1
+
+/* Define to 1 if you have the `arc4random' function. */
+#cmakedefine EVENT__HAVE_ARC4RANDOM 1
+
+/* Define to 1 if you have the `arc4random_buf' function. */
+#cmakedefine EVENT__HAVE_ARC4RANDOM_BUF 1
+
+/* Define to 1 if you have the `arc4random_addrandom' function. */
+#cmakedefine EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
+
+/* Define if clock_gettime is available in libc */
+#cmakedefine EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1
+
+/* Define is no secure id variant is available */
+#cmakedefine EVENT__DNS_USE_GETTIMEOFDAY_FOR_ID 1
+#cmakedefine EVENT__DNS_USE_FTIME_FOR_ID 1
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#cmakedefine EVENT__HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#cmakedefine EVENT__HAVE_CLOCK_GETTIME 1
+
+/* Define to 1 if you have the declaration of `CTL_KERN'. */
+#define EVENT__HAVE_DECL_CTL_KERN @EVENT__HAVE_DECL_CTL_KERN@
+
+/* Define to 1 if you have the declaration of `KERN_ARND'. */
+#define EVENT__HAVE_DECL_KERN_ARND @EVENT__HAVE_DECL_KERN_ARND@
+
+/* Define to 1 if you have `getrandom' function. */
+#cmakedefine EVENT__HAVE_GETRANDOM 1
+
+/* Define if /dev/poll is available */
+#cmakedefine EVENT__HAVE_DEVPOLL 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#cmakedefine EVENT__HAVE_NETDB_H 1
+
+/* Define to 1 if fd_mask type is defined */
+#cmakedefine EVENT__HAVE_FD_MASK 1
+
+/* Define to 1 if the <sys/queue.h> header file defines TAILQ_FOREACH. */
+#cmakedefine EVENT__HAVE_TAILQFOREACH 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine EVENT__HAVE_DLFCN_H 1
+
+/* Define if your system supports the epoll system calls */
+#cmakedefine EVENT__HAVE_EPOLL 1
+
+/* Define to 1 if you have the `epoll_create1' function. */
+#cmakedefine EVENT__HAVE_EPOLL_CREATE1 1
+
+/* Define to 1 if you have the `epoll_ctl' function. */
+#cmakedefine EVENT__HAVE_EPOLL_CTL 1
+
+/* Define to 1 if you have the `eventfd' function. */
+#cmakedefine EVENT__HAVE_EVENTFD 1
+
+/* Define if your system supports event ports */
+#cmakedefine EVENT__HAVE_EVENT_PORTS 1
+
+/* Define to 1 if you have the `fcntl' function. */
+#cmakedefine EVENT__HAVE_FCNTL 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#cmakedefine EVENT__HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#cmakedefine EVENT__HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `getegid' function. */
+#cmakedefine EVENT__HAVE_GETEGID 1
+
+/* Define to 1 if you have the `geteuid' function. */
+#cmakedefine EVENT__HAVE_GETEUID 1
+
+/* TODO: Check for different gethostname argument counts. CheckPrototypeDefinition.cmake can be used. */
+/* Define this if you have any gethostbyname_r() */
+#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R 1
+
+/* Define this if gethostbyname_r takes 3 arguments */
+#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_3_ARG 1
+
+/* Define this if gethostbyname_r takes 5 arguments */
+#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_5_ARG 1
+
+/* Define this if gethostbyname_r takes 6 arguments */
+#cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_6_ARG 1
+
+/* Define to 1 if you have the `getifaddrs' function. */
+#cmakedefine EVENT__HAVE_GETIFADDRS 1
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#cmakedefine EVENT__HAVE_GETNAMEINFO 1
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#cmakedefine EVENT__HAVE_GETPROTOBYNUMBER 1
+
+/* Define to 1 if you have the `getservbyname' function. */
+#cmakedefine EVENT__HAVE_GETSERVBYNAME 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#cmakedefine EVENT__HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <ifaddrs.h> header file. */
+#cmakedefine EVENT__HAVE_IFADDRS_H 1
+
+/* Define to 1 if you have the `inet_ntop' function. */
+#cmakedefine EVENT__HAVE_INET_NTOP 1
+
+/* Define to 1 if you have the `inet_pton' function. */
+#cmakedefine EVENT__HAVE_INET_PTON 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine EVENT__HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `issetugid' function. */
+#cmakedefine EVENT__HAVE_ISSETUGID 1
+
+/* Define to 1 if you have the `kqueue' function. */
+#cmakedefine EVENT__HAVE_KQUEUE 1
+
+/* Define if the system has zlib */
+#cmakedefine EVENT__HAVE_LIBZ 1
+
+/* Define to 1 if you have the `mach_absolute_time' function. */
+#cmakedefine EVENT__HAVE_MACH_ABSOLUTE_TIME 1
+
+/* Define to 1 if you have the <mach/mach_time.h> header file. */
+#cmakedefine EVENT__HAVE_MACH_MACH_TIME_H 1
+
+/* Define to 1 if you have the <mach/mach.h> header file. */
+#cmakedefine EVENT__HAVE_MACH_MACH_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine EVENT__HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mmap' function. */
+#cmakedefine EVENT__HAVE_MMAP 1
+
+/* Define to 1 if you have the `nanosleep' function. */
+#cmakedefine EVENT__HAVE_NANOSLEEP 1
+
+/* Define to 1 if you have the `usleep' function. */
+#cmakedefine EVENT__HAVE_USLEEP 1
+
+/* Define to 1 if you have the <netinet/in6.h> header file. */
+#cmakedefine EVENT__HAVE_NETINET_IN6_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#cmakedefine EVENT__HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#cmakedefine EVENT__HAVE_NETINET_TCP_H 1
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_UN_H 1
+
+/* Define to 1 if you have the <afunix.h> header file. */
+#cmakedefine EVENT__HAVE_AFUNIX_H 1
+
+/* Define if the system has openssl */
+#cmakedefine EVENT__HAVE_OPENSSL 1
+
+/* Define to 1 if you have the `pipe' function. */
+#cmakedefine EVENT__HAVE_PIPE 1
+
+/* Define to 1 if you have the `pipe2' function. */
+#cmakedefine EVENT__HAVE_PIPE2 1
+
+/* Define to 1 if you have the `poll' function. */
+#cmakedefine EVENT__HAVE_POLL 1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#cmakedefine EVENT__HAVE_POLL_H 1
+
+/* Define to 1 if you have the `port_create' function. */
+#cmakedefine EVENT__HAVE_PORT_CREATE 1
+
+/* Define to 1 if you have the <port.h> header file. */
+#cmakedefine EVENT__HAVE_PORT_H 1
+
+/* Define if we have pthreads on this system */
+#cmakedefine EVENT__HAVE_PTHREADS 1
+
+/* Define to 1 if you have the `putenv' function. */
+#cmakedefine EVENT__HAVE_PUTENV 1
+
+/* Define to 1 if the system has the type `sa_family_t'. */
+#cmakedefine EVENT__HAVE_SA_FAMILY_T 1
+
+/* Define to 1 if you have the `select' function. */
+#cmakedefine EVENT__HAVE_SELECT 1
+
+/* Define to 1 if you have the `setenv' function. */
+#cmakedefine EVENT__HAVE_SETENV 1
+
+/* Define if F_SETFD is defined in <fcntl.h> */
+#cmakedefine EVENT__HAVE_SETFD 1
+
+/* Define to 1 if you have the `setrlimit' function. */
+#cmakedefine EVENT__HAVE_SETRLIMIT 1
+
+/* Define to 1 if you have the `sendfile' function. */
+#cmakedefine EVENT__HAVE_SENDFILE 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#cmakedefine EVENT__HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `signal' function. */
+#cmakedefine EVENT__HAVE_SIGNAL 1
+
+/* Define to 1 if you have the `splice' function. */
+#cmakedefine EVENT__HAVE_SPLICE 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#cmakedefine EVENT__HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#cmakedefine EVENT__HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine EVENT__HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine EVENT__HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine EVENT__HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#cmakedefine EVENT__HAVE_STRLCPY 1
+
+/* Define to 1 if you have the `strsep' function. */
+#cmakedefine EVENT__HAVE_STRSEP 1
+
+/* Define to 1 if you have the `strtok_r' function. */
+#cmakedefine EVENT__HAVE_STRTOK_R 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#cmakedefine EVENT__HAVE_STRTOLL 1
+
+/* Define to 1 if you have the `_gmtime64_s' function. */
+#cmakedefine EVENT__HAVE__GMTIME64_S 1
+
+/* Define to 1 if you have the `_gmtime64' function. */
+#cmakedefine EVENT__HAVE__GMTIME64 1
+
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#cmakedefine EVENT__HAVE_STRUCT_ADDRINFO 1
+
+/* Define to 1 if the system has the type `struct in6_addr'. */
+#cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR 1
+
+/* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */
+#cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
+
+/* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */
+#cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
+
+/* Define to 1 if the system has the type `struct sockaddr_in6'. */
+#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN6 1
+
+/* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */
+#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1
+
+/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
+#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
+
+/* Define to 1 if the system has the type `struct sockaddr_un'. */
+#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_UN 1
+
+/* Define to 1 if the system has the type `struct sockaddr_storage'. */
+#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
+
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
+#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
+
+/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
+#cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
+
+/* Define to 1 if the system has the type `struct linger'. */
+#cmakedefine EVENT__HAVE_STRUCT_LINGER 1
+
+/* Define to 1 if you have the `sysctl' function. */
+#cmakedefine EVENT__HAVE_SYSCTL 1
+
+/* Define to 1 if you have the <sys/epoll.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_EPOLL_H 1
+
+/* Define to 1 if you have the <sys/eventfd.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_EVENTFD_H 1
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_EVENT_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/queue.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_QUEUE_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/sendfile.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_SENDFILE_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/random.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_RANDOM_H 1
+
+/* Define to 1 if you have the <sys/sysctl.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_SYSCTL_H 1
+
+/* Define to 1 if you have the <sys/timerfd.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_TIMERFD_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_UIO_H 1
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#cmakedefine EVENT__HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <errno.h> header file. */
+#cmakedefine EVENT__HAVE_ERRNO_H 1
+
+/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
+#cmakedefine EVENT__HAVE_TAILQFOREACH 1
+
+/* Define if timeradd is defined in <sys/time.h> */
+#cmakedefine EVENT__HAVE_TIMERADD 1
+
+/* Define if timerclear is defined in <sys/time.h> */
+#cmakedefine EVENT__HAVE_TIMERCLEAR 1
+
+/* Define if timercmp is defined in <sys/time.h> */
+#cmakedefine EVENT__HAVE_TIMERCMP 1
+
+
+/* Define to 1 if you have the `timerfd_create' function. */
+#cmakedefine EVENT__HAVE_TIMERFD_CREATE 1
+
+/* Define if timerisset is defined in <sys/time.h> */
+#cmakedefine EVENT__HAVE_TIMERISSET 1
+
+/* Define to 1 if the system has the type `uint8_t'. */
+#cmakedefine EVENT__HAVE_UINT8_T 1
+
+/* Define to 1 if the system has the type `uint16_t'. */
+#cmakedefine EVENT__HAVE_UINT16_T 1
+
+/* Define to 1 if the system has the type `uint32_t'. */
+#cmakedefine EVENT__HAVE_UINT32_T 1
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#cmakedefine EVENT__HAVE_UINT64_T 1
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#cmakedefine EVENT__HAVE_UINTPTR_T 1
+
+/* Define to 1 if you have the `umask' function. */
+#cmakedefine EVENT__HAVE_UMASK 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine EVENT__HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#cmakedefine EVENT__HAVE_UNSETENV 1
+
+/* Define to 1 if you have the `vasprintf' function. */
+#cmakedefine EVENT__HAVE_VASPRINTF 1
+
+/* Define if kqueue works correctly with pipes */
+#cmakedefine EVENT__HAVE_WORKING_KQUEUE 1
+
+#ifdef __USE_UNUSED_DEFINITIONS__
+/* Define to necessary symbol if this constant uses a non-standard name on your system. */
+/* XXX: Hello, this isn't even used, nor is it defined anywhere... - Ellzey */
+#define EVENT__PTHREAD_CREATE_JOINABLE ${EVENT__PTHREAD_CREATE_JOINABLE}
+#endif
+
+/* The size of `pthread_t', as computed by sizeof. */
+#define EVENT__SIZEOF_PTHREAD_T @EVENT__SIZEOF_PTHREAD_T@
+
+/* The size of a `int', as computed by sizeof. */
+#define EVENT__SIZEOF_INT @EVENT__SIZEOF_INT@
+
+/* The size of a `long', as computed by sizeof. */
+#define EVENT__SIZEOF_LONG @EVENT__SIZEOF_LONG@
+
+/* The size of a `long long', as computed by sizeof. */
+#define EVENT__SIZEOF_LONG_LONG @EVENT__SIZEOF_LONG_LONG@
+
+/* The size of `off_t', as computed by sizeof. */
+#define EVENT__SIZEOF_OFF_T @EVENT__SIZEOF_OFF_T@
+
+#define EVENT__SIZEOF_SSIZE_T @EVENT__SIZEOF_SSIZE_T@
+
+
+/* The size of a `short', as computed by sizeof. */
+#define EVENT__SIZEOF_SHORT @EVENT__SIZEOF_SHORT@
+
+/* The size of `size_t', as computed by sizeof. */
+#define EVENT__SIZEOF_SIZE_T @EVENT__SIZEOF_SIZE_T@
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#cmakedefine EVENT__TIME_WITH_SYS_TIME 1
+
+/* The size of `socklen_t', as computed by sizeof. */
+#define EVENT__SIZEOF_SOCKLEN_T @EVENT__SIZEOF_SOCKLEN_T@
+
+/* The size of 'void *', as computer by sizeof */
+#define EVENT__SIZEOF_VOID_P @EVENT__SIZEOF_VOID_P@
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* why not c++?
+ *
+ * and are we really expected to use EVENT__inline everywhere,
+ * shouldn't we just do:
+ * ifdef EVENT__inline
+ * define inline EVENT__inline
+ *
+ * - Ellzey
+ */
+
+#define EVENT__inline @EVENT__inline@
+#endif
+
+#cmakedefine EVENT__HAVE___func__ 1
+#cmakedefine EVENT__HAVE___FUNCTION__ 1
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#define EVENT__size_t @EVENT__size_t@
+
+/* Define to unsigned int if you dont have it */
+#define EVENT__socklen_t @EVENT__socklen_t@
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define EVENT__ssize_t @EVENT__ssize_t@
+
+#endif /* \EVENT2_EVENT_CONFIG_H_INCLUDED_ */
diff --git a/contrib/ntp/sntp/libevent/event-internal.h b/contrib/ntp/sntp/libevent/event-internal.h
index 5208fbe0874e..9e5ff4244737 100644
--- a/contrib/ntp/sntp/libevent/event-internal.h
+++ b/contrib/ntp/sntp/libevent/event-internal.h
@@ -219,7 +219,7 @@ struct event_base {
/** Function pointers used to describe the backend that this event_base
* uses for signals */
const struct eventop *evsigsel;
- /** Data to implement the common signal handelr code. */
+ /** Data to implement the common signal handler code. */
struct evsig_info sig;
/** Number of virtual events */
@@ -368,7 +368,10 @@ struct event_config {
};
/* Internal use only: Functions that might be missing from <sys/queue.h> */
-#if defined(EVENT__HAVE_SYS_QUEUE_H) && !defined(EVENT__HAVE_TAILQFOREACH)
+#ifndef LIST_END
+#define LIST_END(head) NULL
+#endif
+
#ifndef TAILQ_FIRST
#define TAILQ_FIRST(head) ((head)->tqh_first)
#endif
@@ -394,7 +397,6 @@ struct event_config {
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
} while (0)
#endif
-#endif /* TAILQ_FOREACH */
#define N_ACTIVE_CALLBACKS(base) \
((base)->event_count_active)
@@ -416,26 +418,29 @@ int event_add_nolock_(struct event *ev,
* if it is running in another thread and it doesn't have EV_FINALIZE set.
*/
#define EVENT_DEL_AUTOBLOCK 2
-/** Argument for event_del_nolock_. Tells event_del to procede even if the
+/** Argument for event_del_nolock_. Tells event_del to proceed even if the
* event is set up for finalization rather for regular use.*/
#define EVENT_DEL_EVEN_IF_FINALIZING 3
int event_del_nolock_(struct event *ev, int blocking);
int event_remove_timer_nolock_(struct event *ev);
void event_active_nolock_(struct event *ev, int res, short count);
+EVENT2_EXPORT_SYMBOL
int event_callback_activate_(struct event_base *, struct event_callback *);
int event_callback_activate_nolock_(struct event_base *, struct event_callback *);
int event_callback_cancel_(struct event_base *base,
struct event_callback *evcb);
void event_callback_finalize_nolock_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *));
+EVENT2_EXPORT_SYMBOL
void event_callback_finalize_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *));
int event_callback_finalize_many_(struct event_base *base, int n_cbs, struct event_callback **evcb, void (*cb)(struct event_callback *, void *));
+EVENT2_EXPORT_SYMBOL
void event_active_later_(struct event *ev, int res);
void event_active_later_nolock_(struct event *ev, int res);
-void event_callback_activate_later_nolock_(struct event_base *base,
+int event_callback_activate_later_nolock_(struct event_base *base,
struct event_callback *evcb);
int event_callback_cancel_nolock_(struct event_base *base,
struct event_callback *evcb, int even_if_finalizing);
@@ -443,6 +448,7 @@ void event_callback_init_(struct event_base *base,
struct event_callback *cb);
/* FIXME document. */
+EVENT2_EXPORT_SYMBOL
void event_base_add_virtual_(struct event_base *base);
void event_base_del_virtual_(struct event_base *base);
@@ -452,6 +458,7 @@ void event_base_del_virtual_(struct event_base *base);
Returns on success; aborts on failure.
*/
+EVENT2_EXPORT_SYMBOL
void event_base_assert_ok_(struct event_base *base);
void event_base_assert_ok_nolock_(struct event_base *base);
@@ -467,6 +474,13 @@ void event_base_assert_ok_nolock_(struct event_base *base);
int event_base_foreach_event_nolock_(struct event_base *base,
event_base_foreach_event_cb cb, void *arg);
+/* Cleanup function to reset debug mode during shutdown.
+ *
+ * Calling this function doesn't mean it'll be possible to re-enable
+ * debug mode if any events were added.
+ */
+void event_disable_debug_mode(void);
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/sntp/libevent/event.c b/contrib/ntp/sntp/libevent/event.c
index af4a6e05e677..7a42b7319147 100644
--- a/contrib/ntp/sntp/libevent/event.c
+++ b/contrib/ntp/sntp/libevent/event.c
@@ -52,6 +52,9 @@
#include <string.h>
#include <time.h>
#include <limits.h>
+#ifdef EVENT__HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
#include "event2/event.h"
#include "event2/event_struct.h"
@@ -123,6 +126,7 @@ static const struct eventop *eventops[] = {
};
/* Global state; deprecated */
+EVENT2_EXPORT_SYMBOL
struct event_base *event_global_current_base_ = NULL;
#define current_base event_global_current_base_
@@ -199,6 +203,22 @@ eq_debug_entry(const struct event_debug_entry *a,
}
int event_debug_mode_on_ = 0;
+
+
+#if !defined(EVENT__DISABLE_THREAD_SUPPORT) && !defined(EVENT__DISABLE_DEBUG_MODE)
+/**
+ * @brief debug mode variable which is set for any function/structure that needs
+ * to be shared across threads (if thread support is enabled).
+ *
+ * When and if evthreads are initialized, this variable will be evaluated,
+ * and if set to something other than zero, this means the evthread setup
+ * functions were called out of order.
+ *
+ * See: "Locks and threading" in the documentation.
+ */
+int event_debug_created_threadable_ctx_ = 0;
+#endif
+
/* Set if it's too late to enable event_debug_mode. */
static int event_debug_mode_too_late = 0;
#ifndef EVENT__DISABLE_THREAD_SUPPORT
@@ -212,133 +232,169 @@ HT_PROTOTYPE(event_debug_map, event_debug_entry, node, hash_debug_entry,
HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
eq_debug_entry, 0.5, mm_malloc, mm_realloc, mm_free)
-/* Macro: record that ev is now setup (that is, ready for an add) */
-#define event_debug_note_setup_(ev) do { \
- if (event_debug_mode_on_) { \
- struct event_debug_entry *dent,find; \
- find.ptr = (ev); \
- EVLOCK_LOCK(event_debug_map_lock_, 0); \
- dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
- if (dent) { \
- dent->added = 0; \
- } else { \
- dent = mm_malloc(sizeof(*dent)); \
- if (!dent) \
- event_err(1, \
- "Out of memory in debugging code"); \
- dent->ptr = (ev); \
- dent->added = 0; \
- HT_INSERT(event_debug_map, &global_debug_map, dent); \
- } \
- EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
- } \
- event_debug_mode_too_late = 1; \
- } while (0)
-/* Macro: record that ev is no longer setup */
-#define event_debug_note_teardown_(ev) do { \
- if (event_debug_mode_on_) { \
- struct event_debug_entry *dent,find; \
- find.ptr = (ev); \
- EVLOCK_LOCK(event_debug_map_lock_, 0); \
- dent = HT_REMOVE(event_debug_map, &global_debug_map, &find); \
- if (dent) \
- mm_free(dent); \
- EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
- } \
- event_debug_mode_too_late = 1; \
- } while (0)
+/* record that ev is now setup (that is, ready for an add) */
+static void event_debug_note_setup_(const struct event *ev)
+{
+ struct event_debug_entry *dent, find;
+
+ if (!event_debug_mode_on_)
+ goto out;
+
+ find.ptr = ev;
+ EVLOCK_LOCK(event_debug_map_lock_, 0);
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find);
+ if (dent) {
+ dent->added = 0;
+ } else {
+ dent = mm_malloc(sizeof(*dent));
+ if (!dent)
+ event_err(1,
+ "Out of memory in debugging code");
+ dent->ptr = ev;
+ dent->added = 0;
+ HT_INSERT(event_debug_map, &global_debug_map, dent);
+ }
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0);
+
+out:
+ event_debug_mode_too_late = 1;
+}
+/* record that ev is no longer setup */
+static void event_debug_note_teardown_(const struct event *ev)
+{
+ struct event_debug_entry *dent, find;
+
+ if (!event_debug_mode_on_)
+ goto out;
+
+ find.ptr = ev;
+ EVLOCK_LOCK(event_debug_map_lock_, 0);
+ dent = HT_REMOVE(event_debug_map, &global_debug_map, &find);
+ if (dent)
+ mm_free(dent);
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0);
+
+out:
+ event_debug_mode_too_late = 1;
+}
/* Macro: record that ev is now added */
-#define event_debug_note_add_(ev) do { \
- if (event_debug_mode_on_) { \
- struct event_debug_entry *dent,find; \
- find.ptr = (ev); \
- EVLOCK_LOCK(event_debug_map_lock_, 0); \
- dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
- if (dent) { \
- dent->added = 1; \
- } else { \
- event_errx(EVENT_ERR_ABORT_, \
- "%s: noting an add on a non-setup event %p" \
- " (events: 0x%x, fd: "EV_SOCK_FMT \
- ", flags: 0x%x)", \
- __func__, (ev), (ev)->ev_events, \
- EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
- } \
- EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
- } \
- event_debug_mode_too_late = 1; \
- } while (0)
-/* Macro: record that ev is no longer added */
-#define event_debug_note_del_(ev) do { \
- if (event_debug_mode_on_) { \
- struct event_debug_entry *dent,find; \
- find.ptr = (ev); \
- EVLOCK_LOCK(event_debug_map_lock_, 0); \
- dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
- if (dent) { \
- dent->added = 0; \
- } else { \
- event_errx(EVENT_ERR_ABORT_, \
- "%s: noting a del on a non-setup event %p" \
- " (events: 0x%x, fd: "EV_SOCK_FMT \
- ", flags: 0x%x)", \
- __func__, (ev), (ev)->ev_events, \
- EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
- } \
- EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
- } \
- event_debug_mode_too_late = 1; \
- } while (0)
-/* Macro: assert that ev is setup (i.e., okay to add or inspect) */
-#define event_debug_assert_is_setup_(ev) do { \
- if (event_debug_mode_on_) { \
- struct event_debug_entry *dent,find; \
- find.ptr = (ev); \
- EVLOCK_LOCK(event_debug_map_lock_, 0); \
- dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
- if (!dent) { \
- event_errx(EVENT_ERR_ABORT_, \
- "%s called on a non-initialized event %p" \
- " (events: 0x%x, fd: "EV_SOCK_FMT\
- ", flags: 0x%x)", \
- __func__, (ev), (ev)->ev_events, \
- EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
- } \
- EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
- } \
- } while (0)
-/* Macro: assert that ev is not added (i.e., okay to tear down or set
- * up again) */
-#define event_debug_assert_not_added_(ev) do { \
- if (event_debug_mode_on_) { \
- struct event_debug_entry *dent,find; \
- find.ptr = (ev); \
- EVLOCK_LOCK(event_debug_map_lock_, 0); \
- dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
- if (dent && dent->added) { \
- event_errx(EVENT_ERR_ABORT_, \
- "%s called on an already added event %p" \
- " (events: 0x%x, fd: "EV_SOCK_FMT", " \
- "flags: 0x%x)", \
- __func__, (ev), (ev)->ev_events, \
- EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
- } \
- EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
- } \
- } while (0)
+static void event_debug_note_add_(const struct event *ev)
+{
+ struct event_debug_entry *dent,find;
+
+ if (!event_debug_mode_on_)
+ goto out;
+
+ find.ptr = ev;
+ EVLOCK_LOCK(event_debug_map_lock_, 0);
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find);
+ if (dent) {
+ dent->added = 1;
+ } else {
+ event_errx(EVENT_ERR_ABORT_,
+ "%s: noting an add on a non-setup event %p"
+ " (events: 0x%x, fd: "EV_SOCK_FMT
+ ", flags: 0x%x)",
+ __func__, ev, ev->ev_events,
+ EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
+ }
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0);
+
+out:
+ event_debug_mode_too_late = 1;
+}
+/* record that ev is no longer added */
+static void event_debug_note_del_(const struct event *ev)
+{
+ struct event_debug_entry *dent, find;
+
+ if (!event_debug_mode_on_)
+ goto out;
+
+ find.ptr = ev;
+ EVLOCK_LOCK(event_debug_map_lock_, 0);
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find);
+ if (dent) {
+ dent->added = 0;
+ } else {
+ event_errx(EVENT_ERR_ABORT_,
+ "%s: noting a del on a non-setup event %p"
+ " (events: 0x%x, fd: "EV_SOCK_FMT
+ ", flags: 0x%x)",
+ __func__, ev, ev->ev_events,
+ EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
+ }
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0);
+
+out:
+ event_debug_mode_too_late = 1;
+}
+/* assert that ev is setup (i.e., okay to add or inspect) */
+static void event_debug_assert_is_setup_(const struct event *ev)
+{
+ struct event_debug_entry *dent, find;
+
+ if (!event_debug_mode_on_)
+ return;
+
+ find.ptr = ev;
+ EVLOCK_LOCK(event_debug_map_lock_, 0);
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find);
+ if (!dent) {
+ event_errx(EVENT_ERR_ABORT_,
+ "%s called on a non-initialized event %p"
+ " (events: 0x%x, fd: "EV_SOCK_FMT
+ ", flags: 0x%x)",
+ __func__, ev, ev->ev_events,
+ EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
+ }
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0);
+}
+/* assert that ev is not added (i.e., okay to tear down or set up again) */
+static void event_debug_assert_not_added_(const struct event *ev)
+{
+ struct event_debug_entry *dent, find;
+
+ if (!event_debug_mode_on_)
+ return;
+
+ find.ptr = ev;
+ EVLOCK_LOCK(event_debug_map_lock_, 0);
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find);
+ if (dent && dent->added) {
+ event_errx(EVENT_ERR_ABORT_,
+ "%s called on an already added event %p"
+ " (events: 0x%x, fd: "EV_SOCK_FMT", "
+ "flags: 0x%x)",
+ __func__, ev, ev->ev_events,
+ EV_SOCK_ARG(ev->ev_fd), ev->ev_flags);
+ }
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0);
+}
+static void event_debug_assert_socket_nonblocking_(evutil_socket_t fd)
+{
+ if (!event_debug_mode_on_)
+ return;
+ if (fd < 0)
+ return;
+
+#ifndef _WIN32
+ {
+ int flags;
+ if ((flags = fcntl(fd, F_GETFL, NULL)) >= 0) {
+ EVUTIL_ASSERT(flags & O_NONBLOCK);
+ }
+ }
+#endif
+}
#else
-#define event_debug_note_setup_(ev) \
- ((void)0)
-#define event_debug_note_teardown_(ev) \
- ((void)0)
-#define event_debug_note_add_(ev) \
- ((void)0)
-#define event_debug_note_del_(ev) \
- ((void)0)
-#define event_debug_assert_is_setup_(ev) \
- ((void)0)
-#define event_debug_assert_not_added_(ev) \
- ((void)0)
+static void event_debug_note_setup_(const struct event *ev) { (void)ev; }
+static void event_debug_note_teardown_(const struct event *ev) { (void)ev; }
+static void event_debug_note_add_(const struct event *ev) { (void)ev; }
+static void event_debug_note_del_(const struct event *ev) { (void)ev; }
+static void event_debug_assert_is_setup_(const struct event *ev) { (void)ev; }
+static void event_debug_assert_not_added_(const struct event *ev) { (void)ev; }
+static void event_debug_assert_socket_nonblocking_(evutil_socket_t fd) { (void)fd; }
#endif
#define EVENT_BASE_ASSERT_LOCKED(base) \
@@ -574,7 +630,9 @@ event_base_new_with_config(const struct event_config *cfg)
int flags;
if (should_check_environment && !precise_time) {
precise_time = evutil_getenv_("EVENT_PRECISE_TIMER") != NULL;
- base->flags |= EVENT_BASE_FLAG_PRECISE_TIMER;
+ if (precise_time) {
+ base->flags |= EVENT_BASE_FLAG_PRECISE_TIMER;
+ }
}
flags = precise_time ? EV_MONOT_PRECISE : 0;
evutil_configure_monotonic_time_(&base->monotonic_timer, flags);
@@ -655,6 +713,10 @@ event_base_new_with_config(const struct event_config *cfg)
/* prepare for threading */
+#if !defined(EVENT__DISABLE_THREAD_SUPPORT) && !defined(EVENT__DISABLE_DEBUG_MODE)
+ event_debug_created_threadable_ctx_ = 1;
+#endif
+
#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (EVTHREAD_LOCKING_ENABLED() &&
(!cfg || !(cfg->flags & EVENT_BASE_FLAG_NOLOCK))) {
@@ -749,6 +811,29 @@ event_base_cancel_single_callback_(struct event_base *base,
return result;
}
+static int event_base_free_queues_(struct event_base *base, int run_finalizers)
+{
+ int deleted = 0, i;
+
+ for (i = 0; i < base->nactivequeues; ++i) {
+ struct event_callback *evcb, *next;
+ for (evcb = TAILQ_FIRST(&base->activequeues[i]); evcb; ) {
+ next = TAILQ_NEXT(evcb, evcb_active_next);
+ deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers);
+ evcb = next;
+ }
+ }
+
+ {
+ struct event_callback *evcb;
+ while ((evcb = TAILQ_FIRST(&base->active_later_queue))) {
+ deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers);
+ }
+ }
+
+ return deleted;
+}
+
static void
event_base_free_(struct event_base *base, int run_finalizers)
{
@@ -809,22 +894,23 @@ event_base_free_(struct event_base *base, int run_finalizers)
if (base->common_timeout_queues)
mm_free(base->common_timeout_queues);
- for (i = 0; i < base->nactivequeues; ++i) {
- struct event_callback *evcb, *next;
- for (evcb = TAILQ_FIRST(&base->activequeues[i]); evcb; ) {
- next = TAILQ_NEXT(evcb, evcb_active_next);
- n_deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers);
- evcb = next;
- }
- }
- {
- struct event_callback *evcb;
- while ((evcb = TAILQ_FIRST(&base->active_later_queue))) {
- n_deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers);
+ for (;;) {
+ /* For finalizers we can register yet another finalizer out from
+ * finalizer, and iff finalizer will be in active_later_queue we can
+ * add finalizer to activequeues, and we will have events in
+ * activequeues after this function returns, which is not what we want
+ * (we even have an assertion for this).
+ *
+ * A simple case is bufferevent with underlying (i.e. filters).
+ */
+ int i = event_base_free_queues_(base, run_finalizers);
+ event_debug(("%s: %d events freed", __func__, i));
+ if (!i) {
+ break;
}
+ n_deleted += i;
}
-
if (n_deleted)
event_debug(("%s: %d events were still set in base",
__func__, n_deleted));
@@ -926,13 +1012,13 @@ event_reinit(struct event_base *base)
event_del_nolock_(&base->sig.ev_signal, EVENT_DEL_AUTOBLOCK);
event_debug_unassign(&base->sig.ev_signal);
memset(&base->sig.ev_signal, 0, sizeof(base->sig.ev_signal));
- if (base->sig.ev_signal_pair[0] != -1)
- EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[0]);
- if (base->sig.ev_signal_pair[1] != -1)
- EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[1]);
had_signal_added = 1;
base->sig.ev_signal_added = 0;
}
+ if (base->sig.ev_signal_pair[0] != -1)
+ EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[0]);
+ if (base->sig.ev_signal_pair[1] != -1)
+ EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[1]);
if (base->th_notify_fn != NULL) {
was_notifiable = 1;
base->th_notify_fn = NULL;
@@ -981,8 +1067,12 @@ event_reinit(struct event_base *base)
if (evmap_reinit_(base) < 0)
res = -1;
} else {
- if (had_signal_added)
- res = evsig_init_(base);
+ res = evsig_init_(base);
+ if (res == 0 && had_signal_added) {
+ res = event_add_nolock_(&base->sig.ev_signal, NULL, 0);
+ if (res == 0)
+ base->sig.ev_signal_added = 1;
+ }
}
/* If we were notifiable before, and nothing just exploded, become
@@ -1593,10 +1683,12 @@ event_process_active_single_queue(struct event_base *base,
break;
case EV_CLOSURE_EVENT: {
void (*evcb_callback)(evutil_socket_t, short, void *);
+ short res;
EVUTIL_ASSERT(ev != NULL);
evcb_callback = *ev->ev_callback;
+ res = ev->ev_res;
EVBASE_RELEASE_LOCK(base, th_base_lock);
- evcb_callback(ev->ev_fd, ev->ev_res, ev->ev_arg);
+ evcb_callback(ev->ev_fd, res, ev->ev_arg);
}
break;
case EV_CLOSURE_CB_SELF: {
@@ -1614,8 +1706,8 @@ event_process_active_single_queue(struct event_base *base,
evcb_evfinalize = ev->ev_evcallback.evcb_cb_union.evcb_evfinalize;
EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING));
EVBASE_RELEASE_LOCK(base, th_base_lock);
- evcb_evfinalize(ev, ev->ev_arg);
event_debug_note_teardown_(ev);
+ evcb_evfinalize(ev, ev->ev_arg);
if (evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE)
mm_free(ev);
}
@@ -1964,6 +2056,9 @@ event_base_once(struct event_base *base, evutil_socket_t fd, short events,
int res = 0;
int activate = 0;
+ if (!base)
+ return (-1);
+
/* We cannot support signals that just fire once, or persistent
* events. */
if (events & (EV_SIGNAL|EV_PERSIST))
@@ -2022,6 +2117,8 @@ event_assign(struct event *ev, struct event_base *base, evutil_socket_t fd, shor
if (arg == &event_self_cbarg_ptr_)
arg = ev;
+ if (!(events & EV_SIGNAL))
+ event_debug_assert_socket_nonblocking_(fd);
event_debug_assert_not_added_(ev);
ev->ev_base = base;
@@ -2672,17 +2769,16 @@ static int
event_del_(struct event *ev, int blocking)
{
int res;
+ struct event_base *base = ev->ev_base;
- if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) {
+ if (EVUTIL_FAILURE_CHECK(!base)) {
event_warnx("%s: event has no event_base set.", __func__);
return -1;
}
- EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
-
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
res = event_del_nolock_(ev, blocking);
-
- EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
return (res);
}
@@ -2732,21 +2828,7 @@ event_del_nolock_(struct event *ev, int blocking)
}
}
- /* If the main thread is currently executing this event's callback,
- * and we are not the main thread, then we want to wait until the
- * callback is done before we start removing the event. That way,
- * when this function returns, it will be safe to free the
- * user-supplied argument. */
base = ev->ev_base;
-#ifndef EVENT__DISABLE_THREAD_SUPPORT
- if (blocking != EVENT_DEL_NOBLOCK &&
- base->current_event == event_to_event_callback(ev) &&
- !EVBASE_IN_THREAD(base) &&
- (blocking == EVENT_DEL_BLOCK || !(ev->ev_events & EV_FINALIZE))) {
- ++base->current_event_waiters;
- EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
- }
-#endif
EVUTIL_ASSERT(!(ev->ev_flags & ~EVLIST_ALL));
@@ -2785,6 +2867,10 @@ event_del_nolock_(struct event *ev, int blocking)
notify = 1;
res = 0;
}
+ /* If we do not have events, let's notify event base so it can
+ * exit without waiting */
+ if (!event_haveevents(base) && !N_ACTIVE_CALLBACKS(base))
+ notify = 1;
}
/* if we are not in the right thread, we need to wake up the loop */
@@ -2793,6 +2879,21 @@ event_del_nolock_(struct event *ev, int blocking)
event_debug_note_del_(ev);
+ /* If the main thread is currently executing this event's callback,
+ * and we are not the main thread, then we want to wait until the
+ * callback is done before returning. That way, when this function
+ * returns, it will be safe to free the user-supplied argument.
+ */
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (blocking != EVENT_DEL_NOBLOCK &&
+ base->current_event == event_to_event_callback(ev) &&
+ !EVBASE_IN_THREAD(base) &&
+ (blocking == EVENT_DEL_BLOCK || !(ev->ev_events & EV_FINALIZE))) {
+ ++base->current_event_waiters;
+ EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
+ }
+#endif
+
return (res);
}
@@ -2913,6 +3014,7 @@ event_callback_activate_nolock_(struct event_base *base,
switch (evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) {
default:
EVUTIL_ASSERT(0);
+ EVUTIL_FALLTHROUGH;
case EVLIST_ACTIVE_LATER:
event_queue_remove_active_later(base, evcb);
r = 0;
@@ -2931,16 +3033,17 @@ event_callback_activate_nolock_(struct event_base *base,
return r;
}
-void
+int
event_callback_activate_later_nolock_(struct event_base *base,
struct event_callback *evcb)
{
if (evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER))
- return;
+ return 0;
event_queue_insert_active_later(base, evcb);
if (EVBASE_NEED_NOTIFY(base))
evthread_notify_base(base);
+ return 1;
}
void
@@ -3025,10 +3128,12 @@ event_deferred_cb_schedule_(struct event_base *base, struct event_callback *cb)
base = current_base;
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
if (base->n_deferreds_queued > MAX_DEFERREDS_QUEUED) {
- event_callback_activate_later_nolock_(base, cb);
+ r = event_callback_activate_later_nolock_(base, cb);
} else {
- ++base->n_deferreds_queued;
r = event_callback_activate_nolock_(base, cb);
+ if (r) {
+ ++base->n_deferreds_queued;
+ }
}
EVBASE_RELEASE_LOCK(base, th_base_lock);
return r;
@@ -3098,10 +3203,6 @@ timeout_process(struct event_base *base)
}
}
-#if (EVLIST_INTERNAL >> 4) != 1
-#error "Mismatch for value of EVLIST_INTERNAL"
-#endif
-
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
@@ -3109,13 +3210,13 @@ timeout_process(struct event_base *base)
#define MAX_EVENT_COUNT(var, v) var = MAX(var, v)
/* These are a fancy way to spell
- if (flags & EVLIST_INTERNAL)
+ if (~flags & EVLIST_INTERNAL)
base->event_count--/++;
*/
#define DECR_EVENT_COUNT(base,flags) \
- ((base)->event_count -= (~((flags) >> 4) & 1))
+ ((base)->event_count -= !((flags) & EVLIST_INTERNAL))
#define INCR_EVENT_COUNT(base,flags) do { \
- ((base)->event_count += (~((flags) >> 4) & 1)); \
+ ((base)->event_count += !((flags) & EVLIST_INTERNAL)); \
MAX_EVENT_COUNT((base)->event_count_max, (base)->event_count); \
} while (0)
@@ -3647,13 +3748,14 @@ dump_inserted_event_fn(const struct event_base *base, const struct event *e, voi
if (! (e->ev_flags & (EVLIST_INSERTED|EVLIST_TIMEOUT)))
return 0;
- fprintf(output, " %p [%s "EV_SOCK_FMT"]%s%s%s%s%s%s",
+ fprintf(output, " %p [%s "EV_SOCK_FMT"]%s%s%s%s%s%s%s",
(void*)e, gloss, EV_SOCK_ARG(e->ev_fd),
(e->ev_events&EV_READ)?" Read":"",
(e->ev_events&EV_WRITE)?" Write":"",
(e->ev_events&EV_CLOSED)?" EOF":"",
(e->ev_events&EV_SIGNAL)?" Signal":"",
(e->ev_events&EV_PERSIST)?" Persist":"",
+ (e->ev_events&EV_ET)?" ET":"",
(e->ev_flags&EVLIST_INTERNAL)?" Internal":"");
if (e->ev_flags & EVLIST_TIMEOUT) {
struct timeval tv;
@@ -3724,7 +3826,35 @@ void
event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events)
{
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
- evmap_io_active_(base, fd, events & (EV_READ|EV_WRITE|EV_CLOSED));
+
+ /* Activate any non timer events */
+ if (!(events & EV_TIMEOUT)) {
+ evmap_io_active_(base, fd, events & (EV_READ|EV_WRITE|EV_CLOSED));
+ } else {
+ /* If we want to activate timer events, loop and activate each event with
+ * the same fd in both the timeheap and common timeouts list */
+ int i;
+ unsigned u;
+ struct event *ev;
+
+ for (u = 0; u < base->timeheap.n; ++u) {
+ ev = base->timeheap.p[u];
+ if (ev->ev_fd == fd) {
+ event_active_nolock_(ev, EV_TIMEOUT, 1);
+ }
+ }
+
+ for (i = 0; i < base->n_common_timeouts; ++i) {
+ struct common_timeout_list *ctl = base->common_timeout_queues[i];
+ TAILQ_FOREACH(ev, &ctl->events,
+ ev_timeout_pos.ev_next_with_common_timeout) {
+ if (ev->ev_fd == fd) {
+ event_active_nolock_(ev, EV_TIMEOUT, 1);
+ }
+ }
+ }
+ }
+
EVBASE_RELEASE_LOCK(base, th_base_lock);
}
diff --git a/contrib/ntp/sntp/libevent/event_iocp.c b/contrib/ntp/sntp/libevent/event_iocp.c
index a9902fbc426e..6b2a2e15ef86 100644
--- a/contrib/ntp/sntp/libevent/event_iocp.c
+++ b/contrib/ntp/sntp/libevent/event_iocp.c
@@ -151,7 +151,7 @@ init_extension_functions(struct win32_extension_fns *ext)
const GUID connectex = WSAID_CONNECTEX;
const GUID getacceptexsockaddrs = WSAID_GETACCEPTEXSOCKADDRS;
SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
- if (s == INVALID_SOCKET)
+ if (s == EVUTIL_INVALID_SOCKET)
return;
ext->AcceptEx = get_extension_function(s, &acceptex);
ext->ConnectEx = get_extension_function(s, &connectex);
diff --git a/contrib/ntp/sntp/libevent/event_rpcgen.py b/contrib/ntp/sntp/libevent/event_rpcgen.py
index c5375656969e..0bae3b0fe662 100755
--- a/contrib/ntp/sntp/libevent/event_rpcgen.py
+++ b/contrib/ntp/sntp/libevent/event_rpcgen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
#
# Copyright (c) 2005-2007 Niels Provos <provos@citi.umich.edu>
# Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -6,65 +6,79 @@
#
# Generates marshaling code based on libevent.
+# pylint: disable=too-many-lines
+# pylint: disable=too-many-branches
+# pylint: disable=too-many-public-methods
+# pylint: disable=too-many-statements
+# pylint: disable=global-statement
+
# TODO:
-# 1) use optparse to allow the strategy shell to parse options, and
-# to allow the instantiated factory (for the specific output language)
-# to parse remaining options
-# 2) move the globals into a class that manages execution (including the
-# progress outputs that space stderr at the moment)
-# 3) emit other languages
+# 1) propagate the arguments/options parsed by argparse down to the
+# instantiated factory objects.
+# 2) move the globals into a class that manages execution, including the
+# progress outputs that go to stderr at the moment.
+# 3) emit other languages.
-import sys
+import argparse
import re
+import sys
_NAME = "event_rpcgen.py"
_VERSION = "0.1"
# Globals
-line_count = 0
+LINE_COUNT = 0
-white = re.compile(r'\s+')
-cppcomment = re.compile(r'\/\/.*$')
-nonident = re.compile(r'[^a-zA-Z0-9_]')
-structref = re.compile(r'^struct\[([a-zA-Z_][a-zA-Z0-9_]*)\]$')
-structdef = re.compile(r'^struct +[a-zA-Z_][a-zA-Z0-9_]* *{$')
+CPPCOMMENT_RE = re.compile(r"\/\/.*$")
+NONIDENT_RE = re.compile(r"\W")
+PREPROCESSOR_DEF_RE = re.compile(r"^#define")
+STRUCT_REF_RE = re.compile(r"^struct\[(?P<name>[a-zA-Z_][a-zA-Z0-9_]*)\]$")
+STRUCT_DEF_RE = re.compile(r"^struct +[a-zA-Z_][a-zA-Z0-9_]* *{$")
+WHITESPACE_RE = re.compile(r"\s+")
-headerdirect = []
-cppdirect = []
+HEADER_DIRECT = []
+CPP_DIRECT = []
+
+QUIETLY = False
-QUIETLY = 0
def declare(s):
if not QUIETLY:
- print s
+ print(s)
+
def TranslateList(mylist, mydict):
- return map(lambda x: x % mydict, mylist)
+ return [x % mydict for x in mylist]
+
-# Exception class for parse errors
class RpcGenError(Exception):
- def __init__(self, why):
- self.why = why
- def __str__(self):
- return str(self.why)
+ """An Exception class for parse errors."""
+
+ def __init__(self, why): # pylint: disable=super-init-not-called
+ self.why = why
+
+ def __str__(self):
+ return str(self.why)
+
# Holds everything that makes a struct
-class Struct:
+class Struct(object):
def __init__(self, name):
self._name = name
self._entries = []
self._tags = {}
- declare(' Created struct: %s' % name)
+ declare(" Created struct: %s" % name)
def AddEntry(self, entry):
- if self._tags.has_key(entry.Tag()):
+ if entry.Tag() in self._tags:
raise RpcGenError(
'Entry "%s" duplicates tag number %d from "%s" '
- 'around line %d' % (entry.Name(), entry.Tag(),
- self._tags[entry.Tag()], line_count))
+ "around line %d"
+ % (entry.Name(), entry.Tag(), self._tags[entry.Tag()], LINE_COUNT)
+ )
self._entries.append(entry)
self._tags[entry.Tag()] = entry.Name()
- declare(' Added entry: %s' % entry.Name())
+ declare(" Added entry: %s" % entry.Name())
def Name(self):
return self._name
@@ -75,10 +89,12 @@ class Struct:
name = "%s_%s" % (self._name, entry.Name())
return name.upper()
- def PrintIndented(self, file, ident, code):
+ @staticmethod
+ def PrintIndented(filep, ident, code):
"""Takes an array, add indentation to each entry and prints it."""
for entry in code:
- print >>file, '%s%s' % (ident, entry)
+ filep.write("%s%s\n" % (ident, entry))
+
class StructCCode(Struct):
""" Knows how to generate C code for a struct """
@@ -86,44 +102,41 @@ class StructCCode(Struct):
def __init__(self, name):
Struct.__init__(self, name)
- def PrintTags(self, file):
+ def PrintTags(self, filep):
"""Prints the tag definitions for a structure."""
- print >>file, '/* Tag definition for %s */' % self._name
- print >>file, 'enum %s_ {' % self._name.lower()
+ filep.write("/* Tag definition for %s */\n" % self._name)
+ filep.write("enum %s_ {\n" % self._name.lower())
for entry in self._entries:
- print >>file, ' %s=%d,' % (self.EntryTagName(entry),
- entry.Tag())
- print >>file, ' %s_MAX_TAGS' % (self._name.upper())
- print >>file, '};\n'
+ filep.write(" %s=%d,\n" % (self.EntryTagName(entry), entry.Tag()))
+ filep.write(" %s_MAX_TAGS\n" % (self._name.upper()))
+ filep.write("};\n\n")
- def PrintForwardDeclaration(self, file):
- print >>file, 'struct %s;' % self._name
+ def PrintForwardDeclaration(self, filep):
+ filep.write("struct %s;\n" % self._name)
- def PrintDeclaration(self, file):
- print >>file, '/* Structure declaration for %s */' % self._name
- print >>file, 'struct %s_access_ {' % self._name
+ def PrintDeclaration(self, filep):
+ filep.write("/* Structure declaration for %s */\n" % self._name)
+ filep.write("struct %s_access_ {\n" % self._name)
for entry in self._entries:
- dcl = entry.AssignDeclaration('(*%s_assign)' % entry.Name())
- dcl.extend(
- entry.GetDeclaration('(*%s_get)' % entry.Name()))
+ dcl = entry.AssignDeclaration("(*%s_assign)" % entry.Name())
+ dcl.extend(entry.GetDeclaration("(*%s_get)" % entry.Name()))
if entry.Array():
- dcl.extend(
- entry.AddDeclaration('(*%s_add)' % entry.Name()))
- self.PrintIndented(file, ' ', dcl)
- print >>file, '};\n'
+ dcl.extend(entry.AddDeclaration("(*%s_add)" % entry.Name()))
+ self.PrintIndented(filep, " ", dcl)
+ filep.write("};\n\n")
- print >>file, 'struct %s {' % self._name
- print >>file, ' struct %s_access_ *base;\n' % self._name
+ filep.write("struct %s {\n" % self._name)
+ filep.write(" struct %s_access_ *base;\n\n" % self._name)
for entry in self._entries:
dcl = entry.Declaration()
- self.PrintIndented(file, ' ', dcl)
- print >>file, ''
+ self.PrintIndented(filep, " ", dcl)
+ filep.write("\n")
for entry in self._entries:
- print >>file, ' ev_uint8_t %s_set;' % entry.Name()
- print >>file, '};\n'
+ filep.write(" ev_uint8_t %s_set;\n" % entry.Name())
+ filep.write("};\n\n")
- print >>file, \
-"""struct %(name)s *%(name)s_new(void);
+ filep.write(
+ """struct %(name)s *%(name)s_new(void);
struct %(name)s *%(name)s_new_with_arg(void *);
void %(name)s_free(struct %(name)s *);
void %(name)s_clear(struct %(name)s *);
@@ -133,227 +146,291 @@ int %(name)s_complete(struct %(name)s *);
void evtag_marshal_%(name)s(struct evbuffer *, ev_uint32_t,
const struct %(name)s *);
int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
- struct %(name)s *);""" % { 'name' : self._name }
-
+ struct %(name)s *);\n"""
+ % {"name": self._name}
+ )
# Write a setting function of every variable
for entry in self._entries:
- self.PrintIndented(file, '', entry.AssignDeclaration(
- entry.AssignFuncName()))
- self.PrintIndented(file, '', entry.GetDeclaration(
- entry.GetFuncName()))
+ self.PrintIndented(
+ filep, "", entry.AssignDeclaration(entry.AssignFuncName())
+ )
+ self.PrintIndented(filep, "", entry.GetDeclaration(entry.GetFuncName()))
if entry.Array():
- self.PrintIndented(file, '', entry.AddDeclaration(
- entry.AddFuncName()))
+ self.PrintIndented(filep, "", entry.AddDeclaration(entry.AddFuncName()))
- print >>file, '/* --- %s done --- */\n' % self._name
+ filep.write("/* --- %s done --- */\n\n" % self._name)
- def PrintCode(self, file):
- print >>file, ('/*\n'
- ' * Implementation of %s\n'
- ' */\n') % self._name
+ def PrintCode(self, filep):
+ filep.write(
+ """/*
+ * Implementation of %s
+ */
+"""
+ % (self._name)
+ )
- print >>file, \
- 'static struct %(name)s_access_ %(name)s_base__ = {' % \
- { 'name' : self._name }
+ filep.write(
+ """
+static struct %(name)s_access_ %(name)s_base__ = {
+"""
+ % {"name": self._name}
+ )
for entry in self._entries:
- self.PrintIndented(file, ' ', entry.CodeBase())
- print >>file, '};\n'
+ self.PrintIndented(filep, " ", entry.CodeBase())
+ filep.write("};\n\n")
# Creation
- print >>file, (
- 'struct %(name)s *\n'
- '%(name)s_new(void)\n'
- '{\n'
- ' return %(name)s_new_with_arg(NULL);\n'
- '}\n'
- '\n'
- 'struct %(name)s *\n'
- '%(name)s_new_with_arg(void *unused)\n'
- '{\n'
- ' struct %(name)s *tmp;\n'
- ' if ((tmp = malloc(sizeof(struct %(name)s))) == NULL) {\n'
- ' event_warn("%%s: malloc", __func__);\n'
- ' return (NULL);\n'
- ' }\n'
- ' tmp->base = &%(name)s_base__;\n') % { 'name' : self._name }
+ filep.write(
+ """struct %(name)s *
+%(name)s_new(void)
+{
+ return %(name)s_new_with_arg(NULL);
+}
+
+struct %(name)s *
+%(name)s_new_with_arg(void *unused)
+{
+ struct %(name)s *tmp;
+ if ((tmp = malloc(sizeof(struct %(name)s))) == NULL) {
+ event_warn("%%s: malloc", __func__);
+ return (NULL);
+ }
+ tmp->base = &%(name)s_base__;
+
+"""
+ % {"name": self._name}
+ )
for entry in self._entries:
- self.PrintIndented(file, ' ', entry.CodeInitialize('tmp'))
- print >>file, ' tmp->%s_set = 0;\n' % entry.Name()
+ self.PrintIndented(filep, " ", entry.CodeInitialize("tmp"))
+ filep.write(" tmp->%s_set = 0;\n\n" % entry.Name())
+
+ filep.write(
+ """ return (tmp);
+}
- print >>file, (
- ' return (tmp);\n'
- '}\n')
+"""
+ )
# Adding
for entry in self._entries:
if entry.Array():
- self.PrintIndented(file, '', entry.CodeAdd())
- print >>file, ''
+ self.PrintIndented(filep, "", entry.CodeAdd())
+ filep.write("\n")
# Assigning
for entry in self._entries:
- self.PrintIndented(file, '', entry.CodeAssign())
- print >>file, ''
+ self.PrintIndented(filep, "", entry.CodeAssign())
+ filep.write("\n")
# Getting
for entry in self._entries:
- self.PrintIndented(file, '', entry.CodeGet())
- print >>file, ''
+ self.PrintIndented(filep, "", entry.CodeGet())
+ filep.write("\n")
# Clearing
- print >>file, ( 'void\n'
- '%(name)s_clear(struct %(name)s *tmp)\n'
- '{'
- ) % { 'name' : self._name }
+ filep.write(
+ """void
+%(name)s_clear(struct %(name)s *tmp)
+{
+"""
+ % {"name": self._name}
+ )
for entry in self._entries:
- self.PrintIndented(file, ' ', entry.CodeClear('tmp'))
+ self.PrintIndented(filep, " ", entry.CodeClear("tmp"))
- print >>file, '}\n'
+ filep.write("}\n\n")
# Freeing
- print >>file, ( 'void\n'
- '%(name)s_free(struct %(name)s *tmp)\n'
- '{'
- ) % { 'name' : self._name }
+ filep.write(
+ """void
+%(name)s_free(struct %(name)s *tmp)
+{
+"""
+ % {"name": self._name}
+ )
for entry in self._entries:
- self.PrintIndented(file, ' ', entry.CodeFree('tmp'))
+ self.PrintIndented(filep, " ", entry.CodeFree("tmp"))
+
+ filep.write(
+ """ free(tmp);
+}
- print >>file, (' free(tmp);\n'
- '}\n')
+"""
+ )
# Marshaling
- print >>file, ('void\n'
- '%(name)s_marshal(struct evbuffer *evbuf, '
- 'const struct %(name)s *tmp)'
- '{') % { 'name' : self._name }
+ filep.write(
+ """void
+%(name)s_marshal(struct evbuffer *evbuf, const struct %(name)s *tmp) {
+"""
+ % {"name": self._name}
+ )
for entry in self._entries:
- indent = ' '
+ indent = " "
# Optional entries do not have to be set
if entry.Optional():
- indent += ' '
- print >>file, ' if (tmp->%s_set) {' % entry.Name()
+ indent += " "
+ filep.write(" if (tmp->%s_set) {\n" % entry.Name())
self.PrintIndented(
- file, indent,
- entry.CodeMarshal('evbuf', self.EntryTagName(entry),
- entry.GetVarName('tmp'),
- entry.GetVarLen('tmp')))
+ filep,
+ indent,
+ entry.CodeMarshal(
+ "evbuf",
+ self.EntryTagName(entry),
+ entry.GetVarName("tmp"),
+ entry.GetVarLen("tmp"),
+ ),
+ )
if entry.Optional():
- print >>file, ' }'
+ filep.write(" }\n")
- print >>file, '}\n'
+ filep.write("}\n\n")
# Unmarshaling
- print >>file, ('int\n'
- '%(name)s_unmarshal(struct %(name)s *tmp, '
- ' struct evbuffer *evbuf)\n'
- '{\n'
- ' ev_uint32_t tag;\n'
- ' while (evbuffer_get_length(evbuf) > 0) {\n'
- ' if (evtag_peek(evbuf, &tag) == -1)\n'
- ' return (-1);\n'
- ' switch (tag) {\n'
- ) % { 'name' : self._name }
+ filep.write(
+ """int
+%(name)s_unmarshal(struct %(name)s *tmp, struct evbuffer *evbuf)
+{
+ ev_uint32_t tag;
+ while (evbuffer_get_length(evbuf) > 0) {
+ if (evtag_peek(evbuf, &tag) == -1)
+ return (-1);
+ switch (tag) {
+
+"""
+ % {"name": self._name}
+ )
for entry in self._entries:
- print >>file, ' case %s:\n' % self.EntryTagName(entry)
+ filep.write(" case %s:\n" % (self.EntryTagName(entry)))
if not entry.Array():
- print >>file, (
- ' if (tmp->%s_set)\n'
- ' return (-1);'
- ) % (entry.Name())
+ filep.write(
+ """ if (tmp->%s_set)
+ return (-1);
+"""
+ % (entry.Name())
+ )
self.PrintIndented(
- file, ' ',
- entry.CodeUnmarshal('evbuf',
- self.EntryTagName(entry),
- entry.GetVarName('tmp'),
- entry.GetVarLen('tmp')))
-
- print >>file, ( ' tmp->%s_set = 1;\n' % entry.Name() +
- ' break;\n' )
- print >>file, ( ' default:\n'
- ' return -1;\n'
- ' }\n'
- ' }\n' )
+ filep,
+ " ",
+ entry.CodeUnmarshal(
+ "evbuf",
+ self.EntryTagName(entry),
+ entry.GetVarName("tmp"),
+ entry.GetVarLen("tmp"),
+ ),
+ )
+
+ filep.write(
+ """ tmp->%s_set = 1;
+ break;
+"""
+ % (entry.Name())
+ )
+ filep.write(
+ """ default:
+ return -1;
+ }
+ }
+
+"""
+ )
# Check if it was decoded completely
- print >>file, ( ' if (%(name)s_complete(tmp) == -1)\n'
- ' return (-1);'
- ) % { 'name' : self._name }
-
- # Successfully decoded
- print >>file, ( ' return (0);\n'
- '}\n')
+ filep.write(
+ """ if (%(name)s_complete(tmp) == -1)
+ return (-1);
+ return (0);
+}
+"""
+ % {"name": self._name}
+ )
# Checking if a structure has all the required data
- print >>file, (
- 'int\n'
- '%(name)s_complete(struct %(name)s *msg)\n'
- '{' ) % { 'name' : self._name }
+ filep.write(
+ """
+int
+%(name)s_complete(struct %(name)s *msg)
+{
+"""
+ % {"name": self._name}
+ )
for entry in self._entries:
if not entry.Optional():
code = [
- 'if (!msg->%(name)s_set)',
- ' return (-1);' ]
+ """if (!msg->%(name)s_set)
+ return (-1);"""
+ ]
code = TranslateList(code, entry.GetTranslation())
- self.PrintIndented(
- file, ' ', code)
+ self.PrintIndented(filep, " ", code)
self.PrintIndented(
- file, ' ',
- entry.CodeComplete('msg', entry.GetVarName('msg')))
- print >>file, (
- ' return (0);\n'
- '}\n' )
+ filep, " ", entry.CodeComplete("msg", entry.GetVarName("msg"))
+ )
+ filep.write(
+ """ return (0);
+}
+"""
+ )
# Complete message unmarshaling
- print >>file, (
- 'int\n'
- 'evtag_unmarshal_%(name)s(struct evbuffer *evbuf, '
- 'ev_uint32_t need_tag, struct %(name)s *msg)\n'
- '{\n'
- ' ev_uint32_t tag;\n'
- ' int res = -1;\n'
- '\n'
- ' struct evbuffer *tmp = evbuffer_new();\n'
- '\n'
- ' if (evtag_unmarshal(evbuf, &tag, tmp) == -1'
- ' || tag != need_tag)\n'
- ' goto error;\n'
- '\n'
- ' if (%(name)s_unmarshal(msg, tmp) == -1)\n'
- ' goto error;\n'
- '\n'
- ' res = 0;\n'
- '\n'
- ' error:\n'
- ' evbuffer_free(tmp);\n'
- ' return (res);\n'
- '}\n' ) % { 'name' : self._name }
+ filep.write(
+ """
+int
+evtag_unmarshal_%(name)s(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct %(name)s *msg)
+{
+ ev_uint32_t tag;
+ int res = -1;
+
+ struct evbuffer *tmp = evbuffer_new();
+
+ if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag)
+ goto error;
+
+ if (%(name)s_unmarshal(msg, tmp) == -1)
+ goto error;
+
+ res = 0;
+
+ error:
+ evbuffer_free(tmp);
+ return (res);
+}
+"""
+ % {"name": self._name}
+ )
# Complete message marshaling
- print >>file, (
- 'void\n'
- 'evtag_marshal_%(name)s(struct evbuffer *evbuf, ev_uint32_t tag, '
- 'const struct %(name)s *msg)\n'
- '{\n'
- ' struct evbuffer *buf_ = evbuffer_new();\n'
- ' assert(buf_ != NULL);\n'
- ' %(name)s_marshal(buf_, msg);\n'
- ' evtag_marshal_buffer(evbuf, tag, buf_);\n '
- ' evbuffer_free(buf_);\n'
- '}\n' ) % { 'name' : self._name }
-
-class Entry:
- def __init__(self, type, name, tag):
- self._type = type
+ filep.write(
+ """
+void
+evtag_marshal_%(name)s(struct evbuffer *evbuf, ev_uint32_t tag,
+ const struct %(name)s *msg)
+{
+ struct evbuffer *buf_ = evbuffer_new();
+ assert(buf_ != NULL);
+ %(name)s_marshal(buf_, msg);
+ evtag_marshal_buffer(evbuf, tag, buf_);
+ evbuffer_free(buf_);
+}
+
+"""
+ % {"name": self._name}
+ )
+
+
+class Entry(object):
+ def __init__(self, ent_type, name, tag):
+ self._type = ent_type
self._name = name
self._tag = int(tag)
- self._ctype = type
- self._optional = 0
- self._can_be_array = 0
- self._array = 0
+ self._ctype = ent_type
+ self._optional = False
+ self._can_be_array = False
+ self._array = False
self._line_count = -1
self._struct = None
self._refname = None
@@ -361,8 +438,9 @@ class Entry:
self._optpointer = True
self._optaddarg = True
- def GetInitializer(self):
- assert 0, "Entry does not provide initializer"
+ @staticmethod
+ def GetInitializer():
+ raise NotImplementedError("Entry does not provide an initializer")
def SetStruct(self, struct):
self._struct = struct
@@ -389,326 +467,351 @@ class Entry:
def Type(self):
return self._type
- def MakeArray(self, yes=1):
- self._array = yes
+ def MakeArray(self):
+ self._array = True
def MakeOptional(self):
- self._optional = 1
+ self._optional = True
def Verify(self):
if self.Array() and not self._can_be_array:
raise RpcGenError(
'Entry "%s" cannot be created as an array '
- 'around line %d' % (self._name, self.LineCount()))
+ "around line %d" % (self._name, self.LineCount())
+ )
if not self._struct:
raise RpcGenError(
'Entry "%s" does not know which struct it belongs to '
- 'around line %d' % (self._name, self.LineCount()))
+ "around line %d" % (self._name, self.LineCount())
+ )
if self._optional and self._array:
raise RpcGenError(
'Entry "%s" has illegal combination of optional and array '
- 'around line %d' % (self._name, self.LineCount()))
+ "around line %d" % (self._name, self.LineCount())
+ )
- def GetTranslation(self, extradict = {}):
+ def GetTranslation(self, extradict=None):
+ if extradict is None:
+ extradict = {}
mapping = {
- "parent_name" : self._struct.Name(),
- "name" : self._name,
- "ctype" : self._ctype,
- "refname" : self._refname,
- "optpointer" : self._optpointer and "*" or "",
- "optreference" : self._optpointer and "&" or "",
- "optaddarg" :
- self._optaddarg and ", const %s value" % self._ctype or ""
- }
- for (k, v) in extradict.items():
+ "parent_name": self._struct.Name(),
+ "name": self._name,
+ "ctype": self._ctype,
+ "refname": self._refname,
+ "optpointer": self._optpointer and "*" or "",
+ "optreference": self._optpointer and "&" or "",
+ "optaddarg": self._optaddarg and ", const %s value" % self._ctype or "",
+ }
+ for (k, v) in list(extradict.items()):
mapping[k] = v
return mapping
def GetVarName(self, var):
- return '%(var)s->%(name)s_data' % self.GetTranslation({ 'var' : var })
+ return "%(var)s->%(name)s_data" % self.GetTranslation({"var": var})
- def GetVarLen(self, var):
- return 'sizeof(%s)' % self._ctype
+ def GetVarLen(self, _var):
+ return "sizeof(%s)" % self._ctype
def GetFuncName(self):
- return '%s_%s_get' % (self._struct.Name(), self._name)
+ return "%s_%s_get" % (self._struct.Name(), self._name)
def GetDeclaration(self, funcname):
- code = [ 'int %s(struct %s *, %s *);' % (
- funcname, self._struct.Name(), self._ctype ) ]
+ code = [
+ "int %s(struct %s *, %s *);" % (funcname, self._struct.Name(), self._ctype)
+ ]
return code
def CodeGet(self):
- code = (
- 'int',
- '%(parent_name)s_%(name)s_get(struct %(parent_name)s *msg, '
- '%(ctype)s *value)',
- '{',
- ' if (msg->%(name)s_set != 1)',
- ' return (-1);',
- ' *value = msg->%(name)s_data;',
- ' return (0);',
- '}' )
- code = '\n'.join(code)
+ code = """int
+%(parent_name)s_%(name)s_get(struct %(parent_name)s *msg, %(ctype)s *value)
+{
+ if (msg->%(name)s_set != 1)
+ return (-1);
+ *value = msg->%(name)s_data;
+ return (0);
+}"""
code = code % self.GetTranslation()
- return code.split('\n')
+ return code.split("\n")
def AssignFuncName(self):
- return '%s_%s_assign' % (self._struct.Name(), self._name)
+ return "%s_%s_assign" % (self._struct.Name(), self._name)
def AddFuncName(self):
- return '%s_%s_add' % (self._struct.Name(), self._name)
+ return "%s_%s_add" % (self._struct.Name(), self._name)
def AssignDeclaration(self, funcname):
- code = [ 'int %s(struct %s *, const %s);' % (
- funcname, self._struct.Name(), self._ctype ) ]
+ code = [
+ "int %s(struct %s *, const %s);"
+ % (funcname, self._struct.Name(), self._ctype)
+ ]
return code
def CodeAssign(self):
- code = [ 'int',
- '%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,'
- ' const %(ctype)s value)',
- '{',
- ' msg->%(name)s_set = 1;',
- ' msg->%(name)s_data = value;',
- ' return (0);',
- '}' ]
- code = '\n'.join(code)
+ code = [
+ "int",
+ "%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,"
+ " const %(ctype)s value)",
+ "{",
+ " msg->%(name)s_set = 1;",
+ " msg->%(name)s_data = value;",
+ " return (0);",
+ "}",
+ ]
+ code = "\n".join(code)
code = code % self.GetTranslation()
- return code.split('\n')
+ return code.split("\n")
def CodeClear(self, structname):
- code = [ '%s->%s_set = 0;' % (structname, self.Name()) ]
+ code = ["%s->%s_set = 0;" % (structname, self.Name())]
return code
- def CodeComplete(self, structname, var_name):
+ @staticmethod
+ def CodeComplete(_structname, _var_name):
return []
- def CodeFree(self, name):
+ @staticmethod
+ def CodeFree(_name):
return []
def CodeBase(self):
- code = [
- '%(parent_name)s_%(name)s_assign,',
- '%(parent_name)s_%(name)s_get,'
- ]
+ code = ["%(parent_name)s_%(name)s_assign,", "%(parent_name)s_%(name)s_get,"]
if self.Array():
- code.append('%(parent_name)s_%(name)s_add,')
+ code.append("%(parent_name)s_%(name)s_add,")
- code = '\n'.join(code)
+ code = "\n".join(code)
code = code % self.GetTranslation()
- return code.split('\n')
+ return code.split("\n")
+
class EntryBytes(Entry):
- def __init__(self, type, name, tag, length):
+ def __init__(self, ent_type, name, tag, length):
# Init base class
- Entry.__init__(self, type, name, tag)
+ super(EntryBytes, self).__init__(ent_type, name, tag)
self._length = length
- self._ctype = 'ev_uint8_t'
+ self._ctype = "ev_uint8_t"
- def GetInitializer(self):
+ @staticmethod
+ def GetInitializer():
return "NULL"
- def GetVarLen(self, var):
- return '(%s)' % self._length
+ def GetVarLen(self, _var):
+ return "(%s)" % self._length
- def CodeArrayAdd(self, varname, value):
+ @staticmethod
+ def CodeArrayAdd(varname, _value):
# XXX: copy here
- return [ '%(varname)s = NULL;' % { 'varname' : varname } ]
+ return ["%(varname)s = NULL;" % {"varname": varname}]
def GetDeclaration(self, funcname):
- code = [ 'int %s(struct %s *, %s **);' % (
- funcname, self._struct.Name(), self._ctype ) ]
+ code = [
+ "int %s(struct %s *, %s **);" % (funcname, self._struct.Name(), self._ctype)
+ ]
return code
def AssignDeclaration(self, funcname):
- code = [ 'int %s(struct %s *, const %s *);' % (
- funcname, self._struct.Name(), self._ctype ) ]
+ code = [
+ "int %s(struct %s *, const %s *);"
+ % (funcname, self._struct.Name(), self._ctype)
+ ]
return code
def Declaration(self):
- dcl = ['ev_uint8_t %s_data[%s];' % (self._name, self._length)]
+ dcl = ["ev_uint8_t %s_data[%s];" % (self._name, self._length)]
return dcl
def CodeGet(self):
name = self._name
- code = [ 'int',
- '%s_%s_get(struct %s *msg, %s **value)' % (
- self._struct.Name(), name,
- self._struct.Name(), self._ctype),
- '{',
- ' if (msg->%s_set != 1)' % name,
- ' return (-1);',
- ' *value = msg->%s_data;' % name,
- ' return (0);',
- '}' ]
+ code = [
+ "int",
+ "%s_%s_get(struct %s *msg, %s **value)"
+ % (self._struct.Name(), name, self._struct.Name(), self._ctype),
+ "{",
+ " if (msg->%s_set != 1)" % name,
+ " return (-1);",
+ " *value = msg->%s_data;" % name,
+ " return (0);",
+ "}",
+ ]
return code
def CodeAssign(self):
name = self._name
- code = [ 'int',
- '%s_%s_assign(struct %s *msg, const %s *value)' % (
- self._struct.Name(), name,
- self._struct.Name(), self._ctype),
- '{',
- ' msg->%s_set = 1;' % name,
- ' memcpy(msg->%s_data, value, %s);' % (
- name, self._length),
- ' return (0);',
- '}' ]
+ code = [
+ "int",
+ "%s_%s_assign(struct %s *msg, const %s *value)"
+ % (self._struct.Name(), name, self._struct.Name(), self._ctype),
+ "{",
+ " msg->%s_set = 1;" % name,
+ " memcpy(msg->%s_data, value, %s);" % (name, self._length),
+ " return (0);",
+ "}",
+ ]
return code
def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
- code = [ 'if (evtag_unmarshal_fixed(%(buf)s, %(tag)s, '
- '%(var)s, %(varlen)s) == -1) {',
- ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
- ' return (-1);',
- '}'
- ]
- return TranslateList(code,
- self.GetTranslation({
- 'var' : var_name,
- 'varlen' : var_len,
- 'buf' : buf,
- 'tag' : tag_name }))
-
- def CodeMarshal(self, buf, tag_name, var_name, var_len):
- code = ['evtag_marshal(%s, %s, %s, %s);' % (
- buf, tag_name, var_name, var_len)]
+ code = [
+ "if (evtag_unmarshal_fixed(%(buf)s, %(tag)s, "
+ "%(var)s, %(varlen)s) == -1) {",
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ " return (-1);",
+ "}",
+ ]
+ return TranslateList(
+ code,
+ self.GetTranslation(
+ {"var": var_name, "varlen": var_len, "buf": buf, "tag": tag_name}
+ ),
+ )
+
+ @staticmethod
+ def CodeMarshal(buf, tag_name, var_name, var_len):
+ code = ["evtag_marshal(%s, %s, %s, %s);" % (buf, tag_name, var_name, var_len)]
return code
def CodeClear(self, structname):
- code = [ '%s->%s_set = 0;' % (structname, self.Name()),
- 'memset(%s->%s_data, 0, sizeof(%s->%s_data));' % (
- structname, self._name, structname, self._name)]
+ code = [
+ "%s->%s_set = 0;" % (structname, self.Name()),
+ "memset(%s->%s_data, 0, sizeof(%s->%s_data));"
+ % (structname, self._name, structname, self._name),
+ ]
return code
def CodeInitialize(self, name):
- code = ['memset(%s->%s_data, 0, sizeof(%s->%s_data));' % (
- name, self._name, name, self._name)]
+ code = [
+ "memset(%s->%s_data, 0, sizeof(%s->%s_data));"
+ % (name, self._name, name, self._name)
+ ]
return code
def Verify(self):
if not self._length:
raise RpcGenError(
'Entry "%s" needs a length '
- 'around line %d' % (self._name, self.LineCount()))
+ "around line %d" % (self._name, self.LineCount())
+ )
+
+ super(EntryBytes, self).Verify()
- Entry.Verify(self)
class EntryInt(Entry):
- def __init__(self, type, name, tag, bits=32):
+ def __init__(self, ent_type, name, tag, bits=32):
# Init base class
- Entry.__init__(self, type, name, tag)
+ super(EntryInt, self).__init__(ent_type, name, tag)
- self._can_be_array = 1
+ self._can_be_array = True
if bits == 32:
- self._ctype = 'ev_uint32_t'
- self._marshal_type = 'int'
+ self._ctype = "ev_uint32_t"
+ self._marshal_type = "int"
if bits == 64:
- self._ctype = 'ev_uint64_t'
- self._marshal_type = 'int64'
+ self._ctype = "ev_uint64_t"
+ self._marshal_type = "int64"
- def GetInitializer(self):
+ @staticmethod
+ def GetInitializer():
return "0"
- def CodeArrayFree(self, var):
+ @staticmethod
+ def CodeArrayFree(_var):
return []
- def CodeArrayAssign(self, varname, srcvar):
- return [ '%(varname)s = %(srcvar)s;' % { 'varname' : varname,
- 'srcvar' : srcvar } ]
+ @staticmethod
+ def CodeArrayAssign(varname, srcvar):
+ return ["%(varname)s = %(srcvar)s;" % {"varname": varname, "srcvar": srcvar}]
- def CodeArrayAdd(self, varname, value):
+ @staticmethod
+ def CodeArrayAdd(varname, value):
"""Returns a new entry of this type."""
- return [ '%(varname)s = %(value)s;' % { 'varname' : varname,
- 'value' : value } ]
+ return ["%(varname)s = %(value)s;" % {"varname": varname, "value": value}]
- def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
+ def CodeUnmarshal(self, buf, tag_name, var_name, _var_len):
code = [
- 'if (evtag_unmarshal_%(ma)s(%(buf)s, %(tag)s, &%(var)s) == -1) {',
+ "if (evtag_unmarshal_%(ma)s(%(buf)s, %(tag)s, &%(var)s) == -1) {",
' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
- ' return (-1);',
- '}' ]
- code = '\n'.join(code) % self.GetTranslation({
- 'ma' : self._marshal_type,
- 'buf' : buf,
- 'tag' : tag_name,
- 'var' : var_name })
- return code.split('\n')
-
- def CodeMarshal(self, buf, tag_name, var_name, var_len):
+ " return (-1);",
+ "}",
+ ]
+ code = "\n".join(code) % self.GetTranslation(
+ {"ma": self._marshal_type, "buf": buf, "tag": tag_name, "var": var_name}
+ )
+ return code.split("\n")
+
+ def CodeMarshal(self, buf, tag_name, var_name, _var_len):
code = [
- 'evtag_marshal_%s(%s, %s, %s);' % (
- self._marshal_type, buf, tag_name, var_name)]
+ "evtag_marshal_%s(%s, %s, %s);"
+ % (self._marshal_type, buf, tag_name, var_name)
+ ]
return code
def Declaration(self):
- dcl = ['%s %s_data;' % (self._ctype, self._name)]
+ dcl = ["%s %s_data;" % (self._ctype, self._name)]
return dcl
def CodeInitialize(self, name):
- code = ['%s->%s_data = 0;' % (name, self._name)]
+ code = ["%s->%s_data = 0;" % (name, self._name)]
return code
+
class EntryString(Entry):
- def __init__(self, type, name, tag):
+ def __init__(self, ent_type, name, tag):
# Init base class
- Entry.__init__(self, type, name, tag)
+ super(EntryString, self).__init__(ent_type, name, tag)
- self._can_be_array = 1
- self._ctype = 'char *'
+ self._can_be_array = True
+ self._ctype = "char *"
- def GetInitializer(self):
+ @staticmethod
+ def GetInitializer():
return "NULL"
- def CodeArrayFree(self, varname):
- code = [
- 'if (%(var)s != NULL) free(%(var)s);' ]
+ @staticmethod
+ def CodeArrayFree(varname):
+ code = ["if (%(var)s != NULL) free(%(var)s);"]
- return TranslateList(code, { 'var' : varname })
+ return TranslateList(code, {"var": varname})
- def CodeArrayAssign(self, varname, srcvar):
+ @staticmethod
+ def CodeArrayAssign(varname, srcvar):
code = [
- 'if (%(var)s != NULL)',
- ' free(%(var)s);',
- '%(var)s = strdup(%(srcvar)s);',
- 'if (%(var)s == NULL) {',
+ "if (%(var)s != NULL)",
+ " free(%(var)s);",
+ "%(var)s = strdup(%(srcvar)s);",
+ "if (%(var)s == NULL) {",
' event_warnx("%%s: strdup", __func__);',
- ' return (-1);',
- '}' ]
+ " return (-1);",
+ "}",
+ ]
- return TranslateList(code, { 'var' : varname,
- 'srcvar' : srcvar })
+ return TranslateList(code, {"var": varname, "srcvar": srcvar})
- def CodeArrayAdd(self, varname, value):
+ @staticmethod
+ def CodeArrayAdd(varname, value):
code = [
- 'if (%(value)s != NULL) {',
- ' %(var)s = strdup(%(value)s);',
- ' if (%(var)s == NULL) {',
- ' goto error;',
- ' }',
- '} else {',
- ' %(var)s = NULL;',
- '}' ]
-
- return TranslateList(code, { 'var' : varname,
- 'value' : value })
+ "if (%(value)s != NULL) {",
+ " %(var)s = strdup(%(value)s);",
+ " if (%(var)s == NULL) {",
+ " goto error;",
+ " }",
+ "} else {",
+ " %(var)s = NULL;",
+ "}",
+ ]
+
+ return TranslateList(code, {"var": varname, "value": value})
def GetVarLen(self, var):
- return 'strlen(%s)' % self.GetVarName(var)
+ return "strlen(%s)" % self.GetVarName(var)
- def CodeMakeInitalize(self, varname):
- return '%(varname)s = NULL;' % { 'varname' : varname }
+ @staticmethod
+ def CodeMakeInitalize(varname):
+ return "%(varname)s = NULL;" % {"varname": varname}
def CodeAssign(self):
- name = self._name
code = """int
%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,
const %(ctype)s value)
@@ -719,131 +822,137 @@ class EntryString(Entry):
return (-1);
msg->%(name)s_set = 1;
return (0);
-}""" % self.GetTranslation()
+}""" % (
+ self.GetTranslation()
+ )
- return code.split('\n')
+ return code.split("\n")
- def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
- code = ['if (evtag_unmarshal_string(%(buf)s, %(tag)s, &%(var)s) == -1) {',
- ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
- ' return (-1);',
- '}'
- ]
- code = '\n'.join(code) % self.GetTranslation({
- 'buf' : buf,
- 'tag' : tag_name,
- 'var' : var_name })
- return code.split('\n')
-
- def CodeMarshal(self, buf, tag_name, var_name, var_len):
- code = ['evtag_marshal_string(%s, %s, %s);' % (
- buf, tag_name, var_name)]
+ def CodeUnmarshal(self, buf, tag_name, var_name, _var_len):
+ code = [
+ "if (evtag_unmarshal_string(%(buf)s, %(tag)s, &%(var)s) == -1) {",
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ " return (-1);",
+ "}",
+ ]
+ code = "\n".join(code) % self.GetTranslation(
+ {"buf": buf, "tag": tag_name, "var": var_name}
+ )
+ return code.split("\n")
+
+ @staticmethod
+ def CodeMarshal(buf, tag_name, var_name, _var_len):
+ code = ["evtag_marshal_string(%s, %s, %s);" % (buf, tag_name, var_name)]
return code
def CodeClear(self, structname):
- code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
- ' free(%s->%s_data);' % (structname, self.Name()),
- ' %s->%s_data = NULL;' % (structname, self.Name()),
- ' %s->%s_set = 0;' % (structname, self.Name()),
- '}'
- ]
+ code = [
+ "if (%s->%s_set == 1) {" % (structname, self.Name()),
+ " free(%s->%s_data);" % (structname, self.Name()),
+ " %s->%s_data = NULL;" % (structname, self.Name()),
+ " %s->%s_set = 0;" % (structname, self.Name()),
+ "}",
+ ]
return code
def CodeInitialize(self, name):
- code = ['%s->%s_data = NULL;' % (name, self._name)]
+ code = ["%s->%s_data = NULL;" % (name, self._name)]
return code
def CodeFree(self, name):
- code = ['if (%s->%s_data != NULL)' % (name, self._name),
- ' free (%s->%s_data);' % (name, self._name)]
+ code = [
+ "if (%s->%s_data != NULL)" % (name, self._name),
+ " free (%s->%s_data);" % (name, self._name),
+ ]
return code
def Declaration(self):
- dcl = ['char *%s_data;' % self._name]
+ dcl = ["char *%s_data;" % self._name]
return dcl
+
class EntryStruct(Entry):
- def __init__(self, type, name, tag, refname):
+ def __init__(self, ent_type, name, tag, refname):
# Init base class
- Entry.__init__(self, type, name, tag)
+ super(EntryStruct, self).__init__(ent_type, name, tag)
self._optpointer = False
- self._can_be_array = 1
+ self._can_be_array = True
self._refname = refname
- self._ctype = 'struct %s*' % refname
+ self._ctype = "struct %s*" % refname
self._optaddarg = False
def GetInitializer(self):
return "NULL"
- def GetVarLen(self, var):
- return '-1'
+ def GetVarLen(self, _var):
+ return "-1"
- def CodeArrayAdd(self, varname, value):
+ def CodeArrayAdd(self, varname, _value):
code = [
- '%(varname)s = %(refname)s_new();',
- 'if (%(varname)s == NULL)',
- ' goto error;' ]
+ "%(varname)s = %(refname)s_new();",
+ "if (%(varname)s == NULL)",
+ " goto error;",
+ ]
- return TranslateList(code, self.GetTranslation({ 'varname' : varname }))
+ return TranslateList(code, self.GetTranslation({"varname": varname}))
def CodeArrayFree(self, var):
- code = [ '%(refname)s_free(%(var)s);' % self.GetTranslation(
- { 'var' : var }) ]
+ code = ["%(refname)s_free(%(var)s);" % self.GetTranslation({"var": var})]
return code
def CodeArrayAssign(self, var, srcvar):
code = [
- 'int had_error = 0;',
- 'struct evbuffer *tmp = NULL;',
- '%(refname)s_clear(%(var)s);',
- 'if ((tmp = evbuffer_new()) == NULL) {',
+ "int had_error = 0;",
+ "struct evbuffer *tmp = NULL;",
+ "%(refname)s_clear(%(var)s);",
+ "if ((tmp = evbuffer_new()) == NULL) {",
' event_warn("%%s: evbuffer_new()", __func__);',
- ' had_error = 1;',
- ' goto done;',
- '}',
- '%(refname)s_marshal(tmp, %(srcvar)s);',
- 'if (%(refname)s_unmarshal(%(var)s, tmp) == -1) {',
+ " had_error = 1;",
+ " goto done;",
+ "}",
+ "%(refname)s_marshal(tmp, %(srcvar)s);",
+ "if (%(refname)s_unmarshal(%(var)s, tmp) == -1) {",
' event_warnx("%%s: %(refname)s_unmarshal", __func__);',
- ' had_error = 1;',
- ' goto done;',
- '}',
- 'done:'
- 'if (tmp != NULL)',
- ' evbuffer_free(tmp);',
- 'if (had_error) {',
- ' %(refname)s_clear(%(var)s);',
- ' return (-1);',
- '}' ]
-
- return TranslateList(code, self.GetTranslation({
- 'var' : var,
- 'srcvar' : srcvar}))
+ " had_error = 1;",
+ " goto done;",
+ "}",
+ "done:",
+ "if (tmp != NULL)",
+ " evbuffer_free(tmp);",
+ "if (had_error) {",
+ " %(refname)s_clear(%(var)s);",
+ " return (-1);",
+ "}",
+ ]
+
+ return TranslateList(code, self.GetTranslation({"var": var, "srcvar": srcvar}))
def CodeGet(self):
name = self._name
- code = [ 'int',
- '%s_%s_get(struct %s *msg, %s *value)' % (
- self._struct.Name(), name,
- self._struct.Name(), self._ctype),
- '{',
- ' if (msg->%s_set != 1) {' % name,
- ' msg->%s_data = %s_new();' % (name, self._refname),
- ' if (msg->%s_data == NULL)' % name,
- ' return (-1);',
- ' msg->%s_set = 1;' % name,
- ' }',
- ' *value = msg->%s_data;' % name,
- ' return (0);',
- '}' ]
+ code = [
+ "int",
+ "%s_%s_get(struct %s *msg, %s *value)"
+ % (self._struct.Name(), name, self._struct.Name(), self._ctype),
+ "{",
+ " if (msg->%s_set != 1) {" % name,
+ " msg->%s_data = %s_new();" % (name, self._refname),
+ " if (msg->%s_data == NULL)" % name,
+ " return (-1);",
+ " msg->%s_set = 1;" % name,
+ " }",
+ " *value = msg->%s_data;" % name,
+ " return (0);",
+ "}",
+ ]
return code
def CodeAssign(self):
- name = self._name
- code = """int
+ code = (
+ """int
%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,
const %(ctype)s value)
{
@@ -878,186 +987,210 @@ class EntryStruct(Entry):
msg->%(name)s_data = NULL;
}
return (-1);
-}""" % self.GetTranslation()
- return code.split('\n')
+}"""
+ % self.GetTranslation()
+ )
+ return code.split("\n")
def CodeComplete(self, structname, var_name):
- code = [ 'if (%(structname)s->%(name)s_set && '
- '%(refname)s_complete(%(var)s) == -1)',
- ' return (-1);' ]
+ code = [
+ "if (%(structname)s->%(name)s_set && "
+ "%(refname)s_complete(%(var)s) == -1)",
+ " return (-1);",
+ ]
- return TranslateList(code, self.GetTranslation({
- 'structname' : structname,
- 'var' : var_name }))
+ return TranslateList(
+ code, self.GetTranslation({"structname": structname, "var": var_name})
+ )
- def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
- code = ['%(var)s = %(refname)s_new();',
- 'if (%(var)s == NULL)',
- ' return (-1);',
- 'if (evtag_unmarshal_%(refname)s(%(buf)s, %(tag)s, '
- '%(var)s) == -1) {',
- ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
- ' return (-1);',
- '}'
- ]
- code = '\n'.join(code) % self.GetTranslation({
- 'buf' : buf,
- 'tag' : tag_name,
- 'var' : var_name })
- return code.split('\n')
-
- def CodeMarshal(self, buf, tag_name, var_name, var_len):
- code = ['evtag_marshal_%s(%s, %s, %s);' % (
- self._refname, buf, tag_name, var_name)]
+ def CodeUnmarshal(self, buf, tag_name, var_name, _var_len):
+ code = [
+ "%(var)s = %(refname)s_new();",
+ "if (%(var)s == NULL)",
+ " return (-1);",
+ "if (evtag_unmarshal_%(refname)s(%(buf)s, %(tag)s, ",
+ " %(var)s) == -1) {",
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ " return (-1);",
+ "}",
+ ]
+ code = "\n".join(code) % self.GetTranslation(
+ {"buf": buf, "tag": tag_name, "var": var_name}
+ )
+ return code.split("\n")
+
+ def CodeMarshal(self, buf, tag_name, var_name, _var_len):
+ code = [
+ "evtag_marshal_%s(%s, %s, %s);" % (self._refname, buf, tag_name, var_name)
+ ]
return code
def CodeClear(self, structname):
- code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
- ' %s_free(%s->%s_data);' % (
- self._refname, structname, self.Name()),
- ' %s->%s_data = NULL;' % (structname, self.Name()),
- ' %s->%s_set = 0;' % (structname, self.Name()),
- '}'
- ]
+ code = [
+ "if (%s->%s_set == 1) {" % (structname, self.Name()),
+ " %s_free(%s->%s_data);" % (self._refname, structname, self.Name()),
+ " %s->%s_data = NULL;" % (structname, self.Name()),
+ " %s->%s_set = 0;" % (structname, self.Name()),
+ "}",
+ ]
return code
def CodeInitialize(self, name):
- code = ['%s->%s_data = NULL;' % (name, self._name)]
+ code = ["%s->%s_data = NULL;" % (name, self._name)]
return code
def CodeFree(self, name):
- code = ['if (%s->%s_data != NULL)' % (name, self._name),
- ' %s_free(%s->%s_data);' % (
- self._refname, name, self._name)]
+ code = [
+ "if (%s->%s_data != NULL)" % (name, self._name),
+ " %s_free(%s->%s_data);" % (self._refname, name, self._name),
+ ]
return code
def Declaration(self):
- dcl = ['%s %s_data;' % (self._ctype, self._name)]
+ dcl = ["%s %s_data;" % (self._ctype, self._name)]
return dcl
+
class EntryVarBytes(Entry):
- def __init__(self, type, name, tag):
+ def __init__(self, ent_type, name, tag):
# Init base class
- Entry.__init__(self, type, name, tag)
+ super(EntryVarBytes, self).__init__(ent_type, name, tag)
- self._ctype = 'ev_uint8_t *'
+ self._ctype = "ev_uint8_t *"
- def GetInitializer(self):
+ @staticmethod
+ def GetInitializer():
return "NULL"
def GetVarLen(self, var):
- return '%(var)s->%(name)s_length' % self.GetTranslation({ 'var' : var })
+ return "%(var)s->%(name)s_length" % self.GetTranslation({"var": var})
- def CodeArrayAdd(self, varname, value):
+ @staticmethod
+ def CodeArrayAdd(varname, _value):
# xxx: copy
- return [ '%(varname)s = NULL;' % { 'varname' : varname } ]
+ return ["%(varname)s = NULL;" % {"varname": varname}]
def GetDeclaration(self, funcname):
- code = [ 'int %s(struct %s *, %s *, ev_uint32_t *);' % (
- funcname, self._struct.Name(), self._ctype ) ]
+ code = [
+ "int %s(struct %s *, %s *, ev_uint32_t *);"
+ % (funcname, self._struct.Name(), self._ctype)
+ ]
return code
def AssignDeclaration(self, funcname):
- code = [ 'int %s(struct %s *, const %s, ev_uint32_t);' % (
- funcname, self._struct.Name(), self._ctype ) ]
+ code = [
+ "int %s(struct %s *, const %s, ev_uint32_t);"
+ % (funcname, self._struct.Name(), self._ctype)
+ ]
return code
def CodeAssign(self):
name = self._name
- code = [ 'int',
- '%s_%s_assign(struct %s *msg, '
- 'const %s value, ev_uint32_t len)' % (
- self._struct.Name(), name,
- self._struct.Name(), self._ctype),
- '{',
- ' if (msg->%s_data != NULL)' % name,
- ' free (msg->%s_data);' % name,
- ' msg->%s_data = malloc(len);' % name,
- ' if (msg->%s_data == NULL)' % name,
- ' return (-1);',
- ' msg->%s_set = 1;' % name,
- ' msg->%s_length = len;' % name,
- ' memcpy(msg->%s_data, value, len);' % name,
- ' return (0);',
- '}' ]
+ code = [
+ "int",
+ "%s_%s_assign(struct %s *msg, "
+ "const %s value, ev_uint32_t len)"
+ % (self._struct.Name(), name, self._struct.Name(), self._ctype),
+ "{",
+ " if (msg->%s_data != NULL)" % name,
+ " free (msg->%s_data);" % name,
+ " msg->%s_data = malloc(len);" % name,
+ " if (msg->%s_data == NULL)" % name,
+ " return (-1);",
+ " msg->%s_set = 1;" % name,
+ " msg->%s_length = len;" % name,
+ " memcpy(msg->%s_data, value, len);" % name,
+ " return (0);",
+ "}",
+ ]
return code
def CodeGet(self):
name = self._name
- code = [ 'int',
- '%s_%s_get(struct %s *msg, %s *value, ev_uint32_t *plen)' % (
- self._struct.Name(), name,
- self._struct.Name(), self._ctype),
- '{',
- ' if (msg->%s_set != 1)' % name,
- ' return (-1);',
- ' *value = msg->%s_data;' % name,
- ' *plen = msg->%s_length;' % name,
- ' return (0);',
- '}' ]
+ code = [
+ "int",
+ "%s_%s_get(struct %s *msg, %s *value, ev_uint32_t *plen)"
+ % (self._struct.Name(), name, self._struct.Name(), self._ctype),
+ "{",
+ " if (msg->%s_set != 1)" % name,
+ " return (-1);",
+ " *value = msg->%s_data;" % name,
+ " *plen = msg->%s_length;" % name,
+ " return (0);",
+ "}",
+ ]
return code
def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
- code = ['if (evtag_payload_length(%(buf)s, &%(varlen)s) == -1)',
- ' return (-1);',
- # We do not want DoS opportunities
- 'if (%(varlen)s > evbuffer_get_length(%(buf)s))',
- ' return (-1);',
- 'if ((%(var)s = malloc(%(varlen)s)) == NULL)',
- ' return (-1);',
- 'if (evtag_unmarshal_fixed(%(buf)s, %(tag)s, %(var)s, '
- '%(varlen)s) == -1) {',
- ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
- ' return (-1);',
- '}'
- ]
- code = '\n'.join(code) % self.GetTranslation({
- 'buf' : buf,
- 'tag' : tag_name,
- 'var' : var_name,
- 'varlen' : var_len })
- return code.split('\n')
-
- def CodeMarshal(self, buf, tag_name, var_name, var_len):
- code = ['evtag_marshal(%s, %s, %s, %s);' % (
- buf, tag_name, var_name, var_len)]
+ code = [
+ "if (evtag_payload_length(%(buf)s, &%(varlen)s) == -1)",
+ " return (-1);",
+ # We do not want DoS opportunities
+ "if (%(varlen)s > evbuffer_get_length(%(buf)s))",
+ " return (-1);",
+ "if ((%(var)s = malloc(%(varlen)s)) == NULL)",
+ " return (-1);",
+ "if (evtag_unmarshal_fixed(%(buf)s, %(tag)s, %(var)s, "
+ "%(varlen)s) == -1) {",
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ " return (-1);",
+ "}",
+ ]
+ code = "\n".join(code) % self.GetTranslation(
+ {"buf": buf, "tag": tag_name, "var": var_name, "varlen": var_len}
+ )
+ return code.split("\n")
+
+ @staticmethod
+ def CodeMarshal(buf, tag_name, var_name, var_len):
+ code = ["evtag_marshal(%s, %s, %s, %s);" % (buf, tag_name, var_name, var_len)]
return code
def CodeClear(self, structname):
- code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
- ' free (%s->%s_data);' % (structname, self.Name()),
- ' %s->%s_data = NULL;' % (structname, self.Name()),
- ' %s->%s_length = 0;' % (structname, self.Name()),
- ' %s->%s_set = 0;' % (structname, self.Name()),
- '}'
- ]
+ code = [
+ "if (%s->%s_set == 1) {" % (structname, self.Name()),
+ " free (%s->%s_data);" % (structname, self.Name()),
+ " %s->%s_data = NULL;" % (structname, self.Name()),
+ " %s->%s_length = 0;" % (structname, self.Name()),
+ " %s->%s_set = 0;" % (structname, self.Name()),
+ "}",
+ ]
return code
def CodeInitialize(self, name):
- code = ['%s->%s_data = NULL;' % (name, self._name),
- '%s->%s_length = 0;' % (name, self._name) ]
+ code = [
+ "%s->%s_data = NULL;" % (name, self._name),
+ "%s->%s_length = 0;" % (name, self._name),
+ ]
return code
def CodeFree(self, name):
- code = ['if (%s->%s_data != NULL)' % (name, self._name),
- ' free(%s->%s_data);' % (name, self._name)]
+ code = [
+ "if (%s->%s_data != NULL)" % (name, self._name),
+ " free(%s->%s_data);" % (name, self._name),
+ ]
return code
def Declaration(self):
- dcl = ['ev_uint8_t *%s_data;' % self._name,
- 'ev_uint32_t %s_length;' % self._name]
+ dcl = [
+ "ev_uint8_t *%s_data;" % self._name,
+ "ev_uint32_t %s_length;" % self._name,
+ ]
return dcl
+
class EntryArray(Entry):
+ _index = None
+
def __init__(self, entry):
# Init base class
- Entry.__init__(self, entry._type, entry._name, entry._tag)
+ super(EntryArray, self).__init__(entry._type, entry._name, entry._tag)
self._entry = entry
self._refname = entry._refname
@@ -1068,37 +1201,42 @@ class EntryArray(Entry):
# provide a new function for accessing the variable name
def GetVarName(var_name):
- return '%(var)s->%(name)s_data[%(index)s]' % \
- self._entry.GetTranslation({'var' : var_name,
- 'index' : self._index})
+ return "%(var)s->%(name)s_data[%(index)s]" % self._entry.GetTranslation(
+ {"var": var_name, "index": self._index}
+ )
+
self._entry.GetVarName = GetVarName
def GetInitializer(self):
return "NULL"
- def GetVarName(self, var_name):
- return var_name
+ def GetVarName(self, var):
+ return var
- def GetVarLen(self, var_name):
- return '-1'
+ def GetVarLen(self, _var_name):
+ return "-1"
def GetDeclaration(self, funcname):
"""Allows direct access to elements of the array."""
code = [
- 'int %(funcname)s(struct %(parent_name)s *, int, %(ctype)s *);' %
- self.GetTranslation({ 'funcname' : funcname }) ]
+ "int %(funcname)s(struct %(parent_name)s *, int, %(ctype)s *);"
+ % self.GetTranslation({"funcname": funcname})
+ ]
return code
def AssignDeclaration(self, funcname):
- code = [ 'int %s(struct %s *, int, const %s);' % (
- funcname, self._struct.Name(), self._ctype ) ]
+ code = [
+ "int %s(struct %s *, int, const %s);"
+ % (funcname, self._struct.Name(), self._ctype)
+ ]
return code
def AddDeclaration(self, funcname):
code = [
- '%(ctype)s %(optpointer)s '
- '%(funcname)s(struct %(parent_name)s *msg%(optaddarg)s);' % \
- self.GetTranslation({ 'funcname' : funcname }) ]
+ "%(ctype)s %(optpointer)s "
+ "%(funcname)s(struct %(parent_name)s *msg%(optaddarg)s);"
+ % self.GetTranslation({"funcname": funcname})
+ ]
return code
def CodeGet(self):
@@ -1110,226 +1248,249 @@ class EntryArray(Entry):
return (-1);
*value = msg->%(name)s_data[offset];
return (0);
-}""" % self.GetTranslation()
+}
+""" % (
+ self.GetTranslation()
+ )
- return code.split('\n')
+ return code.splitlines()
def CodeAssign(self):
code = [
- 'int',
- '%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg, int off,',
- ' const %(ctype)s value)',
- '{',
- ' if (!msg->%(name)s_set || off < 0 || off >= msg->%(name)s_length)',
- ' return (-1);\n',
- ' {' ]
+ "int",
+ "%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg, int off,",
+ " const %(ctype)s value)",
+ "{",
+ " if (!msg->%(name)s_set || off < 0 || off >= msg->%(name)s_length)",
+ " return (-1);",
+ "",
+ " {",
+ ]
code = TranslateList(code, self.GetTranslation())
codearrayassign = self._entry.CodeArrayAssign(
- 'msg->%(name)s_data[off]' % self.GetTranslation(), 'value')
- code += map(lambda x: ' ' + x, codearrayassign)
+ "msg->%(name)s_data[off]" % self.GetTranslation(), "value"
+ )
+ code += [" " + x for x in codearrayassign]
- code += TranslateList([
- ' }',
- ' return (0);',
- '}' ], self.GetTranslation())
+ code += TranslateList([" }", " return (0);", "}"], self.GetTranslation())
return code
def CodeAdd(self):
codearrayadd = self._entry.CodeArrayAdd(
- 'msg->%(name)s_data[msg->%(name)s_length - 1]' % self.GetTranslation(),
- 'value')
+ "msg->%(name)s_data[msg->%(name)s_length - 1]" % self.GetTranslation(),
+ "value",
+ )
code = [
- 'static int',
- '%(parent_name)s_%(name)s_expand_to_hold_more('
- 'struct %(parent_name)s *msg)',
- '{',
- ' int tobe_allocated = msg->%(name)s_num_allocated;',
- ' %(ctype)s* new_data = NULL;',
- ' tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1;',
- ' new_data = (%(ctype)s*) realloc(msg->%(name)s_data,',
- ' tobe_allocated * sizeof(%(ctype)s));',
- ' if (new_data == NULL)',
- ' return -1;',
- ' msg->%(name)s_data = new_data;',
- ' msg->%(name)s_num_allocated = tobe_allocated;',
- ' return 0;'
- '}',
- '',
- '%(ctype)s %(optpointer)s',
- '%(parent_name)s_%(name)s_add('
- 'struct %(parent_name)s *msg%(optaddarg)s)',
- '{',
- ' if (++msg->%(name)s_length >= msg->%(name)s_num_allocated) {',
- ' if (%(parent_name)s_%(name)s_expand_to_hold_more(msg)<0)',
- ' goto error;',
- ' }' ]
+ "static int",
+ "%(parent_name)s_%(name)s_expand_to_hold_more("
+ "struct %(parent_name)s *msg)",
+ "{",
+ " int tobe_allocated = msg->%(name)s_num_allocated;",
+ " %(ctype)s* new_data = NULL;",
+ " tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1;",
+ " new_data = (%(ctype)s*) realloc(msg->%(name)s_data,",
+ " tobe_allocated * sizeof(%(ctype)s));",
+ " if (new_data == NULL)",
+ " return -1;",
+ " msg->%(name)s_data = new_data;",
+ " msg->%(name)s_num_allocated = tobe_allocated;",
+ " return 0;",
+ "}",
+ "",
+ "%(ctype)s %(optpointer)s",
+ "%(parent_name)s_%(name)s_add(struct %(parent_name)s *msg%(optaddarg)s)",
+ "{",
+ " if (++msg->%(name)s_length >= msg->%(name)s_num_allocated) {",
+ " if (%(parent_name)s_%(name)s_expand_to_hold_more(msg)<0)",
+ " goto error;",
+ " }",
+ ]
code = TranslateList(code, self.GetTranslation())
- code += map(lambda x: ' ' + x, codearrayadd)
-
- code += TranslateList([
- ' msg->%(name)s_set = 1;',
- ' return %(optreference)s(msg->%(name)s_data['
- 'msg->%(name)s_length - 1]);',
- 'error:',
- ' --msg->%(name)s_length;',
- ' return (NULL);',
- '}' ], self.GetTranslation())
+ code += [" " + x for x in codearrayadd]
+
+ code += TranslateList(
+ [
+ " msg->%(name)s_set = 1;",
+ " return %(optreference)s(msg->%(name)s_data["
+ "msg->%(name)s_length - 1]);",
+ "error:",
+ " --msg->%(name)s_length;",
+ " return (NULL);",
+ "}",
+ ],
+ self.GetTranslation(),
+ )
return code
def CodeComplete(self, structname, var_name):
- self._index = 'i'
+ self._index = "i"
tmp = self._entry.CodeComplete(structname, self._entry.GetVarName(var_name))
# skip the whole loop if there is nothing to check
if not tmp:
return []
- translate = self.GetTranslation({ 'structname' : structname })
+ translate = self.GetTranslation({"structname": structname})
code = [
- '{',
- ' int i;',
- ' for (i = 0; i < %(structname)s->%(name)s_length; ++i) {' ]
+ "{",
+ " int i;",
+ " for (i = 0; i < %(structname)s->%(name)s_length; ++i) {",
+ ]
code = TranslateList(code, translate)
- code += map(lambda x: ' ' + x, tmp)
+ code += [" " + x for x in tmp]
- code += [
- ' }',
- '}' ]
+ code += [" }", "}"]
return code
- def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
- translate = self.GetTranslation({ 'var' : var_name,
- 'buf' : buf,
- 'tag' : tag_name,
- 'init' : self._entry.GetInitializer()})
+ def CodeUnmarshal(self, buf, tag_name, var_name, _var_len):
+ translate = self.GetTranslation(
+ {
+ "var": var_name,
+ "buf": buf,
+ "tag": tag_name,
+ "init": self._entry.GetInitializer(),
+ }
+ )
code = [
- 'if (%(var)s->%(name)s_length >= %(var)s->%(name)s_num_allocated &&',
- ' %(parent_name)s_%(name)s_expand_to_hold_more(%(var)s) < 0) {',
+ "if (%(var)s->%(name)s_length >= %(var)s->%(name)s_num_allocated &&",
+ " %(parent_name)s_%(name)s_expand_to_hold_more(%(var)s) < 0) {",
' puts("HEY NOW");',
- ' return (-1);',
- '}']
+ " return (-1);",
+ "}",
+ ]
# the unmarshal code directly returns
code = TranslateList(code, translate)
- self._index = '%(var)s->%(name)s_length' % translate
- code += self._entry.CodeUnmarshal(buf, tag_name,
- self._entry.GetVarName(var_name),
- self._entry.GetVarLen(var_name))
+ self._index = "%(var)s->%(name)s_length" % translate
+ code += self._entry.CodeUnmarshal(
+ buf,
+ tag_name,
+ self._entry.GetVarName(var_name),
+ self._entry.GetVarLen(var_name),
+ )
- code += [ '++%(var)s->%(name)s_length;' % translate ]
+ code += ["++%(var)s->%(name)s_length;" % translate]
return code
- def CodeMarshal(self, buf, tag_name, var_name, var_len):
- code = ['{',
- ' int i;',
- ' for (i = 0; i < %(var)s->%(name)s_length; ++i) {' ]
+ def CodeMarshal(self, buf, tag_name, var_name, _var_len):
+ code = ["{", " int i;", " for (i = 0; i < %(var)s->%(name)s_length; ++i) {"]
- self._index = 'i'
- code += self._entry.CodeMarshal(buf, tag_name,
- self._entry.GetVarName(var_name),
- self._entry.GetVarLen(var_name))
- code += [' }',
- '}'
- ]
+ self._index = "i"
+ code += self._entry.CodeMarshal(
+ buf,
+ tag_name,
+ self._entry.GetVarName(var_name),
+ self._entry.GetVarLen(var_name),
+ )
+ code += [" }", "}"]
- code = "\n".join(code) % self.GetTranslation({ 'var' : var_name })
+ code = "\n".join(code) % self.GetTranslation({"var": var_name})
- return code.split('\n')
+ return code.split("\n")
def CodeClear(self, structname):
- translate = self.GetTranslation({ 'structname' : structname })
+ translate = self.GetTranslation({"structname": structname})
codearrayfree = self._entry.CodeArrayFree(
- '%(structname)s->%(name)s_data[i]' % self.GetTranslation(
- { 'structname' : structname } ))
+ "%(structname)s->%(name)s_data[i]"
+ % self.GetTranslation({"structname": structname})
+ )
- code = [ 'if (%(structname)s->%(name)s_set == 1) {' ]
+ code = ["if (%(structname)s->%(name)s_set == 1) {"]
if codearrayfree:
code += [
- ' int i;',
- ' for (i = 0; i < %(structname)s->%(name)s_length; ++i) {' ]
+ " int i;",
+ " for (i = 0; i < %(structname)s->%(name)s_length; ++i) {",
+ ]
code = TranslateList(code, translate)
if codearrayfree:
- code += map(lambda x: ' ' + x, codearrayfree)
- code += [
- ' }' ]
-
- code += TranslateList([
- ' free(%(structname)s->%(name)s_data);',
- ' %(structname)s->%(name)s_data = NULL;',
- ' %(structname)s->%(name)s_set = 0;',
- ' %(structname)s->%(name)s_length = 0;',
- ' %(structname)s->%(name)s_num_allocated = 0;',
- '}'
- ], translate)
+ code += [" " + x for x in codearrayfree]
+ code += [" }"]
+
+ code += TranslateList(
+ [
+ " free(%(structname)s->%(name)s_data);",
+ " %(structname)s->%(name)s_data = NULL;",
+ " %(structname)s->%(name)s_set = 0;",
+ " %(structname)s->%(name)s_length = 0;",
+ " %(structname)s->%(name)s_num_allocated = 0;",
+ "}",
+ ],
+ translate,
+ )
return code
def CodeInitialize(self, name):
- code = ['%s->%s_data = NULL;' % (name, self._name),
- '%s->%s_length = 0;' % (name, self._name),
- '%s->%s_num_allocated = 0;' % (name, self._name)]
+ code = [
+ "%s->%s_data = NULL;" % (name, self._name),
+ "%s->%s_length = 0;" % (name, self._name),
+ "%s->%s_num_allocated = 0;" % (name, self._name),
+ ]
return code
def CodeFree(self, structname):
- code = self.CodeClear(structname);
+ code = self.CodeClear(structname)
- code += TranslateList([
- 'free(%(structname)s->%(name)s_data);' ],
- self.GetTranslation({'structname' : structname }))
+ code += TranslateList(
+ ["free(%(structname)s->%(name)s_data);"],
+ self.GetTranslation({"structname": structname}),
+ )
return code
def Declaration(self):
- dcl = ['%s *%s_data;' % (self._ctype, self._name),
- 'int %s_length;' % self._name,
- 'int %s_num_allocated;' % self._name ]
+ dcl = [
+ "%s *%s_data;" % (self._ctype, self._name),
+ "int %s_length;" % self._name,
+ "int %s_num_allocated;" % self._name,
+ ]
return dcl
+
def NormalizeLine(line):
- global white
- global cppcomment
- line = cppcomment.sub('', line)
+ line = CPPCOMMENT_RE.sub("", line)
line = line.strip()
- line = white.sub(' ', line)
+ line = WHITESPACE_RE.sub(" ", line)
return line
+
+ENTRY_NAME_RE = re.compile(r"(?P<name>[^\[\]]+)(\[(?P<fixed_length>.*)\])?")
+ENTRY_TAG_NUMBER_RE = re.compile(r"(0x)?\d+", re.I)
+
+
def ProcessOneEntry(factory, newstruct, entry):
- optional = 0
- array = 0
- entry_type = ''
- name = ''
- tag = ''
+ optional = False
+ array = False
+ entry_type = ""
+ name = ""
+ tag = ""
tag_set = None
- separator = ''
- fixed_length = ''
-
- tokens = entry.split(' ')
- while tokens:
- token = tokens[0]
- tokens = tokens[1:]
+ separator = ""
+ fixed_length = ""
+ for token in entry.split(" "):
if not entry_type:
- if not optional and token == 'optional':
- optional = 1
+ if not optional and token == "optional":
+ optional = True
continue
- if not array and token == 'array':
- array = 1
+ if not array and token == "array":
+ array = True
continue
if not entry_type:
@@ -1337,53 +1498,52 @@ def ProcessOneEntry(factory, newstruct, entry):
continue
if not name:
- res = re.match(r'^([^\[\]]+)(\[.*\])?$', token)
+ res = ENTRY_NAME_RE.match(token)
if not res:
- raise RpcGenError(
- 'Cannot parse name: \"%s\" '
- 'around line %d' % (entry, line_count))
- name = res.group(1)
- fixed_length = res.group(2)
- if fixed_length:
- fixed_length = fixed_length[1:-1]
+ raise RpcGenError(
+ r"""Cannot parse name: "%s" around line %d""" % (entry, LINE_COUNT)
+ )
+ name = res.group("name")
+ fixed_length = res.group("fixed_length")
continue
if not separator:
separator = token
- if separator != '=':
- raise RpcGenError('Expected "=" after name \"%s\" got %s'
- % (name, token))
+ if separator != "=":
+ raise RpcGenError(
+ r'''Expected "=" after name "%s" got "%s"''' % (name, token)
+ )
continue
if not tag_set:
tag_set = 1
- if not re.match(r'^(0x)?[0-9]+$', token):
- raise RpcGenError('Expected tag number: \"%s\"' % entry)
+ if not ENTRY_TAG_NUMBER_RE.match(token):
+ raise RpcGenError(r'''Expected tag number: "%s"''' % (entry))
tag = int(token, 0)
continue
- raise RpcGenError('Cannot parse \"%s\"' % entry)
+ raise RpcGenError(r'''Cannot parse "%s"''' % (entry))
if not tag_set:
- raise RpcGenError('Need tag number: \"%s\"' % entry)
+ raise RpcGenError(r'''Need tag number: "%s"''' % (entry))
# Create the right entry
- if entry_type == 'bytes':
+ if entry_type == "bytes":
if fixed_length:
newentry = factory.EntryBytes(entry_type, name, tag, fixed_length)
else:
newentry = factory.EntryVarBytes(entry_type, name, tag)
- elif entry_type == 'int' and not fixed_length:
+ elif entry_type == "int" and not fixed_length:
newentry = factory.EntryInt(entry_type, name, tag)
- elif entry_type == 'int64' and not fixed_length:
+ elif entry_type == "int64" and not fixed_length:
newentry = factory.EntryInt(entry_type, name, tag, bits=64)
- elif entry_type == 'string' and not fixed_length:
+ elif entry_type == "string" and not fixed_length:
newentry = factory.EntryString(entry_type, name, tag)
else:
- res = structref.match(entry_type)
+ res = STRUCT_REF_RE.match(entry_type)
if res:
# References another struct defined in our file
- newentry = factory.EntryStruct(entry_type, name, tag, res.group(1))
+ newentry = factory.EntryStruct(entry_type, name, tag, res.group("name"))
else:
raise RpcGenError('Bad type: "%s" in "%s"' % (entry_type, entry))
@@ -1395,32 +1555,30 @@ def ProcessOneEntry(factory, newstruct, entry):
newentry.MakeArray()
newentry.SetStruct(newstruct)
- newentry.SetLineCount(line_count)
+ newentry.SetLineCount(LINE_COUNT)
newentry.Verify()
if array:
# We need to encapsulate this entry into a struct
- newname = newentry.Name()+ '_array'
-
- # Now borgify the new entry.
newentry = factory.EntryArray(newentry)
newentry.SetStruct(newstruct)
- newentry.SetLineCount(line_count)
+ newentry.SetLineCount(LINE_COUNT)
newentry.MakeArray()
newstruct.AddEntry(newentry)
return structs
+
def ProcessStruct(factory, data):
- tokens = data.split(' ')
+ tokens = data.split(" ")
# First three tokens are: 'struct' 'name' '{'
newstruct = factory.Struct(tokens[1])
- inside = ' '.join(tokens[3:-1])
+ inside = " ".join(tokens[3:-1])
- tokens = inside.split(';')
+ tokens = inside.split(";")
structs = []
@@ -1435,36 +1593,52 @@ def ProcessStruct(factory, data):
structs.append(newstruct)
return structs
-def GetNextStruct(file):
- global line_count
- global cppdirect
- got_struct = 0
+C_COMMENT_START = "/*"
+C_COMMENT_END = "*/"
- processed_lines = []
+C_COMMENT_START_RE = re.compile(re.escape(C_COMMENT_START))
+C_COMMENT_END_RE = re.compile(re.escape(C_COMMENT_END))
- have_c_comment = 0
- data = ''
- while 1:
- line = file.readline()
+C_COMMENT_START_SUB_RE = re.compile(r"%s.*$" % (re.escape(C_COMMENT_START)))
+C_COMMENT_END_SUB_RE = re.compile(r"%s.*$" % (re.escape(C_COMMENT_END)))
+
+C_MULTILINE_COMMENT_SUB_RE = re.compile(
+ r"%s.*?%s" % (re.escape(C_COMMENT_START), re.escape(C_COMMENT_END))
+)
+CPP_CONDITIONAL_BLOCK_RE = re.compile(r"#(if( |def)|endif)")
+INCLUDE_RE = re.compile(r'#include (".+"|<.+>)')
+
+
+def GetNextStruct(filep):
+ global CPP_DIRECT
+ global LINE_COUNT
+
+ got_struct = False
+ have_c_comment = False
+
+ data = ""
+
+ while True:
+ line = filep.readline()
if not line:
break
- line_count += 1
+ LINE_COUNT += 1
line = line[:-1]
- if not have_c_comment and re.search(r'/\*', line):
- if re.search(r'/\*.*?\*/', line):
- line = re.sub(r'/\*.*?\*/', '', line)
+ if not have_c_comment and C_COMMENT_START_RE.search(line):
+ if C_MULTILINE_COMMENT_SUB_RE.search(line):
+ line = C_MULTILINE_COMMENT_SUB_RE.sub("", line)
else:
- line = re.sub(r'/\*.*$', '', line)
- have_c_comment = 1
+ line = C_COMMENT_START_SUB_RE.sub("", line)
+ have_c_comment = True
if have_c_comment:
- if not re.search(r'\*/', line):
+ if not C_COMMENT_END_RE.search(line):
continue
- have_c_comment = 0
- line = re.sub(r'^.*\*/', '', line)
+ have_c_comment = False
+ line = C_COMMENT_END_SUB_RE.sub("", line)
line = NormalizeLine(line)
@@ -1472,47 +1646,39 @@ def GetNextStruct(file):
continue
if not got_struct:
- if re.match(r'#include ["<].*[>"]', line):
- cppdirect.append(line)
- continue
-
- if re.match(r'^#(if( |def)|endif)', line):
- cppdirect.append(line)
- continue
-
- if re.match(r'^#define', line):
- headerdirect.append(line)
- continue
-
- if not structdef.match(line):
- raise RpcGenError('Missing struct on line %d: %s'
- % (line_count, line))
+ if INCLUDE_RE.match(line):
+ CPP_DIRECT.append(line)
+ elif CPP_CONDITIONAL_BLOCK_RE.match(line):
+ CPP_DIRECT.append(line)
+ elif PREPROCESSOR_DEF_RE.match(line):
+ HEADER_DIRECT.append(line)
+ elif not STRUCT_DEF_RE.match(line):
+ raise RpcGenError("Missing struct on line %d: %s" % (LINE_COUNT, line))
else:
- got_struct = 1
+ got_struct = True
data += line
continue
# We are inside the struct
- tokens = line.split('}')
+ tokens = line.split("}")
if len(tokens) == 1:
- data += ' ' + line
+ data += " " + line
continue
- if len(tokens[1]):
- raise RpcGenError('Trailing garbage after struct on line %d'
- % line_count)
+ if tokens[1]:
+ raise RpcGenError("Trailing garbage after struct on line %d" % LINE_COUNT)
# We found the end of the struct
- data += ' %s}' % tokens[0]
+ data += " %s}" % tokens[0]
break
# Remove any comments, that might be in there
- data = re.sub(r'/\*.*\*/', '', data)
+ data = re.sub(r"/\*.*\*/", "", data)
return data
-def Parse(factory, file):
+def Parse(factory, filep):
"""
Parses the input file and returns C code and corresponding header file.
"""
@@ -1521,7 +1687,7 @@ def Parse(factory, file):
while 1:
# Just gets the whole struct nicely formatted
- data = GetNextStruct(file)
+ data = GetNextStruct(filep)
if not data:
break
@@ -1530,199 +1696,230 @@ def Parse(factory, file):
return entities
-class CCodeGenerator:
+
+class CCodeGenerator(object):
def __init__(self):
pass
- def GuardName(self, name):
+ @staticmethod
+ def GuardName(name):
# Use the complete provided path to the input file, with all
# non-identifier characters replaced with underscores, to
# reduce the chance of a collision between guard macros.
- return 'EVENT_RPCOUT_' + nonident.sub('_', name).upper() + '_'
+ return "EVENT_RPCOUT_%s_" % (NONIDENT_RE.sub("_", name).upper())
def HeaderPreamble(self, name):
guard = self.GuardName(name)
- pre = (
- '/*\n'
- ' * Automatically generated from %s\n'
- ' */\n\n'
- '#ifndef %s\n'
- '#define %s\n\n' ) % (
- name, guard, guard)
-
- for statement in headerdirect:
- pre += '%s\n' % statement
- if headerdirect:
- pre += '\n'
-
- pre += (
- '#include <event2/util.h> /* for ev_uint*_t */\n'
- '#include <event2/rpc.h>\n'
+ pre = """
+/*
+ * Automatically generated from %s
+ */
+
+#ifndef %s
+#define %s
+
+""" % (
+ name,
+ guard,
+ guard,
)
+ if HEADER_DIRECT:
+ for statement in HEADER_DIRECT:
+ pre += "%s\n" % statement
+ pre += "\n"
+
+ pre += """
+#include <event2/util.h> /* for ev_uint*_t */
+#include <event2/rpc.h>
+"""
+
return pre
def HeaderPostamble(self, name):
guard = self.GuardName(name)
- return '#endif /* %s */' % guard
+ return "#endif /* %s */" % (guard)
- def BodyPreamble(self, name, header_file):
+ @staticmethod
+ def BodyPreamble(name, header_file):
global _NAME
global _VERSION
- slash = header_file.rfind('/')
+ slash = header_file.rfind("/")
if slash != -1:
- header_file = header_file[slash+1:]
-
- pre = ( '/*\n'
- ' * Automatically generated from %s\n'
- ' * by %s/%s. DO NOT EDIT THIS FILE.\n'
- ' */\n\n' ) % (name, _NAME, _VERSION)
- pre += ( '#include <stdlib.h>\n'
- '#include <string.h>\n'
- '#include <assert.h>\n'
- '#include <event2/event-config.h>\n'
- '#include <event2/event.h>\n'
- '#include <event2/buffer.h>\n'
- '#include <event2/tag.h>\n\n'
- '#ifdef EVENT____func__\n'
- '#define __func__ EVENT____func__\n'
- '#endif\n\n'
- )
-
- for statement in cppdirect:
- pre += '%s\n' % statement
+ header_file = header_file[slash + 1 :]
+
+ pre = """
+/*
+ * Automatically generated from %(name)s
+ * by %(script_name)s/%(script_version)s. DO NOT EDIT THIS FILE.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <event2/event-config.h>
+#include <event2/event.h>
+#include <event2/buffer.h>
+#include <event2/tag.h>
+
+#if defined(EVENT__HAVE___func__)
+# ifndef __func__
+# define __func__ __func__
+# endif
+#elif defined(EVENT__HAVE___FUNCTION__)
+# define __func__ __FUNCTION__
+#else
+# define __func__ __FILE__
+#endif
+
+""" % {
+ "name": name,
+ "script_name": _NAME,
+ "script_version": _VERSION,
+ }
+
+ for statement in CPP_DIRECT:
+ pre += "%s\n" % statement
pre += '\n#include "%s"\n\n' % header_file
- pre += 'void event_warn(const char *fmt, ...);\n'
- pre += 'void event_warnx(const char *fmt, ...);\n\n'
+ pre += "void event_warn(const char *fmt, ...);\n"
+ pre += "void event_warnx(const char *fmt, ...);\n\n"
return pre
- def HeaderFilename(self, filename):
- return '.'.join(filename.split('.')[:-1]) + '.h'
+ @staticmethod
+ def HeaderFilename(filename):
+ return ".".join(filename.split(".")[:-1]) + ".h"
- def CodeFilename(self, filename):
- return '.'.join(filename.split('.')[:-1]) + '.gen.c'
+ @staticmethod
+ def CodeFilename(filename):
+ return ".".join(filename.split(".")[:-1]) + ".gen.c"
- def Struct(self, name):
+ @staticmethod
+ def Struct(name):
return StructCCode(name)
- def EntryBytes(self, entry_type, name, tag, fixed_length):
+ @staticmethod
+ def EntryBytes(entry_type, name, tag, fixed_length):
return EntryBytes(entry_type, name, tag, fixed_length)
- def EntryVarBytes(self, entry_type, name, tag):
+ @staticmethod
+ def EntryVarBytes(entry_type, name, tag):
return EntryVarBytes(entry_type, name, tag)
- def EntryInt(self, entry_type, name, tag, bits=32):
+ @staticmethod
+ def EntryInt(entry_type, name, tag, bits=32):
return EntryInt(entry_type, name, tag, bits)
- def EntryString(self, entry_type, name, tag):
+ @staticmethod
+ def EntryString(entry_type, name, tag):
return EntryString(entry_type, name, tag)
- def EntryStruct(self, entry_type, name, tag, struct_name):
+ @staticmethod
+ def EntryStruct(entry_type, name, tag, struct_name):
return EntryStruct(entry_type, name, tag, struct_name)
- def EntryArray(self, entry):
+ @staticmethod
+ def EntryArray(entry):
return EntryArray(entry)
-class Usage(RpcGenError):
- def __init__(self, argv0):
- RpcGenError.__init__("usage: %s input.rpc [[output.h] output.c]"
- % argv0)
-class CommandLine:
- def __init__(self, argv):
+class CommandLine(object):
+ def __init__(self, argv=None):
"""Initialize a command-line to launch event_rpcgen, as if
from a command-line with CommandLine(sys.argv). If you're
calling this directly, remember to provide a dummy value
for sys.argv[0]
"""
+ global QUIETLY
+
self.filename = None
self.header_file = None
self.impl_file = None
self.factory = CCodeGenerator()
- if len(argv) >= 2 and argv[1] == '--quiet':
- global QUIETLY
- QUIETLY = 1
- del argv[1]
+ parser = argparse.ArgumentParser(
+ usage="%(prog)s [options] rpc-file [[h-file] c-file]"
+ )
+ parser.add_argument("--quiet", action="store_true", default=False)
+ parser.add_argument("rpc_file", type=argparse.FileType("r"))
+
+ args, extra_args = parser.parse_known_args(args=argv)
- if len(argv) < 2 or len(argv) > 4:
- raise Usage(argv[0])
+ QUIETLY = args.quiet
- self.filename = argv[1].replace('\\', '/')
- if len(argv) == 3:
- self.impl_file = argv[2].replace('\\', '/')
- if len(argv) == 4:
- self.header_file = argv[2].replace('\\', '/')
- self.impl_file = argv[3].replace('\\', '/')
+ if extra_args:
+ if len(extra_args) == 1:
+ self.impl_file = extra_args[0].replace("\\", "/")
+ elif len(extra_args) == 2:
+ self.header_file = extra_args[0].replace("\\", "/")
+ self.impl_file = extra_args[1].replace("\\", "/")
+ else:
+ parser.error("Spurious arguments provided")
- if not self.filename:
- raise Usage(argv[0])
+ self.rpc_file = args.rpc_file
if not self.impl_file:
- self.impl_file = self.factory.CodeFilename(self.filename)
+ self.impl_file = self.factory.CodeFilename(self.rpc_file.name)
if not self.header_file:
self.header_file = self.factory.HeaderFilename(self.impl_file)
- if not self.impl_file.endswith('.c'):
- raise RpcGenError("can only generate C implementation files")
- if not self.header_file.endswith('.h'):
- raise RpcGenError("can only generate C header files")
+ if not self.impl_file.endswith(".c"):
+ parser.error("can only generate C implementation files")
+ if not self.header_file.endswith(".h"):
+ parser.error("can only generate C header files")
def run(self):
- filename = self.filename
+ filename = self.rpc_file.name
header_file = self.header_file
impl_file = self.impl_file
factory = self.factory
- declare('Reading \"%s\"' % filename)
+ declare('Reading "%s"' % filename)
- fp = open(filename, 'r')
- entities = Parse(factory, fp)
- fp.close()
+ with self.rpc_file:
+ entities = Parse(factory, self.rpc_file)
declare('... creating "%s"' % header_file)
- header_fp = open(header_file, 'w')
- print >>header_fp, factory.HeaderPreamble(filename)
+ with open(header_file, "w") as header_fp:
+ header_fp.write(factory.HeaderPreamble(filename))
- # Create forward declarations: allows other structs to reference
- # each other
- for entry in entities:
- entry.PrintForwardDeclaration(header_fp)
- print >>header_fp, ''
+ # Create forward declarations: allows other structs to reference
+ # each other
+ for entry in entities:
+ entry.PrintForwardDeclaration(header_fp)
+ header_fp.write("\n")
- for entry in entities:
- entry.PrintTags(header_fp)
- entry.PrintDeclaration(header_fp)
- print >>header_fp, factory.HeaderPostamble(filename)
- header_fp.close()
+ for entry in entities:
+ entry.PrintTags(header_fp)
+ entry.PrintDeclaration(header_fp)
+ header_fp.write(factory.HeaderPostamble(filename))
declare('... creating "%s"' % impl_file)
- impl_fp = open(impl_file, 'w')
- print >>impl_fp, factory.BodyPreamble(filename, header_file)
- for entry in entities:
- entry.PrintCode(impl_fp)
- impl_fp.close()
+ with open(impl_file, "w") as impl_fp:
+ impl_fp.write(factory.BodyPreamble(filename, header_file))
+ for entry in entities:
+ entry.PrintCode(impl_fp)
-if __name__ == '__main__':
- try:
- CommandLine(sys.argv).run()
- sys.exit(0)
-
- except RpcGenError, e:
- print >>sys.stderr, e
- sys.exit(1)
- except EnvironmentError, e:
+def main(argv=None):
+ try:
+ CommandLine(argv=argv).run()
+ return 0
+ except RpcGenError as e:
+ sys.stderr.write(e)
+ except EnvironmentError as e:
if e.filename and e.strerror:
- print >>sys.stderr, "%s: %s" % (e.filename, e.strerror)
- sys.exit(1)
+ sys.stderr.write("%s: %s" % (e.filename, e.strerror))
elif e.strerror:
- print >> sys.stderr, e.strerror
- sys.exit(1)
+ sys.stderr.write(e.strerror)
else:
raise
+ return 1
+
+
+if __name__ == "__main__":
+ sys.exit(main(argv=sys.argv[1:]))
diff --git a/contrib/ntp/sntp/libevent/event_tagging.c b/contrib/ntp/sntp/libevent/event_tagging.c
index 64b100b82510..b021e8c8dea2 100644
--- a/contrib/ntp/sntp/libevent/event_tagging.c
+++ b/contrib/ntp/sntp/libevent/event_tagging.c
@@ -40,10 +40,11 @@
#include <winsock2.h>
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-#else
-#include <sys/ioctl.h>
#endif
+#ifdef EVENT__HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
#include <sys/queue.h>
#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
@@ -92,9 +93,13 @@
a final padding nibble with value 0 is appended.
*/
+EVENT2_EXPORT_SYMBOL
int evtag_decode_int(ev_uint32_t *pnumber, struct evbuffer *evbuf);
+EVENT2_EXPORT_SYMBOL
int evtag_decode_int64(ev_uint64_t *pnumber, struct evbuffer *evbuf);
+EVENT2_EXPORT_SYMBOL
int evtag_encode_tag(struct evbuffer *evbuf, ev_uint32_t tag);
+EVENT2_EXPORT_SYMBOL
int evtag_decode_tag(ev_uint32_t *ptag, struct evbuffer *evbuf);
void
diff --git a/contrib/ntp/sntp/libevent/evmap.c b/contrib/ntp/sntp/libevent/evmap.c
index 3f76dd0ae1f7..e4e35c6877f8 100644
--- a/contrib/ntp/sntp/libevent/evmap.c
+++ b/contrib/ntp/sntp/libevent/evmap.c
@@ -43,6 +43,7 @@
#include <unistd.h>
#endif
#include <errno.h>
+#include <limits.h>
#include <signal.h>
#include <string.h>
#include <time.h>
@@ -207,9 +208,15 @@ evmap_make_space(struct event_signal_map *map, int slot, int msize)
int nentries = map->nentries ? map->nentries : 32;
void **tmp;
+ if (slot > INT_MAX / 2)
+ return (-1);
+
while (nentries <= slot)
nentries <<= 1;
+ if (nentries > INT_MAX / msize)
+ return (-1);
+
tmp = (void **)mm_realloc(map->entries, nentries * msize);
if (tmp == NULL)
return (-1);
@@ -393,7 +400,8 @@ evmap_io_del_(struct event_base *base, evutil_socket_t fd, struct event *ev)
if (res) {
void *extra = ((char*)ctx) + sizeof(struct evmap_io);
- if (evsel->del(base, ev->ev_fd, old, res, extra) == -1) {
+ if (evsel->del(base, ev->ev_fd,
+ old, (ev->ev_events & EV_ET) | res, extra) == -1) {
retval = -1;
} else {
retval = 1;
@@ -424,7 +432,7 @@ evmap_io_active_(struct event_base *base, evutil_socket_t fd, short events)
if (NULL == ctx)
return;
LIST_FOREACH(ev, &ctx->events, ev_io_next) {
- if (ev->ev_events & events)
+ if (ev->ev_events & (events & ~EV_ET))
event_active_nolock_(ev, ev->ev_events & events, 1);
}
}
@@ -445,6 +453,9 @@ evmap_signal_add_(struct event_base *base, int sig, struct event *ev)
struct event_signal_map *map = &base->sigmap;
struct evmap_signal *ctx = NULL;
+ if (sig < 0 || sig >= NSIG)
+ return (-1);
+
if (sig >= map->nentries) {
if (evmap_make_space(
map, sig, sizeof(struct evmap_signal *)) == -1)
@@ -471,7 +482,7 @@ evmap_signal_del_(struct event_base *base, int sig, struct event *ev)
struct event_signal_map *map = &base->sigmap;
struct evmap_signal *ctx;
- if (sig >= map->nentries)
+ if (sig < 0 || sig >= map->nentries)
return (-1);
GET_SIGNAL_SLOT(ctx, map, sig, evmap_signal);
@@ -858,6 +869,7 @@ event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, sh
struct event_changelist *changelist = &base->changelist;
struct event_changelist_fdinfo *fdinfo = p;
struct event_change *change;
+ ev_uint8_t evchange = EV_CHANGE_ADD | (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
event_changelist_check(base);
@@ -869,18 +881,12 @@ event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, sh
* since the delete might fail (because the fd had been closed since
* the last add, for instance. */
- if (events & (EV_READ|EV_SIGNAL)) {
- change->read_change = EV_CHANGE_ADD |
- (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
- }
- if (events & EV_WRITE) {
- change->write_change = EV_CHANGE_ADD |
- (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
- }
- if (events & EV_CLOSED) {
- change->close_change = EV_CHANGE_ADD |
- (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
- }
+ if (events & (EV_READ|EV_SIGNAL))
+ change->read_change = evchange;
+ if (events & EV_WRITE)
+ change->write_change = evchange;
+ if (events & EV_CLOSED)
+ change->close_change = evchange;
event_changelist_check(base);
return (0);
@@ -893,6 +899,7 @@ event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, sh
struct event_changelist *changelist = &base->changelist;
struct event_changelist_fdinfo *fdinfo = p;
struct event_change *change;
+ ev_uint8_t del = EV_CHANGE_DEL | (events & EV_ET);
event_changelist_check(base);
change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);
@@ -919,19 +926,19 @@ event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, sh
if (!(change->old_events & (EV_READ | EV_SIGNAL)))
change->read_change = 0;
else
- change->read_change = EV_CHANGE_DEL;
+ change->read_change = del;
}
if (events & EV_WRITE) {
if (!(change->old_events & EV_WRITE))
change->write_change = 0;
else
- change->write_change = EV_CHANGE_DEL;
+ change->write_change = del;
}
if (events & EV_CLOSED) {
if (!(change->old_events & EV_CLOSED))
change->close_change = 0;
else
- change->close_change = EV_CHANGE_DEL;
+ change->close_change = del;
}
event_changelist_check(base);
diff --git a/contrib/ntp/sntp/libevent/evrpc.c b/contrib/ntp/sntp/libevent/evrpc.c
index 2443ab27937a..4a60ca5f0703 100644
--- a/contrib/ntp/sntp/libevent/evrpc.c
+++ b/contrib/ntp/sntp/libevent/evrpc.c
@@ -329,7 +329,8 @@ evrpc_request_cb(struct evhttp_request *req, void *arg)
return;
error:
- evrpc_reqstate_free_(rpc_state);
+ if (rpc_state)
+ evrpc_reqstate_free_(rpc_state);
evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
return;
}
@@ -891,8 +892,7 @@ evrpc_reply_done(struct evhttp_request *req, void *arg)
* layer is going to free it. we need to
* request ownership explicitly
*/
- if (req != NULL)
- evhttp_request_own(req);
+ evhttp_request_own(req);
evrpc_pause_request(pool, ctx,
evrpc_reply_done_closure);
diff --git a/contrib/ntp/sntp/libevent/evthread-internal.h b/contrib/ntp/sntp/libevent/evthread-internal.h
index efdecf81e7cd..83e409f09b4c 100644
--- a/contrib/ntp/sntp/libevent/evthread-internal.h
+++ b/contrib/ntp/sntp/libevent/evthread-internal.h
@@ -38,7 +38,7 @@ extern "C" {
struct event_base;
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(__CYGWIN__)
/* On Windows, the way we currently make DLLs, it's not allowed for us to
* have shared global structures. Thus, we only do the direct-call-to-function
* code path if we know that the local shared library system supports it.
@@ -49,9 +49,12 @@ struct event_base;
#if ! defined(EVENT__DISABLE_THREAD_SUPPORT) && defined(EVTHREAD_EXPOSE_STRUCTS)
/* Global function pointers to lock-related functions. NULL if locking isn't
enabled. */
+EVENT2_EXPORT_SYMBOL
extern struct evthread_lock_callbacks evthread_lock_fns_;
+EVENT2_EXPORT_SYMBOL
extern struct evthread_condition_callbacks evthread_cond_fns_;
extern unsigned long (*evthread_id_fn_)(void);
+EVENT2_EXPORT_SYMBOL
extern int evthread_lock_debugging_enabled_;
/** Return the ID of the current thread, or 1 if threading isn't enabled. */
@@ -182,14 +185,23 @@ EVLOCK_TRY_LOCK_(void *lock)
#elif ! defined(EVENT__DISABLE_THREAD_SUPPORT)
unsigned long evthreadimpl_get_id_(void);
+EVENT2_EXPORT_SYMBOL
int evthreadimpl_is_lock_debugging_enabled_(void);
+EVENT2_EXPORT_SYMBOL
void *evthreadimpl_lock_alloc_(unsigned locktype);
+EVENT2_EXPORT_SYMBOL
void evthreadimpl_lock_free_(void *lock, unsigned locktype);
+EVENT2_EXPORT_SYMBOL
int evthreadimpl_lock_lock_(unsigned mode, void *lock);
+EVENT2_EXPORT_SYMBOL
int evthreadimpl_lock_unlock_(unsigned mode, void *lock);
+EVENT2_EXPORT_SYMBOL
void *evthreadimpl_cond_alloc_(unsigned condtype);
+EVENT2_EXPORT_SYMBOL
void evthreadimpl_cond_free_(void *cond);
+EVENT2_EXPORT_SYMBOL
int evthreadimpl_cond_signal_(void *cond, int broadcast);
+EVENT2_EXPORT_SYMBOL
int evthreadimpl_cond_wait_(void *cond, void *lock, const struct timeval *tv);
int evthreadimpl_locking_enabled_(void);
@@ -355,6 +367,7 @@ EVLOCK_TRY_LOCK_(void *lock)
EVLOCK_UNLOCK(lock1_tmplock_,mode1); \
} while (0)
+EVENT2_EXPORT_SYMBOL
int evthread_is_debug_lock_held_(void *lock);
void *evthread_debug_get_real_lock_(void *lock);
@@ -377,6 +390,7 @@ int evutil_global_setup_locks_(const int enable_locks);
int evutil_secure_rng_global_setup_locks_(const int enable_locks);
/** Return current evthread_lock_callbacks */
+EVENT2_EXPORT_SYMBOL
struct evthread_lock_callbacks *evthread_get_lock_callbacks(void);
/** Return current evthread_condition_callbacks */
struct evthread_condition_callbacks *evthread_get_condition_callbacks(void);
diff --git a/contrib/ntp/sntp/libevent/evthread.c b/contrib/ntp/sntp/libevent/evthread.c
index 02dab7a8057e..3eac594d64dc 100644
--- a/contrib/ntp/sntp/libevent/evthread.c
+++ b/contrib/ntp/sntp/libevent/evthread.c
@@ -45,6 +45,11 @@
#define GLOBAL static
#endif
+#ifndef EVENT__DISABLE_DEBUG_MODE
+extern int event_debug_created_threadable_ctx_;
+extern int event_debug_mode_on_;
+#endif
+
/* globals */
GLOBAL int evthread_lock_debugging_enabled_ = 0;
GLOBAL struct evthread_lock_callbacks evthread_lock_fns_ = {
@@ -89,6 +94,14 @@ evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs)
{
struct evthread_lock_callbacks *target = evthread_get_lock_callbacks();
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ if (event_debug_mode_on_) {
+ if (event_debug_created_threadable_ctx_) {
+ event_errx(1, "evthread initialization must be called BEFORE anything else!");
+ }
+ }
+#endif
+
if (!cbs) {
if (target->alloc)
event_warnx("Trying to disable lock functions after "
@@ -124,6 +137,14 @@ evthread_set_condition_callbacks(const struct evthread_condition_callbacks *cbs)
{
struct evthread_condition_callbacks *target = evthread_get_condition_callbacks();
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ if (event_debug_mode_on_) {
+ if (event_debug_created_threadable_ctx_) {
+ event_errx(1, "evthread initialization must be called BEFORE anything else!");
+ }
+ }
+#endif
+
if (!cbs) {
if (target->alloc_condition)
event_warnx("Trying to disable condition functions "
@@ -380,17 +401,18 @@ evthread_setup_global_lock_(void *lock_, unsigned locktype, int enable_locks)
return evthread_lock_fns_.alloc(locktype);
} else {
/* Case 4: Fill in a debug lock with a real lock */
- struct debug_lock *lock = lock_;
+ struct debug_lock *lock = lock_ ? lock_ : debug_lock_alloc(locktype);
EVUTIL_ASSERT(enable_locks &&
evthread_lock_debugging_enabled_);
EVUTIL_ASSERT(lock->locktype == locktype);
- EVUTIL_ASSERT(lock->lock == NULL);
- lock->lock = original_lock_fns_.alloc(
- locktype|EVTHREAD_LOCKTYPE_RECURSIVE);
if (!lock->lock) {
- lock->count = -200;
- mm_free(lock);
- return NULL;
+ lock->lock = original_lock_fns_.alloc(
+ locktype|EVTHREAD_LOCKTYPE_RECURSIVE);
+ if (!lock->lock) {
+ lock->count = -200;
+ mm_free(lock);
+ return NULL;
+ }
}
return lock;
}
@@ -406,6 +428,12 @@ evthreadimpl_get_id_()
void *
evthreadimpl_lock_alloc_(unsigned locktype)
{
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ if (event_debug_mode_on_) {
+ event_debug_created_threadable_ctx_ = 1;
+ }
+#endif
+
return evthread_lock_fns_.alloc ?
evthread_lock_fns_.alloc(locktype) : NULL;
}
@@ -434,6 +462,12 @@ evthreadimpl_lock_unlock_(unsigned mode, void *lock)
void *
evthreadimpl_cond_alloc_(unsigned condtype)
{
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ if (event_debug_mode_on_) {
+ event_debug_created_threadable_ctx_ = 1;
+ }
+#endif
+
return evthread_cond_fns_.alloc_condition ?
evthread_cond_fns_.alloc_condition(condtype) : NULL;
}
diff --git a/contrib/ntp/sntp/libevent/evutil.c b/contrib/ntp/sntp/libevent/evutil.c
index 3d72e4032450..9817f086433d 100644
--- a/contrib/ntp/sntp/libevent/evutil.c
+++ b/contrib/ntp/sntp/libevent/evutil.c
@@ -29,6 +29,7 @@
#ifdef _WIN32
#include <winsock2.h>
+#include <winerror.h>
#include <ws2tcpip.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -40,6 +41,7 @@
/* For structs needed by GetAdaptersAddresses */
#define _WIN32_WINNT 0x0501
#include <iphlpapi.h>
+#include <netioapi.h>
#endif
#include <sys/types.h>
@@ -73,6 +75,9 @@
#endif
#include <time.h>
#include <sys/stat.h>
+#ifndef _WIN32
+#include <net/if.h>
+#endif
#ifdef EVENT__HAVE_IFADDRS_H
#include <ifaddrs.h>
#endif
@@ -226,16 +231,17 @@ evutil_ersatz_socketpair_(int family, int type, int protocol,
struct sockaddr_in connect_addr;
ev_socklen_t size;
int saved_errno = -1;
-
- if (protocol
- || (family != AF_INET
+ int family_test;
+
+ family_test = family != AF_INET;
#ifdef AF_UNIX
- && family != AF_UNIX
+ family_test = family_test && (family != AF_UNIX);
#endif
- )) {
+ if (protocol || family_test) {
EVUTIL_SET_SOCKET_ERROR(ERR(EAFNOSUPPORT));
return -1;
}
+
if (!fd) {
EVUTIL_SET_SOCKET_ERROR(ERR(EINVAL));
return -1;
@@ -257,6 +263,9 @@ evutil_ersatz_socketpair_(int family, int type, int protocol,
connector = socket(AF_INET, type, 0);
if (connector < 0)
goto tidy_up_and_fail;
+
+ memset(&connect_addr, 0, sizeof(connect_addr));
+
/* We want to find out the port number to connect to. */
size = sizeof(connect_addr);
if (getsockname(listener, (struct sockaddr *) &connect_addr, &size) == -1)
@@ -310,7 +319,7 @@ evutil_make_socket_nonblocking(evutil_socket_t fd)
{
#ifdef _WIN32
{
- u_long nonblocking = 1;
+ unsigned long nonblocking = 1;
if (ioctlsocket(fd, FIONBIO, &nonblocking) == SOCKET_ERROR) {
event_sock_warn(fd, "fcntl(%d, F_GETFL)", (int)fd);
return -1;
@@ -355,7 +364,7 @@ evutil_fast_socket_nonblocking(evutil_socket_t fd)
int
evutil_make_listen_socket_reuseable(evutil_socket_t sock)
{
-#ifndef _WIN32
+#if defined(SO_REUSEADDR) && !defined(_WIN32)
int one = 1;
/* REUSEADDR on Unix means, "don't hang on to this address after the
* listener is closed." On Windows, though, it means "don't keep other
@@ -382,6 +391,17 @@ evutil_make_listen_socket_reuseable_port(evutil_socket_t sock)
}
int
+evutil_make_listen_socket_ipv6only(evutil_socket_t sock)
+{
+#if defined(IPV6_V6ONLY)
+ int one = 1;
+ return setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void*) &one,
+ (ev_socklen_t)sizeof(one));
+#endif
+ return 0;
+}
+
+int
evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock)
{
#if defined(EVENT__HAVE_NETINET_TCP_H) && defined(TCP_DEFER_ACCEPT)
@@ -520,7 +540,7 @@ evutil_socket_geterror(evutil_socket_t sock)
/* XXX we should use an enum here. */
/* 2 for connection refused, 1 for connected, 0 for not yet, -1 for error. */
int
-evutil_socket_connect_(evutil_socket_t *fd_ptr, struct sockaddr *sa, int socklen)
+evutil_socket_connect_(evutil_socket_t *fd_ptr, const struct sockaddr *sa, int socklen)
{
int made_fd = 0;
@@ -591,44 +611,56 @@ evutil_socket_finished_connecting_(evutil_socket_t fd)
set by evutil_check_interfaces. */
static int have_checked_interfaces, had_ipv4_address, had_ipv6_address;
-/* Macro: True iff the IPv4 address 'addr', in host order, is in 127.0.0.0/8
- */
-#define EVUTIL_V4ADDR_IS_LOCALHOST(addr) (((addr)>>24) == 127)
+/* True iff the IPv4 address 'addr', in host order, is in 127.0.0.0/8 */
+static inline int evutil_v4addr_is_localhost(ev_uint32_t addr)
+{ return addr>>24 == 127; }
-/* Macro: True iff the IPv4 address 'addr', in host order, is a class D
- * (multiclass) address.
- */
-#define EVUTIL_V4ADDR_IS_CLASSD(addr) ((((addr)>>24) & 0xf0) == 0xe0)
+/* True iff the IPv4 address 'addr', in host order, is link-local
+ * 169.254.0.0/16 (RFC3927) */
+static inline int evutil_v4addr_is_linklocal(ev_uint32_t addr)
+{ return ((addr & 0xffff0000U) == 0xa9fe0000U); }
+
+/* True iff the IPv4 address 'addr', in host order, is a class D
+ * (multiclass) address. */
+static inline int evutil_v4addr_is_classd(ev_uint32_t addr)
+{ return ((addr>>24) & 0xf0) == 0xe0; }
+
+int
+evutil_v4addr_is_local_(const struct in_addr *in)
+{
+ const ev_uint32_t addr = ntohl(in->s_addr);
+ return addr == INADDR_ANY ||
+ evutil_v4addr_is_localhost(addr) ||
+ evutil_v4addr_is_linklocal(addr) ||
+ evutil_v4addr_is_classd(addr);
+}
+int
+evutil_v6addr_is_local_(const struct in6_addr *in)
+{
+ static const char ZEROES[] =
+ "\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+ const unsigned char *addr = (const unsigned char *)in->s6_addr;
+ return !memcmp(addr, ZEROES, 8) ||
+ ((addr[0] & 0xfe) == 0xfc) ||
+ (addr[0] == 0xfe && (addr[1] & 0xc0) == 0x80) ||
+ (addr[0] == 0xfe && (addr[1] & 0xc0) == 0xc0) ||
+ (addr[0] == 0xff);
+}
static void
evutil_found_ifaddr(const struct sockaddr *sa)
{
- const char ZEROES[] = "\x00\x00\x00\x00\x00\x00\x00\x00"
- "\x00\x00\x00\x00\x00\x00\x00\x00";
-
if (sa->sa_family == AF_INET) {
const struct sockaddr_in *sin = (struct sockaddr_in *)sa;
- ev_uint32_t addr = ntohl(sin->sin_addr.s_addr);
- if (addr == 0 ||
- EVUTIL_V4ADDR_IS_LOCALHOST(addr) ||
- EVUTIL_V4ADDR_IS_CLASSD(addr)) {
- /* Not actually a usable external address. */
- } else {
+ if (!evutil_v4addr_is_local_(&sin->sin_addr)) {
event_debug(("Detected an IPv4 interface"));
had_ipv4_address = 1;
}
} else if (sa->sa_family == AF_INET6) {
const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
- const unsigned char *addr =
- (unsigned char*)sin6->sin6_addr.s6_addr;
- if (!memcmp(addr, ZEROES, 8) ||
- ((addr[0] & 0xfe) == 0xfc) ||
- (addr[0] == 0xfe && (addr[1] & 0xc0) == 0x80) ||
- (addr[0] == 0xfe && (addr[1] & 0xc0) == 0xc0) ||
- (addr[0] == 0xff)) {
- /* This is a reserved, ipv4compat, ipv4map, loopback,
- * link-local, multicast, or unspecified address. */
- } else {
+ if (!evutil_v6addr_is_local_(&sin6->sin6_addr)) {
event_debug(("Detected an IPv6 interface"));
had_ipv6_address = 1;
}
@@ -666,7 +698,7 @@ evutil_check_ifaddrs(void)
"GetAdaptersInfo", but that's deprecated; let's just try
GetAdaptersAddresses and fall back to connect+getsockname.
*/
- HMODULE lib = evutil_load_windows_system_library_(TEXT("ihplapi.dll"));
+ HMODULE lib = evutil_load_windows_system_library_(TEXT("iphlpapi.dll"));
GetAdaptersAddresses_fn_t fn;
ULONG size, res;
IP_ADAPTER_ADDRESSES *addresses = NULL, *address;
@@ -723,7 +755,7 @@ done:
/* Test whether we have an ipv4 interface and an ipv6 interface. Return 0 if
* the test seemed successful. */
static int
-evutil_check_interfaces(int force_recheck)
+evutil_check_interfaces(void)
{
evutil_socket_t fd = -1;
struct sockaddr_in sin, sin_out;
@@ -731,9 +763,12 @@ evutil_check_interfaces(int force_recheck)
ev_socklen_t sin_out_len = sizeof(sin_out);
ev_socklen_t sin6_out_len = sizeof(sin6_out);
int r;
- if (have_checked_interfaces && !force_recheck)
+ if (have_checked_interfaces)
return 0;
+ /* From this point on we have done the ipv4/ipv6 interface check */
+ have_checked_interfaces = 1;
+
if (evutil_check_ifaddrs() == 0) {
/* Use a nice sane interface, if this system has one. */
return 0;
@@ -959,6 +994,7 @@ evutil_getaddrinfo_common_(const char *nodename, const char *servname,
struct evutil_addrinfo *hints, struct evutil_addrinfo **res, int *portnum)
{
int port = 0;
+ unsigned int if_index;
const char *pname;
if (nodename == NULL && servname == NULL)
@@ -1032,10 +1068,12 @@ evutil_getaddrinfo_common_(const char *nodename, const char *servname,
if (hints->ai_family == PF_INET6 || hints->ai_family == PF_UNSPEC) {
struct sockaddr_in6 sin6;
memset(&sin6, 0, sizeof(sin6));
- if (1==evutil_inet_pton(AF_INET6, nodename, &sin6.sin6_addr)) {
+ if (1 == evutil_inet_pton_scope(
+ AF_INET6, nodename, &sin6.sin6_addr, &if_index)) {
/* Got an ipv6 address. */
sin6.sin6_family = AF_INET6;
sin6.sin6_port = htons(port);
+ sin6.sin6_scope_id = if_index;
*res = evutil_new_addrinfo_((struct sockaddr*)&sin6,
sizeof(sin6), hints);
if (!*res)
@@ -1049,7 +1087,7 @@ evutil_getaddrinfo_common_(const char *nodename, const char *servname,
struct sockaddr_in sin;
memset(&sin, 0, sizeof(sin));
if (1==evutil_inet_pton(AF_INET, nodename, &sin.sin_addr)) {
- /* Got an ipv6 address. */
+ /* Got an ipv4 address. */
sin.sin_family = AF_INET;
sin.sin_port = htons(port);
*res = evutil_new_addrinfo_((struct sockaddr*)&sin,
@@ -1159,7 +1197,7 @@ addrinfo_from_hostent(const struct hostent *ent,
sin6.sin6_family = AF_INET6;
sin6.sin6_port = htons(port);
sa = (struct sockaddr *)&sin6;
- socklen = sizeof(struct sockaddr_in);
+ socklen = sizeof(struct sockaddr_in6);
addrp = &sin6.sin6_addr;
if (ent->h_length != sizeof(sin6.sin6_addr)) {
event_warnx("Weird h_length from gethostbyname");
@@ -1201,8 +1239,7 @@ evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints)
return;
if (hints->ai_family != PF_UNSPEC)
return;
- if (!have_checked_interfaces)
- evutil_check_interfaces(0);
+ evutil_check_interfaces();
if (had_ipv4_address && !had_ipv6_address) {
hints->ai_family = PF_INET;
} else if (!had_ipv4_address && had_ipv6_address) {
@@ -1234,11 +1271,20 @@ static int tested_for_getaddrinfo_hacks=0;
field set to 0. We test for this so we can apply an appropriate
workaround.
*/
+static struct evutil_addrinfo *ai_find_protocol(struct evutil_addrinfo *ai)
+{
+ while (ai) {
+ if (ai->ai_protocol)
+ return ai;
+ ai = ai->ai_next;
+ }
+ return NULL;
+}
static void
test_for_getaddrinfo_hacks(void)
{
int r, r2;
- struct evutil_addrinfo *ai=NULL, *ai2=NULL;
+ struct evutil_addrinfo *ai=NULL, *ai2=NULL, *ai3=NULL;
struct evutil_addrinfo hints;
memset(&hints,0,sizeof(hints));
@@ -1252,12 +1298,13 @@ test_for_getaddrinfo_hacks(void)
#endif
0;
r = getaddrinfo("1.2.3.4", "80", &hints, &ai);
+ getaddrinfo("1.2.3.4", NULL, &hints, &ai3);
hints.ai_socktype = SOCK_STREAM;
r2 = getaddrinfo("1.2.3.4", "80", &hints, &ai2);
if (r2 == 0 && r != 0) {
need_numeric_port_hack_=1;
}
- if (ai2 && ai2->ai_protocol == 0) {
+ if (!ai_find_protocol(ai2) || !ai_find_protocol(ai3)) {
need_socktype_protocol_hack_=1;
}
@@ -1265,6 +1312,8 @@ test_for_getaddrinfo_hacks(void)
freeaddrinfo(ai);
if (ai2)
freeaddrinfo(ai2);
+ if (ai3)
+ freeaddrinfo(ai3);
tested_for_getaddrinfo_hacks=1;
}
@@ -1542,6 +1591,7 @@ evutil_freeaddrinfo(struct evutil_addrinfo *ai)
}
static evdns_getaddrinfo_fn evdns_getaddrinfo_impl = NULL;
+static evdns_getaddrinfo_cancel_fn evdns_getaddrinfo_cancel_impl = NULL;
void
evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo_fn fn)
@@ -1549,27 +1599,40 @@ evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo_fn fn)
if (!evdns_getaddrinfo_impl)
evdns_getaddrinfo_impl = fn;
}
+void
+evutil_set_evdns_getaddrinfo_cancel_fn_(evdns_getaddrinfo_cancel_fn fn)
+{
+ if (!evdns_getaddrinfo_cancel_impl)
+ evdns_getaddrinfo_cancel_impl = fn;
+}
/* Internal helper function: act like evdns_getaddrinfo if dns_base is set;
* otherwise do a blocking resolve and pass the result to the callback in the
* way that evdns_getaddrinfo would.
*/
-int
-evutil_getaddrinfo_async_(struct evdns_base *dns_base,
+struct evdns_getaddrinfo_request *evutil_getaddrinfo_async_(
+ struct evdns_base *dns_base,
const char *nodename, const char *servname,
const struct evutil_addrinfo *hints_in,
void (*cb)(int, struct evutil_addrinfo *, void *), void *arg)
{
if (dns_base && evdns_getaddrinfo_impl) {
- evdns_getaddrinfo_impl(
+ return evdns_getaddrinfo_impl(
dns_base, nodename, servname, hints_in, cb, arg);
} else {
struct evutil_addrinfo *ai=NULL;
int err;
err = evutil_getaddrinfo(nodename, servname, hints_in, &ai);
cb(err, ai, arg);
+ return NULL;
+ }
+}
+
+void evutil_getaddrinfo_cancel_async_(struct evdns_getaddrinfo_request *data)
+{
+ if (evdns_getaddrinfo_cancel_impl && data) {
+ evdns_getaddrinfo_cancel_impl(data);
}
- return 0;
}
const char *
@@ -1705,10 +1768,10 @@ evutil_socket_error_to_string(int errcode)
goto done;
}
- if (0 != FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+ if (0 != FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_ALLOCATE_BUFFER,
- NULL, errcode, 0, (LPTSTR)&msg, 0, NULL))
+ NULL, errcode, 0, (char *)&msg, 0, NULL))
chomp (msg); /* because message has trailing newline */
else {
size_t len = 50;
@@ -1926,6 +1989,41 @@ evutil_inet_ntop(int af, const void *src, char *dst, size_t len)
}
int
+evutil_inet_pton_scope(int af, const char *src, void *dst, unsigned *indexp)
+{
+ int r;
+ unsigned if_index;
+ char *check, *cp, *tmp_src;
+
+ *indexp = 0; /* Reasonable default */
+
+ /* Bail out if not IPv6 */
+ if (af != AF_INET6)
+ return evutil_inet_pton(af, src, dst);
+
+ cp = strchr(src, '%');
+
+ /* Bail out if no zone ID */
+ if (cp == NULL)
+ return evutil_inet_pton(af, src, dst);
+
+ if_index = if_nametoindex(cp + 1);
+ if (if_index == 0) {
+ /* Could be numeric */
+ if_index = strtoul(cp + 1, &check, 10);
+ if (check[0] != '\0')
+ return 0;
+ }
+ *indexp = if_index;
+ tmp_src = mm_strdup(src);
+ cp = strchr(tmp_src, '%');
+ *cp = '\0';
+ r = evutil_inet_pton(af, tmp_src, dst);
+ free(tmp_src);
+ return r;
+}
+
+int
evutil_inet_pton(int af, const char *src, void *dst)
{
#if defined(EVENT__HAVE_INET_PTON) && !defined(USE_INTERNAL_PTON)
@@ -2041,6 +2139,7 @@ int
evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *outlen)
{
int port;
+ unsigned int if_index;
char buf[128];
const char *cp, *addr_part, *port_part;
int is_ipv6;
@@ -2054,12 +2153,12 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *
cp = strchr(ip_as_string, ':');
if (*ip_as_string == '[') {
- int len;
+ size_t len;
if (!(cp = strchr(ip_as_string, ']'))) {
return -1;
}
- len = (int) ( cp-(ip_as_string + 1) );
- if (len > (int)sizeof(buf)-1) {
+ len = ( cp-(ip_as_string + 1) );
+ if (len > sizeof(buf)-1) {
return -1;
}
memcpy(buf, ip_as_string+1, len);
@@ -2110,10 +2209,13 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *
#endif
sin6.sin6_family = AF_INET6;
sin6.sin6_port = htons(port);
- if (1 != evutil_inet_pton(AF_INET6, addr_part, &sin6.sin6_addr))
+ if (1 != evutil_inet_pton_scope(
+ AF_INET6, addr_part, &sin6.sin6_addr, &if_index)) {
return -1;
+ }
if ((int)sizeof(sin6) > *outlen)
return -1;
+ sin6.sin6_scope_id = if_index;
memset(out, 0, *outlen);
memcpy(out, &sin6, sizeof(sin6));
*outlen = sizeof(sin6);
@@ -2267,7 +2369,7 @@ static const unsigned char EVUTIL_TOLOWER_TABLE[256] = {
#define IMPL_CTYPE_FN(name) \
int EVUTIL_##name##_(char c) { \
ev_uint8_t u = c; \
- return !!(EVUTIL_##name##_TABLE[(u >> 5) & 7] & (1 << (u & 31))); \
+ return !!(EVUTIL_##name##_TABLE[(u >> 5) & 7] & (1U << (u & 31))); \
}
IMPL_CTYPE_FN(ISALPHA)
IMPL_CTYPE_FN(ISALNUM)
@@ -2563,7 +2665,7 @@ evutil_accept4_(evutil_socket_t sockfd, struct sockaddr *addr,
}
/* Internal function: Set fd[0] and fd[1] to a pair of fds such that writes on
- * fd[0] get read from fd[1]. Make both fds nonblocking and close-on-exec.
+ * fd[1] get read from fd[0]. Make both fds nonblocking and close-on-exec.
* Return 0 on success, -1 on failure.
*/
int
diff --git a/contrib/ntp/sntp/libevent/evutil_rand.c b/contrib/ntp/sntp/libevent/evutil_rand.c
index 24efa69288da..f56fd9d30d25 100644
--- a/contrib/ntp/sntp/libevent/evutil_rand.c
+++ b/contrib/ntp/sntp/libevent/evutil_rand.c
@@ -171,9 +171,7 @@ evutil_secure_rng_init(void)
int val;
ARC4_LOCK_();
- if (!arc4_seeded_ok)
- arc4_stir();
- val = arc4_seeded_ok ? 0 : -1;
+ val = (!arc4_stir()) ? 0 : -1;
ARC4_UNLOCK_();
return val;
}
@@ -192,10 +190,12 @@ evutil_secure_rng_get_bytes(void *buf, size_t n)
ev_arc4random_buf(buf, n);
}
+#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
void
evutil_secure_rng_add_bytes(const char *buf, size_t n)
{
}
+#endif
void
evutil_free_secure_rng_globals_(void)
diff --git a/contrib/ntp/sntp/libevent/evutil_time.c b/contrib/ntp/sntp/libevent/evutil_time.c
index 8f53c66b68c0..c327218227a4 100644
--- a/contrib/ntp/sntp/libevent/evutil_time.c
+++ b/contrib/ntp/sntp/libevent/evutil_time.c
@@ -43,7 +43,7 @@
#ifndef EVENT__HAVE_GETTIMEOFDAY
#include <sys/timeb.h>
#endif
-#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT_HAVE_USLEEP) && \
+#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT__HAVE_USLEEP) && \
!defined(_WIN32)
#include <sys/select.h>
#endif
@@ -51,6 +51,13 @@
#include <sys/stat.h>
#include <string.h>
+/** evutil_usleep_() */
+#if defined(_WIN32)
+#elif defined(EVENT__HAVE_NANOSLEEP)
+#elif defined(EVENT__HAVE_USLEEP)
+#include <unistd.h>
+#endif
+
#include "event2/util.h"
#include "util-internal.h"
#include "log-internal.h"
@@ -58,6 +65,9 @@
#ifndef EVENT__HAVE_GETTIMEOFDAY
/* No gettimeofday; this must be windows. */
+
+typedef void (WINAPI *GetSystemTimePreciseAsFileTime_fn_t) (LPFILETIME);
+
int
evutil_gettimeofday(struct timeval *tv, struct timezone *tz)
{
@@ -83,7 +93,22 @@ evutil_gettimeofday(struct timeval *tv, struct timezone *tz)
if (tv == NULL)
return -1;
- GetSystemTimeAsFileTime(&ft.ft_ft);
+ static GetSystemTimePreciseAsFileTime_fn_t GetSystemTimePreciseAsFileTime_fn = NULL;
+ static int check_precise = 1;
+
+ if (EVUTIL_UNLIKELY(check_precise)) {
+ HMODULE h = evutil_load_windows_system_library_(TEXT("kernel32.dll"));
+ if (h != NULL)
+ GetSystemTimePreciseAsFileTime_fn =
+ (GetSystemTimePreciseAsFileTime_fn_t)
+ GetProcAddress(h, "GetSystemTimePreciseAsFileTime");
+ check_precise = 0;
+ }
+
+ if (GetSystemTimePreciseAsFileTime_fn != NULL)
+ GetSystemTimePreciseAsFileTime_fn(&ft.ft_ft);
+ else
+ GetSystemTimeAsFileTime(&ft.ft_ft);
if (EVUTIL_UNLIKELY(ft.ft_64 < EPOCH_BIAS)) {
/* Time before the unix epoch. */
@@ -119,8 +144,22 @@ evutil_usleep_(const struct timeval *tv)
return;
#if defined(_WIN32)
{
- long msec = evutil_tv_to_msec_(tv);
- Sleep((DWORD)msec);
+ __int64 usec;
+ LARGE_INTEGER li;
+ HANDLE timer;
+
+ usec = tv->tv_sec * 1000000LL + tv->tv_usec;
+ if (!usec)
+ return;
+
+ li.QuadPart = -10LL * usec;
+ timer = CreateWaitableTimer(NULL, TRUE, NULL);
+ if (!timer)
+ return;
+
+ SetWaitableTimer(timer, &li, 0, NULL, NULL, 0);
+ WaitForSingleObject(timer, INFINITE);
+ CloseHandle(timer);
}
#elif defined(EVENT__HAVE_NANOSLEEP)
{
@@ -134,10 +173,54 @@ evutil_usleep_(const struct timeval *tv)
sleep(tv->tv_sec);
usleep(tv->tv_usec);
#else
- select(0, NULL, NULL, NULL, tv);
+ {
+ struct timeval tv2 = *tv;
+ select(0, NULL, NULL, NULL, &tv2);
+ }
#endif
}
+int
+evutil_date_rfc1123(char *date, const size_t datelen, const struct tm *tm)
+{
+ static const char *DAYS[] =
+ { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
+ static const char *MONTHS[] =
+ { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+
+ time_t t = time(NULL);
+
+#if defined(EVENT__HAVE__GMTIME64_S) || !defined(_WIN32)
+ struct tm sys;
+#endif
+
+ /* If `tm` is null, set system's current time. */
+ if (tm == NULL) {
+#if !defined(_WIN32)
+ gmtime_r(&t, &sys);
+ tm = &sys;
+ /** detect _gmtime64()/_gmtime64_s() */
+#elif defined(EVENT__HAVE__GMTIME64_S)
+ errno_t err;
+ err = _gmtime64_s(&sys, &t);
+ if (err) {
+ event_errx(1, "Invalid argument to _gmtime64_s");
+ } else {
+ tm = &sys;
+ }
+#elif defined(EVENT__HAVE__GMTIME64)
+ tm = _gmtime64(&t);
+#else
+ tm = gmtime(&t);
+#endif
+ }
+
+ return evutil_snprintf(
+ date, datelen, "%s, %02d %s %4d %02d:%02d:%02d GMT",
+ DAYS[tm->tm_wday], tm->tm_mday, MONTHS[tm->tm_mon],
+ 1900 + tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec);
+}
+
/*
This function assumes it's called repeatedly with a
not-actually-so-monotonic time source whose outputs are in 'tv'. It
diff --git a/contrib/ntp/sntp/libevent/http-internal.h b/contrib/ntp/sntp/libevent/http-internal.h
index a83160c8341b..feaf436d7421 100644
--- a/contrib/ntp/sntp/libevent/http-internal.h
+++ b/contrib/ntp/sntp/libevent/http-internal.h
@@ -18,9 +18,6 @@
#define HTTP_WRITE_TIMEOUT 50
#define HTTP_READ_TIMEOUT 50
-#define HTTP_PREFIX "http://"
-#define HTTP_DEFAULTPORT 80
-
enum message_read_status {
ALL_DATA_READ = 1,
MORE_DATA_EXPECTED = 0,
@@ -62,19 +59,23 @@ struct evhttp_connection {
struct event retry_ev; /* for retrying connects */
char *bind_address; /* address to use for binding the src */
- u_short bind_port; /* local port for binding the src */
+ ev_uint16_t bind_port; /* local port for binding the src */
char *address; /* address to connect to */
- u_short port;
+ ev_uint16_t port;
size_t max_headers_size;
ev_uint64_t max_body_size;
int flags;
-#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
-#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */
-#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */
-#define EVHTTP_CON_AUTOFREE 0x0008 /* set when we want to auto free the connection */
+#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
+#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */
+#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */
+/* set when we want to auto free the connection */
+#define EVHTTP_CON_AUTOFREE EVHTTP_CON_PUBLIC_FLAGS_END
+/* Installed when attempt to read HTTP error after write failed, see
+ * EVHTTP_CON_READ_ON_WRITE_ERROR */
+#define EVHTTP_CON_READING_ERROR (EVHTTP_CON_AUTOFREE << 1)
struct timeval timeout; /* timeout for events */
int retry_cnt; /* retry count */
@@ -101,13 +102,6 @@ struct evhttp_connection {
struct event_base *base;
struct evdns_base *dns_base;
int ai_family;
-
- /* Saved conn_addr, to extract IP address from it.
- *
- * Because some servers may reset/close connection without waiting clients,
- * in that case we can't extract IP address even in close_cb.
- * So we need to save it, just after we connected to remote server. */
- struct sockaddr_storage *conn_address;
};
/* A callback for an http server */
@@ -160,6 +154,7 @@ struct evhttp {
size_t default_max_headers_size;
ev_uint64_t default_max_body_size;
+ int flags;
const char *default_content_type;
/* Bitmask of all HTTP methods that we accept and pass to user
@@ -186,21 +181,26 @@ int evhttp_connection_connect_(struct evhttp_connection *);
enum evhttp_request_error;
/* notifies the current request that it failed; resets connection */
+EVENT2_EXPORT_SYMBOL
void evhttp_connection_fail_(struct evhttp_connection *,
enum evhttp_request_error error);
enum message_read_status;
+EVENT2_EXPORT_SYMBOL
enum message_read_status evhttp_parse_firstline_(struct evhttp_request *, struct evbuffer*);
+EVENT2_EXPORT_SYMBOL
enum message_read_status evhttp_parse_headers_(struct evhttp_request *, struct evbuffer*);
void evhttp_start_read_(struct evhttp_connection *);
+void evhttp_start_write_(struct evhttp_connection *);
/* response sending HTML the data in the buffer */
void evhttp_response_code_(struct evhttp_request *, int, const char *);
void evhttp_send_page_(struct evhttp_request *, struct evbuffer *);
+EVENT2_EXPORT_SYMBOL
int evhttp_decode_uri_internal(const char *uri, size_t length,
char *ret, int decode_plus);
-#endif /* _HTTP_H */
+#endif /* HTTP_INTERNAL_H_INCLUDED_ */
diff --git a/contrib/ntp/sntp/libevent/http.c b/contrib/ntp/sntp/libevent/http.c
index dd8c9cffddfc..04f089bc0182 100644
--- a/contrib/ntp/sntp/libevent/http.c
+++ b/contrib/ntp/sntp/libevent/http.c
@@ -35,21 +35,32 @@
#include <sys/types.h>
#endif
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+#ifdef EVENT__HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef HAVE_SYS_IOCCOM_H
-#include <sys/ioccom.h>
+#ifdef EVENT__HAVE_SYS_WAIT_H
+#include <sys/wait.h>
#endif
#ifndef _WIN32
-#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/wait.h>
-#else
+#else /* _WIN32 */
#include <winsock2.h>
#include <ws2tcpip.h>
+#endif /* _WIN32 */
+
+#ifdef EVENT__HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+#ifdef EVENT__HAVE_AFUNIX_H
+#include <afunix.h>
#endif
#include <sys/queue.h>
@@ -74,9 +85,8 @@
#include <string.h>
#ifndef _WIN32
#include <syslog.h>
-#endif
+#endif /* !_WIN32 */
#include <signal.h>
-#include <time.h>
#ifdef EVENT__HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -167,9 +177,10 @@ fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
extern int debug;
-static evutil_socket_t bind_socket_ai(struct evutil_addrinfo *, int reuse);
+static evutil_socket_t create_bind_socket_nonblock(struct evutil_addrinfo *, int reuse);
static evutil_socket_t bind_socket(const char *, ev_uint16_t, int reuse);
static void name_from_addr(struct sockaddr *, ev_socklen_t, char **, char **);
+static struct evhttp_uri *evhttp_uri_parse_authority(char *source_uri);
static int evhttp_associate_new_request_with_connection(
struct evhttp_connection *evcon);
static void evhttp_connection_start_detectclose(
@@ -347,6 +358,7 @@ evhttp_response_needs_body(struct evhttp_request *req)
return (req->response_code != HTTP_NOCONTENT &&
req->response_code != HTTP_NOTMODIFIED &&
(req->response_code < 100 || req->response_code >= 200) &&
+ req->type != EVHTTP_REQ_CONNECT &&
req->type != EVHTTP_REQ_HEAD);
}
@@ -365,15 +377,15 @@ evhttp_write_buffer(struct evhttp_connection *evcon,
evcon->cb_arg = arg;
/* Disable the read callback: we don't actually care about data;
- * we only care about close detection. (We don't disable reading,
- * since we *do* want to learn about any close events.) */
+ * we only care about close detection. (We don't disable reading --
+ * EV_READ, since we *do* want to learn about any close events.) */
bufferevent_setcb(evcon->bufev,
NULL, /*read*/
evhttp_write_cb,
evhttp_error_cb,
evcon);
- bufferevent_enable(evcon->bufev, EV_WRITE);
+ bufferevent_enable(evcon->bufev, EV_READ|EV_WRITE);
}
static void
@@ -431,7 +443,10 @@ evhttp_make_header_request(struct evhttp_connection *evcon,
evhttp_remove_header(req->output_headers, "Proxy-Connection");
/* Generate request line */
- method = evhttp_method(req->type);
+ if (!(method = evhttp_method(req->type))) {
+ method = "NULL";
+ }
+
evbuffer_add_printf(bufferevent_get_output(evcon->bufev),
"%s %s HTTP/%d.%d\r\n",
method, req->uri, req->major, req->minor);
@@ -461,6 +476,16 @@ evhttp_is_connection_close(int flags, struct evkeyvalq* headers)
return (connection != NULL && evutil_ascii_strcasecmp(connection, "close") == 0);
}
}
+static int
+evhttp_is_request_connection_close(struct evhttp_request *req)
+{
+ if (req->type == EVHTTP_REQ_CONNECT)
+ return 0;
+
+ return
+ evhttp_is_connection_close(req->flags, req->input_headers) ||
+ evhttp_is_connection_close(req->flags, req->output_headers);
+}
/* Return true iff 'headers' contains 'Connection: keep-alive' */
static int
@@ -477,19 +502,7 @@ evhttp_maybe_add_date_header(struct evkeyvalq *headers)
{
if (evhttp_find_header(headers, "Date") == NULL) {
char date[50];
-#ifndef _WIN32
- struct tm cur;
-#endif
- struct tm *cur_p;
- time_t t = time(NULL);
-#ifdef _WIN32
- cur_p = gmtime(&t);
-#else
- gmtime_r(&t, &cur);
- cur_p = &cur;
-#endif
- if (strftime(date, sizeof(date),
- "%a, %d %b %Y %H:%M:%S GMT", cur_p) != 0) {
+ if (sizeof(date) - evutil_date_rfc1123(date, sizeof(date), NULL) > 0) {
evhttp_add_header(headers, "Date", date);
}
}
@@ -569,6 +582,23 @@ evhttp_make_header_response(struct evhttp_connection *evcon,
}
}
+enum expect { NO, CONTINUE, OTHER };
+static enum expect evhttp_have_expect(struct evhttp_request *req, int input)
+{
+ const char *expect;
+ struct evkeyvalq *h = input ? req->input_headers : req->output_headers;
+
+ if (!(req->kind == EVHTTP_REQUEST) || !REQ_VERSION_ATLEAST(req, 1, 1))
+ return NO;
+
+ expect = evhttp_find_header(h, "Expect");
+ if (!expect)
+ return NO;
+
+ return !evutil_ascii_strcasecmp(expect, "100-continue") ? CONTINUE : OTHER;
+}
+
+
/** Generate all headers appropriate for sending the http request in req (or
* the response, if we're sending a response), and write them to evcon's
* bufferevent. Also writes all data from req->output_buffer */
@@ -594,14 +624,12 @@ evhttp_make_header(struct evhttp_connection *evcon, struct evhttp_request *req)
}
evbuffer_add(output, "\r\n", 2);
- if (evbuffer_get_length(req->output_buffer) > 0) {
+ if (evhttp_have_expect(req, 0) != CONTINUE &&
+ evbuffer_get_length(req->output_buffer)) {
/*
* For a request, we add the POST data, for a reply, this
* is the regular data.
*/
- /* XXX We might want to support waiting (a limited amount of
- time) for a continue status line from the server before
- sending POST/PUT message bodies. */
evbuffer_add_buffer(output, req->output_buffer);
}
}
@@ -630,6 +658,14 @@ evhttp_connection_incoming_fail(struct evhttp_request *req,
enum evhttp_request_error error)
{
switch (error) {
+ case EVREQ_HTTP_DATA_TOO_LONG:
+ req->response_code = HTTP_ENTITYTOOLARGE;
+ break;
+ default:
+ req->response_code = HTTP_BADREQUEST;
+ }
+
+ switch (error) {
case EVREQ_HTTP_TIMEOUT:
case EVREQ_HTTP_EOF:
/*
@@ -674,6 +710,22 @@ evhttp_connection_incoming_fail(struct evhttp_request *req,
return (0);
}
+/* Free connection ownership of which can be acquired by user using
+ * evhttp_request_own(). */
+static inline void
+evhttp_request_free_auto(struct evhttp_request *req)
+{
+ if (!(req->flags & EVHTTP_USER_OWNED))
+ evhttp_request_free(req);
+}
+
+static void
+evhttp_request_free_(struct evhttp_connection *evcon, struct evhttp_request *req)
+{
+ TAILQ_REMOVE(&evcon->requests, req, next);
+ evhttp_request_free_auto(req);
+}
+
/* Called when evcon has experienced a (non-recoverable? -NM) error, as
* given in error. If it's an outgoing connection, reset the connection,
* retry any pending requests, and inform the user. If it's incoming,
@@ -722,8 +774,7 @@ evhttp_connection_fail_(struct evhttp_connection *evcon,
* send over a new connection. when a user cancels a request,
* all other pending requests should be processed as normal
*/
- TAILQ_REMOVE(&evcon->requests, req, next);
- evhttp_request_free(req);
+ evhttp_request_free_(evcon, req);
/* reset the connection */
evhttp_connection_reset_(evcon);
@@ -731,6 +782,11 @@ evhttp_connection_fail_(struct evhttp_connection *evcon,
/* We are trying the next request that was queued on us */
if (TAILQ_FIRST(&evcon->requests) != NULL)
evhttp_connection_connect_(evcon);
+ else
+ if ((evcon->flags & EVHTTP_CON_OUTGOING) &&
+ (evcon->flags & EVHTTP_CON_AUTOFREE)) {
+ evhttp_connection_free(evcon);
+ }
/* The call to evhttp_connection_reset_ overwrote errno.
* Let's restore the original errno, so that the user's
@@ -773,16 +829,12 @@ evhttp_connection_done(struct evhttp_connection *evcon)
if (con_outgoing) {
/* idle or close the connection */
- int need_close;
+ int need_close = evhttp_is_request_connection_close(req);
TAILQ_REMOVE(&evcon->requests, req, next);
req->evcon = NULL;
evcon->state = EVCON_IDLE;
- need_close =
- evhttp_is_connection_close(req->flags, req->input_headers)||
- evhttp_is_connection_close(req->flags, req->output_headers);
-
/* check if we got asked to close the connection */
if (need_close)
evhttp_connection_reset_(evcon);
@@ -820,11 +872,9 @@ evhttp_connection_done(struct evhttp_connection *evcon)
/* notify the user of the request */
(*req->cb)(req, req->cb_arg);
- /* if this was an outgoing request, we own and it's done. so free it.
- * unless the callback specifically requested to own the request.
- */
- if (con_outgoing && ((req->flags & EVHTTP_USER_OWNED) == 0)) {
- evhttp_request_free(req);
+ /* if this was an outgoing request, we own and it's done. so free it. */
+ if (con_outgoing) {
+ evhttp_request_free_auto(req);
}
/* If this was the last request of an outgoing connection and we're
@@ -960,12 +1010,40 @@ evhttp_read_trailer(struct evhttp_connection *evcon, struct evhttp_request *req)
case MORE_DATA_EXPECTED:
case REQUEST_CANCELED: /* ??? */
default:
- bufferevent_enable(evcon->bufev, EV_READ);
break;
}
}
static void
+evhttp_lingering_close(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ struct evbuffer *buf = bufferevent_get_input(evcon->bufev);
+
+ size_t n = evbuffer_get_length(buf);
+ if (n > (size_t) req->ntoread)
+ n = (size_t) req->ntoread;
+ req->ntoread -= n;
+ req->body_size += n;
+
+ event_debug(("Request body is too long, left " EV_I64_FMT,
+ EV_I64_ARG(req->ntoread)));
+
+ evbuffer_drain(buf, n);
+ if (!req->ntoread)
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_DATA_TOO_LONG);
+}
+static void
+evhttp_lingering_fail(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ if (evcon->flags & EVHTTP_CON_LINGERING_CLOSE)
+ evhttp_lingering_close(evcon, req);
+ else
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_DATA_TOO_LONG);
+}
+
+static void
evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
{
struct evbuffer *buf = bufferevent_get_input(evcon->bufev);
@@ -985,7 +1063,7 @@ evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
return;
case REQUEST_CANCELED:
/* request canceled */
- evhttp_request_free(req);
+ evhttp_request_free_auto(req);
return;
case MORE_DATA_EXPECTED:
default:
@@ -1018,9 +1096,8 @@ evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
(size_t)req->ntoread > req->evcon->max_body_size)) {
/* XXX: The above casted comparison must checked for overflow */
/* failed body length test */
- event_debug(("Request body is too long"));
- evhttp_connection_fail_(evcon,
- EVREQ_HTTP_DATA_TOO_LONG);
+
+ evhttp_lingering_fail(evcon, req);
return;
}
@@ -1031,20 +1108,17 @@ evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
evbuffer_drain(req->input_buffer,
evbuffer_get_length(req->input_buffer));
if ((req->flags & EVHTTP_REQ_NEEDS_FREE) != 0) {
- evhttp_request_free(req);
+ evhttp_request_free_auto(req);
return;
}
}
- if (req->ntoread == 0) {
+ if (!req->ntoread) {
bufferevent_disable(evcon->bufev, EV_READ);
/* Completed content length */
evhttp_connection_done(evcon);
return;
}
-
- /* Read more! */
- bufferevent_enable(evcon->bufev, EV_READ);
}
#define get_deferred_queue(evcon) \
@@ -1113,7 +1187,9 @@ static void
evhttp_deferred_read_cb(struct event_callback *cb, void *data)
{
struct evhttp_connection *evcon = data;
- evhttp_read_cb(evcon->bufev, evcon);
+ struct bufferevent *bev = evcon->bufev;
+ if (bev->readcb)
+ (bev->readcb)(evcon->bufev, evcon);
}
static void
@@ -1121,10 +1197,16 @@ evhttp_write_connectioncb(struct evhttp_connection *evcon, void *arg)
{
/* This is after writing the request to the server */
struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+ struct evbuffer *output = bufferevent_get_output(evcon->bufev);
EVUTIL_ASSERT(req != NULL);
EVUTIL_ASSERT(evcon->state == EVCON_WRITING);
+ /* We need to wait until we've written all of our output data before we can
+ * continue */
+ if (evbuffer_get_length(output) > 0)
+ return;
+
/* We are done writing our header and are now expecting the response */
req->kind = EVHTTP_RESPONSE;
@@ -1139,6 +1221,7 @@ void
evhttp_connection_free(struct evhttp_connection *evcon)
{
struct evhttp_request *req;
+ int need_close = 0;
/* notify interested parties that this connection is going down */
if (evcon->fd != -1) {
@@ -1152,8 +1235,7 @@ evhttp_connection_free(struct evhttp_connection *evcon)
* evhttp_connection_fail_.
*/
while ((req = TAILQ_FIRST(&evcon->requests)) != NULL) {
- TAILQ_REMOVE(&evcon->requests, req, next);
- evhttp_request_free(req);
+ evhttp_request_free_(evcon, req);
}
if (evcon->http_server != NULL) {
@@ -1166,17 +1248,22 @@ evhttp_connection_free(struct evhttp_connection *evcon)
event_debug_unassign(&evcon->retry_ev);
}
- if (evcon->bufev != NULL)
- bufferevent_free(evcon->bufev);
-
event_deferred_cb_cancel_(get_deferred_queue(evcon),
&evcon->read_more_deferred_cb);
+ if (evcon->bufev != NULL) {
+ need_close =
+ !(bufferevent_get_options_(evcon->bufev) & BEV_OPT_CLOSE_ON_FREE);
+ if (evcon->fd == -1)
+ evcon->fd = bufferevent_getfd(evcon->bufev);
+
+ bufferevent_free(evcon->bufev);
+ }
+
if (evcon->fd != -1) {
shutdown(evcon->fd, EVUTIL_SHUT_WR);
- if (!(bufferevent_get_options_(evcon->bufev) & BEV_OPT_CLOSE_ON_FREE)) {
+ if (need_close)
evutil_closesocket(evcon->fd);
- }
}
if (evcon->bind_address != NULL)
@@ -1185,9 +1272,6 @@ evhttp_connection_free(struct evhttp_connection *evcon)
if (evcon->address != NULL)
mm_free(evcon->address);
- if (evcon->conn_address != NULL)
- mm_free(evcon->conn_address);
-
mm_free(evcon);
}
@@ -1224,6 +1308,8 @@ evhttp_request_dispatch(struct evhttp_connection* evcon)
if (req == NULL)
return;
+ EVUTIL_ASSERT(req->kind == EVHTTP_REQUEST);
+
/* delete possible close detection events */
evhttp_connection_stop_detectclose(evcon);
@@ -1244,6 +1330,9 @@ void
evhttp_connection_reset_(struct evhttp_connection *evcon)
{
struct evbuffer *tmp;
+ int err;
+
+ bufferevent_setcb(evcon->bufev, NULL, NULL, NULL, NULL);
/* XXXX This is not actually an optimal fix. Instead we ought to have
an API for "stop connecting", or use bufferevent_setfd to turn off
@@ -1258,6 +1347,9 @@ evhttp_connection_reset_(struct evhttp_connection *evcon)
*/
bufferevent_disable_hard_(evcon->bufev, EV_READ|EV_WRITE);
+ if (evcon->fd == -1)
+ evcon->fd = bufferevent_getfd(evcon->bufev);
+
if (evcon->fd != -1) {
/* inform interested parties about connection close */
if (evhttp_connected(evcon) && evcon->closecb != NULL)
@@ -1265,15 +1357,20 @@ evhttp_connection_reset_(struct evhttp_connection *evcon)
shutdown(evcon->fd, EVUTIL_SHUT_WR);
evutil_closesocket(evcon->fd);
- bufferevent_setfd(evcon->bufev, -1);
evcon->fd = -1;
}
+ err = bufferevent_setfd(evcon->bufev, -1);
+ EVUTIL_ASSERT(!err && "setfd");
/* we need to clean up any buffered data */
tmp = bufferevent_get_output(evcon->bufev);
- evbuffer_drain(tmp, evbuffer_get_length(tmp));
+ err = evbuffer_drain(tmp, -1);
+ EVUTIL_ASSERT(!err && "drain output");
tmp = bufferevent_get_input(evcon->bufev);
- evbuffer_drain(tmp, evbuffer_get_length(tmp));
+ err = evbuffer_drain(tmp, -1);
+ EVUTIL_ASSERT(!err && "drain input");
+
+ evcon->flags &= ~EVHTTP_CON_READING_ERROR;
evcon->state = EVCON_DISCONNECTED;
}
@@ -1282,7 +1379,6 @@ static void
evhttp_connection_start_detectclose(struct evhttp_connection *evcon)
{
evcon->flags |= EVHTTP_CON_CLOSEDETECT;
-
bufferevent_enable(evcon->bufev, EV_READ);
}
@@ -1290,7 +1386,6 @@ static void
evhttp_connection_stop_detectclose(struct evhttp_connection *evcon)
{
evcon->flags &= ~EVHTTP_CON_CLOSEDETECT;
-
bufferevent_disable(evcon->bufev, EV_READ);
}
@@ -1352,8 +1447,32 @@ evhttp_connection_cb_cleanup(struct evhttp_connection *evcon)
/* we might want to set an error here */
request->cb(request, request->cb_arg);
- evhttp_request_free(request);
+ evhttp_request_free_auto(request);
+ }
+}
+
+static void
+evhttp_connection_read_on_write_error(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ struct evbuffer *buf;
+
+ /** Second time, we can't read anything */
+ if (evcon->flags & EVHTTP_CON_READING_ERROR) {
+ evcon->flags &= ~EVHTTP_CON_READING_ERROR;
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_EOF);
+ return;
}
+
+ req->kind = EVHTTP_RESPONSE;
+
+ buf = bufferevent_get_output(evcon->bufev);
+ evbuffer_unfreeze(buf, 1);
+ evbuffer_drain(buf, evbuffer_get_length(buf));
+ evbuffer_freeze(buf, 1);
+
+ evhttp_start_read_(evcon);
+ evcon->flags |= EVHTTP_CON_READING_ERROR;
}
static void
@@ -1425,6 +1544,20 @@ evhttp_error_cb(struct bufferevent *bufev, short what, void *arg)
if (what & BEV_EVENT_TIMEOUT) {
evhttp_connection_fail_(evcon, EVREQ_HTTP_TIMEOUT);
} else if (what & (BEV_EVENT_EOF|BEV_EVENT_ERROR)) {
+ if (what & BEV_EVENT_WRITING &&
+ evcon->flags & EVHTTP_CON_READ_ON_WRITE_ERROR) {
+ evhttp_connection_read_on_write_error(evcon, req);
+ return;
+ }
+
+ if (what & BEV_EVENT_READING &&
+ evcon->flags & EVHTTP_CON_READ_ON_WRITE_ERROR &&
+ evbuffer_get_length(bufferevent_get_input(bufev))) {
+ event_deferred_cb_schedule_(get_deferred_queue(evcon),
+ &evcon->read_more_deferred_cb);
+ return;
+ }
+
evhttp_connection_fail_(evcon, EVREQ_HTTP_EOF);
} else if (what == BEV_EVENT_CONNECTED) {
} else {
@@ -1441,7 +1574,6 @@ evhttp_connection_cb(struct bufferevent *bufev, short what, void *arg)
struct evhttp_connection *evcon = arg;
int error;
ev_socklen_t errsz = sizeof(error);
- socklen_t conn_address_len = sizeof(*evcon->conn_address);
if (evcon->fd == -1)
evcon->fd = bufferevent_getfd(bufev);
@@ -1492,14 +1624,6 @@ evhttp_connection_cb(struct bufferevent *bufev, short what, void *arg)
evcon->retry_cnt = 0;
evcon->state = EVCON_IDLE;
- if (!evcon->conn_address) {
- evcon->conn_address = mm_malloc(sizeof(*evcon->conn_address));
- }
- if (getpeername(evcon->fd, (struct sockaddr *)evcon->conn_address, &conn_address_len)) {
- mm_free(evcon->conn_address);
- evcon->conn_address = NULL;
- }
-
/* reset the bufferevent cbs */
bufferevent_setcb(evcon->bufev,
evhttp_read_cb,
@@ -1578,6 +1702,8 @@ evhttp_parse_response_line(struct evhttp_request *req, char *line)
return (-1);
}
+ if (req->response_code_line != NULL)
+ mm_free(req->response_code_line);
if ((req->response_code_line = mm_strdup(readable)) == NULL) {
event_warn("%s: strdup", __func__);
return (-1);
@@ -1589,8 +1715,9 @@ evhttp_parse_response_line(struct evhttp_request *req, char *line)
/* Parse the first line of a HTTP request */
static int
-evhttp_parse_request_line(struct evhttp_request *req, char *line)
+evhttp_parse_request_line(struct evhttp_request *req, char *line, size_t len)
{
+ char *eos = line + len;
char *method;
char *uri;
char *version;
@@ -1599,16 +1726,24 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line)
size_t method_len;
enum evhttp_cmd_type type;
+ while (eos > line && *(eos-1) == ' ') {
+ *(eos-1) = '\0';
+ --eos;
+ --len;
+ }
+ if (len < strlen("GET / HTTP/1.0"))
+ return -1;
+
/* Parse the request line */
method = strsep(&line, " ");
- if (line == NULL)
- return (-1);
- uri = strsep(&line, " ");
- if (line == NULL)
- return (-1);
- version = strsep(&line, " ");
- if (line != NULL)
- return (-1);
+ if (!line)
+ return -1;
+ uri = line;
+ version = strrchr(uri, ' ');
+ if (!version || uri == version)
+ return -1;
+ *version = '\0';
+ version++;
method_len = (uri - method) - 1;
type = EVHTTP_REQ_UNKNOWN_;
@@ -1728,16 +1863,22 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line)
req->type = type;
if (evhttp_parse_http_version(version, req) < 0)
- return (-1);
+ return -1;
if ((req->uri = mm_strdup(uri)) == NULL) {
event_debug(("%s: mm_strdup", __func__));
- return (-1);
+ return -1;
}
- if ((req->uri_elems = evhttp_uri_parse_with_flags(req->uri,
- EVHTTP_URI_NONCONFORMANT)) == NULL) {
- return -1;
+ if (type == EVHTTP_REQ_CONNECT) {
+ if ((req->uri_elems = evhttp_uri_parse_authority(req->uri)) == NULL) {
+ return -1;
+ }
+ } else {
+ if ((req->uri_elems = evhttp_uri_parse_with_flags(req->uri,
+ EVHTTP_URI_NONCONFORMANT)) == NULL) {
+ return -1;
+ }
}
/* If we have an absolute-URI, check to see if it is an http request
@@ -1751,7 +1892,7 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line)
!evhttp_find_vhost(req->evcon->http_server, NULL, hostname))
req->flags |= EVHTTP_PROXY_REQUEST;
- return (0);
+ return 0;
}
const char *
@@ -1886,9 +2027,9 @@ evhttp_parse_firstline_(struct evhttp_request *req, struct evbuffer *buffer)
char *line;
enum message_read_status status = ALL_DATA_READ;
- size_t line_length;
+ size_t len;
/* XXX try */
- line = evbuffer_readln(buffer, &line_length, EVBUFFER_EOL_CRLF);
+ line = evbuffer_readln(buffer, &len, EVBUFFER_EOL_CRLF);
if (line == NULL) {
if (req->evcon != NULL &&
evbuffer_get_length(buffer) > req->evcon->max_headers_size)
@@ -1897,17 +2038,16 @@ evhttp_parse_firstline_(struct evhttp_request *req, struct evbuffer *buffer)
return (MORE_DATA_EXPECTED);
}
- if (req->evcon != NULL &&
- line_length > req->evcon->max_headers_size) {
+ if (req->evcon != NULL && len > req->evcon->max_headers_size) {
mm_free(line);
return (DATA_TOO_LONG);
}
- req->headers_size = line_length;
+ req->headers_size = len;
switch (req->kind) {
case EVHTTP_REQUEST:
- if (evhttp_parse_request_line(req, line) == -1)
+ if (evhttp_parse_request_line(req, line, len) == -1)
status = DATA_CORRUPTED;
break;
case EVHTTP_RESPONSE:
@@ -1960,12 +2100,12 @@ evhttp_parse_headers_(struct evhttp_request *req, struct evbuffer* buffer)
enum message_read_status status = MORE_DATA_EXPECTED;
struct evkeyvalq* headers = req->input_headers;
- size_t line_length;
- while ((line = evbuffer_readln(buffer, &line_length, EVBUFFER_EOL_CRLF))
+ size_t len;
+ while ((line = evbuffer_readln(buffer, &len, EVBUFFER_EOL_CRLF))
!= NULL) {
char *skey, *svalue;
- req->headers_size += line_length;
+ req->headers_size += len;
if (req->evcon != NULL &&
req->headers_size > req->evcon->max_headers_size) {
@@ -2029,11 +2169,7 @@ evhttp_get_body_length(struct evhttp_request *req)
req->ntoread = -1;
else if (content_length == NULL &&
evutil_ascii_strcasecmp(connection, "Close") != 0) {
- /* Bad combination, we don't know when it will end */
- event_warnx("%s: we got no content length, but the "
- "server wants to keep the connection open: %s.",
- __func__, connection);
- return (-1);
+ req->ntoread = 0;
} else if (content_length == NULL) {
req->ntoread = -1;
} else {
@@ -2061,16 +2197,15 @@ evhttp_method_may_have_body(enum evhttp_cmd_type type)
case EVHTTP_REQ_POST:
case EVHTTP_REQ_PUT:
case EVHTTP_REQ_PATCH:
- return 1;
- case EVHTTP_REQ_TRACE:
- return 0;
- /* XXX May any of the below methods have a body? */
+
case EVHTTP_REQ_GET:
- case EVHTTP_REQ_HEAD:
case EVHTTP_REQ_DELETE:
case EVHTTP_REQ_OPTIONS:
case EVHTTP_REQ_CONNECT:
- return 0;
+ return 1;
+
+ case EVHTTP_REQ_TRACE:
+ case EVHTTP_REQ_HEAD:
default:
return 0;
}
@@ -2094,8 +2229,7 @@ evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req)
req->ntoread = -1;
} else {
if (evhttp_get_body_length(req) == -1) {
- evhttp_connection_fail_(evcon,
- EVREQ_HTTP_INVALID_HEADER);
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_INVALID_HEADER);
return;
}
if (req->kind == EVHTTP_REQUEST && req->ntoread < 1) {
@@ -2107,12 +2241,8 @@ evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req)
}
/* Should we send a 100 Continue status line? */
- if (req->kind == EVHTTP_REQUEST && REQ_VERSION_ATLEAST(req, 1, 1)) {
- const char *expect;
-
- expect = evhttp_find_header(req->input_headers, "Expect");
- if (expect) {
- if (!evutil_ascii_strcasecmp(expect, "100-continue")) {
+ switch (evhttp_have_expect(req, 1)) {
+ case CONTINUE:
/* XXX It would be nice to do some sanity
checking here. Does the resource exist?
Should the resource accept post requests? If
@@ -2121,19 +2251,19 @@ evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req)
send their message body. */
if (req->ntoread > 0) {
/* ntoread is ev_int64_t, max_body_size is ev_uint64_t */
- if ((req->evcon->max_body_size <= EV_INT64_MAX) && (ev_uint64_t)req->ntoread > req->evcon->max_body_size) {
- evhttp_send_error(req, HTTP_ENTITYTOOLARGE, NULL);
+ if ((req->evcon->max_body_size <= EV_INT64_MAX) &&
+ (ev_uint64_t)req->ntoread > req->evcon->max_body_size) {
+ evhttp_lingering_fail(evcon, req);
return;
}
}
if (!evbuffer_get_length(bufferevent_get_input(evcon->bufev)))
evhttp_send_continue(evcon, req);
- } else {
- evhttp_send_error(req, HTTP_EXPECTATIONFAILED,
- NULL);
- return;
- }
- }
+ break;
+ case OTHER:
+ evhttp_send_error(req, HTTP_EXPECTATIONFAILED, NULL);
+ return;
+ case NO: break;
}
evhttp_read_body(evcon, req);
@@ -2181,9 +2311,6 @@ evhttp_read_header(struct evhttp_connection *evcon,
return;
}
- /* Disable reading for now */
- bufferevent_disable(evcon->bufev, EV_READ);
-
/* Callback can shut down connection with negative return value */
if (req->header_cb != NULL) {
if ((*req->header_cb)(req, req->cb_arg) < 0) {
@@ -2204,7 +2331,9 @@ evhttp_read_header(struct evhttp_connection *evcon,
case EVHTTP_RESPONSE:
/* Start over if we got a 100 Continue response. */
if (req->response_code == 100) {
- evhttp_start_read_(evcon);
+ struct evbuffer *output = bufferevent_get_output(evcon->bufev);
+ evbuffer_add_buffer(output, req->output_buffer);
+ evhttp_start_write_(evcon);
return;
}
if (!evhttp_response_needs_body(req)) {
@@ -2241,14 +2370,14 @@ evhttp_read_header(struct evhttp_connection *evcon,
*/
struct evhttp_connection *
-evhttp_connection_new(const char *address, unsigned short port)
+evhttp_connection_new(const char *address, ev_uint16_t port)
{
return (evhttp_connection_base_new(NULL, NULL, address, port));
}
struct evhttp_connection *
evhttp_connection_base_bufferevent_new(struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev,
- const char *address, unsigned short port)
+ const char *address, ev_uint16_t port)
{
struct evhttp_connection *evcon = NULL;
@@ -2324,7 +2453,7 @@ evhttp_connection_get_server(struct evhttp_connection *evcon)
struct evhttp_connection *
evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase,
- const char *address, unsigned short port)
+ const char *address, ev_uint16_t port)
{
return evhttp_connection_base_bufferevent_new(base, dnsbase, NULL, address, port);
}
@@ -2335,6 +2464,22 @@ void evhttp_connection_set_family(struct evhttp_connection *evcon,
evcon->ai_family = family;
}
+int evhttp_connection_set_flags(struct evhttp_connection *evcon,
+ int flags)
+{
+ int avail_flags = 0;
+ avail_flags |= EVHTTP_CON_REUSE_CONNECTED_ADDR;
+ avail_flags |= EVHTTP_CON_READ_ON_WRITE_ERROR;
+
+ if (flags & ~avail_flags || flags > EVHTTP_CON_PUBLIC_FLAGS_END)
+ return 1;
+ evcon->flags &= ~avail_flags;
+
+ evcon->flags |= flags;
+
+ return 0;
+}
+
void
evhttp_connection_set_base(struct evhttp_connection *evcon,
struct event_base *base)
@@ -2412,13 +2557,16 @@ evhttp_connection_get_peer(struct evhttp_connection *evcon,
const struct sockaddr*
evhttp_connection_get_addr(struct evhttp_connection *evcon)
{
- return (struct sockaddr *)evcon->conn_address;
+ return bufferevent_socket_get_conn_address_(evcon->bufev);
}
int
evhttp_connection_connect_(struct evhttp_connection *evcon)
{
int old_state = evcon->state;
+ const char *address = evcon->address;
+ const struct sockaddr *sa = evhttp_connection_get_addr(evcon);
+ int ret;
if (evcon->state == EVCON_CONNECTING)
return (0);
@@ -2437,9 +2585,11 @@ evhttp_connection_connect_(struct evhttp_connection *evcon)
return (-1);
}
- bufferevent_setfd(evcon->bufev, evcon->fd);
+ if (bufferevent_setfd(evcon->bufev, evcon->fd))
+ return (-1);
} else {
- bufferevent_setfd(evcon->bufev, -1);
+ if (bufferevent_setfd(evcon->bufev, -1))
+ return (-1);
}
/* Set up a callback for successful connection setup */
@@ -2450,17 +2600,30 @@ evhttp_connection_connect_(struct evhttp_connection *evcon)
evcon);
if (!evutil_timerisset(&evcon->timeout)) {
const struct timeval conn_tv = { HTTP_CONNECT_TIMEOUT, 0 };
- bufferevent_set_timeouts(evcon->bufev, NULL, &conn_tv);
+ bufferevent_set_timeouts(evcon->bufev, &conn_tv, &conn_tv);
} else {
- bufferevent_set_timeouts(evcon->bufev, NULL, &evcon->timeout);
+ bufferevent_set_timeouts(evcon->bufev, &evcon->timeout, &evcon->timeout);
}
/* make sure that we get a write callback */
- bufferevent_enable(evcon->bufev, EV_WRITE);
+ if (bufferevent_enable(evcon->bufev, EV_WRITE))
+ return (-1);
evcon->state = EVCON_CONNECTING;
- if (bufferevent_socket_connect_hostname(evcon->bufev, evcon->dns_base,
- evcon->ai_family, evcon->address, evcon->port) < 0) {
+ if (evcon->flags & EVHTTP_CON_REUSE_CONNECTED_ADDR &&
+ sa &&
+ (sa->sa_family == AF_INET || sa->sa_family == AF_INET6)) {
+ int socklen = sizeof(struct sockaddr_in);
+ if (sa->sa_family == AF_INET6) {
+ socklen = sizeof(struct sockaddr_in6);
+ }
+ ret = bufferevent_socket_connect(evcon->bufev, sa, socklen);
+ } else {
+ ret = bufferevent_socket_connect_hostname(evcon->bufev,
+ evcon->dns_base, evcon->ai_family, address, evcon->port);
+ }
+
+ if (ret < 0) {
evcon->state = old_state;
event_sock_warn(evcon->fd, "%s: connection to \"%s\" failed",
__func__, evcon->address);
@@ -2493,7 +2656,7 @@ evhttp_make_request(struct evhttp_connection *evcon,
mm_free(req->uri);
if ((req->uri = mm_strdup(uri)) == NULL) {
event_warn("%s: strdup", __func__);
- evhttp_request_free(req);
+ evhttp_request_free_auto(req);
return (-1);
}
@@ -2509,6 +2672,10 @@ evhttp_make_request(struct evhttp_connection *evcon,
TAILQ_INSERT_TAIL(&evcon->requests, req, next);
+ /* We do not want to conflict with retry_ev */
+ if (evcon->retry_cnt)
+ return (0);
+
/* If the connection object is not connected; make it so */
if (!evhttp_connected(evcon)) {
int res = evhttp_connection_connect_(evcon);
@@ -2519,7 +2686,7 @@ evhttp_make_request(struct evhttp_connection *evcon,
if (res != 0)
TAILQ_REMOVE(&evcon->requests, req, next);
- return res;
+ return (res);
}
/*
@@ -2556,7 +2723,7 @@ evhttp_cancel_request(struct evhttp_request *req)
}
}
- evhttp_request_free(req);
+ evhttp_request_free_auto(req);
}
/*
@@ -2567,9 +2734,9 @@ evhttp_cancel_request(struct evhttp_request *req)
void
evhttp_start_read_(struct evhttp_connection *evcon)
{
- /* Set up an event to read the headers */
bufferevent_disable(evcon->bufev, EV_WRITE);
bufferevent_enable(evcon->bufev, EV_READ);
+
evcon->state = EVCON_READING_FIRSTLINE;
/* Reset the bufferevent callbacks */
bufferevent_setcb(evcon->bufev,
@@ -2586,6 +2753,16 @@ evhttp_start_read_(struct evhttp_connection *evcon)
}
}
+void
+evhttp_start_write_(struct evhttp_connection *evcon)
+{
+ bufferevent_disable(evcon->bufev, EV_WRITE);
+ bufferevent_enable(evcon->bufev, EV_READ);
+
+ evcon->state = EVCON_WRITING;
+ evhttp_write_buffer(evcon, evhttp_write_connectioncb, NULL);
+}
+
static void
evhttp_send_done(struct evhttp_connection *evcon, void *arg)
{
@@ -2599,9 +2776,8 @@ evhttp_send_done(struct evhttp_connection *evcon, void *arg)
need_close =
(REQ_VERSION_BEFORE(req, 1, 1) &&
- !evhttp_is_connection_keepalive(req->input_headers))||
- evhttp_is_connection_close(req->flags, req->input_headers) ||
- evhttp_is_connection_close(req->flags, req->output_headers);
+ !evhttp_is_connection_keepalive(req->input_headers)) ||
+ evhttp_is_request_connection_close(req);
EVUTIL_ASSERT(req->flags & EVHTTP_REQ_OWN_CONNECTION);
evhttp_request_free(req);
@@ -2692,6 +2868,10 @@ evhttp_send_reply_start(struct evhttp_request *req, int code,
const char *reason)
{
evhttp_response_code_(req, code, reason);
+
+ if (req->evcon == NULL)
+ return;
+
if (evhttp_find_header(req->output_headers, "Content-Length") == NULL &&
REQ_VERSION_ATLEAST(req, 1, 1) &&
evhttp_response_needs_body(req)) {
@@ -2931,15 +3111,32 @@ evhttp_uriencode(const char *uri, ev_ssize_t len, int space_as_plus)
{
struct evbuffer *buf = evbuffer_new();
const char *p, *end;
- char *result;
+ char *result = NULL;
- if (buf == NULL)
- return (NULL);
+ if (!buf) {
+ goto out;
+ }
- if (len >= 0)
- end = uri+len;
- else
- end = uri+strlen(uri);
+ if (len >= 0) {
+ if (uri + len < uri) {
+ goto out;
+ }
+
+ end = uri + len;
+ } else {
+ size_t slen = strlen(uri);
+
+ if (slen >= EV_SSIZE_MAX) {
+ /* we don't want to mix signed and unsigned */
+ goto out;
+ }
+
+ if (uri + slen < uri) {
+ goto out;
+ }
+
+ end = uri + slen;
+ }
for (p = uri; p < end; p++) {
if (CHAR_IS_UNRESERVED(*p)) {
@@ -2950,13 +3147,17 @@ evhttp_uriencode(const char *uri, ev_ssize_t len, int space_as_plus)
evbuffer_add_printf(buf, "%%%02X", (unsigned char)(*p));
}
}
+
evbuffer_add(buf, "", 1); /* NUL-terminator. */
result = mm_malloc(evbuffer_get_length(buf));
+
if (result)
evbuffer_remove(buf, result, evbuffer_get_length(buf));
- evbuffer_free(buf);
- return (result);
+out:
+ if (buf)
+ evbuffer_free(buf);
+ return result;
}
char *
@@ -3085,6 +3286,7 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers,
p = argument = line;
while (p != NULL && *p != '\0') {
char *key, *value, *decoded_value;
+ int err;
argument = strsep(&p, "&");
value = argument;
@@ -3100,8 +3302,10 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers,
evhttp_decode_uri_internal(value, strlen(value),
decoded_value, 1 /*always_decode_plus*/);
event_debug(("Query Param: %s -> %s\n", key, decoded_value));
- evhttp_add_header_internal(headers, key, decoded_value);
+ err = evhttp_add_header_internal(headers, key, decoded_value);
mm_free(decoded_value);
+ if (err)
+ goto error;
}
result = 0;
@@ -3267,8 +3471,10 @@ evhttp_handle_request(struct evhttp_request *req, void *arg)
/* we have a new request on which the user needs to take action */
req->userdone = 0;
+ bufferevent_disable(req->evcon->bufev, EV_READ);
+
if (req->type == 0 || req->uri == NULL) {
- evhttp_send_error(req, HTTP_BADREQUEST, NULL);
+ evhttp_send_error(req, req->response_code, NULL);
return;
}
@@ -3354,13 +3560,16 @@ evhttp_bind_socket_with_handle(struct evhttp *http, const char *address, ev_uint
{
evutil_socket_t fd;
struct evhttp_bound_socket *bound;
+ int serrno;
if ((fd = bind_socket(address, port, 1 /*reuse*/)) == -1)
return (NULL);
if (listen(fd, 128) == -1) {
+ serrno = EVUTIL_SOCKET_ERROR();
event_sock_warn(fd, "%s: listen", __func__);
evutil_closesocket(fd);
+ EVUTIL_SET_SOCKET_ERROR(serrno);
return (NULL);
}
@@ -3503,7 +3712,7 @@ evhttp_new(struct event_base *base)
*/
struct evhttp *
-evhttp_start(const char *address, unsigned short port)
+evhttp_start(const char *address, ev_uint16_t port)
{
struct evhttp *http = NULL;
@@ -3657,6 +3866,20 @@ evhttp_set_timeout_tv(struct evhttp* http, const struct timeval* tv)
}
}
+int evhttp_set_flags(struct evhttp *http, int flags)
+{
+ int avail_flags = 0;
+ avail_flags |= EVHTTP_SERVER_LINGERING_CLOSE;
+
+ if (flags & ~avail_flags)
+ return 1;
+ http->flags &= ~avail_flags;
+
+ http->flags |= flags;
+
+ return 0;
+}
+
void
evhttp_set_max_headers_size(struct evhttp* http, ev_ssize_t max_headers_size)
{
@@ -4006,6 +4229,13 @@ evhttp_get_request_connection(
char *hostname = NULL, *portname = NULL;
struct bufferevent* bev = NULL;
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_UN
+ if (sa->sa_family == AF_UNIX) {
+ struct sockaddr_un *sa_un = (struct sockaddr_un *)sa;
+ sa_un->sun_path[0] = '\0';
+ }
+#endif
+
name_from_addr(sa, salen, &hostname, &portname);
if (hostname == NULL || portname == NULL) {
if (hostname) mm_free(hostname);
@@ -4029,15 +4259,27 @@ evhttp_get_request_connection(
evcon->max_headers_size = http->default_max_headers_size;
evcon->max_body_size = http->default_max_body_size;
+ if (http->flags & EVHTTP_SERVER_LINGERING_CLOSE)
+ evcon->flags |= EVHTTP_CON_LINGERING_CLOSE;
evcon->flags |= EVHTTP_CON_INCOMING;
evcon->state = EVCON_READING_FIRSTLINE;
evcon->fd = fd;
- bufferevent_setfd(evcon->bufev, fd);
+ if (bufferevent_setfd(evcon->bufev, fd))
+ goto err;
+ if (bufferevent_enable(evcon->bufev, EV_READ))
+ goto err;
+ if (bufferevent_disable(evcon->bufev, EV_WRITE))
+ goto err;
+ bufferevent_socket_set_conn_address_(evcon->bufev, sa, salen);
return (evcon);
+
+err:
+ evhttp_connection_free(evcon);
+ return (NULL);
}
static int
@@ -4146,9 +4388,8 @@ name_from_addr(struct sockaddr *sa, ev_socklen_t salen,
}
/* Create a non-blocking socket and bind it */
-/* todo: rename this function */
static evutil_socket_t
-bind_socket_ai(struct evutil_addrinfo *ai, int reuse)
+create_bind_socket_nonblock(struct evutil_addrinfo *ai, int reuse)
{
evutil_socket_t fd;
@@ -4222,14 +4463,14 @@ bind_socket(const char *address, ev_uint16_t port, int reuse)
/* just create an unbound socket */
if (address == NULL && port == 0)
- return bind_socket_ai(NULL, 0);
+ return create_bind_socket_nonblock(NULL, 0);
aitop = make_addrinfo(address, port);
if (aitop == NULL)
return (-1);
- fd = bind_socket_ai(aitop, reuse);
+ fd = create_bind_socket_nonblock(aitop, reuse);
evutil_freeaddrinfo(aitop);
@@ -4654,6 +4895,36 @@ err:
return NULL;
}
+static struct evhttp_uri *
+evhttp_uri_parse_authority(char *source_uri)
+{
+ struct evhttp_uri *uri = mm_calloc(1, sizeof(struct evhttp_uri));
+ char *end;
+
+ if (uri == NULL) {
+ event_warn("%s: calloc", __func__);
+ goto err;
+ }
+ uri->port = -1;
+ uri->flags = 0;
+
+ end = end_of_authority(source_uri);
+ if (parse_authority(uri, source_uri, end) < 0)
+ goto err;
+
+ uri->path = mm_strdup("");
+ if (uri->path == NULL) {
+ event_warn("%s: strdup", __func__);
+ goto err;
+ }
+
+ return uri;
+err:
+ if (uri)
+ evhttp_uri_free(uri);
+ return NULL;
+}
+
void
evhttp_uri_free(struct evhttp_uri *uri)
{
diff --git a/contrib/ntp/sntp/libevent/include/event.h b/contrib/ntp/sntp/libevent/include/event.h
index 3a1b0c2c0e43..ba5186713bb9 100644
--- a/contrib/ntp/sntp/libevent/include/event.h
+++ b/contrib/ntp/sntp/libevent/include/event.h
@@ -63,8 +63,6 @@ extern "C" {
#include <winsock2.h>
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
-typedef unsigned char u_char;
-typedef unsigned short u_short;
#endif
#include <event2/event_struct.h>
diff --git a/contrib/ntp/sntp/libevent/include/event2/buffer.h b/contrib/ntp/sntp/libevent/include/event2/buffer.h
index 468588b9f141..88af3ae141b1 100644
--- a/contrib/ntp/sntp/libevent/include/event2/buffer.h
+++ b/contrib/ntp/sntp/libevent/include/event2/buffer.h
@@ -726,7 +726,8 @@ int evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
@param buffer the evbuffer to store the result
@param fd the file descriptor to read from
- @param howmuch the number of bytes to be read
+ @param howmuch the number of bytes to be read. If the given number is negative
+ or out of maximum bytes per one read, as many bytes as we can will be read.
@return the number of bytes read, or -1 if an error occurred
@see evbuffer_write()
*/
diff --git a/contrib/ntp/sntp/libevent/include/event2/buffer_compat.h b/contrib/ntp/sntp/libevent/include/event2/buffer_compat.h
index c0bdd9d21f06..0ce10254487d 100644
--- a/contrib/ntp/sntp/libevent/include/event2/buffer_compat.h
+++ b/contrib/ntp/sntp/libevent/include/event2/buffer_compat.h
@@ -37,7 +37,7 @@
/**
- Obsolete alias for evbuffer_readln(buffer, NULL, EOL_STYLE_ANY).
+ Obsolete alias for evbuffer_readln(buffer, NULL, EVBUFFER_EOL_ANY).
@deprecated This function is deprecated because its behavior is not correct
for almost any protocol, and also because it's wholly subsumed by
@@ -90,9 +90,10 @@ typedef void (*evbuffer_cb)(struct evbuffer *buffer, size_t old_len, size_t new_
@param cb the callback function to invoke when the evbuffer is modified,
or NULL to remove all callbacks.
@param cbarg an argument to be provided to the callback function
+ @return 0 if successful, or -1 on error
*/
EVENT2_EXPORT_SYMBOL
-void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
+int evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
/**
diff --git a/contrib/ntp/sntp/libevent/include/event2/bufferevent.h b/contrib/ntp/sntp/libevent/include/event2/bufferevent.h
index fe8a74d348c6..48cd153563bb 100644
--- a/contrib/ntp/sntp/libevent/include/event2/bufferevent.h
+++ b/contrib/ntp/sntp/libevent/include/event2/bufferevent.h
@@ -209,7 +209,7 @@ struct bufferevent *bufferevent_socket_new(struct event_base *base, evutil_socke
@return 0 on success, -1 on failure.
*/
EVENT2_EXPORT_SYMBOL
-int bufferevent_socket_connect(struct bufferevent *, struct sockaddr *, int);
+int bufferevent_socket_connect(struct bufferevent *, const struct sockaddr *, int);
struct evdns_base;
/**
@@ -491,7 +491,7 @@ short bufferevent_get_enabled(struct bufferevent *bufev);
(In other words, if reading or writing is disabled, or if the
bufferevent's read or write operation has been suspended because
- there's no data to write, or not enough banwidth, or so on, the
+ there's no data to write, or not enough bandwidth, or so on, the
timeout isn't active. The timeout only becomes active when we we're
willing to actually read or write.)
@@ -518,6 +518,9 @@ int bufferevent_set_timeouts(struct bufferevent *bufev,
On input, a bufferevent does not invoke the user read callback unless
there is at least low watermark data in the buffer. If the read buffer
is beyond the high watermark, the bufferevent stops reading from the network.
+ But be aware that bufferevent input/read buffer can overrun high watermark
+ limit (typical example is openssl bufferevent), so you should not relay in
+ this.
On output, the user write callback is invoked whenever the buffered data
falls below the low watermark. Filters that write to this bufev will try
@@ -562,6 +565,32 @@ void bufferevent_lock(struct bufferevent *bufev);
EVENT2_EXPORT_SYMBOL
void bufferevent_unlock(struct bufferevent *bufev);
+
+/**
+ * Public interface to manually increase the reference count of a bufferevent
+ * this is useful in situations where a user may reference the bufferevent
+ * somewhere else (unknown to libevent)
+ *
+ * @param bufev the bufferevent to increase the refcount on
+ *
+ */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_incref(struct bufferevent *bufev);
+
+/**
+ * Public interface to manually decrement the reference count of a bufferevent
+ *
+ * Warning: make sure you know what you're doing. This is mainly used in
+ * conjunction with bufferevent_incref(). This will free up all data associated
+ * with a bufferevent if the reference count hits 0.
+ *
+ * @param bufev the bufferevent to decrement the refcount on
+ *
+ * @return 1 if the bufferevent was freed, otherwise 0 (still referenced)
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_decref(struct bufferevent *bufev);
+
/**
Flags that can be passed into filters to let them know how to
deal with the incoming data.
@@ -773,7 +802,7 @@ void ev_token_bucket_cfg_free(struct ev_token_bucket_cfg *cfg);
They are: socket-based bufferevents (normal and IOCP-based), and SSL-based
bufferevents.
- Return 0 on sucess, -1 on failure.
+ Return 0 on success, -1 on failure.
*/
EVENT2_EXPORT_SYMBOL
int bufferevent_set_rate_limit(struct bufferevent *bev,
@@ -824,7 +853,7 @@ int bufferevent_rate_limit_group_set_cfg(
The default min-share is currently 64 bytes.
- Returns 0 on success, -1 on faulre.
+ Returns 0 on success, -1 on failure.
*/
EVENT2_EXPORT_SYMBOL
int bufferevent_rate_limit_group_set_min_share(
diff --git a/contrib/ntp/sntp/libevent/include/event2/bufferevent_compat.h b/contrib/ntp/sntp/libevent/include/event2/bufferevent_compat.h
index 65482042f9d1..a5a3c7207d64 100644
--- a/contrib/ntp/sntp/libevent/include/event2/bufferevent_compat.h
+++ b/contrib/ntp/sntp/libevent/include/event2/bufferevent_compat.h
@@ -28,6 +28,8 @@
#ifndef EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
#define EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
+#include <event2/visibility.h>
+
#define evbuffercb bufferevent_data_cb
#define everrorcb bufferevent_event_cb
@@ -72,6 +74,7 @@
error occurred
@see bufferevent_base_set(), bufferevent_free()
*/
+EVENT2_EXPORT_SYMBOL
struct bufferevent *bufferevent_new(evutil_socket_t fd,
evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg);
@@ -83,6 +86,7 @@ struct bufferevent *bufferevent_new(evutil_socket_t fd,
@param timeout_read the read timeout
@param timeout_write the write timeout
*/
+EVENT2_EXPORT_SYMBOL
void bufferevent_settimeout(struct bufferevent *bufev,
int timeout_read, int timeout_write);
diff --git a/contrib/ntp/sntp/libevent/include/event2/dns.h b/contrib/ntp/sntp/libevent/include/event2/dns.h
index 17cd86a2ec2d..13ce027e4a8c 100644
--- a/contrib/ntp/sntp/libevent/include/event2/dns.h
+++ b/contrib/ntp/sntp/libevent/include/event2/dns.h
@@ -179,11 +179,39 @@ extern "C" {
#define DNS_QUERY_NO_SEARCH 1
+/* Allow searching */
#define DNS_OPTION_SEARCH 1
+/* Parse "nameserver" and add default if no such section */
#define DNS_OPTION_NAMESERVERS 2
+/* Parse additional options like:
+ * - timeout:
+ * - getaddrinfo-allow-skew:
+ * - max-timeouts:
+ * - max-inflight:
+ * - attempts:
+ * - randomize-case:
+ * - initial-probe-timeout:
+ */
#define DNS_OPTION_MISC 4
+/* Load hosts file (i.e. "/etc/hosts") */
#define DNS_OPTION_HOSTSFILE 8
-#define DNS_OPTIONS_ALL 15
+/**
+ * All above:
+ * - DNS_OPTION_SEARCH
+ * - DNS_OPTION_NAMESERVERS
+ * - DNS_OPTION_MISC
+ * - DNS_OPTION_HOSTSFILE
+ */
+#define DNS_OPTIONS_ALL ( \
+ DNS_OPTION_SEARCH | \
+ DNS_OPTION_NAMESERVERS | \
+ DNS_OPTION_MISC | \
+ DNS_OPTION_HOSTSFILE | \
+ 0 \
+)
+/* Do not "default" nameserver (i.e. "127.0.0.1:53") if there is no nameservers
+ * in resolv.conf, (iff DNS_OPTION_NAMESERVERS is set) */
+#define DNS_OPTION_NAMESERVERS_NO_DEFAULT 16
/* Obsolete name for DNS_QUERY_NO_SEARCH */
#define DNS_NO_SEARCH DNS_QUERY_NO_SEARCH
@@ -208,6 +236,10 @@ struct event_base;
/** Flag for evdns_base_new: Do not prevent the libevent event loop from
* exiting when we have no active dns requests. */
#define EVDNS_BASE_DISABLE_WHEN_INACTIVE 0x8000
+/** Flag for evdns_base_new: If EVDNS_BASE_INITIALIZE_NAMESERVERS isset, do not
+ * add default nameserver if there are no nameservers in resolv.conf
+ * @see DNS_OPTION_NAMESERVERS_NO_DEFAULT */
+#define EVDNS_BASE_NAMESERVERS_NO_DEFAULT 0x10000
/**
Initialize the asynchronous DNS library.
@@ -218,7 +250,7 @@ struct event_base;
@param event_base the event base to associate the dns client with
@param flags any of EVDNS_BASE_INITIALIZE_NAMESERVERS|
- EVDNS_BASE_DISABLE_WHEN_INACTIVE
+ EVDNS_BASE_DISABLE_WHEN_INACTIVE|EVDNS_BASE_NAMESERVERS_NO_DEFAULT
@return evdns_base object if successful, or NULL if an error occurred.
@see evdns_base_free()
*/
@@ -423,7 +455,8 @@ void evdns_cancel_request(struct evdns_base *base, struct evdns_request *req);
The currently available configuration options are:
ndots, timeout, max-timeouts, max-inflight, attempts, randomize-case,
- bind-to, initial-probe-timeout, getaddrinfo-allow-skew.
+ bind-to, initial-probe-timeout, getaddrinfo-allow-skew,
+ so-rcvbuf, so-sndbuf.
In versions before Libevent 2.0.3-alpha, the option name needed to end with
a colon.
@@ -453,7 +486,7 @@ int evdns_base_set_option(struct evdns_base *base, const char *option, const cha
@param base the evdns_base to which to apply this operation
@param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
- DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL
+ DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL|DNS_OPTION_NAMESERVERS_NO_DEFAULT
@param filename the path to the resolv.conf file
@return 0 if successful, or various positive error codes if an error
occurred (see above)
@@ -478,6 +511,7 @@ int evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char
EVENT2_EXPORT_SYMBOL
int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname);
+#if defined(EVENT_IN_DOXYGEN_) || defined(_WIN32)
/**
Obtain nameserver information using the Windows API.
@@ -488,7 +522,6 @@ int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname);
@return 0 if successful, or -1 if an error occurred
@see evdns_resolv_conf_parse()
*/
-#ifdef _WIN32
EVENT2_EXPORT_SYMBOL
int evdns_base_config_windows_nameservers(struct evdns_base *);
#define EVDNS_BASE_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
@@ -615,7 +648,8 @@ typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, vo
@param callback A function to invoke whenever we get a DNS request
on the socket.
@param user_data Data to pass to the callback.
- @return an evdns_server_port structure for this server port.
+ @return an evdns_server_port structure for this server port or NULL if
+ an error occurred.
*/
EVENT2_EXPORT_SYMBOL
struct evdns_server_port *evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
diff --git a/contrib/ntp/sntp/libevent/include/event2/dns_compat.h b/contrib/ntp/sntp/libevent/include/event2/dns_compat.h
index 965fd65445b4..a58c4b29375e 100644
--- a/contrib/ntp/sntp/libevent/include/event2/dns_compat.h
+++ b/contrib/ntp/sntp/libevent/include/event2/dns_compat.h
@@ -49,6 +49,7 @@ extern "C" {
/* For int types. */
#include <event2/util.h>
+#include <event2/visibility.h>
/**
Initialize the asynchronous DNS library.
@@ -66,6 +67,7 @@ extern "C" {
@return 0 if successful, or -1 if an error occurred
@see evdns_shutdown()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_init(void);
struct evdns_base;
@@ -76,6 +78,7 @@ struct evdns_base;
@deprecated This function is deprecated because use of the global
evdns_base is error-prone.
*/
+EVENT2_EXPORT_SYMBOL
struct evdns_base *evdns_get_global_base(void);
/**
@@ -93,6 +96,7 @@ struct evdns_base *evdns_get_global_base(void);
active requests will return DNS_ERR_SHUTDOWN.
@see evdns_init()
*/
+EVENT2_EXPORT_SYMBOL
void evdns_shutdown(int fail_requests);
/**
@@ -109,6 +113,7 @@ void evdns_shutdown(int fail_requests);
@return 0 if successful, or -1 if an error occurred
@see evdns_nameserver_ip_add()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_nameserver_add(unsigned long int address);
/**
@@ -126,6 +131,7 @@ int evdns_nameserver_add(unsigned long int address);
@return the number of configured nameservers
@see evdns_nameserver_add()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_count_nameservers(void);
/**
@@ -140,6 +146,7 @@ int evdns_count_nameservers(void);
@return 0 if successful, or -1 if an error occurred
@see evdns_resume()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_clear_nameservers_and_suspend(void);
/**
@@ -155,6 +162,7 @@ int evdns_clear_nameservers_and_suspend(void);
@return 0 if successful, or -1 if an error occurred
@see evdns_clear_nameservers_and_suspend()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_resume(void);
/**
@@ -170,6 +178,7 @@ int evdns_resume(void);
@return 0 if successful, or -1 if an error occurred
@see evdns_nameserver_add()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_nameserver_ip_add(const char *ip_as_string);
/**
@@ -186,6 +195,7 @@ int evdns_nameserver_ip_add(const char *ip_as_string);
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr);
/**
@@ -198,6 +208,7 @@ int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr);
struct in_addr;
@@ -217,6 +228,7 @@ struct in6_addr;
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_reverse_ipv6()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
/**
@@ -233,6 +245,7 @@ int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_ty
@return 0 if successful, or -1 if an error occurred
@see evdns_resolve_reverse_ipv6()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
/**
@@ -251,6 +264,7 @@ int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callb
@param flags Ignored.
@return 0 if successful, or -1 if an error occurred
*/
+EVENT2_EXPORT_SYMBOL
int evdns_set_option(const char *option, const char *val, int flags);
/**
@@ -278,6 +292,7 @@ int evdns_set_option(const char *option, const char *val, int flags);
occurred (see above)
@see resolv.conf(3), evdns_config_windows_nameservers()
*/
+EVENT2_EXPORT_SYMBOL
int evdns_resolv_conf_parse(int flags, const char *const filename);
/**
@@ -287,6 +302,7 @@ int evdns_resolv_conf_parse(int flags, const char *const filename);
caller to specify which evdns_base it applies to. The recommended
function is evdns_base_search_clear().
*/
+EVENT2_EXPORT_SYMBOL
void evdns_search_clear(void);
/**
@@ -298,6 +314,7 @@ void evdns_search_clear(void);
@param domain the domain to be added to the search list
*/
+EVENT2_EXPORT_SYMBOL
void evdns_search_add(const char *domain);
/**
@@ -312,6 +329,7 @@ void evdns_search_add(const char *domain);
@param ndots the new ndots parameter
*/
+EVENT2_EXPORT_SYMBOL
void evdns_search_ndots_set(const int ndots);
/**
@@ -322,9 +340,13 @@ void evdns_search_ndots_set(const int ndots);
function is evdns_add_server_port_with_base().
*/
-struct evdns_server_port *evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
+EVENT2_EXPORT_SYMBOL
+struct evdns_server_port *
+evdns_add_server_port(evutil_socket_t socket, int flags,
+ evdns_request_callback_fn_type callback, void *user_data);
#ifdef _WIN32
+EVENT2_EXPORT_SYMBOL
int evdns_config_windows_nameservers(void);
#define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
#endif
diff --git a/contrib/ntp/sntp/libevent/include/event2/event.h b/contrib/ntp/sntp/libevent/include/event2/event.h
index 570031f264b0..a6b6144a92be 100644
--- a/contrib/ntp/sntp/libevent/include/event2/event.h
+++ b/contrib/ntp/sntp/libevent/include/event2/event.h
@@ -232,7 +232,7 @@ struct event_base
*
* Generally, you can create events with event_new(), then make them
* pending with event_add(). As your event_base runs, it will run the
- * callbacks of an events whose conditions are triggered. When you
+ * callbacks of an events whose conditions are triggered. When you no
* longer want the event, free it with event_free().
*
* In more depth:
@@ -285,7 +285,7 @@ struct event
* There are many options that can be used to alter the behavior and
* implementation of an event_base. To avoid having to pass them all in a
* complex many-argument constructor, we provide an abstract data type
- * wrhere you set up configation information before passing it to
+ * where you set up configuration information before passing it to
* event_base_new_with_config().
*
* @see event_config_new(), event_config_free(), event_base_new_with_config(),
@@ -632,7 +632,7 @@ int event_config_set_num_cpus_hint(struct event_config *cfg, int cpus);
/**
* Record an interval and/or a number of callbacks after which the event base
* should check for new events. By default, the event base will run as many
- * events are as activated at the higest activated priority before checking
+ * events are as activated at the highest activated priority before checking
* for new events. If you configure it by setting max_interval, it will check
* the time after each callback, and not allow more than max_interval to
* elapse before checking for new events. If you configure it by setting
@@ -692,10 +692,7 @@ EVENT2_EXPORT_SYMBOL
void event_base_free(struct event_base *);
/**
- As event_free, but do not run finalizers.
-
- THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
- BECOMES STABLE.
+ As event_base_free, but do not run finalizers.
*/
EVENT2_EXPORT_SYMBOL
void event_base_free_nofinalize(struct event_base *);
@@ -777,10 +774,6 @@ void event_set_fatal_callback(event_fatal_cb cb);
EVENT2_EXPORT_SYMBOL
void event_enable_debug_logging(ev_uint32_t which);
-EVENT2_EXPORT_SYMBOL
-void
-event_disable_debug_mode(void);
-
/**
Associate a different event base with an event.
@@ -948,9 +941,6 @@ int event_base_got_break(struct event_base *);
* To use this option safely, you may need to use event_finalize() or
* event_free_finalize() in order to safely tear down an event in a
* multithreaded application. See those functions for more information.
- *
- * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
- * BECOMES STABLE.
**/
#define EV_FINALIZE 0x40
/**
@@ -967,11 +957,13 @@ int event_base_got_break(struct event_base *);
/**
@name evtimer_* macros
- Aliases for working with one-shot timer events */
+ Aliases for working with one-shot timer events
+ If you need EV_PERSIST timer use event_*() functions.
+ */
/**@{*/
#define evtimer_assign(ev, b, cb, arg) \
event_assign((ev), (b), -1, 0, (cb), (arg))
-#define evtimer_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
+#define evtimer_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
#define evtimer_add(ev, tv) event_add((ev), (tv))
#define evtimer_del(ev) event_del(ev)
#define evtimer_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv))
@@ -995,6 +987,20 @@ int event_base_got_break(struct event_base *);
/**@}*/
/**
+ @name evuser_* macros
+
+ Aliases for working with user-triggered events
+ If you need EV_PERSIST event use event_*() functions.
+ */
+/**@{*/
+#define evuser_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
+#define evuser_del(ev) event_del(ev)
+#define evuser_pending(ev, tv) event_pending((ev), 0, (tv))
+#define evuser_initialized(ev) event_initialized(ev)
+#define evuser_trigger(ev) event_active((ev), 0, 0)
+/**@}*/
+
+/**
A callback function for an event.
It receives three arguments:
@@ -1033,7 +1039,7 @@ EVENT2_EXPORT_SYMBOL
void *event_self_cbarg(void);
/**
- Allocate and asssign a new event structure, ready to be added.
+ Allocate and assign a new event structure, ready to be added.
The function event_new() returns a new event that can be used in
future calls to event_add() and event_del(). The fd and events
@@ -1059,10 +1065,10 @@ void *event_self_cbarg(void);
The EV_TIMEOUT flag has no effect here.
It is okay to have multiple events all listening on the same fds; but
- they must either all be edge-triggered, or all not be edge triggerd.
+ they must either all be edge-triggered, or all not be edge triggered.
When the event becomes active, the event loop will run the provided
- callbuck function, with three arguments. The first will be the provided
+ callback function, with three arguments. The first will be the provided
fd value. The second will be a bitfield of the events that triggered:
EV_READ, EV_WRITE, or EV_SIGNAL. Here the EV_TIMEOUT flag indicates
that a timeout occurred, and EV_ET indicates that an edge-triggered
@@ -1077,7 +1083,7 @@ void *event_self_cbarg(void);
@param callback_arg an argument to be passed to the callback function
@return a newly allocated struct event that must later be freed with
- event_free().
+ event_free() or NULL if an error occurred.
@see event_free(), event_add(), event_del(), event_assign()
*/
EVENT2_EXPORT_SYMBOL
@@ -1128,18 +1134,14 @@ int event_assign(struct event *, struct event_base *, evutil_socket_t, short, ev
/**
Deallocate a struct event * returned by event_new().
- If the event is pending or active, first make it non-pending and
- non-active.
+ If the event is pending or active, this function makes it non-pending
+ and non-active first.
*/
EVENT2_EXPORT_SYMBOL
void event_free(struct event *);
/**
* Callback type for event_finalize and event_free_finalize().
- *
- * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
- * BECOMES STABLE.
- *
**/
typedef void (*event_finalize_callback_fn)(struct event *, void *);
/**
@@ -1167,13 +1169,10 @@ typedef void (*event_finalize_callback_fn)(struct event *, void *);
event_finalize() does not.
A finalizer callback must not make events pending or active. It must not
- add events, activate events, or attempt to "resucitate" the event being
+ add events, activate events, or attempt to "resuscitate" the event being
finalized in any way.
- THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
- BECOMES STABLE.
-
- @return 0 on succes, -1 on failure.
+ @return 0 on success, -1 on failure.
*/
/**@{*/
EVENT2_EXPORT_SYMBOL
@@ -1203,7 +1202,7 @@ int event_free_finalize(unsigned, struct event *, event_finalize_callback_fn);
@param arg an argument to be passed to the callback function
@param timeout the maximum amount of time to wait for the event. NULL
makes an EV_READ/EV_WRITE event make forever; NULL makes an
- EV_TIMEOUT event succees immediately.
+ EV_TIMEOUT event success immediately.
@return 0 if successful, or -1 if an error occurred
*/
EVENT2_EXPORT_SYMBOL
@@ -1214,7 +1213,7 @@ int event_base_once(struct event_base *, evutil_socket_t, short, event_callback_
The function event_add() schedules the execution of the event 'ev' when the
condition specified by event_assign() or event_new() occurs, or when the time
- specified in timeout has elapesed. If atimeout is NULL, no timeout
+ specified in timeout has elapsed. If a timeout is NULL, no timeout
occurs and the function will only be
called if a matching event occurs. The event in the
ev argument must be already initialized by event_assign() or event_new()
@@ -1240,7 +1239,7 @@ int event_add(struct event *ev, const struct timeval *timeout);
leaves the event otherwise pending.
@param ev an event struct initialized via event_assign() or event_new()
- @return 0 on success, or -1 if an error occurrect.
+ @return 0 on success, or -1 if an error occurred.
*/
EVENT2_EXPORT_SYMBOL
int event_remove_timer(struct event *ev);
@@ -1263,9 +1262,6 @@ int event_del(struct event *);
As event_del(), but never blocks while the event's callback is running
in another thread, even if the event was constructed without the
EV_FINALIZE flag.
-
- THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
- BECOMES STABLE.
*/
EVENT2_EXPORT_SYMBOL
int event_del_noblock(struct event *ev);
@@ -1273,9 +1269,6 @@ int event_del_noblock(struct event *ev);
As event_del(), but always blocks while the event's callback is running
in another thread, even if the event was constructed with the
EV_FINALIZE flag.
-
- THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
- BECOMES STABLE.
*/
EVENT2_EXPORT_SYMBOL
int event_del_block(struct event *ev);
@@ -1328,7 +1321,7 @@ struct event *event_base_get_running_event(struct event_base *base);
The event_initialized() function can be used to check if an event has been
initialized.
- Warning: This function is only useful for distinguishing a a zeroed-out
+ Warning: This function is only useful for distinguishing a zeroed-out
piece of memory from an initialized event, it can easily be confused by
uninitialized memory. Thus, it should ONLY be used to distinguish an
initialized event from zero.
@@ -1535,7 +1528,7 @@ const struct timeval *event_base_init_common_timeout(struct event_base *base,
Note also that if you are going to call this function, you should do so
before any call to any Libevent function that does allocation.
- Otherwise, those funtions will allocate their memory using malloc(), but
+ Otherwise, those functions will allocate their memory using malloc(), but
then later free it using your provided free_fn.
@param malloc_fn A replacement for malloc.
@@ -1574,7 +1567,7 @@ void event_base_dump_events(struct event_base *, FILE *);
@param base the event_base on which to activate the events.
@param fd An fd to active events on.
- @param events One or more of EV_{READ,WRITE}.
+ @param events One or more of EV_{READ,WRITE,TIMEOUT}.
*/
EVENT2_EXPORT_SYMBOL
void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events);
@@ -1631,7 +1624,7 @@ int event_base_foreach_event(struct event_base *base, event_base_foreach_event_c
cached time.
Generally, this value will only be cached while actually
- processing event callbacks, and may be very inaccuate if your
+ processing event callbacks, and may be very inaccurate if your
callbacks take a long time to execute.
Returns 0 on success, negative on failure.
diff --git a/contrib/ntp/sntp/libevent/include/event2/http.h b/contrib/ntp/sntp/libevent/include/event2/http.h
index 4284d5fc32bc..2a41303ede0e 100644
--- a/contrib/ntp/sntp/libevent/include/event2/http.h
+++ b/contrib/ntp/sntp/libevent/include/event2/http.h
@@ -78,7 +78,8 @@ struct evdns_base;
* Create a new HTTP server.
*
* @param base (optional) the event base to receive the HTTP events
- * @return a pointer to a newly initialized evhttp server structure
+ * @return a pointer to a newly initialized evhttp server structure or NULL
+ * on error
* @see evhttp_free()
*/
EVENT2_EXPORT_SYMBOL
@@ -373,6 +374,19 @@ void evhttp_set_timeout(struct evhttp *http, int timeout_in_secs);
EVENT2_EXPORT_SYMBOL
void evhttp_set_timeout_tv(struct evhttp *http, const struct timeval* tv);
+/* Read all the clients body, and only after this respond with an error if the
+ * clients body exceed max_body_size */
+#define EVHTTP_SERVER_LINGERING_CLOSE 0x0001
+/**
+ * Set connection flags for HTTP server.
+ *
+ * @see EVHTTP_SERVER_*
+ * @return 0 on success, otherwise non zero (for example if flag doesn't
+ * supported).
+ */
+EVENT2_EXPORT_SYMBOL
+int evhttp_set_flags(struct evhttp *http, int flags);
+
/* Request/Response functionality */
/**
@@ -503,11 +517,12 @@ enum evhttp_request_kind { EVHTTP_REQUEST, EVHTTP_RESPONSE };
* when the connection closes. It must have no fd set on it.
* @param address the address to which to connect
* @param port the port to connect to
- * @return an evhttp_connection object that can be used for making requests
+ * @return an evhttp_connection object that can be used for making requests or
+ * NULL on error
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_bufferevent_new(
- struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev, const char *address, unsigned short port);
+ struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev, const char *address, ev_uint16_t port);
/**
* Return the bufferevent that an evhttp_connection is using.
@@ -623,19 +638,42 @@ void evhttp_request_free(struct evhttp_request *req);
* specified host name resolution will block.
* @param address the address to which to connect
* @param port the port to connect to
- * @return an evhttp_connection object that can be used for making requests
+ * @return an evhttp_connection object that can be used for making requests or
+ * NULL on error
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_new(
struct event_base *base, struct evdns_base *dnsbase,
- const char *address, unsigned short port);
+ const char *address, ev_uint16_t port);
/**
* Set family hint for DNS requests.
*/
+EVENT2_EXPORT_SYMBOL
void evhttp_connection_set_family(struct evhttp_connection *evcon,
int family);
+/* reuse connection address on retry */
+#define EVHTTP_CON_REUSE_CONNECTED_ADDR 0x0008
+/* Try to read error, since server may already send and close
+ * connection, but if at that time we have some data to send then we
+ * can send get EPIPE and fail, while we can read that HTTP error. */
+#define EVHTTP_CON_READ_ON_WRITE_ERROR 0x0010
+/* @see EVHTTP_SERVER_LINGERING_CLOSE */
+#define EVHTTP_CON_LINGERING_CLOSE 0x0020
+/* Padding for public flags, @see EVHTTP_CON_* in http-internal.h */
+#define EVHTTP_CON_PUBLIC_FLAGS_END 0x100000
+/**
+ * Set connection flags.
+ *
+ * @see EVHTTP_CON_*
+ * @return 0 on success, otherwise non zero (for example if flag doesn't
+ * supported).
+ */
+EVENT2_EXPORT_SYMBOL
+int evhttp_connection_set_flags(struct evhttp_connection *evcon,
+ int flags);
+
/** Takes ownership of the request object
*
* Can be used in a request callback to keep onto the request until
@@ -728,7 +766,7 @@ void evhttp_connection_get_peer(struct evhttp_connection *evcon,
char **address, ev_uint16_t *port);
/** Get the remote address associated with this connection.
- * extracted from getpeername().
+ * extracted from getpeername() OR from nameserver.
*
* @return NULL if getpeername() return non success,
* or connection is not connected,
@@ -892,14 +930,14 @@ char *evhttp_uriencode(const char *str, ev_ssize_t size, int space_to_plus);
/**
Helper function to sort of decode a URI-encoded string. Unlike
- evhttp_get_decoded_uri, it decodes all plus characters that appear
+ evhttp_uridecode, it decodes all plus characters that appear
_after_ the first question mark character, but no plusses that occur
before. This is not a good way to decode URIs in whole or in part.
The returned string must be freed by the caller
@deprecated This function is deprecated; you probably want to use
- evhttp_get_decoded_uri instead.
+ evhttp_uridecode instead.
@param uri an encoded URI
@return a newly allocated unencoded URI or NULL on failure
diff --git a/contrib/ntp/sntp/libevent/include/event2/http_compat.h b/contrib/ntp/sntp/libevent/include/event2/http_compat.h
index 0d9af17f3fed..794a581083e4 100644
--- a/contrib/ntp/sntp/libevent/include/event2/http_compat.h
+++ b/contrib/ntp/sntp/libevent/include/event2/http_compat.h
@@ -56,9 +56,11 @@ extern "C" {
*
* @param address the address to which the HTTP server should be bound
* @param port the port number on which the HTTP server should listen
- * @return an struct evhttp object
+ * @return a pointer to a newly initialized evhttp server structure
+ * or NULL on error
*/
-struct evhttp *evhttp_start(const char *address, unsigned short port);
+EVENT2_EXPORT_SYMBOL
+struct evhttp *evhttp_start(const char *address, ev_uint16_t port);
/**
* A connection object that can be used to for making HTTP requests. The
@@ -67,8 +69,9 @@ struct evhttp *evhttp_start(const char *address, unsigned short port);
*
* @deprecated It does not allow an event base to be specified
*/
+EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_new(
- const char *address, unsigned short port);
+ const char *address, ev_uint16_t port);
/**
* Associates an event base with the connection - can only be called
@@ -76,6 +79,7 @@ struct evhttp_connection *evhttp_connection_new(
*
* @deprecated XXXX Why?
*/
+EVENT2_EXPORT_SYMBOL
void evhttp_connection_set_base(struct evhttp_connection *evcon,
struct event_base *base);
diff --git a/contrib/ntp/sntp/libevent/include/event2/listener.h b/contrib/ntp/sntp/libevent/include/event2/listener.h
index 84b4da055d8d..789a27c2aacc 100644
--- a/contrib/ntp/sntp/libevent/include/event2/listener.h
+++ b/contrib/ntp/sntp/libevent/include/event2/listener.h
@@ -97,6 +97,18 @@ typedef void (*evconnlistener_errorcb)(struct evconnlistener *, void *);
* This is only available on Linux and kernel 3.9+
*/
#define LEV_OPT_REUSEABLE_PORT (1u<<7)
+/** Flag: Indicates that the listener wants to work only in IPv6 socket.
+ *
+ * According to RFC3493 and most Linux distributions, default value is to
+ * work in IPv4-mapped mode. If there is a requirement to bind same port
+ * on same ip addresses but different handlers for both IPv4 and IPv6,
+ * it is required to set IPV6_V6ONLY socket option to be sure that the
+ * code works as expected without affected by bindv6only sysctl setting in
+ * system.
+ *
+ * This socket option also supported by Windows.
+ */
+#define LEV_OPT_BIND_IPV6ONLY (1u<<8)
/**
Allocate a new evconnlistener object to listen for incoming TCP connections
diff --git a/contrib/ntp/sntp/libevent/include/event2/rpc.h b/contrib/ntp/sntp/libevent/include/event2/rpc.h
index dd43df266a17..1bc31d57117e 100644
--- a/contrib/ntp/sntp/libevent/include/event2/rpc.h
+++ b/contrib/ntp/sntp/libevent/include/event2/rpc.h
@@ -27,6 +27,10 @@
#ifndef EVENT2_RPC_H_INCLUDED_
#define EVENT2_RPC_H_INCLUDED_
+/* For int types. */
+#include <event2/util.h>
+#include <event2/visibility.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -178,6 +182,7 @@ EVRPC_STRUCT(rpcname) { \
struct evhttp_request* http_req; \
struct evbuffer* rpc_data; \
}; \
+EVENT2_EXPORT_SYMBOL \
int evrpc_send_request_##rpcname(struct evrpc_pool *, \
struct reqstruct *, struct rplystruct *, \
void (*)(struct evrpc_status *, \
@@ -187,6 +192,7 @@ int evrpc_send_request_##rpcname(struct evrpc_pool *, \
struct evrpc_pool;
/** use EVRPC_GENERATE instead */
+EVENT2_EXPORT_SYMBOL
struct evrpc_request_wrapper *evrpc_make_request_ctx(
struct evrpc_pool *pool, void *request, void *reply,
const char *rpcname,
@@ -257,10 +263,13 @@ struct evrpc_request_wrapper *evrpc_make_request_ctx(
#define EVRPC_REQUEST_HTTP(rpc_req) (rpc_req)->http_req
/** completes the server response to an rpc request */
+EVENT2_EXPORT_SYMBOL
void evrpc_request_done(struct evrpc_req_generic *req);
/** accessors for request and reply */
+EVENT2_EXPORT_SYMBOL
void *evrpc_get_request(struct evrpc_req_generic *req);
+EVENT2_EXPORT_SYMBOL
void *evrpc_get_reply(struct evrpc_req_generic *req);
/** Creates the reply to an RPC request
@@ -285,9 +294,10 @@ struct evhttp;
/** Creates a new rpc base from which RPC requests can be received
*
* @param server a pointer to an existing HTTP server
- * @return a newly allocated evrpc_base struct
+ * @return a newly allocated evrpc_base struct or NULL if an error occurred
* @see evrpc_free()
*/
+EVENT2_EXPORT_SYMBOL
struct evrpc_base *evrpc_init(struct evhttp *server);
/**
@@ -298,6 +308,7 @@ struct evrpc_base *evrpc_init(struct evhttp *server);
* @param base the evrpc_base object to be freed
* @see evrpc_init
*/
+EVENT2_EXPORT_SYMBOL
void evrpc_free(struct evrpc_base *base);
/** register RPCs with the HTTP Server
@@ -319,10 +330,10 @@ void evrpc_free(struct evrpc_base *base);
#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \
evrpc_register_generic(base, #name, \
(void (*)(struct evrpc_req_generic *, void *))callback, cbarg, \
- (void *(*)(void *))request##_new, NULL, \
+ (void *(*)(void *))request##_new_with_arg, NULL, \
(void (*)(void *))request##_free, \
(int (*)(void *, struct evbuffer *))request##_unmarshal, \
- (void *(*)(void *))reply##_new, NULL, \
+ (void *(*)(void *))reply##_new_with_arg, NULL, \
(void (*)(void *))reply##_free, \
(int (*)(void *))reply##_complete, \
(void (*)(struct evbuffer *, void *))reply##_marshal)
@@ -334,6 +345,7 @@ void evrpc_free(struct evrpc_base *base);
@see EVRPC_REGISTER()
*/
+EVENT2_EXPORT_SYMBOL
int evrpc_register_rpc(struct evrpc_base *, struct evrpc *,
void (*)(struct evrpc_req_generic*, void *), void *);
@@ -347,6 +359,7 @@ int evrpc_register_rpc(struct evrpc_base *, struct evrpc *,
*/
#define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc((base), #name)
+EVENT2_EXPORT_SYMBOL
int evrpc_unregister_rpc(struct evrpc_base *base, const char *name);
/*
@@ -385,6 +398,7 @@ struct evrpc_status;
@returns 0 on success, -1 otherwise.
@see EVRPC_MAKE_REQUEST(), EVRPC_MAKE_CTX()
*/
+EVENT2_EXPORT_SYMBOL
int evrpc_make_request(struct evrpc_request_wrapper *ctx);
/** creates an rpc connection pool
@@ -394,15 +408,18 @@ int evrpc_make_request(struct evrpc_request_wrapper *ctx);
*
* @param base a pointer to an struct event_based object; can be left NULL
* in singled-threaded applications
- * @return a newly allocated struct evrpc_pool object
+ * @return a newly allocated struct evrpc_pool object or NULL if an error
+ * occurred
* @see evrpc_pool_free()
*/
+EVENT2_EXPORT_SYMBOL
struct evrpc_pool *evrpc_pool_new(struct event_base *base);
/** frees an rpc connection pool
*
* @param pool a pointer to an evrpc_pool allocated via evrpc_pool_new()
* @see evrpc_pool_new()
*/
+EVENT2_EXPORT_SYMBOL
void evrpc_pool_free(struct evrpc_pool *pool);
/**
@@ -413,6 +430,7 @@ void evrpc_pool_free(struct evrpc_pool *pool);
* @param pool the pool to which to add the connection
* @param evcon the connection to add to the pool.
*/
+EVENT2_EXPORT_SYMBOL
void evrpc_pool_add_connection(struct evrpc_pool *pool,
struct evhttp_connection *evcon);
@@ -424,6 +442,7 @@ void evrpc_pool_add_connection(struct evrpc_pool *pool,
* @param pool the pool from which to remove the connection
* @param evcon the connection to remove from the pool.
*/
+EVENT2_EXPORT_SYMBOL
void evrpc_pool_remove_connection(struct evrpc_pool *pool,
struct evhttp_connection *evcon);
@@ -442,6 +461,7 @@ void evrpc_pool_remove_connection(struct evrpc_pool *pool,
* @param timeout_in_secs the number of seconds after which a request should
* timeout and a failure be returned to the callback.
*/
+EVENT2_EXPORT_SYMBOL
void evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs);
/**
@@ -489,6 +509,7 @@ enum EVRPC_HOOK_RESULT {
* @return a handle to the hook so it can be removed later
* @see evrpc_remove_hook()
*/
+EVENT2_EXPORT_SYMBOL
void *evrpc_add_hook(void *vbase,
enum EVRPC_HOOK_TYPE hook_type,
int (*cb)(void *, struct evhttp_request *, struct evbuffer *, void *),
@@ -502,6 +523,7 @@ void *evrpc_add_hook(void *vbase,
* @return 1 on success or 0 on failure
* @see evrpc_add_hook()
*/
+EVENT2_EXPORT_SYMBOL
int evrpc_remove_hook(void *vbase,
enum EVRPC_HOOK_TYPE hook_type,
void *handle);
@@ -511,8 +533,8 @@ int evrpc_remove_hook(void *vbase,
* @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
* @param ctx the context pointer provided to the original hook call
*/
-int
-evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
+EVENT2_EXPORT_SYMBOL
+int evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
/** adds meta data to request
*
@@ -525,6 +547,7 @@ evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
* @param data the data to be associated with the key
* @param data_size the size of the data
*/
+EVENT2_EXPORT_SYMBOL
void evrpc_hook_add_meta(void *ctx, const char *key,
const void *data, size_t data_size);
@@ -538,6 +561,7 @@ void evrpc_hook_add_meta(void *ctx, const char *key,
* @param data_size pointer to the size of the data
* @return 0 on success or -1 on failure
*/
+EVENT2_EXPORT_SYMBOL
int evrpc_hook_find_meta(void *ctx, const char *key,
void **data, size_t *data_size);
@@ -545,8 +569,10 @@ int evrpc_hook_find_meta(void *ctx, const char *key,
* returns the connection object associated with the request
*
* @param ctx the context provided to the hook call
- * @return a pointer to the evhttp_connection object
+ * @return a pointer to the evhttp_connection object or NULL if an error
+ * occurred
*/
+EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evrpc_hook_get_connection(void *ctx);
/**
@@ -556,6 +582,7 @@ struct evhttp_connection *evrpc_hook_get_connection(void *ctx);
@see EVRPC_MAKE_REQUEST()
*/
+EVENT2_EXPORT_SYMBOL
int evrpc_send_request_generic(struct evrpc_pool *pool,
void *request, void *reply,
void (*cb)(struct evrpc_status *, void *, void *, void *),
@@ -572,8 +599,8 @@ int evrpc_send_request_generic(struct evrpc_pool *pool,
@see EVRPC_REGISTER()
*/
-int
-evrpc_register_generic(struct evrpc_base *base, const char *name,
+EVENT2_EXPORT_SYMBOL
+int evrpc_register_generic(struct evrpc_base *base, const char *name,
void (*callback)(struct evrpc_req_generic *, void *), void *cbarg,
void *(*req_new)(void *), void *req_new_arg, void (*req_free)(void *),
int (*req_unmarshal)(void *, struct evbuffer *),
@@ -582,9 +609,12 @@ evrpc_register_generic(struct evrpc_base *base, const char *name,
void (*rpl_marshal)(struct evbuffer *, void *));
/** accessors for obscure and undocumented functionality */
+EVENT2_EXPORT_SYMBOL
struct evrpc_pool* evrpc_request_get_pool(struct evrpc_request_wrapper *ctx);
+EVENT2_EXPORT_SYMBOL
void evrpc_request_set_pool(struct evrpc_request_wrapper *ctx,
struct evrpc_pool *pool);
+EVENT2_EXPORT_SYMBOL
void evrpc_request_set_cb(struct evrpc_request_wrapper *ctx,
void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg),
void *cb_arg);
diff --git a/contrib/ntp/sntp/libevent/include/event2/rpc_struct.h b/contrib/ntp/sntp/libevent/include/event2/rpc_struct.h
index 8f691f49fbcd..f3cb460aed41 100644
--- a/contrib/ntp/sntp/libevent/include/event2/rpc_struct.h
+++ b/contrib/ntp/sntp/libevent/include/event2/rpc_struct.h
@@ -38,6 +38,16 @@ extern "C" {
*/
+/* Fix so that people don't have to run with <sys/queue.h> */
+#ifndef TAILQ_ENTRY
+#define EVENT_DEFINED_TQENTRY_
+#define TAILQ_ENTRY(type) \
+struct { \
+ struct type *tqe_next; /* next element */ \
+ struct type **tqe_prev; /* address of previous next element */ \
+}
+#endif /* !TAILQ_ENTRY */
+
/**
* provides information about the completed RPC request.
*/
@@ -93,6 +103,10 @@ struct evrpc {
struct evrpc_base *base;
};
+#ifdef EVENT_DEFINED_TQENTRY_
+#undef TAILQ_ENTRY
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/sntp/libevent/include/event2/util.h b/contrib/ntp/sntp/libevent/include/event2/util.h
index b152a4b40b51..02aa7ba9dab8 100644
--- a/contrib/ntp/sntp/libevent/include/event2/util.h
+++ b/contrib/ntp/sntp/libevent/include/event2/util.h
@@ -58,9 +58,6 @@ extern "C" {
#endif
#include <stdarg.h>
#ifdef EVENT__HAVE_NETDB_H
-#if !defined(_GNU_SOURCE)
-#define _GNU_SOURCE
-#endif
#include <netdb.h>
#endif
@@ -71,9 +68,14 @@ extern "C" {
#include <ws2tcpip.h>
#endif
#else
+#ifdef EVENT__HAVE_ERRNO_H
+#include <errno.h>
+#endif
#include <sys/socket.h>
#endif
+#include <time.h>
+
/* Some openbsd autoconf versions get the name of this macro wrong. */
#if defined(EVENT__SIZEOF_VOID__) && !defined(EVENT__SIZEOF_VOID_P)
#define EVENT__SIZEOF_VOID_P EVENT__SIZEOF_VOID__
@@ -233,6 +235,7 @@ extern "C" {
@{
*/
+#ifndef EVENT__HAVE_STDINT_H
#define EV_UINT64_MAX ((((ev_uint64_t)0xffffffffUL) << 32) | 0xffffffffUL)
#define EV_INT64_MAX ((((ev_int64_t) 0x7fffffffL) << 32) | 0xffffffffL)
#define EV_INT64_MIN ((-EV_INT64_MAX) - 1)
@@ -245,7 +248,22 @@ extern "C" {
#define EV_UINT8_MAX 255
#define EV_INT8_MAX 127
#define EV_INT8_MIN ((-EV_INT8_MAX) - 1)
+#else
+#define EV_UINT64_MAX UINT64_MAX
+#define EV_INT64_MAX INT64_MAX
+#define EV_INT64_MIN INT64_MIN
+#define EV_UINT32_MAX UINT32_MAX
+#define EV_INT32_MAX INT32_MAX
+#define EV_INT32_MIN INT32_MIN
+#define EV_UINT16_MAX UINT16_MAX
+#define EV_INT16_MIN INT16_MIN
+#define EV_INT16_MAX INT16_MAX
+#define EV_UINT8_MAX UINT8_MAX
+#define EV_INT8_MAX INT8_MAX
+#define EV_INT8_MIN INT8_MIN
/** @} */
+#endif
+
/**
@name Limits for SIZE_T and SSIZE_T
@@ -313,6 +331,15 @@ struct evutil_monotonic_timer
#define EV_MONOT_PRECISE 1
#define EV_MONOT_FALLBACK 2
+/** Format a date string using RFC 1123 format (used in HTTP).
+ * If `tm` is NULL, current system's time will be used.
+ * The number of characters written will be returned.
+ * One should check if the return value is smaller than `datelen` to check if
+ * the result is truncated or not.
+ */
+EVENT2_EXPORT_SYMBOL int
+evutil_date_rfc1123(char *date, const size_t datelen, const struct tm *tm);
+
/** Allocate a new struct evutil_monotonic_timer for use with the
* evutil_configure_monotonic_time() and evutil_gettime_monotonic()
* functions. You must configure the timer with
@@ -396,6 +423,18 @@ int evutil_make_listen_socket_reuseable(evutil_socket_t sock);
EVENT2_EXPORT_SYMBOL
int evutil_make_listen_socket_reuseable_port(evutil_socket_t sock);
+/** Set ipv6 only bind socket option to make listener work only in ipv6 sockets.
+
+ According to RFC3493 and most Linux distributions, default value for the
+ sockets is to work in IPv4-mapped mode. In IPv4-mapped mode, it is not possible
+ to bind same port from different IPv4 and IPv6 handlers.
+
+ @param sock The socket to make in ipv6only working mode
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_make_listen_socket_ipv6only(evutil_socket_t sock);
+
/** Do platform-specific operations as needed to close a socket upon a
successful execution of one of the exec*() functions.
@@ -409,7 +448,8 @@ int evutil_make_socket_closeonexec(evutil_socket_t sock);
socket() or accept().
@param sock The socket to be closed
- @return 0 on success, -1 on failure
+ @return 0 on success (whether the operation is supported or not),
+ -1 on failure
*/
EVENT2_EXPORT_SYMBOL
int evutil_closesocket(evutil_socket_t sock);
@@ -441,6 +481,7 @@ int evutil_socket_geterror(evutil_socket_t sock);
/** Convert a socket error to a string. */
EVENT2_EXPORT_SYMBOL
const char *evutil_socket_error_to_string(int errcode);
+#define EVUTIL_INVALID_SOCKET INVALID_SOCKET
#elif defined(EVENT_IN_DOXYGEN_)
/**
@name Socket error functions
@@ -464,14 +505,16 @@ const char *evutil_socket_error_to_string(int errcode);
#define evutil_socket_geterror(sock) ...
/** Convert a socket error to a string. */
#define evutil_socket_error_to_string(errcode) ...
+#define EVUTIL_INVALID_SOCKET -1
/**@}*/
-#else
+#else /** !EVENT_IN_DOXYGEN_ && !_WIN32 */
#define EVUTIL_SOCKET_ERROR() (errno)
#define EVUTIL_SET_SOCKET_ERROR(errcode) \
do { errno = (errcode); } while (0)
#define evutil_socket_geterror(sock) (errno)
#define evutil_socket_error_to_string(errcode) (strerror(errcode))
-#endif
+#define EVUTIL_INVALID_SOCKET -1
+#endif /** !_WIN32 */
/**
@@ -569,6 +612,12 @@ int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
/** Replacement for inet_ntop for platforms which lack it. */
EVENT2_EXPORT_SYMBOL
const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len);
+/** Variation of inet_pton that also parses IPv6 scopes. Public for
+ unit tests. No reason to call this directly.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_inet_pton_scope(int af, const char *src, void *dst,
+ unsigned *indexp);
/** Replacement for inet_pton for platforms which lack it. */
EVENT2_EXPORT_SYMBOL
int evutil_inet_pton(int af, const char *src, void *dst);
@@ -813,6 +862,7 @@ int evutil_secure_rng_init(void);
EVENT2_EXPORT_SYMBOL
int evutil_secure_rng_set_urandom_device_file(char *fname);
+#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
/** Seed the random number generator with extra random bytes.
You should almost never need to call this function; it should be
@@ -829,6 +879,7 @@ int evutil_secure_rng_set_urandom_device_file(char *fname);
*/
EVENT2_EXPORT_SYMBOL
void evutil_secure_rng_add_bytes(const char *dat, size_t datlen);
+#endif
#ifdef __cplusplus
}
diff --git a/contrib/ntp/sntp/libevent/include/event2/visibility.h b/contrib/ntp/sntp/libevent/include/event2/visibility.h
index 5e7163a1e993..006bbf06d80f 100644
--- a/contrib/ntp/sntp/libevent/include/event2/visibility.h
+++ b/contrib/ntp/sntp/libevent/include/event2/visibility.h
@@ -29,27 +29,39 @@
#include <event2/event-config.h>
-#if defined(event_EXPORTS) || defined(event_extra_EXPORTS) || defined(event_core_EXPORTS)
-
-#if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
-#define EVENT2_EXPORT_SYMBOL __global
-#elif defined __GNUC__
-#define EVENT2_EXPORT_SYMBOL __attribute__ ((visibility("default")))
-#elif defined(_MSC_VER)
-#define EVENT2_EXPORT_SYMBOL extern __declspec(dllexport)
-#else
-/* unknown compiler */
-#define EVENT2_EXPORT_SYMBOL
-#endif
+#if defined(event_shared_EXPORTS) || \
+ defined(event_extra_shared_EXPORTS) || \
+ defined(event_core_shared_EXPORTS) || \
+ defined(event_pthreads_shared_EXPORTS) || \
+ defined(event_openssl_shared_EXPORTS)
-#else
+# if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define EVENT2_EXPORT_SYMBOL __global
+# elif defined __GNUC__
+# define EVENT2_EXPORT_SYMBOL __attribute__ ((visibility("default")))
+# elif defined(_MSC_VER)
+# define EVENT2_EXPORT_SYMBOL __declspec(dllexport)
+# else
+# define EVENT2_EXPORT_SYMBOL /* unknown compiler */
+# endif
-#if defined(EVENT__NEED_DLLIMPORT) && defined(_MSC_VER) && !defined(EVENT_BUILDING_REGRESS_TEST)
-#define EVENT2_EXPORT_SYMBOL extern __declspec(dllimport)
-#else
-#define EVENT2_EXPORT_SYMBOL
-#endif
+#else /* event_*_EXPORTS */
+
+# define EVENT2_EXPORT_SYMBOL
+
+#endif /* event_*_EXPORTS */
+/** We need to dllimport event_debug_logging_mask_ into event_extra */
+#if defined(_MSC_VER)
+# if defined(event_core_shared_EXPORTS) /** from core export */
+# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllexport)
+# elif defined(event_extra_shared_EXPORTS) || /** from extra import */ \
+ defined(EVENT_VISIBILITY_WANT_DLLIMPORT)
+# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllimport)
+# endif
+#endif /* _MSC_VER */
+#if !defined(EVENT2_CORE_EXPORT_SYMBOL)
+# define EVENT2_CORE_EXPORT_SYMBOL EVENT2_EXPORT_SYMBOL
#endif
#endif /* EVENT2_VISIBILITY_H_INCLUDED_ */
diff --git a/contrib/ntp/sntp/libevent/include/include.am b/contrib/ntp/sntp/libevent/include/include.am
index 9aad2dba4abe..aaa2042af1f6 100644
--- a/contrib/ntp/sntp/libevent/include/include.am
+++ b/contrib/ntp/sntp/libevent/include/include.am
@@ -1,4 +1,4 @@
-# include/Makefile.am for libevent
+# include/include.am for libevent
# Copyright 2000-2007 Niels Provos
# Copyright 2007-2012 Niels Provos and Nick Mathewson
#
@@ -11,7 +11,6 @@ EVENT2_EXPORT = \
include/event2/buffer_compat.h \
include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
- include/event2/bufferevent_ssl.h \
include/event2/bufferevent_struct.h \
include/event2/dns.h \
include/event2/dns_compat.h \
@@ -33,6 +32,10 @@ EVENT2_EXPORT = \
include/event2/util.h \
include/event2/visibility.h
+if OPENSSL
+EVENT2_EXPORT += include/event2/bufferevent_ssl.h
+endif
+
## Without the nobase_ prefixing, Automake would strip "include/event2/" from
## the source header filename to derive the installed header filename.
## With nobase_ the installed path is $(includedir)/include/event2/ev*.h.
diff --git a/contrib/ntp/sntp/libevent/iocp-internal.h b/contrib/ntp/sntp/libevent/iocp-internal.h
index 93dbe2b1a454..21e0e0af6807 100644
--- a/contrib/ntp/sntp/libevent/iocp-internal.h
+++ b/contrib/ntp/sntp/libevent/iocp-internal.h
@@ -92,6 +92,7 @@ struct event_iocp_port {
HANDLE *shutdownSemaphore;
};
+EVENT2_EXPORT_SYMBOL
const struct win32_extension_fns *event_get_win32_extension_fns_(void);
#else
/* Dummy definition so we can test-compile more things on unix. */
@@ -106,12 +107,14 @@ struct event_overlapped {
@param cb The callback that should be invoked once the IO operation has
finished.
*/
+EVENT2_EXPORT_SYMBOL
void event_overlapped_init_(struct event_overlapped *, iocp_callback cb);
/** Allocate and return a new evbuffer that supports overlapped IO on a given
socket. The socket must be associated with an IO completion port using
event_iocp_port_associate_.
*/
+EVENT2_EXPORT_SYMBOL
struct evbuffer *evbuffer_overlapped_new_(evutil_socket_t fd);
/** XXXX Document (nickm) */
@@ -131,6 +134,7 @@ void evbuffer_overlapped_set_fd_(struct evbuffer *buf, evutil_socket_t fd);
@param ol Overlapped object with associated completion callback.
@return 0 on success, -1 on error.
*/
+EVENT2_EXPORT_SYMBOL
int evbuffer_launch_read_(struct evbuffer *buf, size_t n, struct event_overlapped *ol);
/** Start writing data from the start of an evbuffer.
@@ -145,21 +149,26 @@ int evbuffer_launch_read_(struct evbuffer *buf, size_t n, struct event_overlappe
@param ol Overlapped object with associated completion callback.
@return 0 on success, -1 on error.
*/
+EVENT2_EXPORT_SYMBOL
int evbuffer_launch_write_(struct evbuffer *buf, ev_ssize_t n, struct event_overlapped *ol);
/** XXX document */
+EVENT2_EXPORT_SYMBOL
void evbuffer_commit_read_(struct evbuffer *, ev_ssize_t);
+EVENT2_EXPORT_SYMBOL
void evbuffer_commit_write_(struct evbuffer *, ev_ssize_t);
/** Create an IOCP, and launch its worker threads. Internal use only.
This interface is unstable, and will change.
*/
+EVENT2_EXPORT_SYMBOL
struct event_iocp_port *event_iocp_port_launch_(int n_cpus);
/** Associate a file descriptor with an iocp, such that overlapped IO on the
fd will happen on one of the iocp's worker threads.
*/
+EVENT2_EXPORT_SYMBOL
int event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd,
ev_uintptr_t key);
@@ -169,22 +178,27 @@ int event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd,
0. Otherwise, return -1. If you get a -1 return value, it is safe to call
this function again.
*/
+EVENT2_EXPORT_SYMBOL
int event_iocp_shutdown_(struct event_iocp_port *port, long waitMsec);
/* FIXME document. */
+EVENT2_EXPORT_SYMBOL
int event_iocp_activate_overlapped_(struct event_iocp_port *port,
struct event_overlapped *o,
ev_uintptr_t key, ev_uint32_t n_bytes);
struct event_base;
/* FIXME document. */
+EVENT2_EXPORT_SYMBOL
struct event_iocp_port *event_base_get_iocp_(struct event_base *base);
/* FIXME document. */
+EVENT2_EXPORT_SYMBOL
int event_base_start_iocp_(struct event_base *base, int n_cpus);
void event_base_stop_iocp_(struct event_base *base);
/* FIXME document. */
+EVENT2_EXPORT_SYMBOL
struct bufferevent *bufferevent_async_new_(struct event_base *base,
evutil_socket_t fd, int options);
diff --git a/contrib/ntp/sntp/libevent/kqueue.c b/contrib/ntp/sntp/libevent/kqueue.c
index a6578dfe1a57..dfd7751d6497 100644
--- a/contrib/ntp/sntp/libevent/kqueue.c
+++ b/contrib/ntp/sntp/libevent/kqueue.c
@@ -37,6 +37,7 @@
#endif
#include <sys/queue.h>
#include <sys/event.h>
+#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -50,7 +51,10 @@
/* Some platforms apparently define the udata field of struct kevent as
* intptr_t, whereas others define it as void*. There doesn't seem to be an
* easy way to tell them apart via autoconf, so we need to use OS macros. */
-#if defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__)
+#if defined(__NetBSD__)
+#define PTR_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(x))
+#define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x))
+#elif defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__)
#define PTR_TO_UDATA(x) ((intptr_t)(x))
#define INT_TO_UDATA(x) ((intptr_t)(x))
#else
@@ -62,6 +66,7 @@
#include "log-internal.h"
#include "evmap-internal.h"
#include "event2/thread.h"
+#include "event2/util.h"
#include "evthread-internal.h"
#include "changelist-internal.h"
@@ -154,7 +159,7 @@ kq_init(struct event_base *base)
if (kevent(kq,
kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
(int)kqueueop->events[0].ident != -1 ||
- kqueueop->events[0].flags != EV_ERROR) {
+ !(kqueueop->events[0].flags & EV_ERROR)) {
event_warn("%s: detected broken kqueue; not using.", __func__);
goto err;
}
@@ -207,9 +212,17 @@ kq_build_changes_list(const struct event_changelist *changelist,
struct event_change *in_ch = &changelist->changes[i];
struct kevent *out_ch;
if (n_changes >= kqop->changes_size - 1) {
- int newsize = kqop->changes_size * 2;
+ int newsize;
struct kevent *newchanges;
+ if (kqop->changes_size > INT_MAX / 2 ||
+ (size_t)kqop->changes_size * 2 > EV_SIZE_MAX /
+ sizeof(struct kevent)) {
+ event_warnx("%s: int overflow", __func__);
+ return (-1);
+ }
+
+ newsize = kqop->changes_size * 2;
newchanges = mm_realloc(kqop->changes,
newsize * sizeof(struct kevent));
if (newchanges == NULL) {
@@ -260,7 +273,8 @@ kq_dispatch(struct event_base *base, struct timeval *tv)
int i, n_changes, res;
if (tv != NULL) {
- TIMEVAL_TO_TIMESPEC(tv, &ts);
+ ts.tv_sec = tv->tv_sec;
+ ts.tv_nsec = tv->tv_usec * 1000;
ts_p = &ts;
}
@@ -332,7 +346,7 @@ kq_dispatch(struct event_base *base, struct timeval *tv)
* on FreeBSD. */
case EINVAL:
continue;
-#if defined(__FreeBSD__) && defined(ENOTCAPABLE)
+#if defined(__FreeBSD__)
/*
* This currently occurs if an FD is closed
* before the EV_DELETE makes it out via kevent().
diff --git a/contrib/ntp/sntp/libevent/libevent_core.pc.in b/contrib/ntp/sntp/libevent/libevent_core.pc.in
new file mode 100644
index 000000000000..98ab1efe7fcb
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/libevent_core.pc.in
@@ -0,0 +1,16 @@
+#libevent pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libevent_core
+Description: libevent_core
+Version: @VERSION@
+Requires:
+Conflicts:
+Libs: -L${libdir} -levent_core
+Libs.private: @LIBS@
+Cflags: -I${includedir}
+
diff --git a/contrib/ntp/sntp/libevent/libevent_extra.pc.in b/contrib/ntp/sntp/libevent/libevent_extra.pc.in
new file mode 100644
index 000000000000..b9633998d08e
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/libevent_extra.pc.in
@@ -0,0 +1,16 @@
+#libevent pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libevent_extra
+Description: libevent_extra
+Version: @VERSION@
+Requires:
+Conflicts:
+Libs: -L${libdir} -levent_extra
+Libs.private: @LIBS@
+Cflags: -I${includedir}
+
diff --git a/contrib/ntp/sntp/libevent/listener.c b/contrib/ntp/sntp/libevent/listener.c
index 2af14e3a7b54..f5c00c9c0e30 100644
--- a/contrib/ntp/sntp/libevent/listener.c
+++ b/contrib/ntp/sntp/libevent/listener.c
@@ -35,6 +35,7 @@
#define _WIN32_WINNT 0x0403
#endif
#include <winsock2.h>
+#include <winerror.h>
#include <ws2tcpip.h>
#include <mswsock.h>
#endif
@@ -245,6 +246,11 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb,
goto err;
}
+ if (flags & LEV_OPT_BIND_IPV6ONLY) {
+ if (evutil_make_listen_socket_ipv6only(fd) < 0)
+ goto err;
+ }
+
if (sa) {
if (bind(fd, sa, socklen)<0)
goto err;
@@ -421,11 +427,14 @@ listener_read_cb(evutil_socket_t fd, short what, void *p)
if (lev->refcnt == 1) {
int freed = listener_decref_and_unlock(lev);
EVUTIL_ASSERT(freed);
-
- evutil_closesocket(new_fd);
return;
}
--lev->refcnt;
+ if (!lev->enabled) {
+ /* the callback could have disabled the listener */
+ UNLOCK(lev);
+ return;
+ }
}
err = evutil_socket_geterror(fd);
if (EVUTIL_ERR_ACCEPT_RETRIABLE(err)) {
@@ -442,6 +451,7 @@ listener_read_cb(evutil_socket_t fd, short what, void *p)
listener_decref_and_unlock(lev);
} else {
event_sock_warn(fd, "Error from accept() call");
+ UNLOCK(lev);
}
}
@@ -503,7 +513,7 @@ new_accepting_socket(struct evconnlistener_iocp *lev, int family)
return NULL;
event_overlapped_init_(&res->overlapped, accepted_socket_cb);
- res->s = INVALID_SOCKET;
+ res->s = EVUTIL_INVALID_SOCKET;
res->lev = lev;
res->buflen = buflen;
res->family = family;
@@ -521,7 +531,7 @@ static void
free_and_unlock_accepting_socket(struct accepting_socket *as)
{
/* requires lock. */
- if (as->s != INVALID_SOCKET)
+ if (as->s != EVUTIL_INVALID_SOCKET)
closesocket(as->s);
LeaveCriticalSection(&as->lock);
@@ -541,7 +551,7 @@ start_accepting(struct accepting_socket *as)
if (!as->lev->base.enabled)
return 0;
- if (s == INVALID_SOCKET) {
+ if (s == EVUTIL_INVALID_SOCKET) {
error = WSAGetLastError();
goto report_err;
}
@@ -588,7 +598,7 @@ stop_accepting(struct accepting_socket *as)
{
/* requires lock. */
SOCKET s = as->s;
- as->s = INVALID_SOCKET;
+ as->s = EVUTIL_INVALID_SOCKET;
closesocket(s);
}
@@ -630,7 +640,7 @@ accepted_socket_invoke_user_cb(struct event_callback *dcb, void *arg)
&socklen_remote);
sock = as->s;
cb = lev->cb;
- as->s = INVALID_SOCKET;
+ as->s = EVUTIL_INVALID_SOCKET;
/* We need to call this so getsockname, getpeername, and
* shutdown work correctly on the accepted socket. */
@@ -678,7 +688,7 @@ accepted_socket_cb(struct event_overlapped *o, ev_uintptr_t key, ev_ssize_t n, i
free_and_unlock_accepting_socket(as);
listener_decref_and_unlock(lev);
return;
- } else if (as->s == INVALID_SOCKET) {
+ } else if (as->s == EVUTIL_INVALID_SOCKET) {
/* This is okay; we were disabled by iocp_listener_disable. */
LeaveCriticalSection(&as->lock);
} else {
@@ -716,7 +726,7 @@ iocp_listener_enable(struct evconnlistener *lev)
if (!as)
continue;
EnterCriticalSection(&as->lock);
- if (!as->free_on_cb && as->s == INVALID_SOCKET)
+ if (!as->free_on_cb && as->s == EVUTIL_INVALID_SOCKET)
start_accepting(as);
LeaveCriticalSection(&as->lock);
}
@@ -738,7 +748,7 @@ iocp_listener_disable_impl(struct evconnlistener *lev, int shutdown)
if (!as)
continue;
EnterCriticalSection(&as->lock);
- if (!as->free_on_cb && as->s != INVALID_SOCKET) {
+ if (!as->free_on_cb && as->s != EVUTIL_INVALID_SOCKET) {
if (shutdown)
as->free_on_cb = 1;
stop_accepting(as);
diff --git a/contrib/ntp/sntp/libevent/log-internal.h b/contrib/ntp/sntp/libevent/log-internal.h
index 330478a9edd6..2c31608b25be 100644
--- a/contrib/ntp/sntp/libevent/log-internal.h
+++ b/contrib/ntp/sntp/libevent/log-internal.h
@@ -29,6 +29,10 @@
#include "event2/util.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __GNUC__
#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b)))
#define EV_NORETURN __attribute__((noreturn))
@@ -39,32 +43,35 @@
#define EVENT_ERR_ABORT_ ((int)0xdeaddead)
-#define USE_GLOBAL_FOR_DEBUG_LOGGING
-
#if !defined(EVENT__DISABLE_DEBUG_MODE) || defined(USE_DEBUG)
#define EVENT_DEBUG_LOGGING_ENABLED
#endif
#ifdef EVENT_DEBUG_LOGGING_ENABLED
-#ifdef USE_GLOBAL_FOR_DEBUG_LOGGING
-extern ev_uint32_t event_debug_logging_mask_;
+EVENT2_CORE_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_;
#define event_debug_get_logging_mask_() (event_debug_logging_mask_)
#else
-ev_uint32_t event_debug_get_logging_mask_(void);
-#endif
-#else
#define event_debug_get_logging_mask_() (0)
#endif
+EVENT2_EXPORT_SYMBOL
void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN;
+EVENT2_EXPORT_SYMBOL
void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2);
+EVENT2_EXPORT_SYMBOL
void event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(3,4) EV_NORETURN;
+EVENT2_EXPORT_SYMBOL
void event_sock_warn(evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(2,3);
+EVENT2_EXPORT_SYMBOL
void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN;
+EVENT2_EXPORT_SYMBOL
void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2);
+EVENT2_EXPORT_SYMBOL
void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2);
+EVENT2_EXPORT_SYMBOL
void event_debugx_(const char *fmt, ...) EV_CHECK_FMT(1,2);
+EVENT2_EXPORT_SYMBOL
void event_logv_(int severity, const char *errstr, const char *fmt, va_list ap)
EV_CHECK_FMT(3,0);
@@ -80,4 +87,8 @@ void event_logv_(int severity, const char *errstr, const char *fmt, va_list ap)
#undef EV_CHECK_FMT
+#ifdef __cplusplus
+}
#endif
+
+#endif /* LOG_INTERNAL_H_INCLUDED_ */
diff --git a/contrib/ntp/sntp/libevent/log.c b/contrib/ntp/sntp/libevent/log.c
index e8ae9fdc310e..a9debb864e4f 100644
--- a/contrib/ntp/sntp/libevent/log.c
+++ b/contrib/ntp/sntp/libevent/log.c
@@ -69,16 +69,7 @@ static event_fatal_cb fatal_fn = NULL;
#define DEFAULT_MASK 0
#endif
-#ifdef USE_GLOBAL_FOR_DEBUG_LOGGING
-ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
-#else
-static ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
-ev_uint32_t
-event_debug_get_logging_mask_(void)
-{
- return event_debug_logging_mask_;
-}
-#endif
+EVENT2_EXPORT_SYMBOL ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
#endif /* EVENT_DEBUG_LOGGING_ENABLED */
void
diff --git a/contrib/ntp/sntp/libevent/ltmain.sh b/contrib/ntp/sntp/libevent/ltmain.sh
new file mode 100644
index 000000000000..0f0a2da3f9dd
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/ltmain.sh
@@ -0,0 +1,11147 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2014-01-03.01
+
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.6
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+fi
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+ fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath=$progdir/$progname
+ ;;
+ *)
+ _G_IFS=$IFS
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS=$_G_IFS
+ test -x "$progdir/$progname" && break
+ done
+ IFS=$_G_IFS
+ test -n "$progdir" || progdir=`pwd`
+ progpath=$progdir/$progname
+ ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+ $debug_cmd
+
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ $debug_cmd
+
+ func_error "$*"
+ exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $debug_cmd
+
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
+
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$_G_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ _G_dir_list=$_G_directory_path:$_G_dir_list
+
+ # If the last portion added has no slash in it, the list is done
+ case $_G_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ done
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$_G_dir" 2>/dev/null || :
+ done
+ IFS=$func_mkdir_p_IFS
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
+ fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+ $debug_cmd
+
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
+ # Return a directory name, but don't create it in dry-run mode
+ _G_tmpdir=$_G_template-$$
+ else
+
+ # If mktemp works, use that first and foremost
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$_G_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+ func_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ fi
+
+ $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+ $debug_cmd
+
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
+{
+ $debug_cmd
+
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
+ *[\\\`\"\$]*)
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
+
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
+ ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
+ esac
+
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ $debug_cmd
+
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
+ esac
+
+ case $_G_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
+ ;;
+ esac
+
+ func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ $opt_quiet || {
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $debug_cmd
+
+ $opt_verbose && func_echo "$*"
+
+ :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ eval $_G_hook '"$@"'
+
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ done
+
+ func_quote_for_eval ${1+"$@"}
+ func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+#
+# func_quote_for_eval ${1+"$@"}
+# my_options_prep_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# # Note that for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=: ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# ;;
+# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# esac
+# done
+#
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+#
+# func_quote_for_eval ${1+"$@"}
+# my_option_validation_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ func_options_prep ${1+"$@"}
+ eval func_parse_options \
+ ${func_options_prep_result+"$func_options_prep_result"}
+ eval func_validate_options \
+ ${func_parse_options_result+"$func_parse_options_result"}
+
+ eval func_run_hooks func_options \
+ ${func_validate_options_result+"$func_validate_options_result"}
+
+ # save modified positional parameters for caller
+ func_options_result=$func_run_hooks_result
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ func_run_hooks func_options_prep ${1+"$@"}
+
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ func_parse_options_result=
+
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ func_run_hooks func_parse_options ${1+"$@"}
+
+ # Adjust func_parse_options positional parameters to match
+ eval set dummy "$func_run_hooks_result"; shift
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode"
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ test $# = 0 && func_missing_arg $_G_opt && break
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ func_run_hooks func_validate_options ${1+"$@"}
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message"
+ exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $debug_cmd
+
+ func_error "Missing argument for '$1'."
+ exit_cmd=exit
+}
+
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
+}
+
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
+ }
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
+ }
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
+
+ exit $?
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ $debug_cmd
+
+ $warning_func ${1+"$@"}
+}
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --mode=MODE use operation mode MODE
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+ host-triplet: $host
+ shell: $SHELL
+ compiler: $LTCC
+ compiler flags: $LTCFLAGS
+ linker: $LD (gnu? $with_gnu_ld)
+ version: $progname (GNU libtool) 2.4.6
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+ exit 0
+}
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_lo2o ()
+ {
+ case $1 in
+ *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+ * ) func_lo2o_result=$1 ;;
+ esac
+ }'
+
+ # func_xform LIBOBJ-OR-SOURCE
+ # ---------------------------
+ # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+ # suffix to a '.lo' libtool-object suffix.
+ eval 'func_xform ()
+ {
+ func_xform_result=${1%.*}.lo
+ }'
+else
+ # ...otherwise fall back to using sed.
+ func_lo2o ()
+ {
+ func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+ }
+
+ func_xform ()
+ {
+ func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+ }
+fi
+
+
+# func_fatal_configuration ARG...
+# -------------------------------
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func__fatal_error ${1+"$@"} \
+ "See the $PACKAGE documentation for more information." \
+ "Fatal configuration error."
+}
+
+
+# func_config
+# -----------
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+
+# func_features
+# -------------
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test yes = "$build_libtool_libs"; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test yes = "$build_old_libs"; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+
+# func_enable_tag TAGNAME
+# -----------------------
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname=$1
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf=/$re_begincf/,/$re_endcf/p
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+ $debug_mode
+
+ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+ opt_help=false
+ opt_mode=
+ opt_preserve_dup_deps=false
+ opt_quiet=false
+
+ nonopt=
+ preserve_args=
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Pass back the list of options.
+ func_quote_for_eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtool_options_prep
+
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+ $debug_cmd
+
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+
+ --config) func_config ;;
+
+ --dlopen|-dlopen)
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=: ;;
+
+ --features) func_features ;;
+
+ --finish) set dummy --mode finish ${1+"$@"}; shift ;;
+
+ --help) opt_help=: ;;
+
+ --help-all) opt_help=': help-all' ;;
+
+ --mode) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_mode=$1
+ case $1 in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $_G_opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+ shift
+ ;;
+
+ --no-silent|--no-quiet)
+ opt_quiet=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ opt_warning=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-verbose)
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --silent|--quiet)
+ opt_quiet=:
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --tag) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_tag=$1
+ func_append preserve_args " $_G_opt $1"
+ func_enable_tag "$1"
+ shift
+ ;;
+
+ --verbose|-v) opt_quiet=false
+ opt_verbose=:
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+ # save first non-option argument
+ if test 0 -lt $#; then
+ nonopt=$1
+ shift
+ fi
+
+ # preserve --debug
+ test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ test yes != "$build_libtool_libs" \
+ && test yes != "$build_old_libs" \
+ && func_fatal_configuration "not configured to build any kind of library"
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+ func_error "unrecognized option '-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
+
+ # Pass back the unparsed argument list
+ func_quote_for_eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+ $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if 'file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case $lalib_p_line in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test yes = "$lalib_p"
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ test -f "$1" &&
+ $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $debug_cmd
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# 'FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $debug_cmd
+
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case $lt_sysroot:$1 in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result='='$func_stripname_result
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $debug_cmd
+
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with '--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=$1
+ if test yes = "$build_libtool_libs"; then
+ write_lobj=\'$2\'
+ else
+ write_lobj=none
+ fi
+
+ if test yes = "$build_old_libs"; then
+ write_oldobj=\'$3\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "$write_libobj"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $debug_cmd
+
+ func_convert_core_file_wine_to_w32_result=$1
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $debug_cmd
+
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result"; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $debug_cmd
+
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $debug_cmd
+
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $debug_cmd
+
+ if test -z "$2" && test -n "$1"; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result=$1
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $debug_cmd
+
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " '$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result=$3
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $debug_cmd
+
+ case $4 in
+ $1 ) func_to_host_path_result=$3$func_to_host_path_result
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $debug_cmd
+
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $debug_cmd
+
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_msys_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $debug_cmd
+
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd=func_convert_path_$func_stripname_result
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $debug_cmd
+
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_msys_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+ $debug_cmd
+
+ func_dll_def_p_tmp=`$SED -n \
+ -e 's/^[ ]*//' \
+ -e '/^\(;.*\)*$/d' \
+ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
+ -e q \
+ "$1"`
+ test DEF = "$func_dll_def_p_tmp"
+}
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $debug_cmd
+
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile=$nonopt # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg=$arg
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj=$arg
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify '-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs=$IFS; IFS=,
+ for arg in $args; do
+ IFS=$save_ifs
+ func_append_quoted lastarg "$arg"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg=$srcfile
+ srcfile=$arg
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with '-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj=$func_basename_result
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from '$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test yes = "$build_libtool_libs" \
+ || func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name '$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname=$func_basename_result
+ xdir=$func_dirname_result
+ lobj=$xdir$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test yes = "$build_old_libs"; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test no = "$compiler_c_o"; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+ lockfile=$output_obj.lock
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test yes = "$need_locks"; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test warn = "$need_locks"; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test yes = "$build_libtool_libs"; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test no != "$pic_mode"; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test yes = "$suppress_opt"; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test yes = "$build_old_libs"; then
+ if test yes != "$pic_mode"; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test yes = "$compiler_c_o"; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test no != "$need_locks"; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a '.o' file suitable for static linking
+ -static only build a '.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to '-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the '--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the 'install' or 'cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE use a list of object files found in FILE to specify objects
+ -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with '-') are ignored.
+
+Every other argument is treated as a filename. Files ending in '.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
+
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode '$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try '$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test : = "$opt_help"; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ $SED '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $debug_cmd
+
+ # The first argument is the command name.
+ cmd=$nonopt
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "'$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "'$file' was not linked with '-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ ;;
+
+ *)
+ func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir=$absdir
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic=$magic
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if $opt_dry_run; then
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ else
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd=\$cmd$args
+ fi
+}
+
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $debug_cmd
+
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "'$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument '$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_quiet && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the '$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the '$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the '$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $debug_cmd
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac
+ then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=false
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=: ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test X-m = "X$prev" && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=:
+ if $isdir; then
+ destdir=$dest
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir=$func_dirname_result
+ destname=$func_basename_result
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "'$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "'$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir=$func_dirname_result
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking '$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname=$1
+ shift
+
+ srcname=$realname
+ test -n "$relink_command" && srcname=${realname}T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ os2*)
+ case $realname in
+ *_dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try 'ln -sf' first, because the 'ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib=$destdir/$realname
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name=$func_basename_result
+ instname=$dir/${name}i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest=$destfile
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to '$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test yes = "$build_old_libs"; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=.exe
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script '$wrapper'"
+
+ finalize=:
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "'$lib' has not been installed in '$libdir'"
+ finalize=false
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test no = "$fast_install" && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if $finalize; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file=$func_basename_result
+ outputname=$tmpdir/$file
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_quiet || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink '$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file=$outputname
+ else
+ func_warning "cannot relink '$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name=$func_basename_result
+
+ # Set up the ranlib parameters.
+ oldlib=$destdir/$name
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run '$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $debug_cmd
+
+ my_outputname=$1
+ my_originator=$2
+ my_pic_p=${3-false}
+ my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms=${my_outputname}S.c
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist=$output_objdir/$my_outputname.nm
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test yes = "$dlself"; then
+ func_verbose "generating symbol list for '$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols=$output_objdir/$outputname.exp
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from '$dlprefile'"
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname"; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename=$func_basename_result
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename"; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ func_show_eval '$RM "${nlist}I"'
+ if test -n "$global_symbol_to_import"; then
+ eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+ LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+ for (; symbol->name; ++symbol)
+ {"
+ $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+ echo >> "$output_objdir/$my_dlsyms" "\
+ }
+}"
+ fi
+ echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{ {\"$my_originator\", (void *) 0},"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {\"@INIT@\", (void *) &lt_syminit},"
+ fi
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for '$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $debug_cmd
+
+ win32_libid_type=unknown
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+ func_cygming_gnu_implib_p "$1"
+ then
+ win32_nmres=import
+ else
+ win32_nmres=
+ fi
+ ;;
+ *)
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s|.*|import|
+ p
+ q
+ }
+ }'`
+ ;;
+ esac
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $debug_cmd
+
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $debug_cmd
+
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive that possess that section. Heuristic: eliminate
+ # all those that have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $debug_cmd
+
+ if func_cygming_gnu_implib_p "$1"; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1"; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $debug_cmd
+
+ f_ex_an_ar_dir=$1; shift
+ f_ex_an_ar_oldlib=$1
+ if test yes = "$lock_old_archive_extraction"; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test yes = "$lock_old_archive_extraction"; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $debug_cmd
+
+ my_gentop=$1; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=
+ my_xlib=
+ my_xabs=
+ my_xdir=
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib=$func_basename_result
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir=$my_gentop/$my_xlib_u
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches; do
+ func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+ $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+ cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+ func_extract_an_archive "`pwd`" "$darwin_base_archive"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result=$my_oldobjs
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test yes = "$fast_install"; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ \$ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
+# define LT_PATHMAX PATH_MAX
+#elif defined MAXPATHLEN
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free (stale); stale = 0; } \
+} while (0)
+
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test yes = "$fast_install"; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ int rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, (size_t) argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (STREQ (argv[i], dumpscript_opt))
+ {
+EOF
+ case $host in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (STREQ (argv[i], debug_opt))
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (STREQ (argv[i], ltwrapper_option_prefix))
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ size_t tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = (size_t) (q - p);
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (STREQ (str, pat))
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ size_t len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ size_t orig_value_len = strlen (orig_value);
+ size_t add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ size_t len = strlen (new_value);
+ while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[--len] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $debug_cmd
+
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+ $debug_cmd
+
+ case " $compile_command " in
+ *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+ suncc_use_cstd_abi=no
+ ;;
+ *)
+ suncc_use_cstd_abi=yes
+ ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $debug_cmd
+
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll that has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ os2dllname=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=false
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module=$wl-single_module
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test yes != "$build_libtool_libs" \
+ && func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg=$1
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir=$arg
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ $preload || {
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=:
+ }
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test no = "$dlself"; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test dlprefiles = "$prev"; then
+ dlself=yes
+ elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test dlfiles = "$prev"; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols=$arg
+ test -f "$arg" \
+ || func_fatal_error "symbol file '$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex=$arg
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir=$arg
+ prev=
+ continue
+ ;;
+ mllvm)
+ # Clang does not use LLVM to link, so we can simply discard any
+ # '-mllvm $arg' options when doing the link step.
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ if test none != "$pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ fi
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file '$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ os2dllname)
+ os2dllname=$arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex=$arg
+ prev=
+ continue
+ ;;
+ release)
+ release=-$arg
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test rpath = "$prev"; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds=$arg
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg=$arg
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "'-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test X-export-symbols = "X$arg"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between '-L' and '$1'"
+ else
+ func_fatal_error "need path for '-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of '$dir'"
+ dir=$absdir
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc due to us having libc/libc_r.
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test X-lc = "X$arg" && continue
+ ;;
+ esac
+ elif test X-lc_r = "X$arg"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -mllvm)
+ prev=mllvm
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module=$wl-multi_module
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+ func_warning "assuming '-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -os2dllname)
+ prev=os2dllname
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -stdlib=* select c++ std lib with clang
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case $arg in
+ -Zlinker | -Zstack)
+ prev=xcompiler
+ ;;
+ esac
+ continue
+ else
+ # Otherwise treat like 'Some other compiler flag' below
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ fi
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ test none = "$pic_object" || {
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ }
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test dlfiles = "$prev"; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test dlprefiles = "$prev"; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prevarg' option requires an argument"
+
+ if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname=$func_basename_result
+ libobjs_save=$libobjs
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
+ func_dirname "$output" "/" ""
+ output_objdir=$func_dirname_result$objdir
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test lib = "$linkmode"; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=false
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test lib,link = "$linkmode,$pass"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs=$tmp_deplibs
+ fi
+
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass"; then
+ libs=$deplibs
+ deplibs=
+ fi
+ if test prog = "$linkmode"; then
+ case $pass in
+ dlopen) libs=$dlfiles ;;
+ dlpreopen) libs=$dlprefiles ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test lib,dlpreopen = "$linkmode,$pass"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs=$dlprefiles
+ fi
+ if test dlopen = "$pass"; then
+ # Collect dlpreopened libraries
+ save_deplibs=$deplibs
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=false
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test lib != "$linkmode" && test prog != "$linkmode"; then
+ func_warning "'-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test lib = "$linkmode"; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib=$searchdir/lib$name$search_ext
+ if test -f "$lib"; then
+ if test .la = "$search_ext"; then
+ found=:
+ else
+ found=false
+ fi
+ break 2
+ fi
+ done
+ done
+ if $found; then
+ # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll=$l
+ done
+ if test "X$ll" = "X$old_library"; then # only static version available
+ found=false
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+ lib=$ladir/$old_library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ else
+ # deplib doesn't seem to be a libtool library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ *.ltframework)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test conv = "$pass" && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test scan = "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "'-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test link = "$pass"; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=false
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=:
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=:
+ ;;
+ esac
+ if $valid_a_lib; then
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ else
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test link != "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ elif test prog = "$linkmode"; then
+ if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=:
+ continue
+ ;;
+ esac # case $deplib
+
+ $found || test -f "$lib" \
+ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "'$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass" ||
+ { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test conv = "$pass"; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ elif test prog != "$linkmode" && test lib != "$linkmode"; then
+ func_fatal_error "'$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test yes = "$prefer_static_libs" ||
+ test built,no = "$prefer_static_libs,$installed"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib=$l
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test dlopen = "$pass"; then
+ test -z "$libdir" \
+ && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+ if test -z "$dlname" ||
+ test yes != "$dlopen_support" ||
+ test no = "$build_libtool_libs"
+ then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of '$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir=$ladir
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname=$func_basename_result
+
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+ else
+ dir=$lt_sysroot$libdir
+ absdir=$lt_sysroot$libdir
+ fi
+ test yes = "$hardcode_automatic" && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir=$ladir
+ absdir=$abs_ladir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir=$ladir/$objdir
+ absdir=$abs_ladir/$objdir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test dlpreopen = "$pass"; then
+ if test -z "$libdir" && test prog = "$linkmode"; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test lib = "$linkmode"; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test prog = "$linkmode" && test link != "$pass"; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=false
+ if test no != "$link_all_deplibs" || test -z "$library_names" ||
+ test no = "$build_libtool_libs"; then
+ linkalldeplibs=:
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if $linkalldeplibs; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test prog,link = "$linkmode,$pass"; then
+ if test -n "$library_names" &&
+ { { test no = "$prefer_static_libs" ||
+ test built,yes = "$prefer_static_libs,$installed"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+ # Make sure the rpath contains only unique directories.
+ case $temp_rpath: in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if $alldeplibs &&
+ { test pass_all = "$deplibs_check_method" ||
+ { test yes = "$build_libtool_libs" &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test built = "$use_static_libs" && test yes = "$installed"; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test no = "$installed"; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule=$dlpremoduletest
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+ echo
+ if test prog = "$linkmode"; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test lib = "$linkmode" &&
+ test yes = "$hardcode_into_libs"; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname=$dlname
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot=$soname
+ func_basename "$soroot"
+ soname=$func_basename_result
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from '$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for '$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test prog = "$linkmode" || test relink != "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test no = "$hardcode_direct"; then
+ add=$dir/$linklib
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+ *-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir=-L$dir ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we cannot
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library"; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add=$dir/$old_library
+ fi
+ elif test -n "$old_library"; then
+ add=$dir/$old_library
+ fi
+ fi
+ esac
+ elif test no = "$hardcode_minus_L"; then
+ case $host in
+ *-*-sunos*) add_shlibpath=$dir ;;
+ esac
+ add_dir=-L$dir
+ add=-l$name
+ elif test no = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$dir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$absdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test yes != "$lib_linked"; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test yes != "$hardcode_direct" &&
+ test yes != "$hardcode_minus_L" &&
+ test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test prog = "$linkmode" || test relink = "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add=-l$name
+ elif test yes = "$hardcode_automatic"; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add=$inst_prefix_dir$libdir/$linklib
+ else
+ add=$libdir/$linklib
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir=-L$libdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ fi
+
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test prog = "$linkmode"; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test yes = "$build_libtool_libs"; then
+ # Not a shared library
+ if test pass_all != "$deplibs_check_method"; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test yes = "$module"; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test lib = "$linkmode"; then
+ if test -n "$dependency_libs" &&
+ { test yes != "$hardcode_into_libs" ||
+ test yes = "$build_old_libs" ||
+ test yes = "$link_static"; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs=$temp_deplibs
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test no != "$link_all_deplibs"; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path=$deplib ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of '$dir'"
+ absdir=$dir
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names"; then
+ for tmp in $deplibrary_names; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl"; then
+ depdepl=$absdir/$objdir/$depdepl
+ darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+ func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path=-L$absdir/$objdir
+ ;;
+ esac
+ else
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test link = "$pass"; then
+ if test prog = "$linkmode"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs=$newdependency_libs
+ if test dlpreopen = "$pass"; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test dlopen != "$pass"; then
+ test conv = "$pass" || {
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ }
+
+ if test prog,link = "$linkmode,$pass"; then
+ vars="compile_deplibs finalize_deplibs"
+ else
+ vars=deplibs
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+
+ # Add Sun CC postdeps if required:
+ test CXX = "$tagname" && {
+ case $host_os in
+ linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C++ 5.9
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ func_cc_basename "$CC"
+ case $func_cc_basename_result in
+ CC* | sunCC*)
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ }
+
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=
+ ;;
+ esac
+ if test -n "$i"; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test prog = "$linkmode"; then
+ dlfiles=$newdlfiles
+ fi
+ if test prog = "$linkmode" || test lib = "$linkmode"; then
+ dlprefiles=$newdlprefiles
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "'-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs=$output
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form 'libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test no = "$module" \
+ && func_fatal_help "libtool library '$output' must begin with 'lib'"
+
+ if test no != "$need_lib_prefix"; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test pass_all != "$deplibs_check_method"; then
+ func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test no = "$dlself" \
+ || func_warning "'-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test 1 -lt "$#" \
+ && func_warning "ignoring multiple '-rpath's for a libtool library"
+
+ install_libdir=$1
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test yes = "$build_libtool_libs"; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a '.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs=$IFS; IFS=:
+ set dummy $vinfo 0 0 0
+ shift
+ IFS=$save_ifs
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to '-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major=$1
+ number_minor=$2
+ number_revision=$3
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # that has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|freebsd-elf|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_revision
+ ;;
+ freebsd-aout|qnx|sunos)
+ current=$number_major
+ revision=$number_minor
+ age=0
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_minor
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current=$1
+ revision=$2
+ age=$3
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT '$current' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION '$revision' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE '$age' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE '$age' is greater than the current interface number '$current'"
+ func_fatal_error "'$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+ case $CC in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+ *)
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ esac
+ ;;
+
+ freebsd-aout)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ freebsd-elf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ irix | nonstopux)
+ if test no = "$lt_irix_increment"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring=$verstring_prefix$major.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test 0 -ne "$loop"; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring_prefix$major.$iface:$verstring
+ done
+
+ # Before this point, $major must not contain '.'.
+ major=.$major
+ versuffix=$major.$revision
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=.$current.$age.$revision
+ verstring=$current.$age.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test 0 -ne "$loop"; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring:$iface.0
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":$current.0"
+ ;;
+
+ qnx)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sco)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sunos)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 file systems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type '$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring=0.0
+ ;;
+ esac
+ if test no = "$need_version"; then
+ versuffix=
+ else
+ versuffix=.0.0
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test yes,no = "$avoid_version,$need_version"; then
+ major=
+ versuffix=
+ verstring=
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test yes = "$allow_undefined"; then
+ if test unsupported = "$allow_undefined_flag"; then
+ if test yes = "$build_old_libs"; then
+ func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+ build_libtool_libs=no
+ else
+ func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+ fi
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag=$no_undefined_flag
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" :
+ func_append libobjs " $symfileobj"
+ test " " = "$libobjs" && libobjs=
+
+ if test relink != "$opt_mode"; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+ if test -n "$precious_files_regex"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles=$dlfiles
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles=$dlprefiles
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test yes = "$build_libtool_need_lc"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=
+ versuffix=
+ major=
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test yes = "$want_nocaseglob"; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib=$potent_lib
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib=$potent_lib # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ for i in $predeps $postdeps; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test none = "$deplibs_check_method"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test yes = "$droppeddeps"; then
+ if test yes = "$module"; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test no = "$allow_undefined"; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs=$new_libs
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test yes = "$build_libtool_libs"; then
+ # Remove $wl instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test yes = "$hardcode_into_libs"; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath=$finalize_rpath
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath=$finalize_shlibpath
+ test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib=$output_objdir/$realname
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols=$output_objdir/$libname.uexp
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols=$export_symbols
+ export_symbols=
+ always_export_symbols=yes
+ }
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs=$IFS; IFS='~'
+ for cmd1 in $cmds; do
+ IFS=$save_ifs
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test yes = "$try_normal_branch" \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=$output_objdir/$output_la.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS=$save_ifs
+ if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs=$tmp_deplibs
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test yes = "$compiler_needs_object" &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test : != "$skipped_export" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test yes = "$compiler_needs_object"; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-$k.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test -z "$objlist" ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test 1 -eq "$k"; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-$k.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-$k.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ ${skipped_export-false} && {
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ }
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs=$IFS; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ ${skipped_export-false} && {
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ }
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $cmds; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test yes = "$module" || test yes = "$export_dynamic"; then
+ # On all known operating systems, these are identical.
+ dlname=$soname
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object '$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj=$output
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # if reload_cmds runs $LD directly, get rid of -Wl from
+ # whole_archive_flag_spec and hope we can get by with turning comma
+ # into space.
+ case $reload_cmds in
+ *\$LD[\ \$]*) wl= ;;
+ esac
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+ else
+ gentop=$output_objdir/${obj}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
+ # Create the old-style object.
+ reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+
+ output=$obj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ test yes = "$build_libtool_libs" || {
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ }
+
+ if test -n "$pic_flag" || test default != "$pic_mode"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output=$libobj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for programs"
+
+ $preload \
+ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test CXX = "$tagname"; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " $wl-bind_at_load"
+ func_append finalize_command " $wl-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs=$new_libs
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath=$rpath
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath=$rpath
+
+ if test -n "$libobjs" && test yes = "$build_old_libs"; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" false
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=:
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+ *cygwin* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+ if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+ wrappers_required=false
+ fi
+ ;;
+ esac
+ $wrappers_required || {
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command=$compile_command$compile_rpath
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.$objext"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+ fi
+
+ exit $exit_status
+ }
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test yes = "$no_install"; then
+ # We don't need to create a wrapper script.
+ link_command=$compile_var$compile_command$compile_rpath
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ case $hardcode_action,$fast_install in
+ relink,*)
+ # Fast installation is not supported
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "'$output' will be relinked during installation"
+ ;;
+ *,yes)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource=$output_path/$objdir/lt-$output_name.c
+ cwrapper=$output_path/$output_name.exe
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host"; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ case $build_libtool_libs in
+ convenience)
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs=$convenience
+ build_libtool_libs=no
+ ;;
+ module)
+ oldobjs=$libobjs_save
+ addlibs=$old_convenience
+ build_libtool_libs=no
+ ;;
+ *)
+ oldobjs="$old_deplibs $non_pic_objects"
+ $preload && test -f "$symfileobj" \
+ && func_append oldobjs " $symfileobj"
+ addlibs=$old_convenience
+ ;;
+ esac
+
+ if test -n "$addlibs"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase=$func_basename_result
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj"; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test -z "$oldobjs"; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test yes = "$build_old_libs" && old_library=$libname.$libext
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test yes = "$hardcode_automatic"; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test yes = "$installed"; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output=$output_objdir/${outputname}i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name=$func_basename_result
+ func_resolve_sysroot "$deplib"
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs=$newdependency_libs
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles=$newdlprefiles
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles=$newdlprefiles
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result/$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test no,yes = "$installed,$need_relink"; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+ func_mode_link ${1+"$@"}
+fi
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $debug_cmd
+
+ RM=$nonopt
+ files=
+ rmforce=false
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=: ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ if test . = "$dir"; then
+ odir=$objdir
+ else
+ odir=$dir/$objdir
+ fi
+ func_basename "$file"
+ name=$func_basename_result
+ test uninstall = "$opt_mode" && odir=$dir
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test clean = "$opt_mode"; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif $rmforce; then
+ continue
+ fi
+
+ rmfiles=$file
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case $opt_mode in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" && test none != "$pic_object"; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test clean = "$opt_mode"; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+ if test yes = "$fast_install" && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name"; then
+ func_append rmfiles " $odir/lt-$noexename.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the $objdir's in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+ func_mode_uninstall ${1+"$@"}
+fi
+
+test -z "$opt_mode" && {
+ help=$generic_help
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode '$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# where we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/contrib/ntp/sntp/libevent/m4/ax_check_funcs_ex.m4 b/contrib/ntp/sntp/libevent/m4/ax_check_funcs_ex.m4
new file mode 100644
index 000000000000..7aaa58b054d5
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/m4/ax_check_funcs_ex.m4
@@ -0,0 +1,22 @@
+# Check if the function is available.
+# HAVE_XXX will be defined if yes.
+
+# $1: the name of function
+# $2: the headers in where the function declared
+AC_DEFUN([AX_CHECK_DECL_EX], [dnl
+ AS_IF([test "x$2" = "x"], [AC_MSG_ERROR([header not privided])])
+ AS_VAR_PUSHDEF([have_func_var], [HAVE_[]m4_toupper($1)])
+ AC_CHECK_DECL([$1],dnl
+ [AC_DEFINE([have_func_var], [1], [Define to 1 if you have the `$1' function.])],,dnl
+ [$2]dnl
+ )
+ AS_VAR_POPDEF([have_func_var])dnl
+])
+
+AC_DEFUN([AX_CHECK_DECLS_EX], [dnl
+ AS_IF([test "x$2" = "x"], [AC_MSG_ERROR([header not privided])])
+ m4_foreach([decl],dnl
+ m4_split(m4_normalize($1)),dnl
+ [AX_CHECK_DECL_EX([decl], [$2])]dnl
+ )
+])
diff --git a/contrib/ntp/sntp/libevent/m4/ax_prog_doxygen.m4 b/contrib/ntp/sntp/libevent/m4/ax_prog_doxygen.m4
new file mode 100644
index 000000000000..e5bdeb5992dc
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/m4/ax_prog_doxygen.m4
@@ -0,0 +1,600 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# DX_INIT_DOXYGEN(PROJECT-NAME, [DOXYFILE-PATH], [OUTPUT-DIR], ...)
+# DX_DOXYGEN_FEATURE(ON|OFF)
+# DX_DOT_FEATURE(ON|OFF)
+# DX_HTML_FEATURE(ON|OFF)
+# DX_CHM_FEATURE(ON|OFF)
+# DX_CHI_FEATURE(ON|OFF)
+# DX_MAN_FEATURE(ON|OFF)
+# DX_RTF_FEATURE(ON|OFF)
+# DX_XML_FEATURE(ON|OFF)
+# DX_PDF_FEATURE(ON|OFF)
+# DX_PS_FEATURE(ON|OFF)
+#
+# DESCRIPTION
+#
+# The DX_*_FEATURE macros control the default setting for the given
+# Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for
+# generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML
+# help (for MS users), 'CHI' for generating a separate .chi file by the
+# .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate
+# output formats. The environment variable DOXYGEN_PAPER_SIZE may be
+# specified to override the default 'a4wide' paper size.
+#
+# By default, HTML, PDF and PS documentation is generated as this seems to
+# be the most popular and portable combination. MAN pages created by
+# Doxygen are usually problematic, though by picking an appropriate subset
+# and doing some massaging they might be better than nothing. CHM and RTF
+# are specific for MS (note that you can't generate both HTML and CHM at
+# the same time). The XML is rather useless unless you apply specialized
+# post-processing to it.
+#
+# The macros mainly control the default state of the feature. The use can
+# override the default by specifying --enable or --disable. The macros
+# ensure that contradictory flags are not given (e.g.,
+# --enable-doxygen-html and --enable-doxygen-chm,
+# --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each
+# feature will be automatically disabled (with a warning) if the required
+# programs are missing.
+#
+# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN
+# with the following parameters: a one-word name for the project for use
+# as a filename base etc., an optional configuration file name (the
+# default is '$(srcdir)/Doxyfile', the same as Doxygen's default), and an
+# optional output directory name (the default is 'doxygen-doc'). To run
+# doxygen multiple times for different configuration files and output
+# directories provide more parameters: the second, forth, sixth, etc
+# parameter are configuration file names and the third, fifth, seventh,
+# etc parameter are output directories. No checking is done to catch
+# duplicates.
+#
+# Automake Support
+#
+# The DX_RULES substitution can be used to add all needed rules to the
+# Makefile. Note that this is a substitution without being a variable:
+# only the @DX_RULES@ syntax will work.
+#
+# The provided targets are:
+#
+# doxygen-doc: Generate all doxygen documentation.
+#
+# doxygen-run: Run doxygen, which will generate some of the
+# documentation (HTML, CHM, CHI, MAN, RTF, XML)
+# but will not do the post processing required
+# for the rest of it (PS, PDF).
+#
+# doxygen-ps: Generate doxygen PostScript documentation.
+#
+# doxygen-pdf: Generate doxygen PDF documentation.
+#
+# Note that by default these are not integrated into the automake targets.
+# If doxygen is used to generate man pages, you can achieve this
+# integration by setting man3_MANS to the list of man pages generated and
+# then adding the dependency:
+#
+# $(man3_MANS): doxygen-doc
+#
+# This will cause make to run doxygen and generate all the documentation.
+#
+# The following variable is intended for use in Makefile.am:
+#
+# DX_CLEANFILES = everything to clean.
+#
+# Then add this variable to MOSTLYCLEANFILES.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Oren Ben-Kiki <oren@ben-kiki.org>
+# Copyright (c) 2015 Olaf Mandel <olaf@mandel.name>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 24
+
+## ----------##
+## Defaults. ##
+## ----------##
+
+DX_ENV=""
+AC_DEFUN([DX_FEATURE_doc], OFF)
+AC_DEFUN([DX_FEATURE_dot], OFF)
+AC_DEFUN([DX_FEATURE_man], OFF)
+AC_DEFUN([DX_FEATURE_html], ON)
+AC_DEFUN([DX_FEATURE_chm], OFF)
+AC_DEFUN([DX_FEATURE_chi], OFF)
+AC_DEFUN([DX_FEATURE_rtf], OFF)
+AC_DEFUN([DX_FEATURE_xml], OFF)
+AC_DEFUN([DX_FEATURE_pdf], ON)
+AC_DEFUN([DX_FEATURE_ps], ON)
+
+## --------------- ##
+## Private macros. ##
+## --------------- ##
+
+# DX_ENV_APPEND(VARIABLE, VALUE)
+# ------------------------------
+# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen and add it
+# as a substitution (but not a Makefile variable). The substitution
+# is skipped if the variable name is VERSION.
+AC_DEFUN([DX_ENV_APPEND],
+[AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])dnl
+m4_if([$1], [VERSION], [], [AC_SUBST([$1], [$2])dnl
+AM_SUBST_NOTMAKE([$1])])dnl
+])
+
+# DX_DIRNAME_EXPR
+# ---------------
+# Expand into a shell expression prints the directory part of a path.
+AC_DEFUN([DX_DIRNAME_EXPR],
+ [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
+
+# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
+# -------------------------------------
+# Expands according to the M4 (static) status of the feature.
+AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
+
+# DX_REQUIRE_PROG(VARIABLE, PROGRAM)
+# ----------------------------------
+# Require the specified program to be found for the DX_CURRENT_FEATURE to work.
+AC_DEFUN([DX_REQUIRE_PROG], [
+AC_PATH_TOOL([$1], [$2])
+if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
+ if test "x$2" = "xdoxygen"; then
+ AC_MSG_ERROR([$2 not found - will not DX_CURRENT_DESCRIPTION])
+ else
+ AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
+ fi
+ AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
+fi
+])
+
+# DX_TEST_FEATURE(FEATURE)
+# ------------------------
+# Expand to a shell expression testing whether the feature is active.
+AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
+
+# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
+# -------------------------------------------------
+# Verify that a required features has the right state before trying to turn on
+# the DX_CURRENT_FEATURE.
+AC_DEFUN([DX_CHECK_DEPEND], [
+test "$DX_FLAG_$1" = "$2" \
+|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
+ requires, contradicts) doxygen-$1])
+])
+
+# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
+# ----------------------------------------------------------
+# Turn off the DX_CURRENT_FEATURE if the required feature is off.
+AC_DEFUN([DX_CLEAR_DEPEND], [
+test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
+])
+
+# DX_FEATURE_ARG(FEATURE, DESCRIPTION,
+# CHECK_DEPEND, CLEAR_DEPEND,
+# REQUIRE, DO-IF-ON, DO-IF-OFF)
+# --------------------------------------------
+# Parse the command-line option controlling a feature. CHECK_DEPEND is called
+# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
+# otherwise CLEAR_DEPEND is called to turn off the default state if a required
+# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
+# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
+# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
+AC_DEFUN([DX_ARG_ABLE], [
+ AC_DEFUN([DX_CURRENT_FEATURE], [$1])
+ AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
+ AC_ARG_ENABLE(doxygen-$1,
+ [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
+ [--enable-doxygen-$1]),
+ DX_IF_FEATURE([$1], [don't $2], [$2]))],
+ [
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ AC_SUBST([DX_FLAG_$1], 1)
+ $3
+;; #(
+n|N|no|No|NO)
+ AC_SUBST([DX_FLAG_$1], 0)
+;; #(
+*)
+ AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
+;;
+esac
+], [
+AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
+$4
+])
+if DX_TEST_FEATURE([$1]); then
+ $5
+ :
+fi
+if DX_TEST_FEATURE([$1]); then
+ $6
+ :
+else
+ $7
+ :
+fi
+])
+
+## -------------- ##
+## Public macros. ##
+## -------------- ##
+
+# DX_XXX_FEATURE(DEFAULT_STATE)
+# -----------------------------
+AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])])
+AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])])
+AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])])
+AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])])
+AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])])
+AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])])
+AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])])
+AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
+AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
+AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])])
+AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])])
+
+# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR], ...)
+# --------------------------------------------------------------
+# PROJECT also serves as the base name for the documentation files.
+# The default CONFIG-FILE is "$(srcdir)/Doxyfile" and OUTPUT-DOC-DIR is
+# "doxygen-doc".
+# More arguments are interpreted as interleaved CONFIG-FILE and
+# OUTPUT-DOC-DIR values.
+AC_DEFUN([DX_INIT_DOXYGEN], [
+
+# Files:
+AC_SUBST([DX_PROJECT], [$1])
+AC_SUBST([DX_CONFIG], ['ifelse([$2], [], [$(srcdir)/Doxyfile], [$2])'])
+AC_SUBST([DX_DOCDIR], ['ifelse([$3], [], [doxygen-doc], [$3])'])
+m4_if(m4_eval(3 < m4_count($@)), 1, [m4_for([DX_i], 4, m4_count($@), 2,
+ [AC_SUBST([DX_CONFIG]m4_eval(DX_i[/2]),
+ 'm4_default_nblank_quoted(m4_argn(DX_i, $@),
+ [$(srcdir)/Doxyfile])')])])dnl
+m4_if(m4_eval(3 < m4_count($@)), 1, [m4_for([DX_i], 5, m4_count($@,), 2,
+ [AC_SUBST([DX_DOCDIR]m4_eval([(]DX_i[-1)/2]),
+ 'm4_default_nblank_quoted(m4_argn(DX_i, $@),
+ [doxygen-doc])')])])dnl
+m4_define([DX_loop], m4_dquote(m4_if(m4_eval(3 < m4_count($@)), 1,
+ [m4_for([DX_i], 4, m4_count($@), 2, [, m4_eval(DX_i[/2])])],
+ [])))dnl
+
+# Environment variables used inside doxygen.cfg:
+DX_ENV_APPEND(SRCDIR, $srcdir)
+DX_ENV_APPEND(PROJECT, $DX_PROJECT)
+DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
+
+# Doxygen itself:
+DX_ARG_ABLE(doc, [generate any doxygen documentation],
+ [],
+ [],
+ [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
+ DX_REQUIRE_PROG([DX_PERL], perl)],
+ [DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
+
+# Dot for graphics:
+DX_ARG_ABLE(dot, [generate graphics for doxygen documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_DOT], dot)],
+ [DX_ENV_APPEND(HAVE_DOT, YES)
+ DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
+ [DX_ENV_APPEND(HAVE_DOT, NO)])
+
+# Man pages generation:
+DX_ARG_ABLE(man, [generate doxygen manual pages],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_MAN, YES)],
+ [DX_ENV_APPEND(GENERATE_MAN, NO)])
+
+# RTF file generation:
+DX_ARG_ABLE(rtf, [generate doxygen RTF documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_RTF, YES)],
+ [DX_ENV_APPEND(GENERATE_RTF, NO)])
+
+# XML file generation:
+DX_ARG_ABLE(xml, [generate doxygen XML documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_XML, YES)],
+ [DX_ENV_APPEND(GENERATE_XML, NO)])
+
+# (Compressed) HTML help generation:
+DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_HHC], hhc)],
+ [DX_ENV_APPEND(HHC_PATH, $DX_HHC)
+ DX_ENV_APPEND(GENERATE_HTML, YES)
+ DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
+ [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
+
+# Separate CHI file generation.
+DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file],
+ [DX_CHECK_DEPEND(chm, 1)],
+ [DX_CLEAR_DEPEND(chm, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_CHI, YES)],
+ [DX_ENV_APPEND(GENERATE_CHI, NO)])
+
+# Plain HTML pages generation:
+DX_ARG_ABLE(html, [generate doxygen plain HTML documentation],
+ [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
+ [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
+ [],
+ [DX_ENV_APPEND(GENERATE_HTML, YES)],
+ [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
+
+# PostScript file generation:
+DX_ARG_ABLE(ps, [generate doxygen PostScript documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_LATEX], latex)
+ DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
+ DX_REQUIRE_PROG([DX_DVIPS], dvips)
+ DX_REQUIRE_PROG([DX_EGREP], egrep)])
+
+# PDF file generation:
+DX_ARG_ABLE(pdf, [generate doxygen PDF documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
+ DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
+ DX_REQUIRE_PROG([DX_EGREP], egrep)])
+
+# LaTeX generation for PS and/or PDF:
+if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
+ DX_ENV_APPEND(GENERATE_LATEX, YES)
+else
+ DX_ENV_APPEND(GENERATE_LATEX, NO)
+fi
+
+# Paper size for PS and/or PDF:
+AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
+ [a4wide (default), a4, letter, legal or executive])
+case "$DOXYGEN_PAPER_SIZE" in
+#(
+"")
+ AC_SUBST(DOXYGEN_PAPER_SIZE, "")
+;; #(
+a4wide|a4|letter|legal|executive)
+ DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
+;; #(
+*)
+ AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
+;;
+esac
+
+# Rules:
+AS_IF([[test $DX_FLAG_html -eq 1]],
+[[DX_SNIPPET_html="## ------------------------------- ##
+## Rules specific for HTML output. ##
+## ------------------------------- ##
+
+DX_CLEAN_HTML = \$(DX_DOCDIR)/html]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/html]])[
+
+"]],
+[[DX_SNIPPET_html=""]])
+AS_IF([[test $DX_FLAG_chi -eq 1]],
+[[DX_SNIPPET_chi="
+DX_CLEAN_CHI = \$(DX_DOCDIR)/\$(PACKAGE).chi]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).chi]])["]],
+[[DX_SNIPPET_chi=""]])
+AS_IF([[test $DX_FLAG_chm -eq 1]],
+[[DX_SNIPPET_chm="## ------------------------------ ##
+## Rules specific for CHM output. ##
+## ------------------------------ ##
+
+DX_CLEAN_CHM = \$(DX_DOCDIR)/chm]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/chm]])[\
+${DX_SNIPPET_chi}
+
+"]],
+[[DX_SNIPPET_chm=""]])
+AS_IF([[test $DX_FLAG_man -eq 1]],
+[[DX_SNIPPET_man="## ------------------------------ ##
+## Rules specific for MAN output. ##
+## ------------------------------ ##
+
+DX_CLEAN_MAN = \$(DX_DOCDIR)/man]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/man]])[
+
+"]],
+[[DX_SNIPPET_man=""]])
+AS_IF([[test $DX_FLAG_rtf -eq 1]],
+[[DX_SNIPPET_rtf="## ------------------------------ ##
+## Rules specific for RTF output. ##
+## ------------------------------ ##
+
+DX_CLEAN_RTF = \$(DX_DOCDIR)/rtf]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/rtf]])[
+
+"]],
+[[DX_SNIPPET_rtf=""]])
+AS_IF([[test $DX_FLAG_xml -eq 1]],
+[[DX_SNIPPET_xml="## ------------------------------ ##
+## Rules specific for XML output. ##
+## ------------------------------ ##
+
+DX_CLEAN_XML = \$(DX_DOCDIR)/xml]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/xml]])[
+
+"]],
+[[DX_SNIPPET_xml=""]])
+AS_IF([[test $DX_FLAG_ps -eq 1]],
+[[DX_SNIPPET_ps="## ----------------------------- ##
+## Rules specific for PS output. ##
+## ----------------------------- ##
+
+DX_CLEAN_PS = \$(DX_DOCDIR)/\$(PACKAGE).ps]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).ps]])[
+
+DX_PS_GOAL = doxygen-ps
+
+doxygen-ps: \$(DX_CLEAN_PS)
+
+]m4_foreach([DX_i], [DX_loop],
+[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).ps: \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag
+ \$(DX_V_LATEX)cd \$(DX_DOCDIR]DX_i[)/latex; \\
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\
+ \$(DX_LATEX) refman.tex; \\
+ \$(DX_MAKEINDEX) refman.idx; \\
+ \$(DX_LATEX) refman.tex; \\
+ countdown=5; \\
+ while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\
+ refman.log > /dev/null 2>&1 \\
+ && test \$\$countdown -gt 0; do \\
+ \$(DX_LATEX) refman.tex; \\
+ countdown=\`expr \$\$countdown - 1\`; \\
+ done; \\
+ \$(DX_DVIPS) -o ../\$(PACKAGE).ps refman.dvi
+
+]])["]],
+[[DX_SNIPPET_ps=""]])
+AS_IF([[test $DX_FLAG_pdf -eq 1]],
+[[DX_SNIPPET_pdf="## ------------------------------ ##
+## Rules specific for PDF output. ##
+## ------------------------------ ##
+
+DX_CLEAN_PDF = \$(DX_DOCDIR)/\$(PACKAGE).pdf]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).pdf]])[
+
+DX_PDF_GOAL = doxygen-pdf
+
+doxygen-pdf: \$(DX_CLEAN_PDF)
+
+]m4_foreach([DX_i], [DX_loop],
+[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).pdf: \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag
+ \$(DX_V_LATEX)cd \$(DX_DOCDIR]DX_i[)/latex; \\
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ \$(DX_MAKEINDEX) refman.idx; \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ countdown=5; \\
+ while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\
+ refman.log > /dev/null 2>&1 \\
+ && test \$\$countdown -gt 0; do \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ countdown=\`expr \$\$countdown - 1\`; \\
+ done; \\
+ mv refman.pdf ../\$(PACKAGE).pdf
+
+]])["]],
+[[DX_SNIPPET_pdf=""]])
+AS_IF([[test $DX_FLAG_ps -eq 1 -o $DX_FLAG_pdf -eq 1]],
+[[DX_SNIPPET_latex="## ------------------------------------------------- ##
+## Rules specific for LaTeX (shared for PS and PDF). ##
+## ------------------------------------------------- ##
+
+DX_V_LATEX = \$(_DX_v_LATEX_\$(V))
+_DX_v_LATEX_ = \$(_DX_v_LATEX_\$(AM_DEFAULT_VERBOSITY))
+_DX_v_LATEX_0 = @echo \" LATEX \" \$][@;
+
+DX_CLEAN_LATEX = \$(DX_DOCDIR)/latex]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/latex]])[
+
+"]],
+[[DX_SNIPPET_latex=""]])
+
+AS_IF([[test $DX_FLAG_doc -eq 1]],
+[[DX_SNIPPET_doc="## --------------------------------- ##
+## Format-independent Doxygen rules. ##
+## --------------------------------- ##
+
+${DX_SNIPPET_html}\
+${DX_SNIPPET_chm}\
+${DX_SNIPPET_man}\
+${DX_SNIPPET_rtf}\
+${DX_SNIPPET_xml}\
+${DX_SNIPPET_ps}\
+${DX_SNIPPET_pdf}\
+${DX_SNIPPET_latex}\
+DX_V_DXGEN = \$(_DX_v_DXGEN_\$(V))
+_DX_v_DXGEN_ = \$(_DX_v_DXGEN_\$(AM_DEFAULT_VERBOSITY))
+_DX_v_DXGEN_0 = @echo \" DXGEN \" \$<;
+
+.PHONY: doxygen-run doxygen-doc \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+.INTERMEDIATE: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+doxygen-run:]m4_foreach([DX_i], [DX_loop],
+ [[ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag]])[
+
+doxygen-doc: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+]m4_foreach([DX_i], [DX_loop],
+[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag: \$(DX_CONFIG]DX_i[) \$(pkginclude_HEADERS)
+ \$(A""M_V_at)rm -rf \$(DX_DOCDIR]DX_i[)
+ \$(DX_V_DXGEN)\$(DX_ENV) DOCDIR=\$(DX_DOCDIR]DX_i[) \$(DX_DOXYGEN) \$(DX_CONFIG]DX_i[)
+ \$(A""M_V_at)echo Timestamp >\$][@
+
+]])dnl
+[DX_CLEANFILES = \\]
+m4_foreach([DX_i], [DX_loop],
+[[ \$(DX_DOCDIR]DX_i[)/doxygen_sqlite3.db \\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag \\
+]])dnl
+[ -r \\
+ \$(DX_CLEAN_HTML) \\
+ \$(DX_CLEAN_CHM) \\
+ \$(DX_CLEAN_CHI) \\
+ \$(DX_CLEAN_MAN) \\
+ \$(DX_CLEAN_RTF) \\
+ \$(DX_CLEAN_XML) \\
+ \$(DX_CLEAN_PS) \\
+ \$(DX_CLEAN_PDF) \\
+ \$(DX_CLEAN_LATEX)
+DX_INSTALL_DOCS = \\
+ \$(DX_CLEAN_HTML) \\
+ \$(DX_CLEAN_CHM) \\
+ \$(DX_CLEAN_CHI) \\
+ \$(DX_CLEAN_RTF) \\
+ \$(DX_CLEAN_XML) \\
+ \$(DX_CLEAN_PS) \\
+ \$(DX_CLEAN_PDF) \\
+ \$(DX_CLEAN_LATEX)
+ "]],
+[[DX_SNIPPET_doc=""]])
+AC_SUBST([DX_RULES],
+["${DX_SNIPPET_doc}"])dnl
+AM_SUBST_NOTMAKE([DX_RULES])
+
+#For debugging:
+#echo DX_FLAG_doc=$DX_FLAG_doc
+#echo DX_FLAG_dot=$DX_FLAG_dot
+#echo DX_FLAG_man=$DX_FLAG_man
+#echo DX_FLAG_html=$DX_FLAG_html
+#echo DX_FLAG_chm=$DX_FLAG_chm
+#echo DX_FLAG_chi=$DX_FLAG_chi
+#echo DX_FLAG_rtf=$DX_FLAG_rtf
+#echo DX_FLAG_xml=$DX_FLAG_xml
+#echo DX_FLAG_pdf=$DX_FLAG_pdf
+#echo DX_FLAG_ps=$DX_FLAG_ps
+#echo DX_ENV=$DX_ENV
+])
diff --git a/contrib/ntp/sntp/libevent/m4/libevent_openssl.m4 b/contrib/ntp/sntp/libevent/m4/libevent_openssl.m4
index 3cb064a0bd36..a5ea67620067 100644
--- a/contrib/ntp/sntp/libevent/m4/libevent_openssl.m4
+++ b/contrib/ntp/sntp/libevent/m4/libevent_openssl.m4
@@ -26,18 +26,32 @@ case "$enable_openssl" in
save_LIBS="$LIBS"
LIBS=""
OPENSSL_LIBS=""
- AC_SEARCH_LIBS([SSL_new], [ssl],
- [have_openssl=yes
- OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"],
- [have_openssl=no],
- [-lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD])
- LIBS="$save_LIBS"
+ for lib in crypto eay32; do
+ # clear cache
+ unset ac_cv_search_SSL_new
+ AC_SEARCH_LIBS([SSL_new], [ssl ssl32],
+ [have_openssl=yes
+ OPENSSL_LIBS="$LIBS -l$lib $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"],
+ [have_openssl=no],
+ [-l$lib $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD])
+ LIBS="$save_LIBS"
+ test "$have_openssl" = "yes" && break
+ done
;;
esac
+ CPPFLAGS_SAVE=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $OPENSSL_INCS"
+ AC_CHECK_HEADERS([openssl/ssl.h], [], [have_openssl=no])
+ CPPFLAGS=$CPPFLAGS_SAVE
AC_SUBST(OPENSSL_INCS)
AC_SUBST(OPENSSL_LIBS)
case "$have_openssl" in
yes) AC_DEFINE(HAVE_OPENSSL, 1, [Define if the system has openssl]) ;;
+ *) AC_MSG_ERROR([openssl is a must but can not be found. You should add the \
+directory containing `openssl.pc' to the `PKG_CONFIG_PATH' environment variable, \
+or set `CFLAGS' and `LDFLAGS' directly for openssl, or use `--disable-openssl' \
+to disable support for openssl encryption])
+ ;;
esac
;;
esac
diff --git a/contrib/ntp/sntp/libevent/make-event-config.sed b/contrib/ntp/sntp/libevent/make-event-config.sed
index e31018a2dd55..3dc404b5cc47 100644
--- a/contrib/ntp/sntp/libevent/make-event-config.sed
+++ b/contrib/ntp/sntp/libevent/make-event-config.sed
@@ -18,6 +18,10 @@ $a\
\
#endif /* event2/event-config.h */
-s/#\( *\)define /#\1define EVENT__/
-s/#\( *\)undef /#\1undef EVENT__/
-s/#\( *\)if\(n*\)def /#\1if\2def EVENT__/
+/#\( *\)undef STDC_HEADERS\>/b
+/#\( *\)define STDC_HEADERS\>/b
+
+# Only rewrite symbols starting with capitals
+s/#\( *\)define \([A-Z]\)/#\1define EVENT__\2/
+s/#\( *\)undef \([A-Z]\)/#\1undef EVENT__\2/
+s/#\( *\)if\(n*\)def \([A-Z]\)/#\1if\2def EVENT__\2/
diff --git a/contrib/ntp/sntp/libevent/minheap-internal.h b/contrib/ntp/sntp/libevent/minheap-internal.h
index b3b6f1fd497e..b3a0eb1fb589 100644
--- a/contrib/ntp/sntp/libevent/minheap-internal.h
+++ b/contrib/ntp/sntp/libevent/minheap-internal.h
@@ -70,7 +70,7 @@ struct event* min_heap_top_(min_heap_t* s) { return s->n ? *s->p : 0; }
int min_heap_push_(min_heap_t* s, struct event* e)
{
- if (min_heap_reserve_(s, s->n + 1))
+ if (s->n == UINT32_MAX || min_heap_reserve_(s, s->n + 1))
return -1;
min_heap_shift_up_(s, s->n++, e);
return 0;
@@ -138,6 +138,10 @@ int min_heap_reserve_(min_heap_t* s, unsigned n)
unsigned a = s->a ? s->a * 2 : 8;
if (a < n)
a = n;
+#if (SIZE_MAX == UINT32_MAX)
+ if (a > SIZE_MAX / sizeof *p)
+ return -1;
+#endif
if (!(p = (struct event**)mm_realloc(s->p, a * sizeof *p)))
return -1;
s->p = p;
diff --git a/contrib/ntp/sntp/libevent/missing b/contrib/ntp/sntp/libevent/missing
new file mode 100755
index 000000000000..f62bbae306c7
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/contrib/ntp/sntp/libevent/mm-internal.h b/contrib/ntp/sntp/libevent/mm-internal.h
index 4ba6fce4adaf..7a95c9956120 100644
--- a/contrib/ntp/sntp/libevent/mm-internal.h
+++ b/contrib/ntp/sntp/libevent/mm-internal.h
@@ -43,6 +43,7 @@ extern "C" {
* On failure, set errno to ENOMEM and return NULL.
* If the argument sz is 0, simply return NULL.
*/
+EVENT2_EXPORT_SYMBOL
void *event_mm_malloc_(size_t sz);
/** Allocate memory initialized to zero.
@@ -53,6 +54,7 @@ void *event_mm_malloc_(size_t sz);
* set errno to ENOMEM and return NULL.
* If either arguments are 0, simply return NULL.
*/
+EVENT2_EXPORT_SYMBOL
void *event_mm_calloc_(size_t count, size_t size);
/** Duplicate a string.
@@ -63,9 +65,12 @@ void *event_mm_calloc_(size_t count, size_t size);
* occurs (or would occur) in the process.
* If the argument str is NULL, set errno to EINVAL and return NULL.
*/
+EVENT2_EXPORT_SYMBOL
char *event_mm_strdup_(const char *str);
+EVENT2_EXPORT_SYMBOL
void *event_mm_realloc_(void *p, size_t sz);
+EVENT2_EXPORT_SYMBOL
void event_mm_free_(void *p);
#define mm_malloc(sz) event_mm_malloc_(sz)
#define mm_calloc(count, size) event_mm_calloc_((count), (size))
diff --git a/contrib/ntp/sntp/libevent/openssl-compat.h b/contrib/ntp/sntp/libevent/openssl-compat.h
new file mode 100644
index 000000000000..a23e34251b90
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/openssl-compat.h
@@ -0,0 +1,47 @@
+#ifndef OPENSSL_COMPAT_H
+#define OPENSSL_COMPAT_H
+
+#include <openssl/bio.h>
+#include "util-internal.h"
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+
+static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+{
+ BIO_METHOD *biom = calloc(1, sizeof(BIO_METHOD));
+
+ if (biom != NULL) {
+ biom->type = type;
+ biom->name = name;
+ }
+ return biom;
+}
+
+#define BIO_meth_set_write(b, f) (b)->bwrite = (f)
+#define BIO_meth_set_read(b, f) (b)->bread = (f)
+#define BIO_meth_set_puts(b, f) (b)->bputs = (f)
+#define BIO_meth_set_ctrl(b, f) (b)->ctrl = (f)
+#define BIO_meth_set_create(b, f) (b)->create = (f)
+#define BIO_meth_set_destroy(b, f) (b)->destroy = (f)
+
+#define BIO_set_init(b, val) (b)->init = (val)
+#define BIO_set_data(b, val) (b)->ptr = (val)
+#define BIO_set_shutdown(b, val) (b)->shutdown = (val)
+#define BIO_get_init(b) (b)->init
+#define BIO_get_data(b) (b)->ptr
+#define BIO_get_shutdown(b) (b)->shutdown
+
+#define TLS_method SSLv23_method
+
+#define X509_getm_notBefore X509_get_notBefore
+#define X509_getm_notAfter X509_get_notAfter
+
+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
+
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
+#define BIO_get_init(b) (b)->init
+#endif
+
+#endif /* OPENSSL_COMPAT_H */
diff --git a/contrib/ntp/sntp/libevent/poll.c b/contrib/ntp/sntp/libevent/poll.c
index 51475934b348..c3c9aac52a85 100644
--- a/contrib/ntp/sntp/libevent/poll.c
+++ b/contrib/ntp/sntp/libevent/poll.c
@@ -53,6 +53,17 @@
#include "evthread-internal.h"
#include "time-internal.h"
+/* Since Linux 2.6.17, poll is able to report about peer half-closed connection
+ using special POLLRDHUP flag on a read event.
+*/
+#if !defined(POLLRDHUP)
+#define POLLRDHUP 0
+#define EARLY_CLOSE_IF_HAVE_RDHUP 0
+#else
+#define EARLY_CLOSE_IF_HAVE_RDHUP EV_FEATURE_EARLY_CLOSE
+#endif
+
+
struct pollidx {
int idxplus1;
};
@@ -79,8 +90,8 @@ const struct eventop pollops = {
poll_del,
poll_dispatch,
poll_dealloc,
- 0, /* doesn't need_reinit */
- EV_FEATURE_FDS,
+ 1, /* need_reinit */
+ EV_FEATURE_FDS|EARLY_CLOSE_IF_HAVE_RDHUP,
sizeof(struct pollidx),
};
@@ -198,12 +209,14 @@ poll_dispatch(struct event_base *base, struct timeval *tv)
res = 0;
/* If the file gets closed notify */
- if (what & (POLLHUP|POLLERR))
+ if (what & (POLLHUP|POLLERR|POLLNVAL))
what |= POLLIN|POLLOUT;
if (what & POLLIN)
res |= EV_READ;
if (what & POLLOUT)
res |= EV_WRITE;
+ if (what & POLLRDHUP)
+ res |= EV_CLOSED;
if (res == 0)
continue;
@@ -222,7 +235,7 @@ poll_add(struct event_base *base, int fd, short old, short events, void *idx_)
int i;
EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
- if (!(events & (EV_READ|EV_WRITE)))
+ if (!(events & (EV_READ|EV_WRITE|EV_CLOSED)))
return (0);
poll_check_ok(pop);
@@ -265,6 +278,8 @@ poll_add(struct event_base *base, int fd, short old, short events, void *idx_)
pfd->events |= POLLOUT;
if (events & EV_READ)
pfd->events |= POLLIN;
+ if (events & EV_CLOSED)
+ pfd->events |= POLLRDHUP;
poll_check_ok(pop);
return (0);
@@ -283,7 +298,7 @@ poll_del(struct event_base *base, int fd, short old, short events, void *idx_)
int i;
EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
- if (!(events & (EV_READ|EV_WRITE)))
+ if (!(events & (EV_READ|EV_WRITE|EV_CLOSED)))
return (0);
poll_check_ok(pop);
@@ -297,6 +312,8 @@ poll_del(struct event_base *base, int fd, short old, short events, void *idx_)
pfd->events &= ~POLLIN;
if (events & EV_WRITE)
pfd->events &= ~POLLOUT;
+ if (events & EV_CLOSED)
+ pfd->events &= ~POLLRDHUP;
poll_check_ok(pop);
if (pfd->events)
/* Another event cares about that fd. */
diff --git a/contrib/ntp/sntp/libevent/sample/dns-example.c b/contrib/ntp/sntp/libevent/sample/dns-example.c
new file mode 100644
index 000000000000..2d07c3874bca
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/dns-example.c
@@ -0,0 +1,264 @@
+/*
+ This example code shows how to use the high-level, low-level, and
+ server-level interfaces of evdns.
+
+ XXX It's pretty ugly and should probably be cleaned up.
+ */
+
+#include <event2/event-config.h>
+
+/* Compatibility for possible missing IPv6 declarations */
+#include "../ipv6-internal.h"
+
+#include <sys/types.h>
+
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <getopt.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#include <event2/event.h>
+#include <event2/dns.h>
+#include <event2/dns_struct.h>
+#include <event2/util.h>
+
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define u32 ev_uint32_t
+#define u8 ev_uint8_t
+
+static const char *
+debug_ntoa(u32 address)
+{
+ static char buf[32];
+ u32 a = ntohl(address);
+ evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d",
+ (int)(u8)((a>>24)&0xff),
+ (int)(u8)((a>>16)&0xff),
+ (int)(u8)((a>>8 )&0xff),
+ (int)(u8)((a )&0xff));
+ return buf;
+}
+
+static void
+main_callback(int result, char type, int count, int ttl,
+ void *addrs, void *orig) {
+ char *n = (char*)orig;
+ int i;
+ for (i = 0; i < count; ++i) {
+ if (type == DNS_IPv4_A) {
+ printf("%s: %s\n", n, debug_ntoa(((u32*)addrs)[i]));
+ } else if (type == DNS_PTR) {
+ printf("%s: %s\n", n, ((char**)addrs)[i]);
+ }
+ }
+ if (!count) {
+ printf("%s: No answer (%d)\n", n, result);
+ }
+ fflush(stdout);
+}
+
+static void
+gai_callback(int err, struct evutil_addrinfo *ai, void *arg)
+{
+ const char *name = arg;
+ int i;
+ struct evutil_addrinfo *first_ai = ai;
+
+ if (err) {
+ printf("%s: %s\n", name, evutil_gai_strerror(err));
+ }
+ if (ai && ai->ai_canonname)
+ printf(" %s ==> %s\n", name, ai->ai_canonname);
+ for (i=0; ai; ai = ai->ai_next, ++i) {
+ char buf[128];
+ if (ai->ai_family == PF_INET) {
+ struct sockaddr_in *sin =
+ (struct sockaddr_in*)ai->ai_addr;
+ evutil_inet_ntop(AF_INET, &sin->sin_addr, buf,
+ sizeof(buf));
+ printf("[%d] %s: %s\n",i,name,buf);
+ } else {
+ struct sockaddr_in6 *sin6 =
+ (struct sockaddr_in6*)ai->ai_addr;
+ evutil_inet_ntop(AF_INET6, &sin6->sin6_addr, buf,
+ sizeof(buf));
+ printf("[%d] %s: %s\n",i,name,buf);
+ }
+ }
+
+ if (first_ai)
+ evutil_freeaddrinfo(first_ai);
+}
+
+static void
+evdns_server_callback(struct evdns_server_request *req, void *data)
+{
+ int i, r;
+ (void)data;
+ /* dummy; give 192.168.11.11 as an answer for all A questions,
+ * give foo.bar.example.com as an answer for all PTR questions. */
+ for (i = 0; i < req->nquestions; ++i) {
+ u32 ans = htonl(0xc0a80b0bUL);
+ if (req->questions[i]->type == EVDNS_TYPE_A &&
+ req->questions[i]->dns_question_class == EVDNS_CLASS_INET) {
+ printf(" -- replying for %s (A)\n", req->questions[i]->name);
+ r = evdns_server_request_add_a_reply(req, req->questions[i]->name,
+ 1, &ans, 10);
+ if (r<0)
+ printf("eeep, didn't work.\n");
+ } else if (req->questions[i]->type == EVDNS_TYPE_PTR &&
+ req->questions[i]->dns_question_class == EVDNS_CLASS_INET) {
+ printf(" -- replying for %s (PTR)\n", req->questions[i]->name);
+ r = evdns_server_request_add_ptr_reply(req, NULL, req->questions[i]->name,
+ "foo.bar.example.com", 10);
+ if (r<0)
+ printf("ugh, no luck");
+ } else {
+ printf(" -- skipping %s [%d %d]\n", req->questions[i]->name,
+ req->questions[i]->type, req->questions[i]->dns_question_class);
+ }
+ }
+
+ r = evdns_server_request_respond(req, 0);
+ if (r<0)
+ printf("eeek, couldn't send reply.\n");
+}
+
+static int verbose = 0;
+
+static void
+logfn(int is_warn, const char *msg) {
+ if (!is_warn && !verbose)
+ return;
+ fprintf(stderr, "%s: %s\n", is_warn?"WARN":"INFO", msg);
+}
+
+int
+main(int c, char **v) {
+ struct options {
+ int reverse;
+ int use_getaddrinfo;
+ int servertest;
+ const char *resolv_conf;
+ const char *ns;
+ };
+ struct options o;
+ int opt;
+ struct event_base *event_base = NULL;
+ struct evdns_base *evdns_base = NULL;
+
+ memset(&o, 0, sizeof(o));
+
+ if (c < 2) {
+ fprintf(stderr, "syntax: %s [-x] [-v] [-c resolv.conf] [-s ns] hostname\n", v[0]);
+ fprintf(stderr, "syntax: %s [-T]\n", v[0]);
+ return 1;
+ }
+
+ while ((opt = getopt(c, v, "xvc:Ts:g")) != -1) {
+ switch (opt) {
+ case 'x': o.reverse = 1; break;
+ case 'v': ++verbose; break;
+ case 'g': o.use_getaddrinfo = 1; break;
+ case 'T': o.servertest = 1; break;
+ case 'c': o.resolv_conf = optarg; break;
+ case 's': o.ns = optarg; break;
+ default : fprintf(stderr, "Unknown option %c\n", opt); break;
+ }
+ }
+
+#ifdef _WIN32
+ {
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+ }
+#endif
+
+ event_base = event_base_new();
+ evdns_base = evdns_base_new(event_base, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+ evdns_set_log_fn(logfn);
+
+ if (o.servertest) {
+ evutil_socket_t sock;
+ struct sockaddr_in my_addr;
+ sock = socket(PF_INET, SOCK_DGRAM, 0);
+ if (sock == -1) {
+ perror("socket");
+ exit(1);
+ }
+ evutil_make_socket_nonblocking(sock);
+ my_addr.sin_family = AF_INET;
+ my_addr.sin_port = htons(10053);
+ my_addr.sin_addr.s_addr = INADDR_ANY;
+ if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr))<0) {
+ perror("bind");
+ exit(1);
+ }
+ evdns_add_server_port_with_base(event_base, sock, 0, evdns_server_callback, NULL);
+ }
+ if (optind < c) {
+ int res;
+#ifdef _WIN32
+ if (o.resolv_conf == NULL && !o.ns)
+ res = evdns_base_config_windows_nameservers(evdns_base);
+ else
+#endif
+ if (o.ns)
+ res = evdns_base_nameserver_ip_add(evdns_base, o.ns);
+ else
+ res = evdns_base_resolv_conf_parse(evdns_base,
+ DNS_OPTION_NAMESERVERS, o.resolv_conf);
+
+ if (res) {
+ fprintf(stderr, "Couldn't configure nameservers\n");
+ return 1;
+ }
+ }
+
+ printf("EVUTIL_AI_CANONNAME in example = %d\n", EVUTIL_AI_CANONNAME);
+ for (; optind < c; ++optind) {
+ if (o.reverse) {
+ struct in_addr addr;
+ if (evutil_inet_pton(AF_INET, v[optind], &addr)!=1) {
+ fprintf(stderr, "Skipping non-IP %s\n", v[optind]);
+ continue;
+ }
+ fprintf(stderr, "resolving %s...\n",v[optind]);
+ evdns_base_resolve_reverse(evdns_base, &addr, 0, main_callback, v[optind]);
+ } else if (o.use_getaddrinfo) {
+ struct evutil_addrinfo hints;
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_protocol = IPPROTO_TCP;
+ hints.ai_flags = EVUTIL_AI_CANONNAME;
+ fprintf(stderr, "resolving (fwd) %s...\n",v[optind]);
+ evdns_getaddrinfo(evdns_base, v[optind], NULL, &hints,
+ gai_callback, v[optind]);
+ } else {
+ fprintf(stderr, "resolving (fwd) %s...\n",v[optind]);
+ evdns_base_resolve_ipv4(evdns_base, v[optind], 0, main_callback, v[optind]);
+ }
+ }
+ fflush(stdout);
+ event_base_dispatch(event_base);
+ evdns_base_free(evdns_base, 1);
+ event_base_free(event_base);
+ return 0;
+}
+
diff --git a/contrib/ntp/sntp/libevent/sample/event-read-fifo.c b/contrib/ntp/sntp/libevent/sample/event-read-fifo.c
new file mode 100644
index 000000000000..a17b9bd9ae45
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/event-read-fifo.c
@@ -0,0 +1,162 @@
+/*
+ * This sample code shows how to use Libevent to read from a named pipe.
+ * XXX This code could make better use of the Libevent interfaces.
+ *
+ * XXX This does not work on Windows; ignore everything inside the _WIN32 block.
+ *
+ * On UNIX, compile with:
+ * cc -I/usr/local/include -o event-read-fifo event-read-fifo.c \
+ * -L/usr/local/lib -levent
+ */
+
+#include <event2/event-config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifndef _WIN32
+#include <sys/queue.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <signal.h>
+#else
+#include <winsock2.h>
+#include <windows.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event2/event.h>
+
+static void
+fifo_read(evutil_socket_t fd, short event, void *arg)
+{
+ char buf[255];
+ int len;
+ struct event *ev = arg;
+#ifdef _WIN32
+ DWORD dwBytesRead;
+#endif
+
+ fprintf(stderr, "fifo_read called with fd: %d, event: %d, arg: %p\n",
+ (int)fd, event, arg);
+#ifdef _WIN32
+ len = ReadFile((HANDLE)fd, buf, sizeof(buf) - 1, &dwBytesRead, NULL);
+
+ /* Check for end of file. */
+ if (len && dwBytesRead == 0) {
+ fprintf(stderr, "End Of File");
+ event_del(ev);
+ return;
+ }
+
+ buf[dwBytesRead] = '\0';
+#else
+ len = read(fd, buf, sizeof(buf) - 1);
+
+ if (len <= 0) {
+ if (len == -1)
+ perror("read");
+ else if (len == 0)
+ fprintf(stderr, "Connection closed\n");
+ event_del(ev);
+ event_base_loopbreak(event_get_base(ev));
+ return;
+ }
+
+ buf[len] = '\0';
+#endif
+ fprintf(stdout, "Read: %s\n", buf);
+}
+
+/* On Unix, cleanup event.fifo if SIGINT is received. */
+#ifndef _WIN32
+static void
+signal_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event_base *base = arg;
+ event_base_loopbreak(base);
+}
+#endif
+
+int
+main(int argc, char **argv)
+{
+ struct event *evfifo;
+ struct event_base* base;
+#ifdef _WIN32
+ HANDLE socket;
+ /* Open a file. */
+ socket = CreateFileA("test.txt", /* open File */
+ GENERIC_READ, /* open for reading */
+ 0, /* do not share */
+ NULL, /* no security */
+ OPEN_EXISTING, /* existing file only */
+ FILE_ATTRIBUTE_NORMAL, /* normal file */
+ NULL); /* no attr. template */
+
+ if (socket == INVALID_HANDLE_VALUE)
+ return 1;
+
+#else
+ struct event *signal_int;
+ struct stat st;
+ const char *fifo = "event.fifo";
+ int socket;
+
+ if (lstat(fifo, &st) == 0) {
+ if ((st.st_mode & S_IFMT) == S_IFREG) {
+ errno = EEXIST;
+ perror("lstat");
+ exit(1);
+ }
+ }
+
+ unlink(fifo);
+ if (mkfifo(fifo, 0600) == -1) {
+ perror("mkfifo");
+ exit(1);
+ }
+
+ socket = open(fifo, O_RDONLY | O_NONBLOCK, 0);
+
+ if (socket == -1) {
+ perror("open");
+ exit(1);
+ }
+
+ fprintf(stderr, "Write data to %s\n", fifo);
+#endif
+ /* Initialize the event library */
+ base = event_base_new();
+
+ /* Initialize one event */
+#ifdef _WIN32
+ evfifo = event_new(base, (evutil_socket_t)socket, EV_READ|EV_PERSIST, fifo_read,
+ event_self_cbarg());
+#else
+ /* catch SIGINT so that event.fifo can be cleaned up */
+ signal_int = evsignal_new(base, SIGINT, signal_cb, base);
+ event_add(signal_int, NULL);
+
+ evfifo = event_new(base, socket, EV_READ|EV_PERSIST, fifo_read,
+ event_self_cbarg());
+#endif
+
+ /* Add it to the active events, without a timeout */
+ event_add(evfifo, NULL);
+
+ event_base_dispatch(base);
+ event_base_free(base);
+#ifdef _WIN32
+ CloseHandle(socket);
+#else
+ close(socket);
+ unlink(fifo);
+#endif
+ libevent_global_shutdown();
+ return (0);
+}
+
diff --git a/contrib/ntp/sntp/libevent/sample/hello-world.c b/contrib/ntp/sntp/libevent/sample/hello-world.c
new file mode 100644
index 000000000000..a13e06af612d
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/hello-world.c
@@ -0,0 +1,140 @@
+/*
+ This example program provides a trivial server program that listens for TCP
+ connections on port 9995. When they arrive, it writes a short message to
+ each client connection, and closes each connection once it is flushed.
+
+ Where possible, it exits cleanly in response to a SIGINT (ctrl-c).
+*/
+
+
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+#include <signal.h>
+#ifndef _WIN32
+#include <netinet/in.h>
+# ifdef _XOPEN_SOURCE_EXTENDED
+# include <arpa/inet.h>
+# endif
+#include <sys/socket.h>
+#endif
+
+#include <event2/bufferevent.h>
+#include <event2/buffer.h>
+#include <event2/listener.h>
+#include <event2/util.h>
+#include <event2/event.h>
+
+static const char MESSAGE[] = "Hello, World!\n";
+
+static const int PORT = 9995;
+
+static void listener_cb(struct evconnlistener *, evutil_socket_t,
+ struct sockaddr *, int socklen, void *);
+static void conn_writecb(struct bufferevent *, void *);
+static void conn_eventcb(struct bufferevent *, short, void *);
+static void signal_cb(evutil_socket_t, short, void *);
+
+int
+main(int argc, char **argv)
+{
+ struct event_base *base;
+ struct evconnlistener *listener;
+ struct event *signal_event;
+
+ struct sockaddr_in sin = {0};
+#ifdef _WIN32
+ WSADATA wsa_data;
+ WSAStartup(0x0201, &wsa_data);
+#endif
+
+ base = event_base_new();
+ if (!base) {
+ fprintf(stderr, "Could not initialize libevent!\n");
+ return 1;
+ }
+
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(PORT);
+
+ listener = evconnlistener_new_bind(base, listener_cb, (void *)base,
+ LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_FREE, -1,
+ (struct sockaddr*)&sin,
+ sizeof(sin));
+
+ if (!listener) {
+ fprintf(stderr, "Could not create a listener!\n");
+ return 1;
+ }
+
+ signal_event = evsignal_new(base, SIGINT, signal_cb, (void *)base);
+
+ if (!signal_event || event_add(signal_event, NULL)<0) {
+ fprintf(stderr, "Could not create/add a signal event!\n");
+ return 1;
+ }
+
+ event_base_dispatch(base);
+
+ evconnlistener_free(listener);
+ event_free(signal_event);
+ event_base_free(base);
+
+ printf("done\n");
+ return 0;
+}
+
+static void
+listener_cb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *sa, int socklen, void *user_data)
+{
+ struct event_base *base = user_data;
+ struct bufferevent *bev;
+
+ bev = bufferevent_socket_new(base, fd, BEV_OPT_CLOSE_ON_FREE);
+ if (!bev) {
+ fprintf(stderr, "Error constructing bufferevent!");
+ event_base_loopbreak(base);
+ return;
+ }
+ bufferevent_setcb(bev, NULL, conn_writecb, conn_eventcb, NULL);
+ bufferevent_enable(bev, EV_WRITE);
+ bufferevent_disable(bev, EV_READ);
+
+ bufferevent_write(bev, MESSAGE, strlen(MESSAGE));
+}
+
+static void
+conn_writecb(struct bufferevent *bev, void *user_data)
+{
+ struct evbuffer *output = bufferevent_get_output(bev);
+ if (evbuffer_get_length(output) == 0) {
+ printf("flushed answer\n");
+ bufferevent_free(bev);
+ }
+}
+
+static void
+conn_eventcb(struct bufferevent *bev, short events, void *user_data)
+{
+ if (events & BEV_EVENT_EOF) {
+ printf("Connection closed.\n");
+ } else if (events & BEV_EVENT_ERROR) {
+ printf("Got an error on the connection: %s\n",
+ strerror(errno));/*XXX win32*/
+ }
+ /* None of the other events can happen here, since we haven't enabled
+ * timeouts */
+ bufferevent_free(bev);
+}
+
+static void
+signal_cb(evutil_socket_t sig, short events, void *user_data)
+{
+ struct event_base *base = user_data;
+ struct timeval delay = { 2, 0 };
+
+ printf("Caught an interrupt signal; exiting cleanly in two seconds.\n");
+
+ event_base_loopexit(base, &delay);
+}
diff --git a/contrib/ntp/sntp/libevent/sample/hostcheck.c b/contrib/ntp/sntp/libevent/sample/hostcheck.c
new file mode 100644
index 000000000000..50709369c07e
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/hostcheck.c
@@ -0,0 +1,217 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/* This file is an amalgamation of hostcheck.c and most of rawstr.c
+ from cURL. The contents of the COPYING file mentioned above are:
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2013, Daniel Stenberg, <daniel@haxx.se>.
+
+All rights reserved.
+
+Permission to use, copy, modify, and distribute this software for any purpose
+with or without fee is hereby granted, provided that the above copyright
+notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+*/
+
+#include "hostcheck.h"
+#include <string.h>
+
+/* Portable, consistent toupper (remember EBCDIC). Do not use toupper() because
+ its behavior is altered by the current locale. */
+static char Curl_raw_toupper(char in)
+{
+ switch (in) {
+ case 'a':
+ return 'A';
+ case 'b':
+ return 'B';
+ case 'c':
+ return 'C';
+ case 'd':
+ return 'D';
+ case 'e':
+ return 'E';
+ case 'f':
+ return 'F';
+ case 'g':
+ return 'G';
+ case 'h':
+ return 'H';
+ case 'i':
+ return 'I';
+ case 'j':
+ return 'J';
+ case 'k':
+ return 'K';
+ case 'l':
+ return 'L';
+ case 'm':
+ return 'M';
+ case 'n':
+ return 'N';
+ case 'o':
+ return 'O';
+ case 'p':
+ return 'P';
+ case 'q':
+ return 'Q';
+ case 'r':
+ return 'R';
+ case 's':
+ return 'S';
+ case 't':
+ return 'T';
+ case 'u':
+ return 'U';
+ case 'v':
+ return 'V';
+ case 'w':
+ return 'W';
+ case 'x':
+ return 'X';
+ case 'y':
+ return 'Y';
+ case 'z':
+ return 'Z';
+ }
+ return in;
+}
+
+/*
+ * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant
+ * to be locale independent and only compare strings we know are safe for
+ * this. See http://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for
+ * some further explanation to why this function is necessary.
+ *
+ * The function is capable of comparing a-z case insensitively even for
+ * non-ascii.
+ */
+
+static int Curl_raw_equal(const char *first, const char *second)
+{
+ while(*first && *second) {
+ if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
+ /* get out of the loop as soon as they don't match */
+ break;
+ first++;
+ second++;
+ }
+ /* we do the comparison here (possibly again), just to make sure that if the
+ loop above is skipped because one of the strings reached zero, we must not
+ return this as a successful match */
+ return (Curl_raw_toupper(*first) == Curl_raw_toupper(*second));
+}
+
+static int Curl_raw_nequal(const char *first, const char *second, size_t max)
+{
+ while(*first && *second && max) {
+ if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) {
+ break;
+ }
+ max--;
+ first++;
+ second++;
+ }
+ if(0 == max)
+ return 1; /* they are equal this far */
+
+ return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
+}
+
+/*
+ * Match a hostname against a wildcard pattern.
+ * E.g.
+ * "foo.host.com" matches "*.host.com".
+ *
+ * We use the matching rule described in RFC6125, section 6.4.3.
+ * http://tools.ietf.org/html/rfc6125#section-6.4.3
+ */
+
+static int hostmatch(const char *hostname, const char *pattern)
+{
+ const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
+ int wildcard_enabled;
+ size_t prefixlen, suffixlen;
+ pattern_wildcard = strchr(pattern, '*');
+ if(pattern_wildcard == NULL)
+ return Curl_raw_equal(pattern, hostname) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+ /* We require at least 2 dots in pattern to avoid too wide wildcard
+ match. */
+ wildcard_enabled = 1;
+ pattern_label_end = strchr(pattern, '.');
+ if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL ||
+ pattern_wildcard > pattern_label_end ||
+ Curl_raw_nequal(pattern, "xn--", 4)) {
+ wildcard_enabled = 0;
+ }
+ if(!wildcard_enabled)
+ return Curl_raw_equal(pattern, hostname) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+ hostname_label_end = strchr(hostname, '.');
+ if(hostname_label_end == NULL ||
+ !Curl_raw_equal(pattern_label_end, hostname_label_end))
+ return CURL_HOST_NOMATCH;
+
+ /* The wildcard must match at least one character, so the left-most
+ label of the hostname is at least as large as the left-most label
+ of the pattern. */
+ if(hostname_label_end - hostname < pattern_label_end - pattern)
+ return CURL_HOST_NOMATCH;
+
+ prefixlen = pattern_wildcard - pattern;
+ suffixlen = pattern_label_end - (pattern_wildcard+1);
+ return Curl_raw_nequal(pattern, hostname, prefixlen) &&
+ Curl_raw_nequal(pattern_wildcard+1, hostname_label_end - suffixlen,
+ suffixlen) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+}
+
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
+{
+ if(!match_pattern || !*match_pattern ||
+ !hostname || !*hostname) /* sanity check */
+ return 0;
+
+ if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */
+ return 1;
+
+ if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH)
+ return 1;
+ return 0;
+}
diff --git a/contrib/ntp/sntp/libevent/sample/hostcheck.h b/contrib/ntp/sntp/libevent/sample/hostcheck.h
new file mode 100644
index 000000000000..f40bc4343501
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/hostcheck.h
@@ -0,0 +1,30 @@
+#ifndef HEADER_CURL_HOSTCHECK_H
+#define HEADER_CURL_HOSTCHECK_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#define CURL_HOST_NOMATCH 0
+#define CURL_HOST_MATCH 1
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname);
+
+#endif /* HEADER_CURL_HOSTCHECK_H */
+
diff --git a/contrib/ntp/sntp/libevent/sample/http-connect.c b/contrib/ntp/sntp/libevent/sample/http-connect.c
new file mode 100644
index 000000000000..53f816d3ae59
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/http-connect.c
@@ -0,0 +1,131 @@
+#include "event2/event-config.h"
+
+#include <event2/event.h>
+#include <event2/http.h>
+#include <event2/http_struct.h>
+#include <event2/buffer.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <limits.h>
+
+#define VERIFY(cond) do { \
+ if (!(cond)) { \
+ fprintf(stderr, "[error] %s\n", #cond); \
+ exit(EXIT_FAILURE); \
+ } \
+} while (0); \
+
+#define URL_MAX 4096
+
+struct connect_base
+{
+ struct evhttp_connection *evcon;
+ struct evhttp_uri *location;
+};
+
+static struct evhttp_uri* uri_parse(const char *str)
+{
+ struct evhttp_uri *uri;
+ VERIFY(uri = evhttp_uri_parse(str));
+ VERIFY(evhttp_uri_get_host(uri));
+ VERIFY(evhttp_uri_get_port(uri) > 0);
+ return uri;
+}
+static char* uri_path(struct evhttp_uri *uri, char buffer[URL_MAX])
+{
+ struct evhttp_uri *path;
+
+ VERIFY(evhttp_uri_join(uri, buffer, URL_MAX));
+
+ path = evhttp_uri_parse(buffer);
+ evhttp_uri_set_scheme(path, NULL);
+ evhttp_uri_set_userinfo(path, 0);
+ evhttp_uri_set_host(path, NULL);
+ evhttp_uri_set_port(path, -1);
+ VERIFY(evhttp_uri_join(path, buffer, URL_MAX));
+ return buffer;
+}
+static char* uri_hostport(struct evhttp_uri *uri, char buffer[URL_MAX])
+{
+ VERIFY(evhttp_uri_join(uri, buffer, URL_MAX));
+ VERIFY(evhttp_uri_get_host(uri));
+ VERIFY(evhttp_uri_get_port(uri) > 0);
+ evutil_snprintf(buffer, URL_MAX, "%s:%d",
+ evhttp_uri_get_host(uri), evhttp_uri_get_port(uri));
+ return buffer;
+}
+
+static void get_cb(struct evhttp_request *req, void *arg)
+{
+ ev_ssize_t len;
+ struct evbuffer *evbuf;
+
+ VERIFY(req);
+
+ evbuf = evhttp_request_get_input_buffer(req);
+ len = evbuffer_get_length(evbuf);
+ fwrite(evbuffer_pullup(evbuf, len), len, 1, stdout);
+ evbuffer_drain(evbuf, len);
+}
+
+static void connect_cb(struct evhttp_request *proxy_req, void *arg)
+{
+ struct connect_base *base = arg;
+ struct evhttp_connection *evcon = base->evcon;
+ struct evhttp_uri *location = base->location;
+ struct evhttp_request *req;
+ char buffer[URL_MAX];
+
+ VERIFY(proxy_req);
+ VERIFY(evcon);
+
+ req = evhttp_request_new(get_cb, NULL);
+ evhttp_add_header(req->output_headers, "Connection", "close");
+ evhttp_add_header(req->output_headers, "Host", evhttp_uri_get_host(location));
+ VERIFY(!evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ uri_path(location, buffer)));
+}
+
+int main(int argc, const char **argv)
+{
+ char hostport[URL_MAX];
+
+ struct evhttp_uri *location;
+ struct evhttp_uri *proxy;
+
+ struct event_base *base;
+ struct evhttp_connection *evcon;
+ struct evhttp_request *req;
+
+ struct connect_base connect_base;
+
+ if (argc != 3) {
+ printf("Usage: %s proxy url\n", argv[0]);
+ return 1;
+ }
+
+ proxy = uri_parse(argv[1]);
+ location = uri_parse(argv[2]);
+
+ VERIFY(base = event_base_new());
+ VERIFY(evcon = evhttp_connection_base_new(base, NULL,
+ evhttp_uri_get_host(proxy), evhttp_uri_get_port(proxy)));
+ connect_base.evcon = evcon;
+ connect_base.location = location;
+ VERIFY(req = evhttp_request_new(connect_cb, &connect_base));
+
+ uri_hostport(location, hostport);
+ evhttp_add_header(req->output_headers, "Connection", "keep-alive");
+ evhttp_add_header(req->output_headers, "Proxy-Connection", "keep-alive");
+ evhttp_add_header(req->output_headers, "Host", hostport);
+ evhttp_make_request(evcon, req, EVHTTP_REQ_CONNECT, hostport);
+
+ event_base_dispatch(base);
+
+ evhttp_connection_free(evcon);
+ event_base_free(base);
+ evhttp_uri_free(proxy);
+ evhttp_uri_free(location);
+
+ return 0;
+}
diff --git a/contrib/ntp/sntp/libevent/sample/http-server.c b/contrib/ntp/sntp/libevent/sample/http-server.c
new file mode 100644
index 000000000000..049aabc4418e
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/http-server.c
@@ -0,0 +1,582 @@
+/*
+ A trivial static http webserver using Libevent's evhttp.
+
+ This is not the best code in the world, and it does some fairly stupid stuff
+ that you would never want to do in a production webserver. Caveat hackor!
+
+ */
+
+/* Compatibility for possible missing IPv6 declarations */
+#include "../util-internal.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <windows.h>
+#include <getopt.h>
+#include <io.h>
+#include <fcntl.h>
+#ifndef S_ISDIR
+#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
+#endif
+#else /* !_WIN32 */
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <dirent.h>
+#endif /* _WIN32 */
+#include <signal.h>
+
+#ifdef EVENT__HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+#ifdef EVENT__HAVE_AFUNIX_H
+#include <afunix.h>
+#endif
+
+#include <event2/event.h>
+#include <event2/http.h>
+#include <event2/listener.h>
+#include <event2/buffer.h>
+#include <event2/util.h>
+#include <event2/keyvalq_struct.h>
+
+#ifdef _WIN32
+#include <event2/thread.h>
+#endif /* _WIN32 */
+
+#ifdef EVENT__HAVE_NETINET_IN_H
+#include <netinet/in.h>
+# ifdef _XOPEN_SOURCE_EXTENDED
+# include <arpa/inet.h>
+# endif
+#endif
+
+#ifdef _WIN32
+#ifndef stat
+#define stat _stat
+#endif
+#ifndef fstat
+#define fstat _fstat
+#endif
+#ifndef open
+#define open _open
+#endif
+#ifndef close
+#define close _close
+#endif
+#ifndef O_RDONLY
+#define O_RDONLY _O_RDONLY
+#endif
+#endif /* _WIN32 */
+
+char uri_root[512];
+
+static const struct table_entry {
+ const char *extension;
+ const char *content_type;
+} content_type_table[] = {
+ { "txt", "text/plain" },
+ { "c", "text/plain" },
+ { "h", "text/plain" },
+ { "html", "text/html" },
+ { "htm", "text/htm" },
+ { "css", "text/css" },
+ { "gif", "image/gif" },
+ { "jpg", "image/jpeg" },
+ { "jpeg", "image/jpeg" },
+ { "png", "image/png" },
+ { "pdf", "application/pdf" },
+ { "ps", "application/postscript" },
+ { NULL, NULL },
+};
+
+struct options {
+ int port;
+ int iocp;
+ int verbose;
+
+ int unlink;
+ const char *unixsock;
+ const char *docroot;
+};
+
+/* Try to guess a good content-type for 'path' */
+static const char *
+guess_content_type(const char *path)
+{
+ const char *last_period, *extension;
+ const struct table_entry *ent;
+ last_period = strrchr(path, '.');
+ if (!last_period || strchr(last_period, '/'))
+ goto not_found; /* no exension */
+ extension = last_period + 1;
+ for (ent = &content_type_table[0]; ent->extension; ++ent) {
+ if (!evutil_ascii_strcasecmp(ent->extension, extension))
+ return ent->content_type;
+ }
+
+not_found:
+ return "application/misc";
+}
+
+/* Callback used for the /dump URI, and for every non-GET request:
+ * dumps all information to stdout and gives back a trivial 200 ok */
+static void
+dump_request_cb(struct evhttp_request *req, void *arg)
+{
+ const char *cmdtype;
+ struct evkeyvalq *headers;
+ struct evkeyval *header;
+ struct evbuffer *buf;
+
+ switch (evhttp_request_get_command(req)) {
+ case EVHTTP_REQ_GET: cmdtype = "GET"; break;
+ case EVHTTP_REQ_POST: cmdtype = "POST"; break;
+ case EVHTTP_REQ_HEAD: cmdtype = "HEAD"; break;
+ case EVHTTP_REQ_PUT: cmdtype = "PUT"; break;
+ case EVHTTP_REQ_DELETE: cmdtype = "DELETE"; break;
+ case EVHTTP_REQ_OPTIONS: cmdtype = "OPTIONS"; break;
+ case EVHTTP_REQ_TRACE: cmdtype = "TRACE"; break;
+ case EVHTTP_REQ_CONNECT: cmdtype = "CONNECT"; break;
+ case EVHTTP_REQ_PATCH: cmdtype = "PATCH"; break;
+ default: cmdtype = "unknown"; break;
+ }
+
+ printf("Received a %s request for %s\nHeaders:\n",
+ cmdtype, evhttp_request_get_uri(req));
+
+ headers = evhttp_request_get_input_headers(req);
+ for (header = headers->tqh_first; header;
+ header = header->next.tqe_next) {
+ printf(" %s: %s\n", header->key, header->value);
+ }
+
+ buf = evhttp_request_get_input_buffer(req);
+ puts("Input data: <<<");
+ while (evbuffer_get_length(buf)) {
+ int n;
+ char cbuf[128];
+ n = evbuffer_remove(buf, cbuf, sizeof(cbuf));
+ if (n > 0)
+ (void) fwrite(cbuf, 1, n, stdout);
+ }
+ puts(">>>");
+
+ evhttp_send_reply(req, 200, "OK", NULL);
+}
+
+/* This callback gets invoked when we get any http request that doesn't match
+ * any other callback. Like any evhttp server callback, it has a simple job:
+ * it must eventually call evhttp_send_error() or evhttp_send_reply().
+ */
+static void
+send_document_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = NULL;
+ struct options *o = arg;
+ const char *uri = evhttp_request_get_uri(req);
+ struct evhttp_uri *decoded = NULL;
+ const char *path;
+ char *decoded_path;
+ char *whole_path = NULL;
+ size_t len;
+ int fd = -1;
+ struct stat st;
+
+ if (evhttp_request_get_command(req) != EVHTTP_REQ_GET) {
+ dump_request_cb(req, arg);
+ return;
+ }
+
+ printf("Got a GET request for <%s>\n", uri);
+
+ /* Decode the URI */
+ decoded = evhttp_uri_parse(uri);
+ if (!decoded) {
+ printf("It's not a good URI. Sending BADREQUEST\n");
+ evhttp_send_error(req, HTTP_BADREQUEST, 0);
+ return;
+ }
+
+ /* Let's see what path the user asked for. */
+ path = evhttp_uri_get_path(decoded);
+ if (!path) path = "/";
+
+ /* We need to decode it, to see what path the user really wanted. */
+ decoded_path = evhttp_uridecode(path, 0, NULL);
+ if (decoded_path == NULL)
+ goto err;
+ /* Don't allow any ".."s in the path, to avoid exposing stuff outside
+ * of the docroot. This test is both overzealous and underzealous:
+ * it forbids aceptable paths like "/this/one..here", but it doesn't
+ * do anything to prevent symlink following." */
+ if (strstr(decoded_path, ".."))
+ goto err;
+
+ len = strlen(decoded_path)+strlen(o->docroot)+2;
+ if (!(whole_path = malloc(len))) {
+ perror("malloc");
+ goto err;
+ }
+ evutil_snprintf(whole_path, len, "%s/%s", o->docroot, decoded_path);
+
+ if (stat(whole_path, &st)<0) {
+ goto err;
+ }
+
+ /* This holds the content we're sending. */
+ evb = evbuffer_new();
+
+ if (S_ISDIR(st.st_mode)) {
+ /* If it's a directory, read the comments and make a little
+ * index page */
+#ifdef _WIN32
+ HANDLE d;
+ WIN32_FIND_DATAA ent;
+ char *pattern;
+ size_t dirlen;
+#else
+ DIR *d;
+ struct dirent *ent;
+#endif
+ const char *trailing_slash = "";
+
+ if (!strlen(path) || path[strlen(path)-1] != '/')
+ trailing_slash = "/";
+
+#ifdef _WIN32
+ dirlen = strlen(whole_path);
+ pattern = malloc(dirlen+3);
+ memcpy(pattern, whole_path, dirlen);
+ pattern[dirlen] = '\\';
+ pattern[dirlen+1] = '*';
+ pattern[dirlen+2] = '\0';
+ d = FindFirstFileA(pattern, &ent);
+ free(pattern);
+ if (d == INVALID_HANDLE_VALUE)
+ goto err;
+#else
+ if (!(d = opendir(whole_path)))
+ goto err;
+#endif
+
+ evbuffer_add_printf(evb,
+ "<!DOCTYPE html>\n"
+ "<html>\n <head>\n"
+ " <meta charset='utf-8'>\n"
+ " <title>%s</title>\n"
+ " <base href='%s%s'>\n"
+ " </head>\n"
+ " <body>\n"
+ " <h1>%s</h1>\n"
+ " <ul>\n",
+ decoded_path, /* XXX html-escape this. */
+ path, /* XXX html-escape this? */
+ trailing_slash,
+ decoded_path /* XXX html-escape this */);
+#ifdef _WIN32
+ do {
+ const char *name = ent.cFileName;
+#else
+ while ((ent = readdir(d))) {
+ const char *name = ent->d_name;
+#endif
+ evbuffer_add_printf(evb,
+ " <li><a href=\"%s\">%s</a>\n",
+ name, name);/* XXX escape this */
+#ifdef _WIN32
+ } while (FindNextFileA(d, &ent));
+#else
+ }
+#endif
+ evbuffer_add_printf(evb, "</ul></body></html>\n");
+#ifdef _WIN32
+ FindClose(d);
+#else
+ closedir(d);
+#endif
+ evhttp_add_header(evhttp_request_get_output_headers(req),
+ "Content-Type", "text/html");
+ } else {
+ /* Otherwise it's a file; add it to the buffer to get
+ * sent via sendfile */
+ const char *type = guess_content_type(decoded_path);
+ if ((fd = open(whole_path, O_RDONLY)) < 0) {
+ perror("open");
+ goto err;
+ }
+
+ if (fstat(fd, &st)<0) {
+ /* Make sure the length still matches, now that we
+ * opened the file :/ */
+ perror("fstat");
+ goto err;
+ }
+ evhttp_add_header(evhttp_request_get_output_headers(req),
+ "Content-Type", type);
+ evbuffer_add_file(evb, fd, 0, st.st_size);
+ }
+
+ evhttp_send_reply(req, 200, "OK", evb);
+ goto done;
+err:
+ evhttp_send_error(req, 404, "Document was not found");
+ if (fd>=0)
+ close(fd);
+done:
+ if (decoded)
+ evhttp_uri_free(decoded);
+ if (decoded_path)
+ free(decoded_path);
+ if (whole_path)
+ free(whole_path);
+ if (evb)
+ evbuffer_free(evb);
+}
+
+static void
+print_usage(FILE *out, const char *prog, int exit_code)
+{
+ fprintf(out,
+ "Syntax: %s [ OPTS ] <docroot>\n"
+ " -p - port\n"
+ " -U - bind to unix socket\n"
+ " -u - unlink unix socket before bind\n"
+ " -I - IOCP\n"
+ " -v - verbosity, enables libevent debug logging too\n", prog);
+ exit(exit_code);
+}
+static struct options
+parse_opts(int argc, char **argv)
+{
+ struct options o;
+ int opt;
+
+ memset(&o, 0, sizeof(o));
+
+ while ((opt = getopt(argc, argv, "hp:U:uIv")) != -1) {
+ switch (opt) {
+ case 'p': o.port = atoi(optarg); break;
+ case 'U': o.unixsock = optarg; break;
+ case 'u': o.unlink = 1; break;
+ case 'I': o.iocp = 1; break;
+ case 'v': ++o.verbose; break;
+ case 'h': print_usage(stdout, argv[0], 0); break;
+ default : fprintf(stderr, "Unknown option %c\n", opt); break;
+ }
+ }
+
+ if (optind >= argc || (argc - optind) > 1) {
+ print_usage(stdout, argv[0], 1);
+ }
+ o.docroot = argv[optind];
+
+ return o;
+}
+
+static void
+do_term(int sig, short events, void *arg)
+{
+ struct event_base *base = arg;
+ event_base_loopbreak(base);
+ fprintf(stderr, "Got %i, Terminating\n", sig);
+}
+
+static int
+display_listen_sock(struct evhttp_bound_socket *handle)
+{
+ struct sockaddr_storage ss;
+ evutil_socket_t fd;
+ ev_socklen_t socklen = sizeof(ss);
+ char addrbuf[128];
+ void *inaddr;
+ const char *addr;
+ int got_port = -1;
+
+ fd = evhttp_bound_socket_get_fd(handle);
+ memset(&ss, 0, sizeof(ss));
+ if (getsockname(fd, (struct sockaddr *)&ss, &socklen)) {
+ perror("getsockname() failed");
+ return 1;
+ }
+
+ if (ss.ss_family == AF_INET) {
+ got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port);
+ inaddr = &((struct sockaddr_in*)&ss)->sin_addr;
+ } else if (ss.ss_family == AF_INET6) {
+ got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port);
+ inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr;
+ }
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_UN
+ else if (ss.ss_family == AF_UNIX) {
+ printf("Listening on <%s>\n", ((struct sockaddr_un*)&ss)->sun_path);
+ return 0;
+ }
+#endif
+ else {
+ fprintf(stderr, "Weird address family %d\n",
+ ss.ss_family);
+ return 1;
+ }
+
+ addr = evutil_inet_ntop(ss.ss_family, inaddr, addrbuf,
+ sizeof(addrbuf));
+ if (addr) {
+ printf("Listening on %s:%d\n", addr, got_port);
+ evutil_snprintf(uri_root, sizeof(uri_root),
+ "http://%s:%d",addr,got_port);
+ } else {
+ fprintf(stderr, "evutil_inet_ntop failed\n");
+ return 1;
+ }
+
+ return 0;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event_config *cfg = NULL;
+ struct event_base *base = NULL;
+ struct evhttp *http = NULL;
+ struct evhttp_bound_socket *handle = NULL;
+ struct evconnlistener *lev = NULL;
+ struct event *term = NULL;
+ struct options o = parse_opts(argc, argv);
+ int ret = 0;
+
+#ifdef _WIN32
+ {
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ wVersionRequested = MAKEWORD(2, 2);
+ WSAStartup(wVersionRequested, &wsaData);
+ }
+#else
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
+ ret = 1;
+ goto err;
+ }
+#endif
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
+ /** Read env like in regress */
+ if (o.verbose || getenv("EVENT_DEBUG_LOGGING_ALL"))
+ event_enable_debug_logging(EVENT_DBG_ALL);
+
+ cfg = event_config_new();
+#ifdef _WIN32
+ if (o.iocp) {
+#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
+ evthread_use_windows_threads();
+ event_config_set_num_cpus_hint(cfg, 8);
+#endif
+ event_config_set_flag(cfg, EVENT_BASE_FLAG_STARTUP_IOCP);
+ }
+#endif
+
+ base = event_base_new_with_config(cfg);
+ if (!base) {
+ fprintf(stderr, "Couldn't create an event_base: exiting\n");
+ ret = 1;
+ }
+ event_config_free(cfg);
+ cfg = NULL;
+
+ /* Create a new evhttp object to handle requests. */
+ http = evhttp_new(base);
+ if (!http) {
+ fprintf(stderr, "couldn't create evhttp. Exiting.\n");
+ ret = 1;
+ }
+
+ /* The /dump URI will dump all requests to stdout and say 200 ok. */
+ evhttp_set_cb(http, "/dump", dump_request_cb, NULL);
+
+ /* We want to accept arbitrary requests, so we need to set a "generic"
+ * cb. We can also add callbacks for specific paths. */
+ evhttp_set_gencb(http, send_document_cb, &o);
+
+ if (o.unixsock) {
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_UN
+ struct sockaddr_un addr;
+
+ if (o.unlink && (unlink(o.unixsock) && errno != ENOENT)) {
+ perror(o.unixsock);
+ ret = 1;
+ goto err;
+ }
+
+ addr.sun_family = AF_UNIX;
+ strcpy(addr.sun_path, o.unixsock);
+
+ lev = evconnlistener_new_bind(base, NULL, NULL,
+ LEV_OPT_CLOSE_ON_FREE, -1,
+ (struct sockaddr *)&addr, sizeof(addr));
+ if (!lev) {
+ perror("Cannot create listener");
+ ret = 1;
+ goto err;
+ }
+
+ handle = evhttp_bind_listener(http, lev);
+ if (!handle) {
+ fprintf(stderr, "couldn't bind to %s. Exiting.\n", o.unixsock);
+ ret = 1;
+ goto err;
+ }
+#else /* !EVENT__HAVE_STRUCT_SOCKADDR_UN */
+ fprintf(stderr, "-U is not supported on this platform. Exiting.\n");
+ ret = 1;
+ goto err;
+#endif /* EVENT__HAVE_STRUCT_SOCKADDR_UN */
+ }
+ else {
+ handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", o.port);
+ if (!handle) {
+ fprintf(stderr, "couldn't bind to port %d. Exiting.\n", o.port);
+ ret = 1;
+ goto err;
+ }
+ }
+
+ if (display_listen_sock(handle)) {
+ ret = 1;
+ goto err;
+ }
+
+ term = evsignal_new(base, SIGINT, do_term, base);
+ if (!term)
+ goto err;
+ if (event_add(term, NULL))
+ goto err;
+
+ event_base_dispatch(base);
+
+#ifdef _WIN32
+ WSACleanup();
+#endif
+
+err:
+ if (cfg)
+ event_config_free(cfg);
+ if (http)
+ evhttp_free(http);
+ if (term)
+ event_free(term);
+ if (base)
+ event_base_free(base);
+
+ return ret;
+}
diff --git a/contrib/ntp/sntp/libevent/sample/https-client.c b/contrib/ntp/sntp/libevent/sample/https-client.c
new file mode 100644
index 000000000000..5136acebd79a
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/https-client.c
@@ -0,0 +1,544 @@
+/*
+ This is an example of how to hook up evhttp with bufferevent_ssl
+
+ It just GETs an https URL given on the command-line and prints the response
+ body to stdout.
+
+ Actually, it also accepts plain http URLs to make it easy to compare http vs
+ https code paths.
+
+ Loosely based on le-proxy.c.
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#define snprintf _snprintf
+#define strcasecmp _stricmp
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+#include <event2/bufferevent_ssl.h>
+#include <event2/bufferevent.h>
+#include <event2/buffer.h>
+#include <event2/listener.h>
+#include <event2/util.h>
+#include <event2/http.h>
+
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/rand.h>
+
+#include "openssl_hostname_validation.h"
+
+static int ignore_cert = 0;
+
+static void
+http_request_done(struct evhttp_request *req, void *ctx)
+{
+ char buffer[256];
+ int nread;
+
+ if (!req || !evhttp_request_get_response_code(req)) {
+ /* If req is NULL, it means an error occurred, but
+ * sadly we are mostly left guessing what the error
+ * might have been. We'll do our best... */
+ struct bufferevent *bev = (struct bufferevent *) ctx;
+ unsigned long oslerr;
+ int printed_err = 0;
+ int errcode = EVUTIL_SOCKET_ERROR();
+ fprintf(stderr, "some request failed - no idea which one though!\n");
+ /* Print out the OpenSSL error queue that libevent
+ * squirreled away for us, if any. */
+ while ((oslerr = bufferevent_get_openssl_error(bev))) {
+ ERR_error_string_n(oslerr, buffer, sizeof(buffer));
+ fprintf(stderr, "%s\n", buffer);
+ printed_err = 1;
+ }
+ /* If the OpenSSL error queue was empty, maybe it was a
+ * socket error; let's try printing that. */
+ if (! printed_err)
+ fprintf(stderr, "socket error = %s (%d)\n",
+ evutil_socket_error_to_string(errcode),
+ errcode);
+ return;
+ }
+
+ fprintf(stderr, "Response line: %d %s\n",
+ evhttp_request_get_response_code(req),
+ evhttp_request_get_response_code_line(req));
+
+ while ((nread = evbuffer_remove(evhttp_request_get_input_buffer(req),
+ buffer, sizeof(buffer)))
+ > 0) {
+ /* These are just arbitrary chunks of 256 bytes.
+ * They are not lines, so we can't treat them as such. */
+ fwrite(buffer, nread, 1, stdout);
+ }
+}
+
+static void
+syntax(void)
+{
+ fputs("Syntax:\n", stderr);
+ fputs(" https-client -url <https-url> [-data data-file.bin] [-ignore-cert] [-retries num] [-timeout sec] [-crt crt]\n", stderr);
+ fputs("Example:\n", stderr);
+ fputs(" https-client -url https://ip.appspot.com/\n", stderr);
+}
+
+static void
+err(const char *msg)
+{
+ fputs(msg, stderr);
+}
+
+static void
+err_openssl(const char *func)
+{
+ fprintf (stderr, "%s failed:\n", func);
+
+ /* This is the OpenSSL function that prints the contents of the
+ * error stack to the specified file handle. */
+ ERR_print_errors_fp (stderr);
+
+ exit(1);
+}
+
+/* See http://archives.seul.org/libevent/users/Jan-2013/msg00039.html */
+static int cert_verify_callback(X509_STORE_CTX *x509_ctx, void *arg)
+{
+ char cert_str[256];
+ const char *host = (const char *) arg;
+ const char *res_str = "X509_verify_cert failed";
+ HostnameValidationResult res = Error;
+
+ /* This is the function that OpenSSL would call if we hadn't called
+ * SSL_CTX_set_cert_verify_callback(). Therefore, we are "wrapping"
+ * the default functionality, rather than replacing it. */
+ int ok_so_far = 0;
+
+ X509 *server_cert = NULL;
+
+ if (ignore_cert) {
+ return 1;
+ }
+
+ ok_so_far = X509_verify_cert(x509_ctx);
+
+ server_cert = X509_STORE_CTX_get_current_cert(x509_ctx);
+
+ if (ok_so_far) {
+ res = validate_hostname(host, server_cert);
+
+ switch (res) {
+ case MatchFound:
+ res_str = "MatchFound";
+ break;
+ case MatchNotFound:
+ res_str = "MatchNotFound";
+ break;
+ case NoSANPresent:
+ res_str = "NoSANPresent";
+ break;
+ case MalformedCertificate:
+ res_str = "MalformedCertificate";
+ break;
+ case Error:
+ res_str = "Error";
+ break;
+ default:
+ res_str = "WTF!";
+ break;
+ }
+ }
+
+ X509_NAME_oneline(X509_get_subject_name (server_cert),
+ cert_str, sizeof (cert_str));
+
+ if (res == MatchFound) {
+ printf("https server '%s' has this certificate, "
+ "which looks good to me:\n%s\n",
+ host, cert_str);
+ return 1;
+ } else {
+ printf("Got '%s' for hostname '%s' and certificate:\n%s\n",
+ res_str, host, cert_str);
+ return 0;
+ }
+}
+
+#ifdef _WIN32
+static int
+add_cert_for_store(X509_STORE *store, const char *name)
+{
+ HCERTSTORE sys_store = NULL;
+ PCCERT_CONTEXT ctx = NULL;
+ int r = 0;
+
+ sys_store = CertOpenSystemStore(0, name);
+ if (!sys_store) {
+ err("failed to open system certificate store");
+ return -1;
+ }
+ while ((ctx = CertEnumCertificatesInStore(sys_store, ctx))) {
+ X509 *x509 = d2i_X509(NULL, (unsigned char const **)&ctx->pbCertEncoded,
+ ctx->cbCertEncoded);
+ if (x509) {
+ X509_STORE_add_cert(store, x509);
+ X509_free(x509);
+ } else {
+ r = -1;
+ err_openssl("d2i_X509");
+ break;
+ }
+ }
+ CertCloseStore(sys_store, 0);
+ return r;
+}
+#endif
+
+int
+main(int argc, char **argv)
+{
+ int r;
+ struct event_base *base = NULL;
+ struct evhttp_uri *http_uri = NULL;
+ const char *url = NULL, *data_file = NULL;
+ const char *crt = NULL;
+ const char *scheme, *host, *path, *query;
+ char uri[256];
+ int port;
+ int retries = 0;
+ int timeout = -1;
+
+ SSL_CTX *ssl_ctx = NULL;
+ SSL *ssl = NULL;
+ struct bufferevent *bev;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req;
+ struct evkeyvalq *output_headers;
+ struct evbuffer *output_buffer;
+
+ int i;
+ int ret = 0;
+ enum { HTTP, HTTPS } type = HTTP;
+
+ for (i = 1; i < argc; i++) {
+ if (!strcmp("-url", argv[i])) {
+ if (i < argc - 1) {
+ url = argv[i + 1];
+ } else {
+ syntax();
+ goto error;
+ }
+ } else if (!strcmp("-crt", argv[i])) {
+ if (i < argc - 1) {
+ crt = argv[i + 1];
+ } else {
+ syntax();
+ goto error;
+ }
+ } else if (!strcmp("-ignore-cert", argv[i])) {
+ ignore_cert = 1;
+ } else if (!strcmp("-data", argv[i])) {
+ if (i < argc - 1) {
+ data_file = argv[i + 1];
+ } else {
+ syntax();
+ goto error;
+ }
+ } else if (!strcmp("-retries", argv[i])) {
+ if (i < argc - 1) {
+ retries = atoi(argv[i + 1]);
+ } else {
+ syntax();
+ goto error;
+ }
+ } else if (!strcmp("-timeout", argv[i])) {
+ if (i < argc - 1) {
+ timeout = atoi(argv[i + 1]);
+ } else {
+ syntax();
+ goto error;
+ }
+ } else if (!strcmp("-help", argv[i])) {
+ syntax();
+ goto error;
+ }
+ }
+
+ if (!url) {
+ syntax();
+ goto error;
+ }
+
+#ifdef _WIN32
+ {
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int err;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ err = WSAStartup(wVersionRequested, &wsaData);
+ if (err != 0) {
+ printf("WSAStartup failed with error: %d\n", err);
+ goto error;
+ }
+ }
+#endif // _WIN32
+
+ http_uri = evhttp_uri_parse(url);
+ if (http_uri == NULL) {
+ err("malformed url");
+ goto error;
+ }
+
+ scheme = evhttp_uri_get_scheme(http_uri);
+ if (scheme == NULL || (strcasecmp(scheme, "https") != 0 &&
+ strcasecmp(scheme, "http") != 0)) {
+ err("url must be http or https");
+ goto error;
+ }
+
+ host = evhttp_uri_get_host(http_uri);
+ if (host == NULL) {
+ err("url must have a host");
+ goto error;
+ }
+
+ port = evhttp_uri_get_port(http_uri);
+ if (port == -1) {
+ port = (strcasecmp(scheme, "http") == 0) ? 80 : 443;
+ }
+
+ path = evhttp_uri_get_path(http_uri);
+ if (strlen(path) == 0) {
+ path = "/";
+ }
+
+ query = evhttp_uri_get_query(http_uri);
+ if (query == NULL) {
+ snprintf(uri, sizeof(uri) - 1, "%s", path);
+ } else {
+ snprintf(uri, sizeof(uri) - 1, "%s?%s", path, query);
+ }
+ uri[sizeof(uri) - 1] = '\0';
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ // Initialize OpenSSL
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
+#endif
+
+ /* This isn't strictly necessary... OpenSSL performs RAND_poll
+ * automatically on first use of random number generator. */
+ r = RAND_poll();
+ if (r == 0) {
+ err_openssl("RAND_poll");
+ goto error;
+ }
+
+ /* Create a new OpenSSL context */
+ ssl_ctx = SSL_CTX_new(SSLv23_method());
+ if (!ssl_ctx) {
+ err_openssl("SSL_CTX_new");
+ goto error;
+ }
+
+ if (crt == NULL) {
+ X509_STORE *store;
+ /* Attempt to use the system's trusted root certificates. */
+ store = SSL_CTX_get_cert_store(ssl_ctx);
+#ifdef _WIN32
+ if (add_cert_for_store(store, "CA") < 0 ||
+ add_cert_for_store(store, "AuthRoot") < 0 ||
+ add_cert_for_store(store, "ROOT") < 0) {
+ goto error;
+ }
+#else // _WIN32
+ if (X509_STORE_set_default_paths(store) != 1) {
+ err_openssl("X509_STORE_set_default_paths");
+ goto error;
+ }
+#endif // _WIN32
+ } else {
+ if (SSL_CTX_load_verify_locations(ssl_ctx, crt, NULL) != 1) {
+ err_openssl("SSL_CTX_load_verify_locations");
+ goto error;
+ }
+ }
+ /* Ask OpenSSL to verify the server certificate. Note that this
+ * does NOT include verifying that the hostname is correct.
+ * So, by itself, this means anyone with any legitimate
+ * CA-issued certificate for any website, can impersonate any
+ * other website in the world. This is not good. See "The
+ * Most Dangerous Code in the World" article at
+ * https://crypto.stanford.edu/~dabo/pubs/abstracts/ssl-client-bugs.html
+ */
+ SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, NULL);
+ /* This is how we solve the problem mentioned in the previous
+ * comment. We "wrap" OpenSSL's validation routine in our
+ * own routine, which also validates the hostname by calling
+ * the code provided by iSECPartners. Note that even though
+ * the "Everything You've Always Wanted to Know About
+ * Certificate Validation With OpenSSL (But Were Afraid to
+ * Ask)" paper from iSECPartners says very explicitly not to
+ * call SSL_CTX_set_cert_verify_callback (at the bottom of
+ * page 2), what we're doing here is safe because our
+ * cert_verify_callback() calls X509_verify_cert(), which is
+ * OpenSSL's built-in routine which would have been called if
+ * we hadn't set the callback. Therefore, we're just
+ * "wrapping" OpenSSL's routine, not replacing it. */
+ SSL_CTX_set_cert_verify_callback(ssl_ctx, cert_verify_callback,
+ (void *) host);
+
+ // Create event base
+ base = event_base_new();
+ if (!base) {
+ perror("event_base_new()");
+ goto error;
+ }
+
+ // Create OpenSSL bufferevent and stack evhttp on top of it
+ ssl = SSL_new(ssl_ctx);
+ if (ssl == NULL) {
+ err_openssl("SSL_new()");
+ goto error;
+ }
+
+ #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+ // Set hostname for SNI extension
+ SSL_set_tlsext_host_name(ssl, host);
+ #endif
+
+ if (strcasecmp(scheme, "http") == 0) {
+ bev = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE);
+ } else {
+ type = HTTPS;
+ bev = bufferevent_openssl_socket_new(base, -1, ssl,
+ BUFFEREVENT_SSL_CONNECTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ }
+
+ if (bev == NULL) {
+ fprintf(stderr, "bufferevent_openssl_socket_new() failed\n");
+ goto error;
+ }
+
+ bufferevent_openssl_set_allow_dirty_shutdown(bev, 1);
+
+ // For simplicity, we let DNS resolution block. Everything else should be
+ // asynchronous though.
+ evcon = evhttp_connection_base_bufferevent_new(base, NULL, bev,
+ host, port);
+ if (evcon == NULL) {
+ fprintf(stderr, "evhttp_connection_base_bufferevent_new() failed\n");
+ goto error;
+ }
+
+ if (retries > 0) {
+ evhttp_connection_set_retries(evcon, retries);
+ }
+ if (timeout >= 0) {
+ evhttp_connection_set_timeout(evcon, timeout);
+ }
+
+ // Fire off the request
+ req = evhttp_request_new(http_request_done, bev);
+ if (req == NULL) {
+ fprintf(stderr, "evhttp_request_new() failed\n");
+ goto error;
+ }
+
+ output_headers = evhttp_request_get_output_headers(req);
+ evhttp_add_header(output_headers, "Host", host);
+ evhttp_add_header(output_headers, "Connection", "close");
+
+ if (data_file) {
+ /* NOTE: In production code, you'd probably want to use
+ * evbuffer_add_file() or evbuffer_add_file_segment(), to
+ * avoid needless copying. */
+ FILE * f = fopen(data_file, "rb");
+ char buf[1024];
+ size_t s;
+ size_t bytes = 0;
+
+ if (!f) {
+ syntax();
+ goto error;
+ }
+
+ output_buffer = evhttp_request_get_output_buffer(req);
+ while ((s = fread(buf, 1, sizeof(buf), f)) > 0) {
+ evbuffer_add(output_buffer, buf, s);
+ bytes += s;
+ }
+ evutil_snprintf(buf, sizeof(buf)-1, "%lu", (unsigned long)bytes);
+ evhttp_add_header(output_headers, "Content-Length", buf);
+ fclose(f);
+ }
+
+ r = evhttp_make_request(evcon, req, data_file ? EVHTTP_REQ_POST : EVHTTP_REQ_GET, uri);
+ if (r != 0) {
+ fprintf(stderr, "evhttp_make_request() failed\n");
+ goto error;
+ }
+
+ event_base_dispatch(base);
+ goto cleanup;
+
+error:
+ ret = 1;
+cleanup:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http_uri)
+ evhttp_uri_free(http_uri);
+ if (base)
+ event_base_free(base);
+
+ if (ssl_ctx)
+ SSL_CTX_free(ssl_ctx);
+ if (type == HTTP && ssl)
+ SSL_free(ssl);
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ EVP_cleanup();
+ ERR_free_strings();
+
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
+ ERR_remove_state(0);
+#else
+ ERR_remove_thread_state(NULL);
+#endif
+
+ CRYPTO_cleanup_all_ex_data();
+
+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
+
+#ifdef _WIN32
+ WSACleanup();
+#endif
+
+ return ret;
+}
diff --git a/contrib/ntp/sntp/libevent/sample/include.am b/contrib/ntp/sntp/libevent/sample/include.am
new file mode 100644
index 000000000000..b6894d46e5fe
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/include.am
@@ -0,0 +1,56 @@
+# sample/include.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+SAMPLES = \
+ sample/dns-example \
+ sample/event-read-fifo \
+ sample/hello-world \
+ sample/http-server \
+ sample/http-connect \
+ sample/signal-test \
+ sample/time-test
+
+if OPENSSL
+SAMPLES += sample/le-proxy
+sample_le_proxy_SOURCES = sample/le-proxy.c
+sample_le_proxy_LDADD = libevent.la libevent_openssl.la $(OPENSSL_LIBS) $(OPENSSL_LIBADD)
+sample_le_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+
+SAMPLES += sample/https-client
+sample_https_client_SOURCES = \
+ sample/https-client.c \
+ sample/hostcheck.c \
+ sample/openssl_hostname_validation.c
+sample_https_client_LDADD = libevent.la libevent_openssl.la $(OPENSSL_LIBS) $(OPENSSL_LIBADD)
+if BUILD_WIN32
+sample_https_client_LDADD += -lcrypt32
+endif
+sample_https_client_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+noinst_HEADERS += \
+ sample/hostcheck.h \
+ sample/openssl_hostname_validation.h
+endif
+
+if BUILD_SAMPLES
+noinst_PROGRAMS += $(SAMPLES)
+endif
+
+$(SAMPLES) : libevent.la
+
+sample_event_read_fifo_SOURCES = sample/event-read-fifo.c
+sample_event_read_fifo_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_time_test_SOURCES = sample/time-test.c
+sample_time_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_signal_test_SOURCES = sample/signal-test.c
+sample_signal_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_dns_example_SOURCES = sample/dns-example.c
+sample_dns_example_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_hello_world_SOURCES = sample/hello-world.c
+sample_hello_world_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_http_server_SOURCES = sample/http-server.c
+sample_http_server_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_http_connect_SOURCES = sample/http-connect.c
+sample_http_connect_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
diff --git a/contrib/ntp/sntp/libevent/sample/le-proxy.c b/contrib/ntp/sntp/libevent/sample/le-proxy.c
new file mode 100644
index 000000000000..13e0e2aea918
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/le-proxy.c
@@ -0,0 +1,305 @@
+/*
+ This example code shows how to write an (optionally encrypting) SSL proxy
+ with Libevent's bufferevent layer.
+
+ XXX It's a little ugly and should probably be cleaned up.
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+#include <event2/bufferevent_ssl.h>
+#include <event2/bufferevent.h>
+#include <event2/buffer.h>
+#include <event2/listener.h>
+#include <event2/util.h>
+
+#include "util-internal.h"
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/rand.h>
+#include "openssl-compat.h"
+
+static struct event_base *base;
+static struct sockaddr_storage listen_on_addr;
+static struct sockaddr_storage connect_to_addr;
+static int connect_to_addrlen;
+static int use_wrapper = 1;
+
+static SSL_CTX *ssl_ctx = NULL;
+
+#define MAX_OUTPUT (512*1024)
+
+static void drained_writecb(struct bufferevent *bev, void *ctx);
+static void eventcb(struct bufferevent *bev, short what, void *ctx);
+
+static void
+readcb(struct bufferevent *bev, void *ctx)
+{
+ struct bufferevent *partner = ctx;
+ struct evbuffer *src, *dst;
+ size_t len;
+ src = bufferevent_get_input(bev);
+ len = evbuffer_get_length(src);
+ if (!partner) {
+ evbuffer_drain(src, len);
+ return;
+ }
+ dst = bufferevent_get_output(partner);
+ evbuffer_add_buffer(dst, src);
+
+ if (evbuffer_get_length(dst) >= MAX_OUTPUT) {
+ /* We're giving the other side data faster than it can
+ * pass it on. Stop reading here until we have drained the
+ * other side to MAX_OUTPUT/2 bytes. */
+ bufferevent_setcb(partner, readcb, drained_writecb,
+ eventcb, bev);
+ bufferevent_setwatermark(partner, EV_WRITE, MAX_OUTPUT/2,
+ MAX_OUTPUT);
+ bufferevent_disable(bev, EV_READ);
+ }
+}
+
+static void
+drained_writecb(struct bufferevent *bev, void *ctx)
+{
+ struct bufferevent *partner = ctx;
+
+ /* We were choking the other side until we drained our outbuf a bit.
+ * Now it seems drained. */
+ bufferevent_setcb(bev, readcb, NULL, eventcb, partner);
+ bufferevent_setwatermark(bev, EV_WRITE, 0, 0);
+ if (partner)
+ bufferevent_enable(partner, EV_READ);
+}
+
+static void
+close_on_finished_writecb(struct bufferevent *bev, void *ctx)
+{
+ struct evbuffer *b = bufferevent_get_output(bev);
+
+ if (evbuffer_get_length(b) == 0) {
+ bufferevent_free(bev);
+ }
+}
+
+static void
+eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ struct bufferevent *partner = ctx;
+
+ if (what & (BEV_EVENT_EOF|BEV_EVENT_ERROR)) {
+ if (what & BEV_EVENT_ERROR) {
+ unsigned long err;
+ while ((err = (bufferevent_get_openssl_error(bev)))) {
+ const char *msg = (const char*)
+ ERR_reason_error_string(err);
+ const char *lib = (const char*)
+ ERR_lib_error_string(err);
+ const char *func = (const char*)
+ ERR_func_error_string(err);
+ fprintf(stderr,
+ "%s in %s %s\n", msg, lib, func);
+ }
+ if (errno)
+ perror("connection error");
+ }
+
+ if (partner) {
+ /* Flush all pending data */
+ readcb(bev, ctx);
+
+ if (evbuffer_get_length(
+ bufferevent_get_output(partner))) {
+ /* We still have to flush data from the other
+ * side, but when that's done, close the other
+ * side. */
+ bufferevent_setcb(partner,
+ NULL, close_on_finished_writecb,
+ eventcb, NULL);
+ bufferevent_disable(partner, EV_READ);
+ } else {
+ /* We have nothing left to say to the other
+ * side; close it. */
+ bufferevent_free(partner);
+ }
+ }
+ bufferevent_free(bev);
+ }
+}
+
+static void
+syntax(void)
+{
+ fputs("Syntax:\n", stderr);
+ fputs(" le-proxy [-s] [-W] <listen-on-addr> <connect-to-addr>\n", stderr);
+ fputs("Example:\n", stderr);
+ fputs(" le-proxy 127.0.0.1:8888 1.2.3.4:80\n", stderr);
+
+ exit(1);
+}
+
+static void
+accept_cb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *a, int slen, void *p)
+{
+ struct bufferevent *b_out, *b_in;
+ /* Create two linked bufferevent objects: one to connect, one for the
+ * new connection */
+ b_in = bufferevent_socket_new(base, fd,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+
+ if (!ssl_ctx || use_wrapper)
+ b_out = bufferevent_socket_new(base, -1,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ else {
+ SSL *ssl = SSL_new(ssl_ctx);
+ b_out = bufferevent_openssl_socket_new(base, -1, ssl,
+ BUFFEREVENT_SSL_CONNECTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ }
+
+ assert(b_in && b_out);
+
+ if (bufferevent_socket_connect(b_out,
+ (struct sockaddr*)&connect_to_addr, connect_to_addrlen)<0) {
+ perror("bufferevent_socket_connect");
+ bufferevent_free(b_out);
+ bufferevent_free(b_in);
+ return;
+ }
+
+ if (ssl_ctx && use_wrapper) {
+ struct bufferevent *b_ssl;
+ SSL *ssl = SSL_new(ssl_ctx);
+ b_ssl = bufferevent_openssl_filter_new(base,
+ b_out, ssl, BUFFEREVENT_SSL_CONNECTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ if (!b_ssl) {
+ perror("Bufferevent_openssl_new");
+ bufferevent_free(b_out);
+ bufferevent_free(b_in);
+ return;
+ }
+ b_out = b_ssl;
+ }
+
+ bufferevent_setcb(b_in, readcb, NULL, eventcb, b_out);
+ bufferevent_setcb(b_out, readcb, NULL, eventcb, b_in);
+
+ bufferevent_enable(b_in, EV_READ|EV_WRITE);
+ bufferevent_enable(b_out, EV_READ|EV_WRITE);
+}
+
+int
+main(int argc, char **argv)
+{
+ int i;
+ int socklen;
+
+ int use_ssl = 0;
+ struct evconnlistener *listener;
+
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ wVersionRequested = MAKEWORD(2, 2);
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ if (argc < 3)
+ syntax();
+
+ for (i=1; i < argc; ++i) {
+ if (!strcmp(argv[i], "-s")) {
+ use_ssl = 1;
+ } else if (!strcmp(argv[i], "-W")) {
+ use_wrapper = 0;
+ } else if (argv[i][0] == '-') {
+ syntax();
+ } else
+ break;
+ }
+
+ if (i+2 != argc)
+ syntax();
+
+ memset(&listen_on_addr, 0, sizeof(listen_on_addr));
+ socklen = sizeof(listen_on_addr);
+ if (evutil_parse_sockaddr_port(argv[i],
+ (struct sockaddr*)&listen_on_addr, &socklen)<0) {
+ int p = atoi(argv[i]);
+ struct sockaddr_in *sin = (struct sockaddr_in*)&listen_on_addr;
+ if (p < 1 || p > 65535)
+ syntax();
+ sin->sin_port = htons(p);
+ sin->sin_addr.s_addr = htonl(0x7f000001);
+ sin->sin_family = AF_INET;
+ socklen = sizeof(struct sockaddr_in);
+ }
+
+ memset(&connect_to_addr, 0, sizeof(connect_to_addr));
+ connect_to_addrlen = sizeof(connect_to_addr);
+ if (evutil_parse_sockaddr_port(argv[i+1],
+ (struct sockaddr*)&connect_to_addr, &connect_to_addrlen)<0)
+ syntax();
+
+ base = event_base_new();
+ if (!base) {
+ perror("event_base_new()");
+ return 1;
+ }
+
+ if (use_ssl) {
+ int r;
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
+#endif
+ r = RAND_poll();
+ if (r == 0) {
+ fprintf(stderr, "RAND_poll() failed.\n");
+ return 1;
+ }
+ ssl_ctx = SSL_CTX_new(TLS_method());
+ }
+
+ listener = evconnlistener_new_bind(base, accept_cb, NULL,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_CLOSE_ON_EXEC|LEV_OPT_REUSEABLE,
+ -1, (struct sockaddr*)&listen_on_addr, socklen);
+
+ if (! listener) {
+ fprintf(stderr, "Couldn't open listener.\n");
+ event_base_free(base);
+ return 1;
+ }
+ event_base_dispatch(base);
+
+ evconnlistener_free(listener);
+ event_base_free(base);
+
+#ifdef _WIN32
+ WSACleanup();
+#endif
+
+ return 0;
+}
diff --git a/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c b/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c
new file mode 100644
index 000000000000..4036ccbaabc9
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.c
@@ -0,0 +1,178 @@
+/* Obtained from: https://github.com/iSECPartners/ssl-conservatory */
+
+/*
+Copyright (C) 2012, iSEC Partners.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+ */
+
+/*
+ * Helper functions to perform basic hostname validation using OpenSSL.
+ *
+ * Please read "everything-you-wanted-to-know-about-openssl.pdf" before
+ * attempting to use this code. This whitepaper describes how the code works,
+ * how it should be used, and what its limitations are.
+ *
+ * Author: Alban Diquet
+ * License: See LICENSE
+ *
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <openssl/x509v3.h>
+#include <openssl/ssl.h>
+#include <string.h>
+
+#include "openssl_hostname_validation.h"
+#include "hostcheck.h"
+
+#define HOSTNAME_MAX_SIZE 255
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+#define ASN1_STRING_get0_data ASN1_STRING_data
+#endif
+
+/**
+* Tries to find a match for hostname in the certificate's Common Name field.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if the Common Name had a NUL character embedded in it.
+* Returns Error if the Common Name could not be extracted.
+*/
+static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) {
+ int common_name_loc = -1;
+ X509_NAME_ENTRY *common_name_entry = NULL;
+ ASN1_STRING *common_name_asn1 = NULL;
+ const char *common_name_str = NULL;
+
+ // Find the position of the CN field in the Subject field of the certificate
+ common_name_loc = X509_NAME_get_index_by_NID(X509_get_subject_name((X509 *) server_cert), NID_commonName, -1);
+ if (common_name_loc < 0) {
+ return Error;
+ }
+
+ // Extract the CN field
+ common_name_entry = X509_NAME_get_entry(X509_get_subject_name((X509 *) server_cert), common_name_loc);
+ if (common_name_entry == NULL) {
+ return Error;
+ }
+
+ // Convert the CN field to a C string
+ common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry);
+ if (common_name_asn1 == NULL) {
+ return Error;
+ }
+ common_name_str = (char *) ASN1_STRING_get0_data(common_name_asn1);
+
+ // Make sure there isn't an embedded NUL character in the CN
+ if ((size_t)ASN1_STRING_length(common_name_asn1) != strlen(common_name_str)) {
+ return MalformedCertificate;
+ }
+
+ // Compare expected hostname with the CN
+ if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) {
+ return MatchFound;
+ }
+ else {
+ return MatchNotFound;
+ }
+}
+
+
+/**
+* Tries to find a match for hostname in the certificate's Subject Alternative Name extension.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
+* Returns NoSANPresent if the SAN extension was not present in the certificate.
+*/
+static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *server_cert) {
+ HostnameValidationResult result = MatchNotFound;
+ int i;
+ int san_names_nb = -1;
+ STACK_OF(GENERAL_NAME) *san_names = NULL;
+
+ // Try to extract the names within the SAN extension from the certificate
+ san_names = X509_get_ext_d2i((X509 *) server_cert, NID_subject_alt_name, NULL, NULL);
+ if (san_names == NULL) {
+ return NoSANPresent;
+ }
+ san_names_nb = sk_GENERAL_NAME_num(san_names);
+
+ // Check each name within the extension
+ for (i=0; i<san_names_nb; i++) {
+ const GENERAL_NAME *current_name = sk_GENERAL_NAME_value(san_names, i);
+
+ if (current_name->type == GEN_DNS) {
+ // Current name is a DNS name, let's check it
+ const char *dns_name = (char *) ASN1_STRING_get0_data(current_name->d.dNSName);
+
+ // Make sure there isn't an embedded NUL character in the DNS name
+ if ((size_t)ASN1_STRING_length(current_name->d.dNSName) != strlen(dns_name)) {
+ result = MalformedCertificate;
+ break;
+ }
+ else { // Compare expected hostname with the DNS name
+ if (Curl_cert_hostcheck(dns_name, hostname)
+ == CURL_HOST_MATCH) {
+ result = MatchFound;
+ break;
+ }
+ }
+ }
+ }
+ sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
+
+ return result;
+}
+
+
+/**
+* Validates the server's identity by looking for the expected hostname in the
+* server's certificate. As described in RFC 6125, it first tries to find a match
+* in the Subject Alternative Name extension. If the extension is not present in
+* the certificate, it checks the Common Name instead.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
+* Returns Error if there was an error.
+*/
+HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) {
+ HostnameValidationResult result;
+
+ if((hostname == NULL) || (server_cert == NULL))
+ return Error;
+
+ // First try the Subject Alternative Names extension
+ result = matches_subject_alternative_name(hostname, server_cert);
+ if (result == NoSANPresent) {
+ // Extension was not found: try the Common Name
+ result = matches_common_name(hostname, server_cert);
+ }
+
+ return result;
+}
diff --git a/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h b/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h
new file mode 100644
index 000000000000..54aa1c436d74
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/openssl_hostname_validation.h
@@ -0,0 +1,56 @@
+/* Obtained from: https://github.com/iSECPartners/ssl-conservatory */
+
+/*
+Copyright (C) 2012, iSEC Partners.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+ */
+
+/*
+ * Helper functions to perform basic hostname validation using OpenSSL.
+ *
+ * Please read "everything-you-wanted-to-know-about-openssl.pdf" before
+ * attempting to use this code. This whitepaper describes how the code works,
+ * how it should be used, and what its limitations are.
+ *
+ * Author: Alban Diquet
+ * License: See LICENSE
+ *
+ */
+
+typedef enum {
+ MatchFound,
+ MatchNotFound,
+ NoSANPresent,
+ MalformedCertificate,
+ Error
+} HostnameValidationResult;
+
+/**
+* Validates the server's identity by looking for the expected hostname in the
+* server's certificate. As described in RFC 6125, it first tries to find a match
+* in the Subject Alternative Name extension. If the extension is not present in
+* the certificate, it checks the Common Name instead.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
+* Returns Error if there was an error.
+*/
+HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert);
diff --git a/contrib/ntp/sntp/libevent/sample/signal-test.c b/contrib/ntp/sntp/libevent/sample/signal-test.c
new file mode 100644
index 000000000000..4aef42051574
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/signal-test.c
@@ -0,0 +1,83 @@
+/*
+ * Compile with:
+ * cc -I/usr/local/include -o signal-test \
+ * signal-test.c -L/usr/local/lib -levent
+ */
+
+#include <sys/types.h>
+
+#include <event2/event-config.h>
+
+#include <sys/stat.h>
+#ifndef _WIN32
+#include <sys/queue.h>
+#include <unistd.h>
+#include <sys/time.h>
+#else
+#include <winsock2.h>
+#include <windows.h>
+#endif
+#include <signal.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event2/event.h>
+
+int called = 0;
+
+static void
+signal_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event *signal = arg;
+
+ printf("signal_cb: got signal %d\n", event_get_signal(signal));
+
+ if (called >= 2)
+ event_del(signal);
+
+ called++;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event *signal_int = NULL;
+ struct event_base* base;
+ int ret = 0;
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ /* Initialize the event library */
+ base = event_base_new();
+ if (!base) {
+ ret = 1;
+ goto out;
+ }
+
+ /* Initialize one event */
+ signal_int = evsignal_new(base, SIGINT, signal_cb, event_self_cbarg());
+ if (!signal_int) {
+ ret = 2;
+ goto out;
+ }
+ event_add(signal_int, NULL);
+
+ event_base_dispatch(base);
+
+out:
+ if (signal_int)
+ event_free(signal_int);
+ if (base)
+ event_base_free(base);
+ return ret;
+}
+
diff --git a/contrib/ntp/sntp/libevent/sample/time-test.c b/contrib/ntp/sntp/libevent/sample/time-test.c
new file mode 100644
index 000000000000..671a1d2108e2
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/sample/time-test.c
@@ -0,0 +1,110 @@
+/*
+ * XXX This sample code was once meant to show how to use the basic Libevent
+ * interfaces, but it never worked on non-Unix platforms, and some of the
+ * interfaces have changed since it was first written. It should probably
+ * be removed or replaced with something better.
+ *
+ * Compile with:
+ * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
+ */
+
+#include <sys/types.h>
+
+#include <event2/event-config.h>
+
+#include <sys/stat.h>
+#ifndef _WIN32
+#include <sys/queue.h>
+#include <unistd.h>
+#endif
+#include <time.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event2/event.h>
+#include <event2/event_struct.h>
+#include <event2/util.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+struct timeval lasttime;
+
+int event_is_persistent;
+
+static void
+timeout_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct timeval newtime, difference;
+ struct event *timeout = arg;
+ double elapsed;
+
+ evutil_gettimeofday(&newtime, NULL);
+ evutil_timersub(&newtime, &lasttime, &difference);
+ elapsed = difference.tv_sec +
+ (difference.tv_usec / 1.0e6);
+
+ printf("timeout_cb called at %d: %.3f seconds elapsed.\n",
+ (int)newtime.tv_sec, elapsed);
+ lasttime = newtime;
+
+ if (! event_is_persistent) {
+ struct timeval tv;
+ evutil_timerclear(&tv);
+ tv.tv_sec = 2;
+ event_add(timeout, &tv);
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event timeout;
+ struct timeval tv;
+ struct event_base *base;
+ int flags;
+
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void)WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ if (argc == 2 && !strcmp(argv[1], "-p")) {
+ event_is_persistent = 1;
+ flags = EV_PERSIST;
+ } else {
+ event_is_persistent = 0;
+ flags = 0;
+ }
+
+ /* Initialize the event library */
+ base = event_base_new();
+
+ /* Initialize one event */
+ event_assign(&timeout, base, -1, flags, timeout_cb, (void*) &timeout);
+
+ evutil_timerclear(&tv);
+ tv.tv_sec = 2;
+ event_add(&timeout, &tv);
+
+ evutil_gettimeofday(&lasttime, NULL);
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
+ event_base_dispatch(base);
+
+ return (0);
+}
+
diff --git a/contrib/ntp/sntp/libevent/select.c b/contrib/ntp/sntp/libevent/select.c
index 8ae53cc11ec5..b1db0e44b605 100644
--- a/contrib/ntp/sntp/libevent/select.c
+++ b/contrib/ntp/sntp/libevent/select.c
@@ -98,7 +98,7 @@ const struct eventop selectops = {
select_del,
select_dispatch,
select_dealloc,
- 0, /* doesn't need reinit. */
+ 1, /* need_reinit. */
EV_FEATURE_FDS,
0,
};
diff --git a/contrib/ntp/sntp/libevent/signal.c b/contrib/ntp/sntp/libevent/signal.c
index 3f46295024e5..89f5fc171763 100644
--- a/contrib/ntp/sntp/libevent/signal.c
+++ b/contrib/ntp/sntp/libevent/signal.c
@@ -85,8 +85,10 @@
#ifndef _WIN32
/* Windows wants us to call our signal handlers as __cdecl. Nobody else
* expects you to do anything crazy like this. */
+#ifndef __cdecl
#define __cdecl
#endif
+#endif
static int evsig_add(struct event_base *, evutil_socket_t, short, short, void *);
static int evsig_del(struct event_base *, evutil_socket_t, short, short, void *);
diff --git a/contrib/ntp/sntp/libevent/strlcpy-internal.h b/contrib/ntp/sntp/libevent/strlcpy-internal.h
index cfc27ec66276..4151d601d0b1 100644
--- a/contrib/ntp/sntp/libevent/strlcpy-internal.h
+++ b/contrib/ntp/sntp/libevent/strlcpy-internal.h
@@ -6,10 +6,12 @@ extern "C" {
#endif
#include "event2/event-config.h"
+#include "event2/visibility.h"
#include "evconfig-private.h"
#ifndef EVENT__HAVE_STRLCPY
#include <string.h>
+EVENT2_EXPORT_SYMBOL
size_t event_strlcpy_(char *dst, const char *src, size_t siz);
#define strlcpy event_strlcpy_
#endif
diff --git a/contrib/ntp/sntp/libevent/test/bench.c b/contrib/ntp/sntp/libevent/test/bench.c
index 922a743add4b..f2af4d3f30d1 100644
--- a/contrib/ntp/sntp/libevent/test/bench.c
+++ b/contrib/ntp/sntp/libevent/test/bench.c
@@ -34,6 +34,7 @@
*/
#include "event2/event-config.h"
+#include "../util-internal.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -64,17 +65,19 @@
#include <event.h>
#include <evutil.h>
-static int count, writes, fired, failures;
+static ev_ssize_t count, fired;
+static int writes, failures;
static evutil_socket_t *pipes;
static int num_pipes, num_active, num_writes;
static struct event *events;
+static struct event_base *base;
static void
read_cb(evutil_socket_t fd, short which, void *arg)
{
ev_intptr_t idx = (ev_intptr_t) arg, widx = idx + 1;
- u_char ch;
+ unsigned char ch;
ev_ssize_t n;
n = recv(fd, (char*)&ch, sizeof(ch), 0);
@@ -103,11 +106,11 @@ run_once(void)
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
if (event_initialized(&events[i]))
event_del(&events[i]);
- event_set(&events[i], cp[0], EV_READ | EV_PERSIST, read_cb, (void *)(ev_intptr_t) i);
+ event_assign(&events[i], base, cp[0], EV_READ | EV_PERSIST, read_cb, (void *)(ev_intptr_t) i);
event_add(&events[i], NULL);
}
- event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
+ event_base_loop(base, EVLOOP_ONCE | EVLOOP_NONBLOCK);
fired = 0;
space = num_pipes / num_active;
@@ -117,15 +120,18 @@ run_once(void)
count = 0;
writes = num_writes;
- { int xcount = 0;
- evutil_gettimeofday(&ts, NULL);
- do {
- event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
- xcount++;
- } while (count != fired);
- evutil_gettimeofday(&te, NULL);
-
- if (xcount != count) fprintf(stderr, "Xcount: %d, Rcount: %d\n", xcount, count);
+ {
+ int xcount = 0;
+ evutil_gettimeofday(&ts, NULL);
+ do {
+ event_base_loop(base, EVLOOP_ONCE | EVLOOP_NONBLOCK);
+ xcount++;
+ } while (count != fired);
+ evutil_gettimeofday(&te, NULL);
+
+ if (xcount != count)
+ fprintf(stderr, "Xcount: %d, Rcount: " EV_SSIZE_FMT "\n",
+ xcount, count);
}
evutil_timersub(&te, &ts, &te);
@@ -136,12 +142,15 @@ run_once(void)
int
main(int argc, char **argv)
{
-#ifdef HAVE_SETRLIMIT
+#ifdef EVENT__HAVE_SETRLIMIT
struct rlimit rl;
#endif
int i, c;
struct timeval *tv;
evutil_socket_t *cp;
+ const char **methods;
+ const char *method = NULL;
+ struct event_config *cfg = NULL;
#ifdef _WIN32
WSADATA WSAData;
@@ -150,7 +159,7 @@ main(int argc, char **argv)
num_pipes = 100;
num_active = 1;
num_writes = num_pipes;
- while ((c = getopt(argc, argv, "n:a:w:")) != -1) {
+ while ((c = getopt(argc, argv, "n:a:w:m:l")) != -1) {
switch (c) {
case 'n':
num_pipes = atoi(optarg);
@@ -161,13 +170,23 @@ main(int argc, char **argv)
case 'w':
num_writes = atoi(optarg);
break;
+ case 'm':
+ method = optarg;
+ break;
+ case 'l':
+ methods = event_get_supported_methods();
+ fprintf(stdout, "Using Libevent %s. Available methods are:\n",
+ event_get_version());
+ for (i = 0; methods[i] != NULL; ++i)
+ printf(" %s\n", methods[i]);
+ exit(0);
default:
fprintf(stderr, "Illegal argument \"%c\"\n", c);
exit(1);
}
}
-#ifdef HAVE_SETRLIMIT
+#ifdef EVENT__HAVE_SETRLIMIT
rl.rlim_cur = rl.rlim_max = num_pipes * 2 + 50;
if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
perror("setrlimit");
@@ -182,7 +201,16 @@ main(int argc, char **argv)
exit(1);
}
- event_init();
+ if (method != NULL) {
+ cfg = event_config_new();
+ methods = event_get_supported_methods();
+ for (i = 0; methods[i] != NULL; ++i)
+ if (strcmp(methods[i], method))
+ event_config_avoid_method(cfg, methods[i]);
+ base = event_base_new_with_config(cfg);
+ event_config_free(cfg);
+ } else
+ base = event_base_new();
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
#ifdef USE_PIPES
diff --git a/contrib/ntp/sntp/libevent/test/bench_cascade.c b/contrib/ntp/sntp/libevent/test/bench_cascade.c
index 2d85cc1f1038..29a3203ecdd6 100644
--- a/contrib/ntp/sntp/libevent/test/bench_cascade.c
+++ b/contrib/ntp/sntp/libevent/test/bench_cascade.c
@@ -35,7 +35,8 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#else
+#include <getopt.h>
+#else /* _WIN32 */
#include <sys/socket.h>
#include <sys/resource.h>
#endif
@@ -48,7 +49,6 @@
#include <unistd.h>
#endif
#include <errno.h>
-#include <getopt.h>
#include <event.h>
#include <evutil.h>
@@ -139,7 +139,7 @@ run_once(int num_pipes)
int
main(int argc, char **argv)
{
-#ifdef HAVE_SETRLIMIT
+#ifdef EVENT__HAVE_SETRLIMIT
struct rlimit rl;
#endif
int i, c;
@@ -162,7 +162,7 @@ main(int argc, char **argv)
}
}
-#ifdef HAVE_SETRLIMIT
+#ifdef EVENT__HAVE_SETRLIMIT
rl.rlim_cur = rl.rlim_max = num_pipes * 2 + 50;
if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
perror("setrlimit");
diff --git a/contrib/ntp/sntp/libevent/test/bench_http.c b/contrib/ntp/sntp/libevent/test/bench_http.c
index 6d0d971799b5..80377ee60583 100644
--- a/contrib/ntp/sntp/libevent/test/bench_http.c
+++ b/contrib/ntp/sntp/libevent/test/bench_http.c
@@ -90,7 +90,7 @@ main(int argc, char **argv)
int i;
int c;
int use_iocp = 0;
- unsigned short port = 8080;
+ ev_uint16_t port = 8080;
char *endptr = NULL;
#ifdef _WIN32
@@ -101,6 +101,9 @@ main(int argc, char **argv)
return (1);
#endif
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
for (i = 1; i < argc; ++i) {
if (*argv[i] != '-')
continue;
@@ -138,7 +141,9 @@ main(int argc, char **argv)
#ifdef _WIN32
case 'i':
use_iocp = 1;
+#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
evthread_use_windows_threads();
+#endif
event_config_set_flag(cfg,EVENT_BASE_FLAG_STARTUP_IOCP);
break;
#endif
diff --git a/contrib/ntp/sntp/libevent/test/bench_httpclient.c b/contrib/ntp/sntp/libevent/test/bench_httpclient.c
index 1573e365bfd4..7c7ee470a307 100644
--- a/contrib/ntp/sntp/libevent/test/bench_httpclient.c
+++ b/contrib/ntp/sntp/libevent/test/bench_httpclient.c
@@ -113,13 +113,13 @@ errorcb(struct bufferevent *b, short what, void *arg)
static void
frob_socket(evutil_socket_t sock)
{
-#ifdef HAVE_SO_LINGER
+#ifdef EVENT__HAVE_STRUCT_LINGER
struct linger l;
#endif
int one = 1;
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*)&one, sizeof(one))<0)
perror("setsockopt(SO_REUSEADDR)");
-#ifdef HAVE_SO_LINGER
+#ifdef EVENT__HAVE_STRUCT_LINGER
l.l_onoff = 1;
l.l_linger = 0;
if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (void*)&l, sizeof(l))<0)
@@ -151,7 +151,7 @@ launch_request(void)
}
frob_socket(sock);
if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) < 0) {
- int e = errno;
+ int e = evutil_socket_geterror(sock);
if (! EVUTIL_ERR_CONNECT_RETRIABLE(e)) {
evutil_closesocket(sock);
return -1;
@@ -159,10 +159,6 @@ launch_request(void)
}
ri = malloc(sizeof(*ri));
- if (ri == NULL) {
- printf("Unable to allocate memory in launch_request()\n");
- return -1;
- }
ri->n_read = 0;
evutil_gettimeofday(&ri->started, NULL);
@@ -185,6 +181,12 @@ main(int argc, char **argv)
struct timeval start, end, total;
long long usec;
double throughput;
+
+#ifdef _WIN32
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+#endif
+
resource = "/ref";
setvbuf(stdout, NULL, _IONBF, 0);
@@ -230,5 +232,9 @@ main(int argc, char **argv)
(double)(usec/1000) / total_n_handled,
(I64_TYP)total_n_bytes, n_errors);
+#ifdef _WIN32
+ WSACleanup();
+#endif
+
return 0;
}
diff --git a/contrib/ntp/sntp/libevent/test/check-dumpevents.py b/contrib/ntp/sntp/libevent/test/check-dumpevents.py
index 16fe9bc92fdf..3e1df30c4f40 100755
--- a/contrib/ntp/sntp/libevent/test/check-dumpevents.py
+++ b/contrib/ntp/sntp/libevent/test/check-dumpevents.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python
#
# Post-process the output of test-dumpevents and check it for correctness.
#
@@ -15,12 +15,12 @@ try:
got_inserted_pos = text.index("Inserted events:\n")
got_active_pos = text.index("Active events:\n")
except ValueError:
- print >>sys.stderr, "Missing expected dividing line in dumpevents output"
+ sys.stderr.write("Missing expected dividing line in dumpevents output")
sys.exit(1)
if not (expect_inserted_pos < expect_active_pos <
got_inserted_pos < got_active_pos):
- print >>sys.stderr, "Sections out of order in dumpevents output"
+ sys.stderr.write("Sections out of order in dumpevents output")
sys.exit(1)
now,T= text[1].split()
@@ -45,10 +45,10 @@ cleaned_inserted = set( pat.sub(replace_time, s) for s in got_inserted
if "Internal" not in s)
if cleaned_inserted != want_inserted:
- print >>sys.stderr, "Inserted event lists were not as expected!"
+ sys.stderr.write("Inserted event lists were not as expected!")
sys.exit(1)
if set(got_active) != set(want_active):
- print >>sys.stderr, "Active event lists were not as expected!"
+ sys.stderr.write("Active event lists were not as expected!")
sys.exit(1)
diff --git a/contrib/ntp/sntp/libevent/test/include.am b/contrib/ntp/sntp/libevent/test/include.am
index 4cd49ef6306f..043752471aed 100644
--- a/contrib/ntp/sntp/libevent/test/include.am
+++ b/contrib/ntp/sntp/libevent/test/include.am
@@ -12,6 +12,7 @@ EXTRA_DIST+= \
test/regress.gen.h \
test/regress.rpc \
test/rpcgen_wrapper.sh \
+ test/print-winsock-errors.c \
test/test.sh
TESTPROGRAMS = \
@@ -42,14 +43,41 @@ noinst_HEADERS+= \
test/tinytest_local.h \
test/tinytest_macros.h
-# We need to copy this file, since automake doesn't want us to use top_srcdir
-# in TESTS.
-TESTS = test/test-script.sh
+TESTS = \
+ test_runner_epoll \
+ test_runner_select \
+ test_runner_kqueue \
+ test_runner_evport \
+ test_runner_devpoll \
+ test_runner_poll \
+ test_runner_win32 \
+ test_runner_timerfd \
+ test_runner_changelist \
+ test_runner_timerfd_changelist
+LOG_COMPILER = true
+TESTS_COMPILER = true
+
+test_runner_epoll: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b EPOLL
+test_runner_select: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b SELECT
+test_runner_kqueue: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b KQUEUE
+test_runner_evport: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b EVPORT
+test_runner_devpoll: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b DEVPOLL
+test_runner_poll: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b POLL
+test_runner_win32: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b WIN32
+test_runner_timerfd: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b "" -t
+test_runner_changelist: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b "" -c
+test_runner_timerfd_changelist: $(top_srcdir)/test/test.sh
+ $(top_srcdir)/test/test.sh -b "" -T
-test/test-script.sh: test/test.sh
- cp $(top_srcdir)/test/test.sh $@
-
-DISTCLEANFILES += test/test-script.sh
DISTCLEANFILES += test/regress.gen.c test/regress.gen.h
if BUILD_REGRESS
@@ -101,8 +129,10 @@ regress_thread_SOURCES = test/regress_thread.c
PTHREAD_LIBS += libevent_pthreads.la
endif
if BUILD_WIN32
+if THREADS
regress_thread_SOURCES = test/regress_thread.c
endif
+endif
if ZLIB_REGRESS
regress_zlib_SOURCES = test/regress_zlib.c
endif
@@ -110,7 +140,7 @@ if BUILD_WIN32
test_regress_SOURCES += test/regress_iocp.c
endif
-test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la $(PTHREAD_LIBS) $(ZLIB_LIBS)
+test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la libevent_extra.la $(PTHREAD_LIBS) $(ZLIB_LIBS)
test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS) -Itest
test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
diff --git a/contrib/ntp/sntp/libevent/test/print-winsock-errors.c b/contrib/ntp/sntp/libevent/test/print-winsock-errors.c
new file mode 100644
index 000000000000..64d6b0e70e4d
--- /dev/null
+++ b/contrib/ntp/sntp/libevent/test/print-winsock-errors.c
@@ -0,0 +1,86 @@
+#include <winsock2.h>
+#include <windows.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "event2/event.h"
+#include "event2/util.h"
+#include "event2/thread.h"
+
+#define E(x) printf (#x " -> \"%s\"\n", evutil_socket_error_to_string (x));
+
+int main (int argc, char **argv)
+{
+ int i, j;
+ const char *s1, *s2;
+
+#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
+ evthread_use_windows_threads ();
+#endif
+
+ s1 = evutil_socket_error_to_string (WSAEINTR);
+
+ for (i = 0; i < 3; i++) {
+ printf ("\niteration %d:\n\n", i);
+ E(WSAEINTR);
+ E(WSAEACCES);
+ E(WSAEFAULT);
+ E(WSAEINVAL);
+ E(WSAEMFILE);
+ E(WSAEWOULDBLOCK);
+ E(WSAEINPROGRESS);
+ E(WSAEALREADY);
+ E(WSAENOTSOCK);
+ E(WSAEDESTADDRREQ);
+ E(WSAEMSGSIZE);
+ E(WSAEPROTOTYPE);
+ E(WSAENOPROTOOPT);
+ E(WSAEPROTONOSUPPORT);
+ E(WSAESOCKTNOSUPPORT);
+ E(WSAEOPNOTSUPP);
+ E(WSAEPFNOSUPPORT);
+ E(WSAEAFNOSUPPORT);
+ E(WSAEADDRINUSE);
+ E(WSAEADDRNOTAVAIL);
+ E(WSAENETDOWN);
+ E(WSAENETUNREACH);
+ E(WSAENETRESET);
+ E(WSAECONNABORTED);
+ E(WSAECONNRESET);
+ E(WSAENOBUFS);
+ E(WSAEISCONN);
+ E(WSAENOTCONN);
+ E(WSAESHUTDOWN);
+ E(WSAETIMEDOUT);
+ E(WSAECONNREFUSED);
+ E(WSAEHOSTDOWN);
+ E(WSAEHOSTUNREACH);
+ E(WSAEPROCLIM);
+ E(WSASYSNOTREADY);
+ E(WSAVERNOTSUPPORTED);
+ E(WSANOTINITIALISED);
+ E(WSAEDISCON);
+ E(WSATYPE_NOT_FOUND);
+ E(WSAHOST_NOT_FOUND);
+ E(WSATRY_AGAIN);
+ E(WSANO_RECOVERY);
+ E(WSANO_DATA);
+ E(0xdeadbeef); /* test the case where no message is available */
+
+ /* fill up the hash table a bit to make sure it grows properly */
+ for (j = 0; j < 50; j++) {
+ int err;
+ evutil_secure_rng_get_bytes(&err, sizeof(err));
+ evutil_socket_error_to_string(err);
+ }
+ }
+
+ s2 = evutil_socket_error_to_string (WSAEINTR);
+ if (s1 != s2)
+ printf ("caching failed!\n");
+
+ libevent_global_shutdown ();
+
+ return EXIT_SUCCESS;
+}
diff --git a/contrib/ntp/sntp/libevent/test/regress.c b/contrib/ntp/sntp/libevent/test/regress.c
index 2d887f02f8ee..08c30fab9b9b 100644
--- a/contrib/ntp/sntp/libevent/test/regress.c
+++ b/contrib/ntp/sntp/libevent/test/regress.c
@@ -42,6 +42,7 @@
#ifndef _WIN32
#include <sys/socket.h>
#include <sys/wait.h>
+#include <limits.h>
#include <signal.h>
#include <unistd.h>
#include <netdb.h>
@@ -68,6 +69,7 @@
#include "time-internal.h"
#include "regress.h"
+#include "regress_thread.h"
#ifndef _WIN32
#include "regress.gen.h"
@@ -89,10 +91,6 @@ static struct timeval tcalled;
#define TEST1 "this is a test"
-#ifndef SHUT_WR
-#define SHUT_WR 1
-#endif
-
#ifdef _WIN32
#define write(fd,buf,len) send((fd),(buf),(int)(len),0)
#define read(fd,buf,len) recv((fd),(buf),(int)(len),0)
@@ -196,7 +194,7 @@ multiple_write_cb(evutil_socket_t fd, short event, void *arg)
woff += len;
if (woff >= (int)sizeof(wbuf)) {
- shutdown(fd, SHUT_WR);
+ shutdown(fd, EVUTIL_SHUT_WR);
if (usepersist)
event_del(ev);
return;
@@ -276,7 +274,7 @@ combined_write_cb(evutil_socket_t fd, short event, void *arg)
if (len == -1)
fprintf(stderr, "%s: write\n", __func__);
if (len <= 0) {
- shutdown(fd, SHUT_WR);
+ shutdown(fd, EVUTIL_SHUT_WR);
return;
}
@@ -306,7 +304,7 @@ test_simpleread(void)
tt_fail_perror("write");
}
- shutdown(pair[0], SHUT_WR);
+ shutdown(pair[0], EVUTIL_SHUT_WR);
event_set(&ev, pair[1], EV_READ, simple_read_cb, &ev);
if (event_add(&ev, NULL) == -1)
@@ -351,7 +349,7 @@ test_simpleread_multiple(void)
tt_fail_perror("write");
}
- shutdown(pair[0], SHUT_WR);
+ shutdown(pair[0], EVUTIL_SHUT_WR);
event_set(&one, pair[1], EV_READ, simpleread_multiple_cb, NULL);
if (event_add(&one, NULL) == -1)
@@ -389,7 +387,7 @@ record_event_cb(evutil_socket_t s, short what, void *ptr)
}
static void
-test_simpleclose(void *ptr)
+test_simpleclose_rw(void *ptr)
{
/* Test that a close of FD is detected as a read and as a write. */
struct event_base *base = event_base_new();
@@ -471,6 +469,56 @@ end:
event_base_free(base);
}
+static void
+test_simpleclose(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ evutil_socket_t *pair = data->pair;
+ const char *flags = (const char *)data->setup_data;
+ int et = !!strstr(flags, "ET");
+ int persist = !!strstr(flags, "persist");
+ short events = EV_CLOSED | (et ? EV_ET : 0) | (persist ? EV_PERSIST : 0);
+ struct event *ev = NULL;
+ short got_event;
+
+ if (!(event_base_get_features(data->base) & EV_FEATURE_EARLY_CLOSE))
+ tt_skip();
+
+ /* XXX: should this code moved to regress_et.c ? */
+ if (et && !(event_base_get_features(data->base) & EV_FEATURE_ET))
+ tt_skip();
+
+ ev = event_new(base, pair[0], events, record_event_cb, &got_event);
+ tt_assert(ev);
+ tt_assert(!event_add(ev, NULL));
+
+ got_event = 0;
+ if (strstr(flags, "close")) {
+ tt_assert(!evutil_closesocket(pair[1]));
+ /* avoid closing in setup routines */
+ pair[1] = -1;
+ } else if (strstr(flags, "shutdown")) {
+ tt_assert(!shutdown(pair[1], EVUTIL_SHUT_WR));
+ } else {
+ tt_abort_msg("unknown flags");
+ }
+
+ /* w/o edge-triggerd but w/ persist it will not stop */
+ if (!et && persist) {
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 10000;
+ tt_assert(!event_base_loopexit(base, &tv));
+ }
+
+ tt_int_op(event_base_loop(base, EVLOOP_NONBLOCK), ==, !persist);
+ tt_int_op(got_event, ==, (events & ~EV_PERSIST));
+
+end:
+ if (ev)
+ event_free(ev);
+}
static void
test_multiple(void)
@@ -817,33 +865,82 @@ end:
}
#ifndef _WIN32
-static void signal_cb(evutil_socket_t fd, short event, void *arg);
#define current_base event_global_current_base_
extern struct event_base *current_base;
static void
-child_signal_cb(evutil_socket_t fd, short event, void *arg)
+fork_signal_cb(evutil_socket_t fd, short events, void *arg)
{
- struct timeval tv;
- int *pint = arg;
+ event_del(arg);
+}
- *pint = 1;
+int child_pair[2] = { -1, -1 };
+static void
+simple_child_read_cb(evutil_socket_t fd, short event, void *arg)
+{
+ char buf[256];
+ int len;
- tv.tv_usec = 500000;
- tv.tv_sec = 0;
- event_loopexit(&tv);
+ len = read(fd, buf, sizeof(buf));
+ if (write(child_pair[0], "", 1) < 0)
+ tt_fail_perror("write");
+
+ if (len) {
+ if (!called) {
+ if (event_add(arg, NULL) == -1)
+ exit(1);
+ }
+ } else if (called == 1)
+ test_ok = 1;
+
+ called++;
}
+#define TEST_FORK_EXIT_SUCCESS 76
+static void fork_wait_check(int pid)
+{
+ int status;
+
+ TT_BLATHER(("Before waitpid"));
+
+#ifdef WNOWAIT
+ if ((waitpid(pid, &status, WNOWAIT) == -1 && errno == EINVAL) &&
+#else
+ if (
+#endif
+ waitpid(pid, &status, 0) == -1) {
+ perror("waitpid");
+ exit(1);
+ }
+ TT_BLATHER(("After waitpid"));
+
+ if (WEXITSTATUS(status) != TEST_FORK_EXIT_SUCCESS) {
+ fprintf(stdout, "FAILED (exit): %d\n", WEXITSTATUS(status));
+ exit(1);
+ }
+}
static void
test_fork(void)
{
- int status, got_sigchld = 0;
- struct event ev, sig_ev;
+ char c;
+ struct event ev, sig_ev, usr_ev, existing_ev;
pid_t pid;
setup_test("After fork: ");
+ {
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, child_pair) == -1) {
+ fprintf(stderr, "%s: socketpair\n", __func__);
+ exit(1);
+ }
+
+ if (evutil_make_socket_nonblocking(child_pair[0]) == -1) {
+ fprintf(stderr, "fcntl(O_NONBLOCK)");
+ exit(1);
+ }
+ }
+
tt_assert(current_base);
evthread_make_base_notifiable(current_base);
@@ -851,13 +948,16 @@ test_fork(void)
tt_fail_perror("write");
}
- event_set(&ev, pair[1], EV_READ, simple_read_cb, &ev);
+ event_set(&ev, pair[1], EV_READ, simple_child_read_cb, &ev);
if (event_add(&ev, NULL) == -1)
exit(1);
- evsignal_set(&sig_ev, SIGCHLD, child_signal_cb, &got_sigchld);
+ evsignal_set(&sig_ev, SIGCHLD, fork_signal_cb, &sig_ev);
evsignal_add(&sig_ev, NULL);
+ evsignal_set(&existing_ev, SIGUSR2, fork_signal_cb, &existing_ev);
+ evsignal_add(&existing_ev, NULL);
+
event_base_assert_ok_(current_base);
TT_BLATHER(("Before fork"));
if ((pid = regress_fork()) == 0) {
@@ -874,6 +974,11 @@ test_fork(void)
evsignal_del(&sig_ev);
+ evsignal_set(&usr_ev, SIGUSR1, fork_signal_cb, &usr_ev);
+ evsignal_add(&usr_ev, NULL);
+ kill(getpid(), SIGUSR1);
+ kill(getpid(), SIGUSR2);
+
called = 0;
event_dispatch();
@@ -883,51 +988,135 @@ test_fork(void)
/* we do not send an EOF; simple_read_cb requires an EOF
* to set test_ok. we just verify that the callback was
* called. */
- exit(test_ok != 0 || called != 2 ? -2 : 76);
+ exit(test_ok != 0 || called != 2 ? -2 : TEST_FORK_EXIT_SUCCESS);
}
- /* wait for the child to read the data */
- {
- const struct timeval tv = { 0, 100000 };
- evutil_usleep_(&tv);
+ /** wait until client read first message */
+ if (read(child_pair[1], &c, 1) < 0) {
+ tt_fail_perror("read");
}
-
if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
tt_fail_perror("write");
}
- TT_BLATHER(("Before waitpid"));
- if (waitpid(pid, &status, 0) == -1) {
- fprintf(stdout, "FAILED (fork)\n");
- exit(1);
- }
- TT_BLATHER(("After waitpid"));
-
- if (WEXITSTATUS(status) != 76) {
- fprintf(stdout, "FAILED (exit): %d\n", WEXITSTATUS(status));
- exit(1);
- }
+ fork_wait_check(pid);
/* test that the current event loop still works */
if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
fprintf(stderr, "%s: write\n", __func__);
}
- shutdown(pair[0], SHUT_WR);
+ shutdown(pair[0], EVUTIL_SHUT_WR);
- event_dispatch();
+ evsignal_set(&usr_ev, SIGUSR1, fork_signal_cb, &usr_ev);
+ evsignal_add(&usr_ev, NULL);
+ kill(getpid(), SIGUSR1);
+ kill(getpid(), SIGUSR2);
- if (!got_sigchld) {
- fprintf(stdout, "FAILED (sigchld)\n");
- exit(1);
- }
+ event_dispatch();
evsignal_del(&sig_ev);
+ tt_int_op(test_ok, ==, 1);
end:
cleanup_test();
+ if (child_pair[0] != -1)
+ evutil_closesocket(child_pair[0]);
+ if (child_pair[1] != -1)
+ evutil_closesocket(child_pair[1]);
+}
+
+#ifdef EVTHREAD_USE_PTHREADS_IMPLEMENTED
+static void* del_wait_thread(void *arg)
+{
+ struct timeval tv_start, tv_end;
+
+ evutil_gettimeofday(&tv_start, NULL);
+ event_dispatch();
+ evutil_gettimeofday(&tv_end, NULL);
+
+ test_timeval_diff_eq(&tv_start, &tv_end, 300);
+
+ end:
+ return NULL;
+}
+
+static void
+del_wait_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct timeval delay = { 0, 300*1000 };
+ TT_BLATHER(("Sleeping: %i", test_ok));
+ evutil_usleep_(&delay);
+ ++test_ok;
+}
+
+static void
+test_del_wait(void)
+{
+ struct event ev;
+ THREAD_T thread;
+
+ setup_test("event_del will wait: ");
+
+ event_set(&ev, pair[1], EV_READ|EV_PERSIST, del_wait_cb, &ev);
+ event_add(&ev, NULL);
+
+ THREAD_START(thread, del_wait_thread, NULL);
+
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ {
+ struct timeval delay = { 0, 30*1000 };
+ evutil_usleep_(&delay);
+ }
+
+ {
+ struct timeval tv_start, tv_end;
+ evutil_gettimeofday(&tv_start, NULL);
+ event_del(&ev);
+ evutil_gettimeofday(&tv_end, NULL);
+ test_timeval_diff_eq(&tv_start, &tv_end, 270);
+ }
+
+ THREAD_JOIN(thread);
+
+ tt_int_op(test_ok, ==, 1);
+
+ end:
+ ;
}
+static void null_cb(evutil_socket_t fd, short what, void *arg) {}
+static void* test_del_notify_thread(void *arg)
+{
+ event_dispatch();
+ return NULL;
+}
+static void
+test_del_notify(void)
+{
+ struct event ev;
+ THREAD_T thread;
+
+ test_ok = 1;
+
+ event_set(&ev, -1, EV_READ, null_cb, &ev);
+ event_add(&ev, NULL);
+
+ THREAD_START(thread, test_del_notify_thread, NULL);
+
+ {
+ struct timeval delay = { 0, 1000 };
+ evutil_usleep_(&delay);
+ }
+
+ event_del(&ev);
+ THREAD_JOIN(thread);
+}
+#endif
+
static void
signal_cb_sa(int sig)
{
@@ -1024,7 +1213,7 @@ test_immediatesignal(void)
test_ok = 0;
evsignal_set(&ev, SIGUSR1, signal_cb, &ev);
evsignal_add(&ev, NULL);
- raise(SIGUSR1);
+ kill(getpid(), SIGUSR1);
event_loop(EVLOOP_NONBLOCK);
evsignal_del(&ev);
cleanup_test();
@@ -1097,7 +1286,7 @@ test_signal_switchbase(void)
test_ok = 0;
/* can handle signal before loop is called */
- raise(SIGUSR1);
+ kill(getpid(), SIGUSR1);
event_base_loop(base2, EVLOOP_NONBLOCK);
if (is_kqueue) {
if (!test_ok)
@@ -1110,7 +1299,7 @@ test_signal_switchbase(void)
/* set base1 to handle signals */
event_base_loop(base1, EVLOOP_NONBLOCK);
- raise(SIGUSR1);
+ kill(getpid(), SIGUSR1);
event_base_loop(base1, EVLOOP_NONBLOCK);
event_base_loop(base2, EVLOOP_NONBLOCK);
}
@@ -1139,7 +1328,7 @@ test_signal_assert(void)
*/
evsignal_del(&ev);
- raise(SIGCONT);
+ kill(getpid(), SIGCONT);
#if 0
/* only way to verify we were in evsig_handler() */
/* XXXX Now there's no longer a good way. */
@@ -1183,7 +1372,7 @@ test_signal_restore(void)
evsignal_add(&ev, NULL);
evsignal_del(&ev);
- raise(SIGUSR1);
+ kill(getpid(), SIGUSR1);
/* 1 == signal_cb, 2 == signal_cb_sa, we want our previous handler */
if (test_ok != 2)
test_ok = 0;
@@ -1198,7 +1387,7 @@ signal_cb_swp(int sig, short event, void *arg)
{
called++;
if (called < 5)
- raise(sig);
+ kill(getpid(), sig);
else
event_loopexit(NULL);
}
@@ -1210,7 +1399,7 @@ timeout_cb_swp(evutil_socket_t fd, short event, void *arg)
called = 0;
evtimer_add((struct event *)arg, &tv);
- raise(SIGUSR1);
+ kill(getpid(), SIGUSR1);
return;
}
test_ok = 0;
@@ -1248,18 +1437,14 @@ test_free_active_base(void *ptr)
struct event ev1;
base1 = event_init();
- if (base1) {
- event_assign(&ev1, base1, data->pair[1], EV_READ,
- dummy_read_cb, NULL);
- event_add(&ev1, NULL);
- event_base_free(base1); /* should not crash */
- } else {
- tt_fail_msg("failed to create event_base for test");
- }
+ tt_assert(base1);
+ event_assign(&ev1, base1, data->pair[1], EV_READ, dummy_read_cb, NULL);
+ event_add(&ev1, NULL);
+ event_base_free(base1); /* should not crash */
base1 = event_init();
tt_assert(base1);
- event_assign(&ev1, base1, 0, 0, dummy_read_cb, NULL);
+ event_assign(&ev1, base1, data->pair[0], 0, dummy_read_cb, NULL);
event_active(&ev1, EV_READ, 1);
event_base_free(base1);
end:
@@ -1737,7 +1922,8 @@ static void send_a_byte_cb(evutil_socket_t fd, short what, void *arg)
{
evutil_socket_t *sockp = arg;
(void) fd; (void) what;
- (void) write(*sockp, "A", 1);
+ if (write(*sockp, "A", 1) < 0)
+ tt_fail_perror("write");
}
struct read_not_timeout_param
{
@@ -1820,7 +2006,7 @@ test_event_base_new(void *ptr)
tt_abort_printf(("initial write fell short (%d of %d bytes)",
len, towrite));
- if (shutdown(data->pair[0], SHUT_WR))
+ if (shutdown(data->pair[0], EVUTIL_SHUT_WR))
tt_abort_perror("initial write shutdown");
base = event_base_new();
@@ -1967,60 +2153,48 @@ re_add_read_cb(evutil_socket_t fd, short event, void *arg)
if (n_read < 0) {
tt_fail_perror("read");
event_base_loopbreak(event_get_base(ev_other));
- return;
} else {
event_add(ev_other, NULL);
++test_ok;
}
}
-
static void
-test_nonpersist_readd(void)
+test_nonpersist_readd(void *_data)
{
struct event ev1, ev2;
+ struct basic_test_data *data = _data;
- setup_test("Re-add nonpersistent events: ");
- event_set(&ev1, pair[0], EV_READ, re_add_read_cb, &ev2);
- event_set(&ev2, pair[1], EV_READ, re_add_read_cb, &ev1);
+ memset(&ev1, 0, sizeof(ev1));
+ memset(&ev2, 0, sizeof(ev2));
- if (write(pair[0], "Hello", 5) < 0) {
- tt_fail_perror("write(pair[0])");
- }
+ tt_assert(!event_assign(&ev1, data->base, data->pair[0], EV_READ, re_add_read_cb, &ev2));
+ tt_assert(!event_assign(&ev2, data->base, data->pair[1], EV_READ, re_add_read_cb, &ev1));
- if (write(pair[1], "Hello", 5) < 0) {
- tt_fail_perror("write(pair[1])\n");
- }
+ tt_int_op(write(data->pair[0], "Hello", 5), ==, 5);
+ tt_int_op(write(data->pair[1], "Hello", 5), ==, 5);
+
+ tt_int_op(event_add(&ev1, NULL), ==, 0);
+ tt_int_op(event_add(&ev2, NULL), ==, 0);
+ tt_int_op(event_base_loop(data->base, EVLOOP_ONCE), ==, 0);
+ tt_int_op(test_ok, ==, 2);
- if (event_add(&ev1, NULL) == -1 ||
- event_add(&ev2, NULL) == -1) {
- test_ok = 0;
- }
- if (test_ok != 0)
- exit(1);
- event_loop(EVLOOP_ONCE);
- if (test_ok != 2)
- exit(1);
/* At this point, we executed both callbacks. Whichever one got
* called first added the second, but the second then immediately got
* deleted before its callback was called. At this point, though, it
* re-added the first.
*/
- if (!readd_test_event_last_added) {
- test_ok = 0;
- } else if (readd_test_event_last_added == &ev1) {
- if (!event_pending(&ev1, EV_READ, NULL) ||
- event_pending(&ev2, EV_READ, NULL))
- test_ok = 0;
+ tt_assert(readd_test_event_last_added);
+ if (readd_test_event_last_added == &ev1) {
+ tt_assert(event_pending(&ev1, EV_READ, NULL) && !event_pending(&ev2, EV_READ, NULL));
} else {
- if (event_pending(&ev1, EV_READ, NULL) ||
- !event_pending(&ev2, EV_READ, NULL))
- test_ok = 0;
+ tt_assert(event_pending(&ev2, EV_READ, NULL) && !event_pending(&ev1, EV_READ, NULL));
}
- event_del(&ev1);
- event_del(&ev2);
-
- cleanup_test();
+end:
+ if (event_initialized(&ev1))
+ event_del(&ev1);
+ if (event_initialized(&ev2))
+ event_del(&ev2);
}
struct test_pri_event {
@@ -2290,7 +2464,7 @@ end:
static void
evtag_fuzz(void *ptr)
{
- u_char buffer[4096];
+ unsigned char buffer[4096];
struct evbuffer *tmp = evbuffer_new();
struct timeval tv;
int i, j;
@@ -2649,7 +2823,7 @@ test_event_once(void *ptr)
tt_fail_perror("write");
}
- shutdown(data->pair[1], SHUT_WR);
+ shutdown(data->pair[1], EVUTIL_SHUT_WR);
event_base_dispatch(data->base);
@@ -2733,15 +2907,47 @@ end:
}
}
-#ifndef _WIN32
-/* You can't do this test on windows, since dup2 doesn't work on sockets */
-
static void
dfd_cb(evutil_socket_t fd, short e, void *data)
{
*(int*)data = (int)e;
}
+static void
+test_event_closed_fd_poll(void *arg)
+{
+ struct timeval tv;
+ struct event *e;
+ struct basic_test_data *data = (struct basic_test_data *)arg;
+ int i = 0;
+
+ if (strcmp(event_base_get_method(data->base), "poll")) {
+ tinytest_set_test_skipped_();
+ return;
+ }
+
+ e = event_new(data->base, data->pair[0], EV_READ, dfd_cb, &i);
+ tt_assert(e);
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 500 * 1000;
+ event_add(e, &tv);
+ tt_assert(event_pending(e, EV_READ, NULL));
+ close(data->pair[0]);
+ data->pair[0] = -1; /** avoids double-close */
+ event_base_loop(data->base, EVLOOP_ONCE);
+ tt_int_op(i, ==, EV_READ);
+
+end:
+ if (e) {
+ event_del(e);
+ event_free(e);
+ }
+}
+
+#ifndef _WIN32
+/* You can't do this test on windows, since dup2 doesn't work on sockets */
+
/* Regression test for our workaround for a fun epoll/linux related bug
* where fd2 = dup(fd1); add(fd2); close(fd2); dup2(fd1,fd2); add(fd2)
* will get you an EEXIST */
@@ -2823,10 +3029,6 @@ static void *
dummy_malloc(size_t len)
{
char *mem = malloc(len+16);
- if (mem == NULL) {
- fprintf(stderr, "Unable to allocate memory in dummy_malloc()\n");
- return NULL;
- }
memcpy(mem, "{[<guardedram>]}", 16);
return mem+16;
}
@@ -2910,6 +3112,7 @@ test_many_events(void *arg)
* instance of that. */
sock[i] = socket(AF_INET, SOCK_DGRAM, 0);
tt_assert(sock[i] >= 0);
+ tt_assert(!evutil_make_socket_nonblocking(sock[i]));
called[i] = 0;
ev[i] = event_new(base, sock[i], EV_WRITE|evflags,
many_event_cb, &called[i]);
@@ -2963,7 +3166,7 @@ test_get_assignment(void *arg)
event_get_assignment(ev1, &b, &s, &what, &cb, &cb_arg);
tt_ptr_op(b, ==, base);
- tt_int_op(s, ==, data->pair[1]);
+ tt_fd_op(s, ==, data->pair[1]);
tt_int_op(what, ==, EV_READ);
tt_ptr_op(cb, ==, dummy_read_cb);
tt_ptr_op(cb_arg, ==, str);
@@ -3149,6 +3352,46 @@ tabf_cb(evutil_socket_t fd, short what, void *arg)
}
static void
+test_evmap_invalid_slots(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct event *ev1 = NULL, *ev2 = NULL;
+ int e1, e2;
+#ifndef _WIN32
+ struct event *ev3 = NULL, *ev4 = NULL;
+ int e3, e4;
+#endif
+
+ ev1 = evsignal_new(base, -1, dummy_read_cb, (void *)base);
+ ev2 = evsignal_new(base, NSIG, dummy_read_cb, (void *)base);
+ tt_assert(ev1);
+ tt_assert(ev2);
+ e1 = event_add(ev1, NULL);
+ e2 = event_add(ev2, NULL);
+ tt_int_op(e1, !=, 0);
+ tt_int_op(e2, !=, 0);
+#ifndef _WIN32
+ ev3 = event_new(base, INT_MAX, EV_READ, dummy_read_cb, (void *)base);
+ ev4 = event_new(base, INT_MAX / 2, EV_READ, dummy_read_cb, (void *)base);
+ tt_assert(ev3);
+ tt_assert(ev4);
+ e3 = event_add(ev3, NULL);
+ e4 = event_add(ev4, NULL);
+ tt_int_op(e3, !=, 0);
+ tt_int_op(e4, !=, 0);
+#endif
+
+end:
+ event_free(ev1);
+ event_free(ev2);
+#ifndef _WIN32
+ event_free(ev3);
+ event_free(ev4);
+#endif
+}
+
+static void
test_active_by_fd(void *arg)
{
struct basic_test_data *data = arg;
@@ -3199,6 +3442,7 @@ test_active_by_fd(void *arg)
/* Trigger 2, 3, 4 */
event_base_active_by_fd(base, data->pair[0], EV_WRITE);
event_base_active_by_fd(base, data->pair[1], EV_READ);
+ event_base_active_by_fd(base, data->pair[1], EV_TIMEOUT);
#ifndef _WIN32
event_base_active_by_signal(base, SIGHUP);
#endif
@@ -3211,7 +3455,7 @@ test_active_by_fd(void *arg)
tt_int_op(e2, ==, EV_WRITE | 0x10000);
tt_int_op(e3, ==, EV_READ | 0x10000);
/* Mask out EV_WRITE here, since it could be genuinely writeable. */
- tt_int_op((e4 & ~EV_WRITE), ==, EV_READ | 0x10000);
+ tt_int_op((e4 & ~EV_WRITE), ==, EV_READ | EV_TIMEOUT | 0x10000);
#ifndef _WIN32
tt_int_op(es, ==, EV_SIGNAL | 0x10000);
#endif
@@ -3246,17 +3490,18 @@ struct testcase_t main_testcases[] = {
BASIC(event_assign_selfarg, TT_FORK|TT_NEED_BASE),
BASIC(event_base_get_num_events, TT_FORK|TT_NEED_BASE),
BASIC(event_base_get_max_events, TT_FORK|TT_NEED_BASE),
+ BASIC(evmap_invalid_slots, TT_FORK|TT_NEED_BASE),
BASIC(bad_assign, TT_FORK|TT_NEED_BASE|TT_NO_LOGS),
BASIC(bad_reentrant, TT_FORK|TT_NEED_BASE|TT_NO_LOGS),
- BASIC(active_later, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
+ BASIC(active_later, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR|TT_RETRIABLE),
BASIC(event_remove_timeout, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
/* These are still using the old API */
LEGACY(persistent_timeout, TT_FORK|TT_NEED_BASE),
{ "persistent_timeout_jump", test_persistent_timeout_jump, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "persistent_active_timeout", test_persistent_active_timeout,
- TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ TT_FORK|TT_NEED_BASE|TT_RETRIABLE, &basic_setup, NULL },
LEGACY(priorities, TT_FORK|TT_NEED_BASE),
BASIC(priority_active_inversion, TT_FORK|TT_NEED_BASE),
{ "common_timeout", test_common_timeout, TT_FORK|TT_NEED_BASE,
@@ -3266,8 +3511,35 @@ struct testcase_t main_testcases[] = {
LEGACY(simpleread, TT_ISOLATED),
LEGACY(simpleread_multiple, TT_ISOLATED),
LEGACY(simplewrite, TT_ISOLATED),
- { "simpleclose", test_simpleclose, TT_FORK, &basic_setup,
- NULL },
+ { "simpleclose_rw", test_simpleclose_rw, TT_FORK, &basic_setup, NULL },
+ /* simpleclose */
+ { "simpleclose_close", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"close" },
+ { "simpleclose_shutdown", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"shutdown" },
+ /* simpleclose_*_persist */
+ { "simpleclose_close_persist", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"close_persist" },
+ { "simpleclose_shutdown_persist", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"shutdown_persist" },
+ /* simpleclose_*_et */
+ { "simpleclose_close_et", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"close_ET" },
+ { "simpleclose_shutdown_et", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"shutdown_ET" },
+ /* simpleclose_*_persist_et */
+ { "simpleclose_close_persist_et", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"close_persist_ET" },
+ { "simpleclose_shutdown_persist_et", test_simpleclose,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE,
+ &basic_setup, (void *)"shutdown_persist_ET" },
LEGACY(multiple, TT_ISOLATED),
LEGACY(persistent, TT_ISOLATED),
LEGACY(combined, TT_ISOLATED),
@@ -3275,13 +3547,16 @@ struct testcase_t main_testcases[] = {
LEGACY(loopbreak, TT_ISOLATED),
LEGACY(loopexit, TT_ISOLATED),
LEGACY(loopexit_multiple, TT_ISOLATED),
- LEGACY(nonpersist_readd, TT_ISOLATED),
+ { "nonpersist_readd", test_nonpersist_readd, TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE, &basic_setup, NULL },
LEGACY(multiple_events_for_same_fd, TT_ISOLATED),
LEGACY(want_only_once, TT_ISOLATED),
{ "event_once", test_event_once, TT_ISOLATED, &basic_setup, NULL },
{ "event_once_never", test_event_once_never, TT_ISOLATED, &basic_setup, NULL },
{ "event_pending", test_event_pending, TT_ISOLATED, &basic_setup,
NULL },
+ { "event_closed_fd_poll", test_event_closed_fd_poll, TT_ISOLATED, &basic_setup,
+ NULL },
+
#ifndef _WIN32
{ "dup_fd", test_dup_fd, TT_ISOLATED, &basic_setup, NULL },
#endif
@@ -3304,6 +3579,12 @@ struct testcase_t main_testcases[] = {
#ifndef _WIN32
LEGACY(fork, TT_ISOLATED),
#endif
+
+#ifdef EVTHREAD_USE_PTHREADS_IMPLEMENTED
+ LEGACY(del_wait, TT_ISOLATED|TT_NEED_THREADS|TT_RETRIABLE),
+ LEGACY(del_notify, TT_ISOLATED|TT_NEED_THREADS),
+#endif
+
END_OF_TESTCASES
};
diff --git a/contrib/ntp/sntp/libevent/test/regress.gen.c b/contrib/ntp/sntp/libevent/test/regress.gen.c
index 883cb40d946e..e1fff3f9b9a7 100644
--- a/contrib/ntp/sntp/libevent/test/regress.gen.c
+++ b/contrib/ntp/sntp/libevent/test/regress.gen.c
@@ -1,3 +1,4 @@
+
/*
* Automatically generated from /ntpbuild/data/snaps/ntp-stable/sntp/libevent/test/regress.rpc
* by event_rpcgen.py/0.1. DO NOT EDIT THIS FILE.
@@ -11,8 +12,14 @@
#include <event2/buffer.h>
#include <event2/tag.h>
-#ifdef EVENT____func__
-#define __func__ EVENT____func__
+#if defined(EVENT__HAVE___func__)
+# ifndef __func__
+# define __func__ __func__
+# endif
+#elif defined(EVENT__HAVE___FUNCTION__)
+# define __func__ __FUNCTION__
+#else
+# define __func__ __FILE__
#endif
@@ -21,7 +28,6 @@
void event_warn(const char *fmt, ...);
void event_warnx(const char *fmt, ...);
-
/*
* Implementation of msg
*/
@@ -86,7 +92,8 @@ msg_run_expand_to_hold_more(struct msg *msg)
return -1;
msg->run_data = new_data;
msg->run_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
struct run*
msg_run_add(struct msg *msg)
@@ -168,7 +175,7 @@ msg_attack_assign(struct msg *msg,
int
msg_run_assign(struct msg *msg, int off,
- const struct run* value)
+ const struct run* value)
{
if (!msg->run_set || off < 0 || off >= msg->run_length)
return (-1);
@@ -188,7 +195,8 @@ msg_run_assign(struct msg *msg, int off,
had_error = 1;
goto done;
}
- done:if (tmp != NULL)
+ done:
+ if (tmp != NULL)
evbuffer_free(tmp);
if (had_error) {
run_clear(msg->run_data[off]);
@@ -295,7 +303,7 @@ msg_free(struct msg *tmp)
}
void
-msg_marshal(struct evbuffer *evbuf, const struct msg *tmp){
+msg_marshal(struct evbuffer *evbuf, const struct msg *tmp) {
evtag_marshal_string(evbuf, MSG_FROM_NAME, tmp->from_name_data);
evtag_marshal_string(evbuf, MSG_TO_NAME, tmp->to_name_data);
if (tmp->attack_set) {
@@ -312,7 +320,7 @@ msg_marshal(struct evbuffer *evbuf, const struct msg *tmp){
}
int
-msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
+msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
{
ev_uint32_t tag;
while (evbuffer_get_length(evbuf) > 0) {
@@ -321,7 +329,6 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
switch (tag) {
case MSG_FROM_NAME:
-
if (tmp->from_name_set)
return (-1);
if (evtag_unmarshal_string(evbuf, MSG_FROM_NAME, &tmp->from_name_data) == -1) {
@@ -330,9 +337,7 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
}
tmp->from_name_set = 1;
break;
-
case MSG_TO_NAME:
-
if (tmp->to_name_set)
return (-1);
if (evtag_unmarshal_string(evbuf, MSG_TO_NAME, &tmp->to_name_data) == -1) {
@@ -341,23 +346,20 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
}
tmp->to_name_set = 1;
break;
-
case MSG_ATTACK:
-
if (tmp->attack_set)
return (-1);
tmp->attack_data = kill_new();
if (tmp->attack_data == NULL)
return (-1);
- if (evtag_unmarshal_kill(evbuf, MSG_ATTACK, tmp->attack_data) == -1) {
+ if (evtag_unmarshal_kill(evbuf, MSG_ATTACK,
+ tmp->attack_data) == -1) {
event_warnx("%s: failed to unmarshal attack", __func__);
return (-1);
}
tmp->attack_set = 1;
break;
-
case MSG_RUN:
-
if (tmp->run_length >= tmp->run_num_allocated &&
msg_run_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -366,14 +368,14 @@ msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
tmp->run_data[tmp->run_length] = run_new();
if (tmp->run_data[tmp->run_length] == NULL)
return (-1);
- if (evtag_unmarshal_run(evbuf, MSG_RUN, tmp->run_data[tmp->run_length]) == -1) {
+ if (evtag_unmarshal_run(evbuf, MSG_RUN,
+ tmp->run_data[tmp->run_length]) == -1) {
event_warnx("%s: failed to unmarshal run", __func__);
return (-1);
}
++tmp->run_length;
tmp->run_set = 1;
break;
-
default:
return -1;
}
@@ -404,7 +406,8 @@ msg_complete(struct msg *msg)
}
int
-evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag, struct msg *msg)
+evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct msg *msg)
{
ev_uint32_t tag;
int res = -1;
@@ -425,13 +428,14 @@ evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag, struct msg *ms
}
void
-evtag_marshal_msg(struct evbuffer *evbuf, ev_uint32_t tag, const struct msg *msg)
+evtag_marshal_msg(struct evbuffer *evbuf, ev_uint32_t tag,
+ const struct msg *msg)
{
struct evbuffer *buf_ = evbuffer_new();
assert(buf_ != NULL);
msg_marshal(buf_, msg);
evtag_marshal_buffer(evbuf, tag, buf_);
- evbuffer_free(buf_);
+ evbuffer_free(buf_);
}
/*
@@ -492,7 +496,8 @@ kill_how_often_expand_to_hold_more(struct kill *msg)
return -1;
msg->how_often_data = new_data;
msg->how_often_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
ev_uint32_t *
kill_how_often_add(struct kill *msg, const ev_uint32_t value)
@@ -535,7 +540,7 @@ kill_action_assign(struct kill *msg,
int
kill_how_often_assign(struct kill *msg, int off,
- const ev_uint32_t value)
+ const ev_uint32_t value)
{
if (!msg->how_often_set || off < 0 || off >= msg->how_often_length)
return (-1);
@@ -615,7 +620,7 @@ kill_free(struct kill *tmp)
}
void
-kill_marshal(struct evbuffer *evbuf, const struct kill *tmp){
+kill_marshal(struct evbuffer *evbuf, const struct kill *tmp) {
evtag_marshal_string(evbuf, KILL_WEAPON, tmp->weapon_data);
evtag_marshal_string(evbuf, KILL_ACTION, tmp->action_data);
if (tmp->how_often_set) {
@@ -629,7 +634,7 @@ kill_marshal(struct evbuffer *evbuf, const struct kill *tmp){
}
int
-kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
+kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
{
ev_uint32_t tag;
while (evbuffer_get_length(evbuf) > 0) {
@@ -638,7 +643,6 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
switch (tag) {
case KILL_WEAPON:
-
if (tmp->weapon_set)
return (-1);
if (evtag_unmarshal_string(evbuf, KILL_WEAPON, &tmp->weapon_data) == -1) {
@@ -647,9 +651,7 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
}
tmp->weapon_set = 1;
break;
-
case KILL_ACTION:
-
if (tmp->action_set)
return (-1);
if (evtag_unmarshal_string(evbuf, KILL_ACTION, &tmp->action_data) == -1) {
@@ -658,9 +660,7 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
}
tmp->action_set = 1;
break;
-
case KILL_HOW_OFTEN:
-
if (tmp->how_often_length >= tmp->how_often_num_allocated &&
kill_how_often_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -673,7 +673,6 @@ kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
++tmp->how_often_length;
tmp->how_often_set = 1;
break;
-
default:
return -1;
}
@@ -695,7 +694,8 @@ kill_complete(struct kill *msg)
}
int
-evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag, struct kill *msg)
+evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct kill *msg)
{
ev_uint32_t tag;
int res = -1;
@@ -716,13 +716,14 @@ evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag, struct kill *
}
void
-evtag_marshal_kill(struct evbuffer *evbuf, ev_uint32_t tag, const struct kill *msg)
+evtag_marshal_kill(struct evbuffer *evbuf, ev_uint32_t tag,
+ const struct kill *msg)
{
struct evbuffer *buf_ = evbuffer_new();
assert(buf_ != NULL);
kill_marshal(buf_, msg);
evtag_marshal_buffer(evbuf, tag, buf_);
- evbuffer_free(buf_);
+ evbuffer_free(buf_);
}
/*
@@ -803,7 +804,8 @@ run_notes_expand_to_hold_more(struct run *msg)
return -1;
msg->notes_data = new_data;
msg->notes_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
char * *
run_notes_add(struct run *msg, const char * value)
@@ -840,7 +842,8 @@ run_other_numbers_expand_to_hold_more(struct run *msg)
return -1;
msg->other_numbers_data = new_data;
msg->other_numbers_num_allocated = tobe_allocated;
- return 0;}
+ return 0;
+}
ev_uint32_t *
run_other_numbers_add(struct run *msg, const ev_uint32_t value)
@@ -893,7 +896,7 @@ run_fixed_bytes_assign(struct run *msg, const ev_uint8_t *value)
int
run_notes_assign(struct run *msg, int off,
- const char * value)
+ const char * value)
{
if (!msg->notes_set || off < 0 || off >= msg->notes_length)
return (-1);
@@ -920,7 +923,7 @@ run_large_number_assign(struct run *msg, const ev_uint64_t value)
int
run_other_numbers_assign(struct run *msg, int off,
- const ev_uint32_t value)
+ const ev_uint32_t value)
{
if (!msg->other_numbers_set || off < 0 || off >= msg->other_numbers_length)
return (-1);
@@ -1056,7 +1059,7 @@ run_free(struct run *tmp)
}
void
-run_marshal(struct evbuffer *evbuf, const struct run *tmp){
+run_marshal(struct evbuffer *evbuf, const struct run *tmp) {
evtag_marshal_string(evbuf, RUN_HOW, tmp->how_data);
if (tmp->some_bytes_set) {
evtag_marshal(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length);
@@ -1084,7 +1087,7 @@ run_marshal(struct evbuffer *evbuf, const struct run *tmp){
}
int
-run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
+run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
{
ev_uint32_t tag;
while (evbuffer_get_length(evbuf) > 0) {
@@ -1093,7 +1096,6 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
switch (tag) {
case RUN_HOW:
-
if (tmp->how_set)
return (-1);
if (evtag_unmarshal_string(evbuf, RUN_HOW, &tmp->how_data) == -1) {
@@ -1102,9 +1104,7 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->how_set = 1;
break;
-
case RUN_SOME_BYTES:
-
if (tmp->some_bytes_set)
return (-1);
if (evtag_payload_length(evbuf, &tmp->some_bytes_length) == -1)
@@ -1119,9 +1119,7 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->some_bytes_set = 1;
break;
-
case RUN_FIXED_BYTES:
-
if (tmp->fixed_bytes_set)
return (-1);
if (evtag_unmarshal_fixed(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, (24)) == -1) {
@@ -1130,9 +1128,7 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->fixed_bytes_set = 1;
break;
-
case RUN_NOTES:
-
if (tmp->notes_length >= tmp->notes_num_allocated &&
run_notes_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -1145,9 +1141,7 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
++tmp->notes_length;
tmp->notes_set = 1;
break;
-
case RUN_LARGE_NUMBER:
-
if (tmp->large_number_set)
return (-1);
if (evtag_unmarshal_int64(evbuf, RUN_LARGE_NUMBER, &tmp->large_number_data) == -1) {
@@ -1156,9 +1150,7 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
}
tmp->large_number_set = 1;
break;
-
case RUN_OTHER_NUMBERS:
-
if (tmp->other_numbers_length >= tmp->other_numbers_num_allocated &&
run_other_numbers_expand_to_hold_more(tmp) < 0) {
puts("HEY NOW");
@@ -1171,7 +1163,6 @@ run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
++tmp->other_numbers_length;
tmp->other_numbers_set = 1;
break;
-
default:
return -1;
}
@@ -1193,7 +1184,8 @@ run_complete(struct run *msg)
}
int
-evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag, struct run *msg)
+evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct run *msg)
{
ev_uint32_t tag;
int res = -1;
@@ -1214,12 +1206,13 @@ evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag, struct run *ms
}
void
-evtag_marshal_run(struct evbuffer *evbuf, ev_uint32_t tag, const struct run *msg)
+evtag_marshal_run(struct evbuffer *evbuf, ev_uint32_t tag,
+ const struct run *msg)
{
struct evbuffer *buf_ = evbuffer_new();
assert(buf_ != NULL);
run_marshal(buf_, msg);
evtag_marshal_buffer(evbuf, tag, buf_);
- evbuffer_free(buf_);
+ evbuffer_free(buf_);
}
diff --git a/contrib/ntp/sntp/libevent/test/regress.gen.h b/contrib/ntp/sntp/libevent/test/regress.gen.h
index fc4db4003456..d6b917ba16da 100644
--- a/contrib/ntp/sntp/libevent/test/regress.gen.h
+++ b/contrib/ntp/sntp/libevent/test/regress.gen.h
@@ -1,3 +1,4 @@
+
/*
* Automatically generated from /ntpbuild/data/snaps/ntp-stable/sntp/libevent/test/regress.rpc
*/
@@ -5,9 +6,9 @@
#ifndef EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_
#define EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_
+
#include <event2/util.h> /* for ev_uint*_t */
#include <event2/rpc.h>
-
struct msg;
struct kill;
struct run;
@@ -204,4 +205,4 @@ int run_other_numbers_get(struct run *, int, ev_uint32_t *);
ev_uint32_t * run_other_numbers_add(struct run *msg, const ev_uint32_t value);
/* --- run done --- */
-#endif /* EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_ */
+#endif /* EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_ */ \ No newline at end of file
diff --git a/contrib/ntp/sntp/libevent/test/regress.h b/contrib/ntp/sntp/libevent/test/regress.h
index bbfefe6739e4..43cb4eaf1e69 100644
--- a/contrib/ntp/sntp/libevent/test/regress.h
+++ b/contrib/ntp/sntp/libevent/test/regress.h
@@ -43,6 +43,7 @@ extern struct testcase_t bufferevent_iocp_testcases[];
extern struct testcase_t util_testcases[];
extern struct testcase_t signal_testcases[];
extern struct testcase_t http_testcases[];
+extern struct testcase_t http_iocp_testcases[];
extern struct testcase_t dns_testcases[];
extern struct testcase_t rpc_testcases[];
extern struct testcase_t edgetriggered_testcases[];
@@ -94,6 +95,7 @@ extern int libevent_tests_running_in_debug_mode;
#define TT_NO_LOGS (TT_FIRST_USER_FLAG<<5)
#define TT_ENABLE_IOCP_FLAG (TT_FIRST_USER_FLAG<<6)
#define TT_ENABLE_IOCP (TT_ENABLE_IOCP_FLAG|TT_NEED_THREADS)
+#define TT_ENABLE_DEBUG_MODE (TT_ENABLE_IOCP_FLAG<<7)
/* All the flags that a legacy test needs. */
#define TT_ISOLATED TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE
@@ -129,6 +131,17 @@ long timeval_msec_diff(const struct timeval *start, const struct timeval *end);
pid_t regress_fork(void);
#endif
+#ifdef EVENT__HAVE_OPENSSL
+#include <openssl/ssl.h>
+EVP_PKEY *ssl_getkey(void);
+X509 *ssl_getcert(EVP_PKEY *key);
+SSL_CTX *get_ssl_ctx(void);
+void init_ssl(void);
+#endif
+
+void * basic_test_setup(const struct testcase_t *testcase);
+int basic_test_cleanup(const struct testcase_t *testcase, void *ptr);
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/sntp/libevent/test/regress_buffer.c b/contrib/ntp/sntp/libevent/test/regress_buffer.c
index 4d6a5de20b33..f259b924bff0 100644
--- a/contrib/ntp/sntp/libevent/test/regress_buffer.c
+++ b/contrib/ntp/sntp/libevent/test/regress_buffer.c
@@ -63,6 +63,8 @@
#include "regress.h"
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+
/* Validates that an evbuffer is good. Returns false if it isn't, true if it
* is*/
static int
@@ -198,7 +200,7 @@ test_evbuffer(void *ptr)
tt_assert(evbuffer_get_length(evb_two) == 0);
tt_assert(evbuffer_get_length(evb) == 7);
- tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7) != 0);
+ tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7));
memset(buffer, 0, sizeof(buffer));
evbuffer_add(evb, buffer, sizeof(buffer));
@@ -294,33 +296,306 @@ no_cleanup(const void *data, size_t datalen, void *extra)
static void
test_evbuffer_remove_buffer_with_empty(void *ptr)
{
- struct evbuffer *src = evbuffer_new();
- struct evbuffer *dst = evbuffer_new();
- char buf[2];
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ char buf[2] = { 'A', 'A' };
- evbuffer_validate(src);
- evbuffer_validate(dst);
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
- /* setup the buffers */
- /* we need more data in src than we will move later */
- evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
- evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
- /* we need one buffer in dst and one empty buffer at the end */
- evbuffer_add(dst, buf, sizeof(buf));
- evbuffer_add_reference(dst, buf, 0, no_cleanup, NULL);
+ /* setup the buffers */
+ /* we need more data in src than we will move later */
+ evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
+ evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
+ /* we need one buffer in dst and one empty buffer at the end */
+ evbuffer_add(dst, buf, sizeof(buf));
+ evbuffer_add_reference(dst, buf, 0, no_cleanup, NULL);
- evbuffer_validate(src);
- evbuffer_validate(dst);
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
- /* move three bytes over */
- evbuffer_remove_buffer(src, dst, 3);
+ tt_mem_op(evbuffer_pullup(src, -1), ==, "AAAA", 4);
+ tt_mem_op(evbuffer_pullup(dst, -1), ==, "AA", 2);
- evbuffer_validate(src);
- evbuffer_validate(dst);
+ /* move three bytes over */
+ evbuffer_remove_buffer(src, dst, 3);
-end:
- evbuffer_free(src);
- evbuffer_free(dst);
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ tt_mem_op(evbuffer_pullup(src, -1), ==, "A", 1);
+ tt_mem_op(evbuffer_pullup(dst, -1), ==, "AAAAA", 5);
+
+ end:
+ evbuffer_free(src);
+ evbuffer_free(dst);
+}
+
+static void
+test_evbuffer_remove_buffer_with_empty2(void *ptr)
+{
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ struct evbuffer *buf = evbuffer_new();
+
+ evbuffer_add(buf, "foo", 3);
+ evbuffer_add_reference(buf, "foo", 3, NULL, NULL);
+
+ evbuffer_add_reference(src, "foo", 3, NULL, NULL);
+ evbuffer_add_reference(src, NULL, 0, NULL, NULL);
+ evbuffer_add_buffer(src, buf);
+
+ evbuffer_add(buf, "foo", 3);
+ evbuffer_add_reference(buf, "foo", 3, NULL, NULL);
+
+ evbuffer_add_reference(dst, "foo", 3, NULL, NULL);
+ evbuffer_add_reference(dst, NULL, 0, NULL, NULL);
+ evbuffer_add_buffer(dst, buf);
+
+ tt_int_op(evbuffer_get_length(src), ==, 9);
+ tt_int_op(evbuffer_get_length(dst), ==, 9);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ tt_mem_op(evbuffer_pullup(src, -1), ==, "foofoofoo", 9);
+ tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoofoo", 9);
+
+ evbuffer_remove_buffer(src, dst, 8);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ tt_int_op(evbuffer_get_length(src), ==, 1);
+ tt_int_op(evbuffer_get_length(dst), ==, 17);
+
+ tt_mem_op(evbuffer_pullup(src, -1), ==, "o", 1);
+ tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoofoofoofoofo", 17);
+
+ end:
+ evbuffer_free(src);
+ evbuffer_free(dst);
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_remove_buffer_with_empty3(void *ptr)
+{
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ struct evbuffer *buf = evbuffer_new();
+
+ evbuffer_add(buf, "foo", 3);
+ evbuffer_add_reference(buf, NULL, 0, NULL, NULL);
+
+ evbuffer_add_reference(src, "foo", 3, NULL, NULL);
+ evbuffer_add_reference(src, NULL, 0, NULL, NULL);
+ evbuffer_prepend_buffer(src, buf);
+
+ evbuffer_add(buf, "foo", 3);
+ evbuffer_add_reference(buf, NULL, 0, NULL, NULL);
+
+ evbuffer_add_reference(dst, "foo", 3, NULL, NULL);
+ evbuffer_add_reference(dst, NULL, 0, NULL, NULL);
+ evbuffer_prepend_buffer(dst, buf);
+
+ tt_int_op(evbuffer_get_length(src), ==, 6);
+ tt_int_op(evbuffer_get_length(dst), ==, 6);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ tt_mem_op(evbuffer_pullup(src, -1), ==, "foofoo", 6);
+ tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoo", 6);
+
+ evbuffer_remove_buffer(src, dst, 5);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ tt_int_op(evbuffer_get_length(src), ==, 1);
+ tt_int_op(evbuffer_get_length(dst), ==, 11);
+
+ tt_mem_op(evbuffer_pullup(src, -1), ==, "o", 1);
+ tt_mem_op(evbuffer_pullup(dst, -1), ==, "foofoofoofo", 11);
+
+ end:
+ evbuffer_free(src);
+ evbuffer_free(dst);
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_pullup_with_empty(void *ptr)
+{
+ struct evbuffer *buf = NULL;
+
+ buf = evbuffer_new();
+ evbuffer_add(buf, "foo", 3);
+ evbuffer_add_reference(buf, NULL, 0, NULL, NULL);
+ evbuffer_validate(buf);
+ tt_int_op(evbuffer_get_length(buf), ==, 3);
+ tt_mem_op(evbuffer_pullup(buf, -1), ==, "foo", 3);
+
+ evbuffer_free(buf);
+ buf = evbuffer_new();
+ evbuffer_validate(buf);
+ tt_int_op(evbuffer_get_length(buf), ==, 0);
+ tt_int_op(evbuffer_pullup(buf, -1), ==, NULL);
+
+ evbuffer_free(buf);
+ buf = evbuffer_new();
+ evbuffer_add(buf, "foo", 3);
+ evbuffer_add_reference(buf, NULL, 0, NULL, NULL);
+ evbuffer_validate(buf);
+ tt_mem_op(evbuffer_pullup(buf, 3), ==, "foo", 3);
+
+ end:
+ if (buf)
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_remove_buffer_with_empty_front(void *ptr)
+{
+ struct evbuffer *buf1 = NULL, *buf2 = NULL;
+
+ buf1 = evbuffer_new();
+ tt_assert(buf1);
+
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+
+ tt_int_op(evbuffer_add_reference(buf1, "foo", 3, NULL, NULL), ==, 0);
+ tt_int_op(evbuffer_prepend(buf1, "", 0), ==, 0);
+ tt_int_op(evbuffer_remove_buffer(buf1, buf2, 1), ==, 1);
+ tt_int_op(evbuffer_add(buf1, "bar", 3), ==, 0);
+ tt_mem_op(evbuffer_pullup(buf1, -1), ==, "oobar", 5);
+
+ evbuffer_validate(buf1);
+ evbuffer_validate(buf2);
+
+ end:
+ if (buf1)
+ evbuffer_free(buf1);
+ if (buf2)
+ evbuffer_free(buf2);
+}
+
+static void
+test_evbuffer_remove_buffer_adjust_last_with_datap_with_empty(void *ptr)
+{
+ struct evbuffer *buf1 = NULL, *buf2 = NULL;
+
+ buf1 = evbuffer_new();
+ tt_assert(buf1);
+
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+
+ tt_int_op(evbuffer_add(buf1, "aaaaaa", 6), ==, 0);
+
+ // buf1: aaaaaab
+ // buf2:
+ {
+ struct evbuffer_iovec iovecs[2];
+ /** we want two chains, to leave one chain empty */
+ tt_int_op(evbuffer_reserve_space(buf1, 971, iovecs, 2), ==, 2);
+ tt_int_op(iovecs[0].iov_len, >=, 1);
+ tt_int_op(iovecs[1].iov_len, >=, 1);
+ tt_assert(*(char *)(iovecs[0].iov_base) = 'b');
+ tt_assert(iovecs[0].iov_len = 1);
+ tt_int_op(evbuffer_commit_space(buf1, iovecs, 1), ==, 0);
+ }
+
+ // buf1: aaaaaab
+ // buf2: dddcc
+ tt_int_op(evbuffer_add(buf2, "cc", 2), ==, 0);
+ tt_int_op(evbuffer_prepend(buf2, "ddd", 3), ==, 0);
+
+ // buf1:
+ // buf2: aaaaaabdddcc
+ tt_int_op(evbuffer_prepend_buffer(buf2, buf1), ==, 0);
+
+ // buf1: aaaaaabdddcc
+ // buf2:
+ tt_int_op(evbuffer_add_buffer(buf1, buf2), ==, 0);
+
+ // buf1: c
+ // buf2: aaaaaabdddc
+ tt_int_op(evbuffer_remove_buffer(buf1, buf2, 11), ==, 11);
+
+ // This fails today, we observe "aaaaaabcddd" instead!
+ tt_mem_op(evbuffer_pullup(buf2, -1), ==, "aaaaaabdddc", 11);
+
+ evbuffer_validate(buf1);
+ evbuffer_validate(buf2);
+
+ end:
+ if (buf1)
+ evbuffer_free(buf1);
+ if (buf2)
+ evbuffer_free(buf2);
+}
+
+static void
+test_evbuffer_add_buffer_with_empty(void *ptr)
+{
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ struct evbuffer *buf = evbuffer_new();
+
+ evbuffer_add(buf, "foo", 3);
+
+ evbuffer_add_reference(src, "foo", 3, NULL, NULL);
+ evbuffer_add_reference(src, NULL, 0, NULL, NULL);
+ evbuffer_add_buffer(src, buf);
+
+ evbuffer_add(buf, "foo", 3);
+
+ evbuffer_add_reference(dst, "foo", 3, NULL, NULL);
+ evbuffer_add_reference(dst, NULL, 0, NULL, NULL);
+ evbuffer_add_buffer(dst, buf);
+
+ tt_int_op(evbuffer_get_length(src), ==, 6);
+ tt_int_op(evbuffer_get_length(dst), ==, 6);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ end:
+ evbuffer_free(src);
+ evbuffer_free(dst);
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_add_buffer_with_empty2(void *ptr)
+{
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ struct evbuffer *buf = evbuffer_new();
+
+ evbuffer_add(buf, "foo", 3);
+
+ evbuffer_add_reference(src, NULL, 0, NULL, NULL);
+ evbuffer_add_buffer(src, buf);
+
+ evbuffer_add(buf, "foo", 3);
+
+ evbuffer_add_reference(dst, NULL, 0, NULL, NULL);
+ evbuffer_add_buffer(dst, buf);
+
+ tt_int_op(evbuffer_get_length(src), ==, 3);
+ tt_int_op(evbuffer_get_length(dst), ==, 3);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ end:
+ evbuffer_free(src);
+ evbuffer_free(dst);
+ evbuffer_free(buf);
}
static void
@@ -493,6 +768,63 @@ end:
}
static void
+test_evbuffer_reserve_with_empty(void *ptr)
+{
+ struct evbuffer *buf;
+ struct evbuffer_iovec v[2];
+
+ tt_assert(buf = evbuffer_new());
+ evbuffer_add(buf, "a", 1);
+ tt_int_op(evbuffer_reserve_space(buf, 1<<12, v, 2), ==, 2);
+ v[0].iov_len = 1;
+ *(char *)v[0].iov_base = 'b';
+ tt_int_op(evbuffer_commit_space(buf, v, 1), ==, 0);
+ evbuffer_add(buf, "c", 1);
+ tt_mem_op(evbuffer_pullup(buf, -1), ==, "abc", 2);
+
+ evbuffer_validate(buf);
+
+ end:
+ if (buf)
+ evbuffer_free(buf);
+}
+
+/* regression for evbuffer_expand_fast_() with invalid last_with_datap that has
+ * been left after evbuffer_prepend() with empty chain in it */
+static void
+test_evbuffer_reserve_invalid_last_with_datap(void *ptr)
+{
+ struct evbuffer *buf = NULL;
+ struct evbuffer_iovec vec[2];
+ const int nvec = ARRAY_SIZE(vec);
+ int i, avec;
+
+ buf = evbuffer_new();
+ tt_assert(buf);
+
+ /* prepend with an empty chain */
+ evbuffer_add_reference(buf, "", 0, NULL, NULL);
+ evbuffer_prepend(buf, "foo", 3);
+ /* after invalid last_with_datap will create new chain */
+ evbuffer_add(buf, "", 0);
+ /* we need to create at least 2 "used" (in evbuffer_expand_fast_()) chains */
+ tt_int_op(avec = evbuffer_reserve_space(buf, 1<<12, vec, nvec), >=, 1);
+ for (i = 0; i < avec; ++i)
+ vec[i].iov_len = 0;
+ tt_int_op(evbuffer_commit_space(buf, vec, avec), ==, 0);
+
+ /* and an actual problem, that triggers an assert(chain == buf->first) in
+ * evbuffer_expand_fast_() */
+ tt_int_op(evbuffer_reserve_space(buf, 1<<13, vec, nvec), >=, 1);
+
+ evbuffer_validate(buf);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+}
+
+static void
test_evbuffer_expand(void *ptr)
{
char data[4096];
@@ -566,6 +898,77 @@ end:
evbuffer_free(buf);
}
+static void
+test_evbuffer_expand_overflow(void *ptr)
+{
+ struct evbuffer *buf;
+
+ buf = evbuffer_new();
+ evbuffer_add(buf, "1", 1);
+ evbuffer_expand(buf, EVBUFFER_CHAIN_MAX);
+ evbuffer_validate(buf);
+
+ evbuffer_expand(buf, EV_SIZE_MAX);
+ evbuffer_validate(buf);
+
+end:
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_add1(void *ptr)
+{
+ struct evbuffer *buf;
+ char *str;
+
+ buf = evbuffer_new();
+ evbuffer_add(buf, "1", 1);
+ evbuffer_validate(buf);
+ evbuffer_expand(buf, 2048);
+ evbuffer_validate(buf);
+ evbuffer_add(buf, "2", 1);
+ evbuffer_validate(buf);
+ evbuffer_add_printf(buf, "3");
+ evbuffer_validate(buf);
+
+ tt_assert(evbuffer_get_length(buf) == 3);
+ str = (char *)evbuffer_pullup(buf, -1);
+ tt_assert(str[0] == '1');
+ tt_assert(str[1] == '2');
+ tt_assert(str[2] == '3');
+end:
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_add2(void *ptr)
+{
+ struct evbuffer *buf;
+ static char data[4096];
+ int data_len = MIN_BUFFER_SIZE-EVBUFFER_CHAIN_SIZE-10;
+ char *str;
+ int len;
+
+ memset(data, 'P', sizeof(data));
+ buf = evbuffer_new();
+ evbuffer_add(buf, data, data_len);
+ evbuffer_validate(buf);
+ evbuffer_expand(buf, 100);
+ evbuffer_validate(buf);
+ evbuffer_add(buf, "2", 1);
+ evbuffer_validate(buf);
+ evbuffer_add_printf(buf, "3");
+ evbuffer_validate(buf);
+
+ len = evbuffer_get_length(buf);
+ tt_assert(len == data_len+2);
+ str = (char *)evbuffer_pullup(buf, -1);
+ tt_assert(str[len-3] == 'P');
+ tt_assert(str[len-2] == '2');
+ tt_assert(str[len-1] == '3');
+end:
+ evbuffer_free(buf);
+}
static int reference_cb_called;
static void
@@ -622,10 +1025,40 @@ test_evbuffer_reference(void *ptr)
evbuffer_free(src);
}
-static struct event_base *addfile_test_event_base = NULL;
-static int addfile_test_done_writing = 0;
-static int addfile_test_total_written = 0;
-static int addfile_test_total_read = 0;
+static void
+test_evbuffer_reference2(void *ptr)
+{
+ struct evbuffer *buf;
+ static char data[4096];
+ int data_len = MIN_BUFFER_SIZE-EVBUFFER_CHAIN_SIZE-10;
+ char *str;
+ int len;
+
+ memset(data, 'P', sizeof(data));
+ buf = evbuffer_new();
+ evbuffer_add(buf, data, data_len);
+ evbuffer_validate(buf);
+ evbuffer_expand(buf, 100);
+ evbuffer_validate(buf);
+ evbuffer_add_reference(buf, "2", 1, no_cleanup, NULL);
+ evbuffer_validate(buf);
+ evbuffer_add_printf(buf, "3");
+ evbuffer_validate(buf);
+
+ len = evbuffer_get_length(buf);
+ tt_assert(len == data_len+2);
+ str = (char *)evbuffer_pullup(buf, -1);
+ tt_assert(str[len-3] == 'P');
+ tt_assert(str[len-2] == '2');
+ tt_assert(str[len-1] == '3');
+end:
+ evbuffer_free(buf);
+}
+
+static struct event_base *addfile_test_event_base;
+static int addfile_test_done_writing;
+static int addfile_test_total_written;
+static int addfile_test_total_read;
static void
addfile_test_writecb(evutil_socket_t fd, short what, void *arg)
@@ -827,6 +1260,10 @@ test_evbuffer_add_file(void *ptr)
evbuffer_validate(src);
addfile_test_event_base = base;
+ addfile_test_done_writing = 0;
+ addfile_test_total_written = 0;
+ addfile_test_total_read = 0;
+
wev = event_new(base, pair[0], EV_WRITE|EV_PERSIST,
addfile_test_writecb, src);
rev = event_new(base, pair[1], EV_READ|EV_PERSIST,
@@ -1292,7 +1729,7 @@ test_evbuffer_iterative(void *ptr)
static void
test_evbuffer_find(void *ptr)
{
- u_char* p;
+ unsigned char* p;
const char* test1 = "1234567890\r\n";
const char* test2 = "1234567890\r";
#define EVBUFFER_INITIAL_LENGTH 256
@@ -1303,13 +1740,13 @@ test_evbuffer_find(void *ptr)
tt_assert(buf);
/* make sure evbuffer_find doesn't match past the end of the buffer */
- evbuffer_add(buf, (u_char*)test1, strlen(test1));
+ evbuffer_add(buf, (unsigned char*)test1, strlen(test1));
evbuffer_validate(buf);
evbuffer_drain(buf, strlen(test1));
evbuffer_validate(buf);
- evbuffer_add(buf, (u_char*)test2, strlen(test2));
+ evbuffer_add(buf, (unsigned char*)test2, strlen(test2));
evbuffer_validate(buf);
- p = evbuffer_find(buf, (u_char*)"\r\n", 2);
+ p = evbuffer_find(buf, (unsigned char*)"\r\n", 2);
tt_want(p == NULL);
/*
@@ -1321,13 +1758,13 @@ test_evbuffer_find(void *ptr)
for (i = 0; i < EVBUFFER_INITIAL_LENGTH; ++i)
test3[i] = 'a';
test3[EVBUFFER_INITIAL_LENGTH - 1] = 'x';
- evbuffer_add(buf, (u_char *)test3, EVBUFFER_INITIAL_LENGTH);
+ evbuffer_add(buf, (unsigned char *)test3, EVBUFFER_INITIAL_LENGTH);
evbuffer_validate(buf);
- p = evbuffer_find(buf, (u_char *)"xy", 2);
+ p = evbuffer_find(buf, (unsigned char *)"xy", 2);
tt_want(p == NULL);
/* simple test for match at end of allocated buffer */
- p = evbuffer_find(buf, (u_char *)"ax", 2);
+ p = evbuffer_find(buf, (unsigned char *)"ax", 2);
tt_assert(p != NULL);
tt_want(strncmp((char*)p, "ax", 2) == 0);
@@ -1549,12 +1986,12 @@ test_evbuffer_callbacks(void *ptr)
tt_assert(cb1 != NULL);
cb2 = evbuffer_add_cb(buf, log_change_callback, buf_out2);
tt_assert(cb2 != NULL);
- evbuffer_setcb(buf, self_draining_callback, NULL);
+ tt_int_op(evbuffer_setcb(buf, self_draining_callback, NULL), ==, 0);
evbuffer_add_printf(buf, "This should get drained right away.");
tt_uint_op(evbuffer_get_length(buf), ==, 0);
tt_uint_op(evbuffer_get_length(buf_out1), ==, 0);
tt_uint_op(evbuffer_get_length(buf_out2), ==, 0);
- evbuffer_setcb(buf, NULL, NULL);
+ tt_int_op(evbuffer_setcb(buf, NULL, NULL), ==, 0);
evbuffer_add_printf(buf, "This will not.");
tt_str_op((const char *) evbuffer_pullup(buf, -1), ==, "This will not.");
evbuffer_validate(buf);
@@ -1580,6 +2017,14 @@ test_evbuffer_callbacks(void *ptr)
"0->15; 15->11; 11->0; ");
#endif
+ /* the next call to readline should fail */
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+ event_set_mem_functions(failing_malloc, realloc, free);
+ tt_int_op(evbuffer_setcb(buf, self_draining_callback, NULL), ==, -1);
+ evbuffer_validate(buf);
+ event_set_mem_functions(malloc, realloc, free);
+#endif
+
end:
if (buf)
evbuffer_free(buf);
@@ -1782,12 +2227,23 @@ end:
evbuffer_free(buf2);
}
+static void
+check_prepend(struct evbuffer *buffer,
+ const struct evbuffer_cb_info *cbinfo,
+ void *arg)
+{
+ tt_int_op(cbinfo->orig_size, ==, 3);
+ tt_int_op(cbinfo->n_added, ==, 8096);
+ tt_int_op(cbinfo->n_deleted, ==, 0);
+end:
+ ;
+}
/* Some cases that we didn't get in test_evbuffer() above, for more coverage. */
static void
test_evbuffer_prepend(void *ptr)
{
struct evbuffer *buf1 = NULL, *buf2 = NULL;
- char tmp[128];
+ char tmp[128], *buffer = malloc(8096);
int n;
buf1 = evbuffer_new();
@@ -1835,7 +2291,23 @@ test_evbuffer_prepend(void *ptr)
tmp[n]='\0';
tt_str_op(tmp,==,"Here is string 1000. Here is string 999. ");
+ /* Case 5: evbuffer_prepend() will need a new buffer, with callbacks */
+ memset(buffer, 'A', 8096);
+ evbuffer_free(buf2);
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+ evbuffer_prepend(buf2, "foo", 3);
+ evbuffer_add_cb(buf2, check_prepend, NULL);
+ evbuffer_prepend(buf2, buffer, 8096);
+ evbuffer_remove_cb(buf2, check_prepend, NULL);
+ evbuffer_validate(buf2);
+ tt_nstr_op(8096,(char *)evbuffer_pullup(buf2, 8096),==,buffer);
+ evbuffer_drain(buf2, 8096);
+ tt_nstr_op(3,(char *)evbuffer_pullup(buf2, 3),==,"foo");
+ evbuffer_drain(buf2, 3);
+
end:
+ free(buffer);
if (buf1)
evbuffer_free(buf1);
if (buf2)
@@ -1844,6 +2316,58 @@ end:
}
static void
+test_evbuffer_empty_reference_prepend(void *ptr)
+{
+ struct evbuffer *buf = NULL;
+
+ buf = evbuffer_new();
+ tt_assert(buf);
+
+ /** empty chain could leave invalid last_with_datap */
+ evbuffer_add_reference(buf, "", 0, NULL, NULL);
+ evbuffer_validate(buf);
+ evbuffer_prepend(buf, "foo", 3);
+
+ evbuffer_validate(buf);
+ tt_assert(!strncmp((char *)evbuffer_pullup(buf, -1), "foo", 3));
+ evbuffer_validate(buf);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+}
+static void
+test_evbuffer_empty_reference_prepend_buffer(void *ptr)
+{
+ struct evbuffer *buf1 = NULL, *buf2 = NULL;
+
+ buf1 = evbuffer_new();
+ tt_assert(buf1);
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+
+ /** empty chain could leave invalid last_with_datap */
+ evbuffer_add_reference(buf1, "", 0, NULL, NULL);
+ evbuffer_validate(buf1);
+ evbuffer_add(buf2, "foo", 3);
+ evbuffer_validate(buf2);
+ evbuffer_prepend_buffer(buf2, buf1);
+ evbuffer_validate(buf2);
+
+ tt_assert(!strncmp((char *)evbuffer_pullup(buf2, -1), "foo", 3));
+ evbuffer_validate(buf2);
+
+ tt_assert(evbuffer_pullup(buf1, -1) == NULL);
+ evbuffer_validate(buf2);
+
+end:
+ if (buf1)
+ evbuffer_free(buf1);
+ if (buf2)
+ evbuffer_free(buf2);
+}
+
+static void
test_evbuffer_peek_first_gt(void *info)
{
struct evbuffer *buf = NULL, *tmp_buf = NULL;
@@ -2000,28 +2524,37 @@ end:
static void
test_evbuffer_freeze(void *ptr)
{
- struct evbuffer *buf = NULL, *tmp_buf=NULL;
+ struct basic_test_data *testdata = ptr;
+ evutil_socket_t *pair = testdata->pair;
+ struct evbuffer *buf = NULL, *buf_two = NULL, *tmp_buf = NULL;
const char string[] = /* Year's End, Richard Wilbur */
"I've known the wind by water banks to shake\n"
"The late leaves down, which frozen where they fell\n"
"And held in ice as dancers in a spell\n"
"Fluttered all winter long into a lake...";
- const int start = !strcmp(ptr, "start");
+ const int start = !strcmp(testdata->setup_data, "start");
+ const char tmpfilecontent[] = "file_freeze_test_file";
char *cp;
char charbuf[128];
+ char *tmpfilename = NULL;
+ int fd = -1;
int r;
- size_t orig_length;
+ size_t orig_length, len;
struct evbuffer_iovec v[1];
if (!start)
- tt_str_op(ptr, ==, "end");
+ tt_str_op(testdata->setup_data, ==, "end");
buf = evbuffer_new();
+ buf_two = evbuffer_new();
tmp_buf = evbuffer_new();
tt_assert(tmp_buf);
evbuffer_add(buf, string, strlen(string));
+ evbuffer_add(buf_two, "abc", 3);
+ evbuffer_add(tmp_buf, "xyz", 3);
evbuffer_freeze(buf, start); /* Freeze the start or the end.*/
+ evbuffer_freeze(buf_two, start);
#define FREEZE_EQ(a, startcase, endcase) \
do { \
@@ -2050,7 +2583,22 @@ test_evbuffer_freeze(void *ptr)
FREEZE_EQ(r, 0, -1);
r = evbuffer_add_printf(buf, "Hello %s", "world");
FREEZE_EQ(r, 11, -1);
- /* TODO: test add_buffer, add_file, read */
+
+ r = evbuffer_add_buffer(buf, tmp_buf);
+ FREEZE_EQ(r, 0, -1);
+ len = strlen(tmpfilecontent);
+ fd = regress_make_tmpfile(tmpfilecontent, len, &tmpfilename);
+ r = evbuffer_add_file(buf, fd, 0, len);
+ FREEZE_EQ(r, 0, -1);
+
+ if (start)
+ evbuffer_add(tmp_buf, "xyz", 3);
+
+ tt_assert(evbuffer_get_length(tmp_buf));
+ len = evbuffer_get_length(tmp_buf);
+ evbuffer_write(tmp_buf, pair[0]);
+ r = evbuffer_read(buf, pair[1], -1);
+ FREEZE_EQ(r, len, -1);
if (!start)
tt_int_op(orig_length, ==, evbuffer_get_length(buf));
@@ -2068,7 +2616,24 @@ test_evbuffer_freeze(void *ptr)
FREEZE_EQ(cp==NULL, 1, 0);
if (cp)
free(cp);
- /* TODO: Test remove_buffer, add_buffer, write, prepend_buffer */
+
+ evbuffer_add(tmp_buf, "xyz", 3);
+ tt_assert(evbuffer_get_length(tmp_buf));
+ r = evbuffer_remove_buffer(buf, tmp_buf, 3);
+ FREEZE_EQ(r, -1, 3);
+ r = evbuffer_drain(buf, 3);
+ FREEZE_EQ(r, -1, 0);
+ r = evbuffer_prepend_buffer(buf, tmp_buf);
+ FREEZE_EQ(r, -1, 0);
+
+ len = evbuffer_get_length(buf);
+ r = evbuffer_write(buf, pair[0]);
+ evbuffer_read(tmp_buf, pair[1], -1);
+ FREEZE_EQ(r, -1, len);
+ len = evbuffer_get_length(buf_two);
+ r = evbuffer_write_atmost(buf_two, pair[0], -1);
+ evbuffer_read(tmp_buf, pair[1], -1);
+ FREEZE_EQ(r, -1, len);
if (start)
tt_int_op(orig_length, ==, evbuffer_get_length(buf));
@@ -2077,8 +2642,16 @@ end:
if (buf)
evbuffer_free(buf);
+ if (buf_two)
+ evbuffer_free(buf_two);
+
if (tmp_buf)
evbuffer_free(tmp_buf);
+
+ if (tmpfilename) {
+ unlink(tmpfilename);
+ free(tmpfilename);
+ }
}
static void
@@ -2228,12 +2801,25 @@ static const struct testcase_setup_t nil_setup = {
struct testcase_t evbuffer_testcases[] = {
{ "evbuffer", test_evbuffer, 0, NULL, NULL },
{ "remove_buffer_with_empty", test_evbuffer_remove_buffer_with_empty, 0, NULL, NULL },
+ { "remove_buffer_with_empty2", test_evbuffer_remove_buffer_with_empty2, 0, NULL, NULL },
+ { "remove_buffer_with_empty3", test_evbuffer_remove_buffer_with_empty3, 0, NULL, NULL },
+ { "remove_buffer_with_empty_front", test_evbuffer_remove_buffer_with_empty_front, 0, NULL, NULL },
+ { "remove_buffer_adjust_last_with_datap_with_empty",
+ test_evbuffer_remove_buffer_adjust_last_with_datap_with_empty, 0, NULL, NULL },
+ { "add_buffer_with_empty", test_evbuffer_add_buffer_with_empty, 0, NULL, NULL },
+ { "add_buffer_with_empty2", test_evbuffer_add_buffer_with_empty2, 0, NULL, NULL },
{ "reserve2", test_evbuffer_reserve2, 0, NULL, NULL },
{ "reserve_many", test_evbuffer_reserve_many, 0, NULL, NULL },
{ "reserve_many2", test_evbuffer_reserve_many, 0, &nil_setup, (void*)"add" },
{ "reserve_many3", test_evbuffer_reserve_many, 0, &nil_setup, (void*)"fill" },
+ { "reserve_with_empty", test_evbuffer_reserve_with_empty, 0, NULL, NULL },
+ { "reserve_invalid_last_with_datap", test_evbuffer_reserve_invalid_last_with_datap, TT_FORK, NULL, NULL },
{ "expand", test_evbuffer_expand, 0, NULL, NULL },
+ { "expand_overflow", test_evbuffer_expand_overflow, 0, NULL, NULL },
+ { "add1", test_evbuffer_add1, 0, NULL, NULL },
+ { "add2", test_evbuffer_add2, 0, NULL, NULL },
{ "reference", test_evbuffer_reference, 0, NULL, NULL },
+ { "reference2", test_evbuffer_reference2, 0, NULL, NULL },
{ "iterative", test_evbuffer_iterative, 0, NULL, NULL },
{ "readln", test_evbuffer_readln, TT_NO_LOGS, &basic_setup, NULL },
{ "search_eol", test_evbuffer_search_eol, 0, NULL, NULL },
@@ -2245,13 +2831,16 @@ struct testcase_t evbuffer_testcases[] = {
{ "multicast", test_evbuffer_multicast, 0, NULL, NULL },
{ "multicast_drain", test_evbuffer_multicast_drain, 0, NULL, NULL },
{ "prepend", test_evbuffer_prepend, TT_FORK, NULL, NULL },
+ { "empty_reference_prepend", test_evbuffer_empty_reference_prepend, TT_FORK, NULL, NULL },
+ { "empty_reference_prepend_buffer", test_evbuffer_empty_reference_prepend_buffer, TT_FORK, NULL, NULL },
{ "peek", test_evbuffer_peek, 0, NULL, NULL },
{ "peek_first_gt", test_evbuffer_peek_first_gt, 0, NULL, NULL },
- { "freeze_start", test_evbuffer_freeze, 0, &nil_setup, (void*)"start" },
- { "freeze_end", test_evbuffer_freeze, 0, &nil_setup, (void*)"end" },
+ { "freeze_start", test_evbuffer_freeze, TT_NEED_SOCKETPAIR, &basic_setup, (void*)"start" },
+ { "freeze_end", test_evbuffer_freeze, TT_NEED_SOCKETPAIR, &basic_setup, (void*)"end" },
{ "add_iovec", test_evbuffer_add_iovec, 0, NULL, NULL},
{ "copyout", test_evbuffer_copyout, 0, NULL, NULL},
{ "file_segment_add_cleanup_cb", test_evbuffer_file_segment_add_cleanup_cb, 0, NULL, NULL },
+ { "pullup_with_empty", test_evbuffer_pullup_with_empty, 0, NULL, NULL },
#define ADDFILE_TEST(name, parameters) \
{ name, test_evbuffer_add_file, TT_FORK|TT_NEED_BASE, \
diff --git a/contrib/ntp/sntp/libevent/test/regress_bufferevent.c b/contrib/ntp/sntp/libevent/test/regress_bufferevent.c
index a1998ba62cd1..c276a0e5d1c3 100644
--- a/contrib/ntp/sntp/libevent/test/regress_bufferevent.c
+++ b/contrib/ntp/sntp/libevent/test/regress_bufferevent.c
@@ -29,6 +29,19 @@
/* The old tests here need assertions to work. */
#undef NDEBUG
+/**
+ * - clang supports __has_feature
+ * - gcc supports __SANITIZE_ADDRESS__
+ *
+ * Let's set __SANITIZE_ADDRESS__ if __has_feature(address_sanitizer)
+ */
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+#if !defined(__SANITIZE_ADDRESS__) && __has_feature(address_sanitizer)
+#define __SANITIZE_ADDRESS__
+#endif
+
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
@@ -123,11 +136,12 @@ errorcb(struct bufferevent *bev, short what, void *arg)
}
static void
-test_bufferevent_impl(int use_pair)
+test_bufferevent_impl(int use_pair, int flush)
{
struct bufferevent *bev1 = NULL, *bev2 = NULL;
char buffer[8333];
int i;
+ int expected = 2;
if (use_pair) {
struct bufferevent *pair[2];
@@ -136,14 +150,14 @@ test_bufferevent_impl(int use_pair)
bev2 = pair[1];
bufferevent_setcb(bev1, readcb, writecb, errorcb, bev1);
bufferevent_setcb(bev2, readcb, writecb, errorcb, NULL);
- tt_int_op(bufferevent_getfd(bev1), ==, -1);
+ tt_fd_op(bufferevent_getfd(bev1), ==, EVUTIL_INVALID_SOCKET);
tt_ptr_op(bufferevent_get_underlying(bev1), ==, NULL);
tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, bev2);
tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, bev1);
} else {
bev1 = bufferevent_new(pair[0], readcb, writecb, errorcb, NULL);
bev2 = bufferevent_new(pair[1], readcb, writecb, errorcb, NULL);
- tt_int_op(bufferevent_getfd(bev1), ==, pair[0]);
+ tt_fd_op(bufferevent_getfd(bev1), ==, pair[0]);
tt_ptr_op(bufferevent_get_underlying(bev1), ==, NULL);
tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, NULL);
tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, NULL);
@@ -171,6 +185,9 @@ test_bufferevent_impl(int use_pair)
buffer[i] = i;
bufferevent_write(bev1, buffer, sizeof(buffer));
+ if (flush >= 0) {
+ tt_int_op(bufferevent_flush(bev1, EV_WRITE, flush), >=, 0);
+ }
event_dispatch();
@@ -178,25 +195,28 @@ test_bufferevent_impl(int use_pair)
tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, NULL);
bufferevent_free(bev1);
- if (test_ok != 2)
+ /** Only pair call errorcb for BEV_FINISHED */
+ if (use_pair && flush == BEV_FINISHED) {
+ expected = -1;
+ }
+ if (test_ok != expected)
test_ok = 0;
end:
;
}
-static void
-test_bufferevent(void)
-{
- test_bufferevent_impl(0);
-}
+static void test_bufferevent(void) { test_bufferevent_impl(0, -1); }
+static void test_bufferevent_pair(void) { test_bufferevent_impl(1, -1); }
-static void
-test_bufferevent_pair(void)
-{
- test_bufferevent_impl(1);
-}
+static void test_bufferevent_flush_normal(void) { test_bufferevent_impl(0, BEV_NORMAL); }
+static void test_bufferevent_flush_flush(void) { test_bufferevent_impl(0, BEV_FLUSH); }
+static void test_bufferevent_flush_finished(void) { test_bufferevent_impl(0, BEV_FINISHED); }
+
+static void test_bufferevent_pair_flush_normal(void) { test_bufferevent_impl(1, BEV_NORMAL); }
+static void test_bufferevent_pair_flush_flush(void) { test_bufferevent_impl(1, BEV_FLUSH); }
+static void test_bufferevent_pair_flush_finished(void) { test_bufferevent_impl(1, BEV_FINISHED); }
-#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
+#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED) && !defined(__SANITIZE_ADDRESS__)
/**
* Trace lock/unlock/alloc/free for locks.
* (More heavier then evthread_debug*)
@@ -233,10 +253,11 @@ static lock_wrapper *lu_find(void *lock_)
static void *trace_lock_alloc(unsigned locktype)
{
+ void *lock;
++lu_base.nr_locks;
lu_base.locks = realloc(lu_base.locks,
sizeof(lock_wrapper) * lu_base.nr_locks);
- void *lock = lu_base.cbs.alloc(locktype);
+ lock = lu_base.cbs.alloc(locktype);
lu_base.locks[lu_base.nr_locks - 1] = (lock_wrapper){ lock, ALLOC, 0 };
return lock;
}
@@ -244,7 +265,6 @@ static void trace_lock_free(void *lock_, unsigned locktype)
{
lock_wrapper *lock = lu_find(lock_);
if (!lock || lock->status == FREE || lock->locked) {
- __asm__("int3");
TT_FAIL(("lock: free error"));
} else {
lock->status = FREE;
@@ -273,10 +293,13 @@ static int trace_lock_unlock(unsigned mode, void *lock_)
return lu_base.cbs.unlock(mode, lock_);
}
}
-static void lock_unlock_free_thread_cbs()
+static void lock_unlock_free_thread_cbs(void)
{
event_base_free(NULL);
+ if (libevent_tests_running_in_debug_mode)
+ libevent_global_shutdown();
+
/** drop immutable flag */
evthread_set_lock_callbacks(NULL);
/** avoid calling of event_global_setup_locks_() for new cbs */
@@ -310,6 +333,9 @@ static int use_lock_unlock_profiler(void)
}
static void free_lock_unlock_profiler(struct basic_test_data *data)
{
+ /** fix "held_by" for kqueue */
+ evthread_set_lock_callbacks(NULL);
+
lock_unlock_free_thread_cbs();
free(lu_base.locks);
data->base = NULL;
@@ -474,11 +500,11 @@ bufferevent_input_filter(struct evbuffer *src, struct evbuffer *dst,
buffer = evbuffer_pullup(src, evbuffer_get_length(src));
for (i = 0; i < evbuffer_get_length(src); i += 2) {
+ if (buffer[i] == '-')
+ continue;
+
assert(buffer[i] == 'x');
evbuffer_add(dst, buffer + i + 1, 1);
-
- if (i + 2 > evbuffer_get_length(src))
- break;
}
evbuffer_drain(src, i);
@@ -493,19 +519,35 @@ bufferevent_output_filter(struct evbuffer *src, struct evbuffer *dst,
{
const unsigned char *buffer;
unsigned i;
+ struct bufferevent **bevp = ctx;
- buffer = evbuffer_pullup(src, evbuffer_get_length(src));
- for (i = 0; i < evbuffer_get_length(src); ++i) {
- evbuffer_add(dst, "x", 1);
- evbuffer_add(dst, buffer + i, 1);
+ ++test_ok;
+
+ if (test_ok == 1) {
+ buffer = evbuffer_pullup(src, evbuffer_get_length(src));
+ for (i = 0; i < evbuffer_get_length(src); ++i) {
+ evbuffer_add(dst, "x", 1);
+ evbuffer_add(dst, buffer + i, 1);
+ }
+ evbuffer_drain(src, evbuffer_get_length(src));
+ } else {
+ return BEV_ERROR;
+ }
+
+ if (bevp && test_ok == 1) {
+ int prev = ++test_ok;
+ bufferevent_write(*bevp, "-", 1);
+ /* check that during this bufferevent_write()
+ * bufferevent_output_filter() will not be called again */
+ assert(test_ok == prev);
+ --test_ok;
}
- evbuffer_drain(src, evbuffer_get_length(src));
return (BEV_OK);
}
static void
-test_bufferevent_filters_impl(int use_pair)
+test_bufferevent_filters_impl(int use_pair, int disable)
{
struct bufferevent *bev1 = NULL, *bev2 = NULL;
struct bufferevent *bev1_base = NULL, *bev2_base = NULL;
@@ -530,7 +572,8 @@ test_bufferevent_filters_impl(int use_pair)
buffer[i] = i;
bev1 = bufferevent_filter_new(bev1, NULL, bufferevent_output_filter,
- BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
+ BEV_OPT_CLOSE_ON_FREE, NULL,
+ disable ? &bev1 : NULL);
bev2 = bufferevent_filter_new(bev2, bufferevent_input_filter,
NULL, BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
@@ -539,8 +582,8 @@ test_bufferevent_filters_impl(int use_pair)
tt_ptr_op(bufferevent_get_underlying(bev1), ==, bev1_base);
tt_ptr_op(bufferevent_get_underlying(bev2), ==, bev2_base);
- tt_int_op(bufferevent_getfd(bev1), ==, -1);
- tt_int_op(bufferevent_getfd(bev2), ==, -1);
+ tt_fd_op(bufferevent_getfd(bev1), ==, bufferevent_getfd(bev1_base));
+ tt_fd_op(bufferevent_getfd(bev2), ==, bufferevent_getfd(bev2_base));
bufferevent_disable(bev1, EV_READ);
bufferevent_enable(bev2, EV_READ);
@@ -549,7 +592,7 @@ test_bufferevent_filters_impl(int use_pair)
event_dispatch();
- if (test_ok != 2)
+ if (test_ok != 3 + !!disable)
test_ok = 0;
end:
@@ -560,17 +603,14 @@ end:
}
-static void
-test_bufferevent_filters(void)
-{
- test_bufferevent_filters_impl(0);
-}
-
-static void
-test_bufferevent_pair_filters(void)
-{
- test_bufferevent_filters_impl(1);
-}
+static void test_bufferevent_filters(void)
+{ test_bufferevent_filters_impl(0, 0); }
+static void test_bufferevent_pair_filters(void)
+{ test_bufferevent_filters_impl(1, 0); }
+static void test_bufferevent_filters_disable(void)
+{ test_bufferevent_filters_impl(0, 1); }
+static void test_bufferevent_pair_filters_disable(void)
+{ test_bufferevent_filters_impl(1, 1); }
static void
@@ -593,6 +633,7 @@ static int bufferevent_connect_test_flags = 0;
static int bufferevent_trigger_test_flags = 0;
static int n_strings_read = 0;
static int n_reads_invoked = 0;
+static int n_events_invoked = 0;
#define TEST_STR "Now is the time for all good events to signal for " \
"the good of their protocol"
@@ -612,6 +653,31 @@ end:
;
}
+static evutil_socket_t
+fake_listener_create(struct sockaddr_in *localhost)
+{
+ struct sockaddr *sa = (struct sockaddr *)localhost;
+ evutil_socket_t fd = -1;
+ ev_socklen_t slen = sizeof(*localhost);
+
+ memset(localhost, 0, sizeof(*localhost));
+ localhost->sin_port = 0; /* have the kernel pick a port */
+ localhost->sin_addr.s_addr = htonl(0x7f000001L);
+ localhost->sin_family = AF_INET;
+
+ /* bind, but don't listen or accept. should trigger
+ "Connection refused" reliably on most platforms. */
+ fd = socket(localhost->sin_family, SOCK_STREAM, 0);
+ tt_assert(fd >= 0);
+ tt_assert(bind(fd, sa, slen) == 0);
+ tt_assert(getsockname(fd, sa, &slen) == 0);
+
+ return fd;
+
+end:
+ return -1;
+}
+
static void
reader_eventcb(struct bufferevent *bev, short what, void *ctx)
{
@@ -642,6 +708,14 @@ end:
}
static void
+reader_eventcb_simple(struct bufferevent *bev, short what, void *ctx)
+{
+ TT_BLATHER(("Read eventcb simple invoked on %d.",
+ (int)bufferevent_getfd(bev)));
+ n_events_invoked++;
+}
+
+static void
reader_readcb(struct bufferevent *bev, void *ctx)
{
TT_BLATHER(("Read invoked on %d.", (int)bufferevent_getfd(bev)));
@@ -727,6 +801,70 @@ end:
}
static void
+close_socket_cb(evutil_socket_t fd, short what, void *arg)
+{
+ evutil_socket_t *fdp = arg;
+ if (*fdp >= 0) {
+ evutil_closesocket(*fdp);
+ *fdp = -1;
+ }
+}
+
+static void
+test_bufferevent_connect_fail_eventcb(void *arg)
+{
+ struct basic_test_data *data = arg;
+ int flags = BEV_OPT_CLOSE_ON_FREE | (long)data->setup_data;
+ struct event close_listener_event;
+ struct bufferevent *bev = NULL;
+ struct evconnlistener *lev = NULL;
+ struct sockaddr_in localhost;
+ struct timeval close_timeout = { 0, 300000 };
+ ev_socklen_t slen = sizeof(localhost);
+ evutil_socket_t fake_listener = -1;
+ int r;
+
+ fake_listener = fake_listener_create(&localhost);
+
+ tt_int_op(n_events_invoked, ==, 0);
+
+ bev = bufferevent_socket_new(data->base, -1, flags);
+ tt_assert(bev);
+ bufferevent_setcb(bev, reader_readcb, reader_readcb,
+ reader_eventcb_simple, data->base);
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+ tt_int_op(n_events_invoked, ==, 0);
+ tt_int_op(n_reads_invoked, ==, 0);
+
+ /** @see also test_bufferevent_connect_fail() */
+ r = bufferevent_socket_connect(bev, (struct sockaddr *)&localhost, slen);
+ /* XXXX we'd like to test the '0' case everywhere, but FreeBSD tells
+ * detects the error immediately, which is not really wrong of it. */
+ tt_want(r == 0 || r == -1);
+
+ tt_int_op(n_events_invoked, ==, 0);
+ tt_int_op(n_reads_invoked, ==, 0);
+
+ /* Close the listener socket after a delay. This should trigger
+ "connection refused" on some other platforms, including OSX. */
+ evtimer_assign(&close_listener_event, data->base, close_socket_cb,
+ &fake_listener);
+ event_add(&close_listener_event, &close_timeout);
+
+ event_base_dispatch(data->base);
+ tt_int_op(n_events_invoked, ==, 1);
+ tt_int_op(n_reads_invoked, ==, 0);
+
+end:
+ if (lev)
+ evconnlistener_free(lev);
+ if (bev)
+ bufferevent_free(bev);
+ if (fake_listener >= 0)
+ evutil_closesocket(fake_listener);
+}
+
+static void
want_fail_eventcb(struct bufferevent *bev, short what, void *ctx)
{
struct event_base *base = ctx;
@@ -747,57 +885,36 @@ want_fail_eventcb(struct bufferevent *bev, short what, void *ctx)
}
static void
-close_socket_cb(evutil_socket_t fd, short what, void *arg)
-{
- evutil_socket_t *fdp = arg;
- if (*fdp >= 0) {
- evutil_closesocket(*fdp);
- *fdp = -1;
- }
-}
-
-static void
test_bufferevent_connect_fail(void *arg)
{
struct basic_test_data *data = (struct basic_test_data *)arg;
struct bufferevent *bev=NULL;
- struct sockaddr_in localhost;
- struct sockaddr *sa = (struct sockaddr*)&localhost;
- evutil_socket_t fake_listener = -1;
- ev_socklen_t slen = sizeof(localhost);
struct event close_listener_event;
int close_listener_event_added = 0;
- struct timeval one_second = { 1, 0 };
+ struct timeval close_timeout = { 0, 300000 };
+ struct sockaddr_in localhost;
+ ev_socklen_t slen = sizeof(localhost);
+ evutil_socket_t fake_listener = -1;
int r;
test_ok = 0;
- memset(&localhost, 0, sizeof(localhost));
- localhost.sin_port = 0; /* have the kernel pick a port */
- localhost.sin_addr.s_addr = htonl(0x7f000001L);
- localhost.sin_family = AF_INET;
-
- /* bind, but don't listen or accept. should trigger
- "Connection refused" reliably on most platforms. */
- fake_listener = socket(localhost.sin_family, SOCK_STREAM, 0);
- tt_assert(fake_listener >= 0);
- tt_assert(bind(fake_listener, sa, slen) == 0);
- tt_assert(getsockname(fake_listener, sa, &slen) == 0);
+ fake_listener = fake_listener_create(&localhost);
bev = bufferevent_socket_new(data->base, -1,
BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS);
tt_assert(bev);
bufferevent_setcb(bev, NULL, NULL, want_fail_eventcb, data->base);
- r = bufferevent_socket_connect(bev, sa, slen);
+ r = bufferevent_socket_connect(bev, (struct sockaddr *)&localhost, slen);
/* XXXX we'd like to test the '0' case everywhere, but FreeBSD tells
* detects the error immediately, which is not really wrong of it. */
tt_want(r == 0 || r == -1);
- /* Close the listener socket after a second. This should trigger
+ /* Close the listener socket after a delay. This should trigger
"connection refused" on some other platforms, including OSX. */
evtimer_assign(&close_listener_event, data->base, close_socket_cb,
&fake_listener);
- event_add(&close_listener_event, &one_second);
+ event_add(&close_listener_event, &close_timeout);
close_listener_event_added = 1;
event_base_dispatch(data->base);
@@ -819,18 +936,24 @@ struct timeout_cb_result {
struct timeval read_timeout_at;
struct timeval write_timeout_at;
struct timeval last_wrote_at;
+ struct timeval last_read_at;
int n_read_timeouts;
int n_write_timeouts;
int total_calls;
};
static void
+bev_timeout_read_cb(struct bufferevent *bev, void *arg)
+{
+ struct timeout_cb_result *res = arg;
+ evutil_gettimeofday(&res->last_read_at, NULL);
+}
+static void
bev_timeout_write_cb(struct bufferevent *bev, void *arg)
{
struct timeout_cb_result *res = arg;
evutil_gettimeofday(&res->last_wrote_at, NULL);
}
-
static void
bev_timeout_event_cb(struct bufferevent *bev, short what, void *arg)
{
@@ -858,7 +981,6 @@ test_bufferevent_timeouts(void *arg)
int use_pair = 0, use_filter = 0;
struct timeval tv_w, tv_r, started_at;
struct timeout_cb_result res1, res2;
- char buf[1024];
memset(&res1, 0, sizeof(res1));
memset(&res2, 0, sizeof(res2));
@@ -877,7 +999,6 @@ test_bufferevent_timeouts(void *arg)
bev1 = bufferevent_socket_new(data->base, data->pair[0], 0);
bev2 = bufferevent_socket_new(data->base, data->pair[1], 0);
}
-
tt_assert(bev1);
tt_assert(bev2);
@@ -901,30 +1022,14 @@ test_bufferevent_timeouts(void *arg)
tv_w.tv_sec = tv_r.tv_sec = 0;
tv_w.tv_usec = 100*1000;
tv_r.tv_usec = 150*1000;
- bufferevent_setcb(bev1, NULL, bev_timeout_write_cb,
+ bufferevent_setcb(bev1, bev_timeout_read_cb, bev_timeout_write_cb,
bev_timeout_event_cb, &res1);
- bufferevent_setwatermark(bev1, EV_WRITE, 1024*1024+10, 0);
bufferevent_set_timeouts(bev1, &tv_r, &tv_w);
- if (use_pair) {
- /* For a pair, the fact that the other side isn't reading
- * makes the writer stall */
- bufferevent_write(bev1, "ABCDEFG", 7);
- } else {
- /* For a real socket, the kernel's TCP buffers can eat a
- * fair number of bytes; make sure that at some point we
- * have some bytes that will stall. */
- struct evbuffer *output = bufferevent_get_output(bev1);
- int i;
- memset(buf, 0xbb, sizeof(buf));
- for (i=0;i<1024;++i) {
- evbuffer_add_reference(output, buf, sizeof(buf),
- NULL, NULL);
- }
- }
+ bufferevent_write(bev1, "ABCDEFG", 7);
bufferevent_enable(bev1, EV_READ|EV_WRITE);
/* bev2 has nothing to say, and isn't listening. */
- bufferevent_setcb(bev2, NULL, bev_timeout_write_cb,
+ bufferevent_setcb(bev2, bev_timeout_read_cb, bev_timeout_write_cb,
bev_timeout_event_cb, &res2);
tv_w.tv_sec = tv_r.tv_sec = 0;
tv_w.tv_usec = 200*1000;
@@ -941,15 +1046,26 @@ test_bufferevent_timeouts(void *arg)
/* XXXX Test that actually reading or writing a little resets the
* timeouts. */
- /* Each buf1 timeout happens, and happens only once. */
- tt_want(res1.n_read_timeouts);
- tt_want(res1.n_write_timeouts);
+ tt_want(res1.total_calls == 2);
tt_want(res1.n_read_timeouts == 1);
tt_want(res1.n_write_timeouts == 1);
+ tt_want(res2.total_calls == !(use_pair && !use_filter));
+ tt_want(res2.n_write_timeouts == !(use_pair && !use_filter));
+ tt_want(!res2.n_read_timeouts);
test_timeval_diff_eq(&started_at, &res1.read_timeout_at, 150);
test_timeval_diff_eq(&started_at, &res1.write_timeout_at, 100);
+#define tt_assert_timeval_empty(tv) do { \
+ tt_int_op((tv).tv_sec, ==, 0); \
+ tt_int_op((tv).tv_usec, ==, 0); \
+} while(0)
+ tt_assert_timeval_empty(res1.last_read_at);
+ tt_assert_timeval_empty(res2.last_read_at);
+ tt_assert_timeval_empty(res2.last_wrote_at);
+ tt_assert_timeval_empty(res2.last_wrote_at);
+#undef tt_assert_timeval_empty
+
end:
if (bev1)
bufferevent_free(bev1);
@@ -1083,19 +1199,182 @@ end:
bufferevent_free(bev);
}
+static void
+test_bufferevent_socket_filter_inactive(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev = NULL, *bevf = NULL;
+
+ bev = bufferevent_socket_new(data->base, -1, 0);
+ tt_assert(bev);
+ bevf = bufferevent_filter_new(bev, NULL, NULL, 0, NULL, NULL);
+ tt_assert(bevf);
+
+end:
+ if (bevf)
+ bufferevent_free(bevf);
+ if (bev)
+ bufferevent_free(bev);
+}
+
+static void
+pair_flush_eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ int *callback_what = ctx;
+ *callback_what = what;
+}
+
+static void
+test_bufferevent_pair_flush(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *pair[2];
+ struct bufferevent *bev1 = NULL;
+ struct bufferevent *bev2 = NULL;
+ int callback_what = 0;
+
+ tt_assert(0 == bufferevent_pair_new(data->base, 0, pair));
+ bev1 = pair[0];
+ bev2 = pair[1];
+ tt_assert(0 == bufferevent_enable(bev1, EV_WRITE));
+ tt_assert(0 == bufferevent_enable(bev2, EV_READ));
+
+ bufferevent_setcb(bev2, NULL, NULL, pair_flush_eventcb, &callback_what);
+
+ bufferevent_flush(bev1, EV_WRITE, BEV_FINISHED);
+
+ event_base_loop(data->base, EVLOOP_ONCE);
+
+ tt_assert(callback_what == (BEV_EVENT_READING | BEV_EVENT_EOF));
+
+end:
+ if (bev1)
+ bufferevent_free(bev1);
+ if (bev2)
+ bufferevent_free(bev2);
+}
+
+struct bufferevent_filter_data_stuck {
+ size_t header_size;
+ size_t total_read;
+};
+
+static void
+bufferevent_filter_data_stuck_readcb(struct bufferevent *bev, void *arg)
+{
+ struct bufferevent_filter_data_stuck *filter_data = arg;
+ struct evbuffer *input = bufferevent_get_input(bev);
+ size_t read_size = evbuffer_get_length(input);
+ evbuffer_drain(input, read_size);
+ filter_data->total_read += read_size;
+}
+
+/**
+ * This filter prepends header once before forwarding data.
+ */
+static enum bufferevent_filter_result
+bufferevent_filter_data_stuck_inputcb(
+ struct evbuffer *src, struct evbuffer *dst, ev_ssize_t dst_limit,
+ enum bufferevent_flush_mode mode, void *ctx)
+{
+ struct bufferevent_filter_data_stuck *filter_data = ctx;
+ static int header_inserted = 0;
+ size_t payload_size;
+ size_t header_size = 0;
+
+ if (!header_inserted) {
+ char *header = calloc(filter_data->header_size, 1);
+ evbuffer_add(dst, header, filter_data->header_size);
+ free(header);
+ header_size = filter_data->header_size;
+ header_inserted = 1;
+ }
+
+ payload_size = evbuffer_get_length(src);
+ if (payload_size > dst_limit - header_size) {
+ payload_size = dst_limit - header_size;
+ }
+
+ tt_int_op(payload_size, ==, evbuffer_remove_buffer(src, dst, payload_size));
+
+end:
+ return BEV_OK;
+}
+
+static void
+test_bufferevent_filter_data_stuck(void *arg)
+{
+ const size_t read_high_wm = 4096;
+ struct bufferevent_filter_data_stuck filter_data;
+ struct basic_test_data *data = arg;
+ struct bufferevent *pair[2];
+ struct bufferevent *filter = NULL;
+
+ int options = BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS;
+
+ char payload[4096];
+ int payload_size = sizeof(payload);
+
+ memset(&filter_data, 0, sizeof(filter_data));
+ filter_data.header_size = 20;
+
+ tt_assert(bufferevent_pair_new(data->base, options, pair) == 0);
+
+ bufferevent_setwatermark(pair[0], EV_READ, 0, read_high_wm);
+ bufferevent_setwatermark(pair[1], EV_READ, 0, read_high_wm);
+
+ tt_assert(
+ filter =
+ bufferevent_filter_new(pair[1],
+ bufferevent_filter_data_stuck_inputcb,
+ NULL,
+ options,
+ NULL,
+ &filter_data));
+
+ bufferevent_setcb(filter,
+ bufferevent_filter_data_stuck_readcb,
+ NULL,
+ NULL,
+ &filter_data);
+
+ tt_assert(bufferevent_enable(filter, EV_READ|EV_WRITE) == 0);
+
+ bufferevent_setwatermark(filter, EV_READ, 0, read_high_wm);
+
+ tt_assert(bufferevent_write(pair[0], payload, sizeof(payload)) == 0);
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(filter_data.total_read, ==, payload_size + filter_data.header_size);
+end:
+ if (pair[0])
+ bufferevent_free(pair[0]);
+ if (filter)
+ bufferevent_free(filter);
+}
+
struct testcase_t bufferevent_testcases[] = {
LEGACY(bufferevent, TT_ISOLATED),
LEGACY(bufferevent_pair, TT_ISOLATED),
-#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
+ LEGACY(bufferevent_flush_normal, TT_ISOLATED),
+ LEGACY(bufferevent_flush_flush, TT_ISOLATED),
+ LEGACY(bufferevent_flush_finished, TT_ISOLATED),
+ LEGACY(bufferevent_pair_flush_normal, TT_ISOLATED),
+ LEGACY(bufferevent_pair_flush_flush, TT_ISOLATED),
+ LEGACY(bufferevent_pair_flush_finished, TT_ISOLATED),
+#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED) && !defined(__SANITIZE_ADDRESS__)
{ "bufferevent_pair_release_lock", test_bufferevent_pair_release_lock,
- TT_FORK|TT_ISOLATED|TT_NEED_THREADS|TT_NEED_BASE|TT_LEGACY,
+ TT_FORK|TT_ISOLATED|TT_NEED_THREADS|TT_NEED_BASE|TT_LEGACY|TT_NO_LOGS,
&basic_setup, NULL },
#endif
LEGACY(bufferevent_watermarks, TT_ISOLATED),
LEGACY(bufferevent_pair_watermarks, TT_ISOLATED),
LEGACY(bufferevent_filters, TT_ISOLATED),
LEGACY(bufferevent_pair_filters, TT_ISOLATED),
+ LEGACY(bufferevent_filters_disable, TT_ISOLATED),
+ LEGACY(bufferevent_pair_filters_disable, TT_ISOLATED),
{ "bufferevent_connect", test_bufferevent_connect, TT_FORK|TT_NEED_BASE,
&basic_setup, (void*)"" },
{ "bufferevent_connect_defer", test_bufferevent_connect,
@@ -1111,7 +1390,7 @@ struct testcase_t bufferevent_testcases[] = {
{ "bufferevent_connect_fail", test_bufferevent_connect_fail,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "bufferevent_timeout", test_bufferevent_timeouts,
- TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR, &basic_setup, (void*)"" },
+ TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"" },
{ "bufferevent_timeout_pair", test_bufferevent_timeouts,
TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"pair" },
{ "bufferevent_timeout_filter", test_bufferevent_timeouts,
@@ -1134,29 +1413,55 @@ struct testcase_t bufferevent_testcases[] = {
{ "bufferevent_zlib", NULL, TT_SKIP, NULL, NULL },
#endif
+ { "bufferevent_connect_fail_eventcb_defer",
+ test_bufferevent_connect_fail_eventcb,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (void*)BEV_OPT_DEFER_CALLBACKS },
+ { "bufferevent_connect_fail_eventcb",
+ test_bufferevent_connect_fail_eventcb,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+
+ { "bufferevent_socket_filter_inactive",
+ test_bufferevent_socket_filter_inactive,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "bufferevent_pair_flush",
+ test_bufferevent_pair_flush,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "bufferevent_filter_data_stuck",
+ test_bufferevent_filter_data_stuck,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+
END_OF_TESTCASES,
};
+#define TT_IOCP (TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP)
+#define TT_IOCP_LEGACY (TT_ISOLATED|TT_ENABLE_IOCP)
struct testcase_t bufferevent_iocp_testcases[] = {
+ LEGACY(bufferevent, TT_IOCP_LEGACY),
+ LEGACY(bufferevent_flush_normal, TT_ISOLATED),
+ LEGACY(bufferevent_flush_flush, TT_ISOLATED),
+ LEGACY(bufferevent_flush_finished, TT_ISOLATED),
+ LEGACY(bufferevent_watermarks, TT_IOCP_LEGACY),
+ LEGACY(bufferevent_filters, TT_IOCP_LEGACY),
+ LEGACY(bufferevent_filters_disable, TT_IOCP_LEGACY),
- LEGACY(bufferevent, TT_ISOLATED|TT_ENABLE_IOCP),
- LEGACY(bufferevent_watermarks, TT_ISOLATED|TT_ENABLE_IOCP),
- LEGACY(bufferevent_filters, TT_ISOLATED|TT_ENABLE_IOCP),
{ "bufferevent_connect", test_bufferevent_connect,
- TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, (void*)"" },
+ TT_IOCP, &basic_setup, (void*)"" },
{ "bufferevent_connect_defer", test_bufferevent_connect,
- TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, (void*)"defer" },
+ TT_IOCP, &basic_setup, (void*)"defer" },
{ "bufferevent_connect_lock", test_bufferevent_connect,
- TT_FORK|TT_NEED_BASE|TT_NEED_THREADS|TT_ENABLE_IOCP, &basic_setup,
- (void*)"lock" },
+ TT_IOCP, &basic_setup, (void*)"lock" },
{ "bufferevent_connect_lock_defer", test_bufferevent_connect,
- TT_FORK|TT_NEED_BASE|TT_NEED_THREADS|TT_ENABLE_IOCP, &basic_setup,
- (void*)"defer lock" },
+ TT_IOCP, &basic_setup, (void*)"defer lock" },
{ "bufferevent_connect_fail", test_bufferevent_connect_fail,
- TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
+ TT_IOCP, &basic_setup, NULL },
{ "bufferevent_connect_nonblocking", test_bufferevent_connect,
- TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup,
- (void*)"unset_connectex" },
+ TT_IOCP, &basic_setup, (void*)"unset_connectex" },
+
+ { "bufferevent_connect_fail_eventcb_defer",
+ test_bufferevent_connect_fail_eventcb,
+ TT_IOCP, &basic_setup, (void*)BEV_OPT_DEFER_CALLBACKS },
+ { "bufferevent_connect_fail_eventcb",
+ test_bufferevent_connect_fail_eventcb, TT_IOCP, &basic_setup, NULL },
END_OF_TESTCASES,
};
diff --git a/contrib/ntp/sntp/libevent/test/regress_dns.c b/contrib/ntp/sntp/libevent/test/regress_dns.c
index 31811407e046..9a8bff4f1526 100644
--- a/contrib/ntp/sntp/libevent/test/regress_dns.c
+++ b/contrib/ntp/sntp/libevent/test/regress_dns.c
@@ -59,6 +59,10 @@
#include <string.h>
#include <errno.h>
+#ifdef EVENT__HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
#include "event2/dns.h"
#include "event2/dns_compat.h"
#include "event2/dns_struct.h"
@@ -68,9 +72,14 @@
#include "event2/util.h"
#include "event2/listener.h"
#include "event2/bufferevent.h"
+#include <event2/thread.h>
#include "log-internal.h"
+#include "evthread-internal.h"
#include "regress.h"
#include "regress_testutils.h"
+#include "regress_thread.h"
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
static int dns_ok = 0;
static int dns_got_cancel = 0;
@@ -195,7 +204,7 @@ dns_resolve_reverse(void *ptr)
{
struct in_addr in;
struct event_base *base = event_base_new();
- struct evdns_base *dns = evdns_base_new(base, 1/* init name servers */);
+ struct evdns_base *dns = evdns_base_new(base, EVDNS_BASE_INITIALIZE_NAMESERVERS);
struct evdns_request *req = NULL;
tt_assert(base);
@@ -511,25 +520,25 @@ generic_dns_callback(int result, char type, int count, int ttl, void *addresses,
}
static struct regress_dns_server_table search_table[] = {
- { "host.a.example.com", "err", "3", 0 },
- { "host.b.example.com", "err", "3", 0 },
- { "host.c.example.com", "A", "11.22.33.44", 0 },
- { "host2.a.example.com", "err", "3", 0 },
- { "host2.b.example.com", "A", "200.100.0.100", 0 },
- { "host2.c.example.com", "err", "3", 0 },
- { "hostn.a.example.com", "errsoa", "0", 0 },
- { "hostn.b.example.com", "errsoa", "3", 0 },
- { "hostn.c.example.com", "err", "0", 0 },
-
- { "host", "err", "3", 0 },
- { "host2", "err", "3", 0 },
- { "*", "err", "3", 0 },
- { NULL, NULL, NULL, 0 }
+ { "host.a.example.com", "err", "3", 0, 0 },
+ { "host.b.example.com", "err", "3", 0, 0 },
+ { "host.c.example.com", "A", "11.22.33.44", 0, 0 },
+ { "host2.a.example.com", "err", "3", 0, 0 },
+ { "host2.b.example.com", "A", "200.100.0.100", 0, 0 },
+ { "host2.c.example.com", "err", "3", 0, 0 },
+ { "hostn.a.example.com", "errsoa", "0", 0, 0 },
+ { "hostn.b.example.com", "errsoa", "3", 0, 0 },
+ { "hostn.c.example.com", "err", "0", 0, 0 },
+
+ { "host", "err", "3", 0, 0 },
+ { "host2", "err", "3", 0, 0 },
+ { "*", "err", "3", 0, 0 },
+ { NULL, NULL, NULL, 0, 0 }
};
-
static void
-dns_search_test(void *arg)
+dns_search_test_impl(void *arg, int lower)
{
+ struct regress_dns_server_table table[ARRAY_SIZE(search_table)];
struct basic_test_data *data = arg;
struct event_base *base = data->base;
struct evdns_base *dns = NULL;
@@ -537,8 +546,14 @@ dns_search_test(void *arg)
char buf[64];
struct generic_dns_callback_result r[8];
+ size_t i;
- tt_assert(regress_dnsserver(base, &portnum, search_table));
+ for (i = 0; i < ARRAY_SIZE(table); ++i) {
+ table[i] = search_table[i];
+ table[i].lower = lower;
+ }
+
+ tt_assert(regress_dnsserver(base, &portnum, table));
evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
dns = evdns_base_new(base, 0);
@@ -548,7 +563,7 @@ dns_search_test(void *arg)
evdns_base_search_add(dns, "b.example.com");
evdns_base_search_add(dns, "c.example.com");
- n_replies_left = sizeof(r)/sizeof(r[0]);
+ n_replies_left = ARRAY_SIZE(r);
exit_base = base;
evdns_base_resolve_ipv4(dns, "host", 0, generic_dns_callback, &r[0]);
@@ -584,6 +599,28 @@ end:
regress_clean_dnsserver();
}
+static void
+dns_search_empty_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_base *dns = NULL;
+
+ dns = evdns_base_new(base, 0);
+
+ evdns_base_search_add(dns, "whatever.example.com");
+
+ n_replies_left = 1;
+ exit_base = base;
+
+ tt_ptr_op(evdns_base_resolve_ipv4(dns, "", 0, generic_dns_callback, NULL), ==, NULL);
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+}
+static void dns_search_test(void *arg) { dns_search_test_impl(arg, 0); }
+static void dns_search_lower_test(void *arg) { dns_search_test_impl(arg, 1); }
static int request_count = 0;
static struct evdns_request *current_req = NULL;
@@ -776,13 +813,13 @@ static struct regress_dns_server_table internal_error_table[] = {
XXXX we should reissue under a much wider set of circumstances!
*/
- { "foof.example.com", "err", "4", 0 },
- { NULL, NULL, NULL, 0 }
+ { "foof.example.com", "err", "4", 0, 0 },
+ { NULL, NULL, NULL, 0, 0 }
};
static struct regress_dns_server_table reissue_table[] = {
- { "foof.example.com", "A", "240.15.240.15", 0 },
- { NULL, NULL, NULL, 0 }
+ { "foof.example.com", "A", "240.15.240.15", 0, 0 },
+ { NULL, NULL, NULL, 0, 0 }
};
static void
@@ -967,6 +1004,59 @@ end:
event_base_free(inactive_base);
}
+static void
+dns_initialize_nameservers_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_base *dns = NULL;
+
+ dns = evdns_base_new(base, 0);
+ tt_assert(dns);
+ tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, -1);
+ evdns_base_free(dns, 0);
+
+ dns = evdns_base_new(base, EVDNS_BASE_INITIALIZE_NAMESERVERS);
+ tt_assert(dns);
+ tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, sizeof(struct sockaddr));
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+}
+#ifndef _WIN32
+#define RESOLV_FILE "empty-resolv.conf"
+static void
+dns_nameservers_no_default_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_base *dns = NULL;
+ int ok = access(RESOLV_FILE, R_OK);
+
+ tt_assert(ok);
+
+ dns = evdns_base_new(base, 0);
+ tt_assert(dns);
+ tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, -1);
+
+ /* We cannot test
+ * EVDNS_BASE_INITIALIZE_NAMESERVERS|EVDNS_BASE_NAMESERVERS_NO_DEFAULT
+ * because we cannot mock "/etc/resolv.conf" (yet). */
+
+ evdns_base_resolv_conf_parse(dns,
+ DNS_OPTIONS_ALL|DNS_OPTION_NAMESERVERS_NO_DEFAULT, RESOLV_FILE);
+ tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, -1);
+
+ evdns_base_resolv_conf_parse(dns, DNS_OPTIONS_ALL, RESOLV_FILE);
+ tt_int_op(evdns_base_get_nameserver_addr(dns, 0, NULL, 0), ==, sizeof(struct sockaddr));
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+}
+#endif
+
/* === Test for bufferevent_socket_connect_hostname */
static int total_connected_or_failed = 0;
@@ -983,7 +1073,7 @@ be_getaddrinfo_server_cb(struct evdns_server_request *req, void *data)
int added_any=0;
++*n_got_p;
- for (i=0;i<req->nquestions;++i) {
+ for (i = 0; i < req->nquestions; ++i) {
const int qtype = req->questions[i]->type;
const int qclass = req->questions[i]->dns_question_class;
const char *qname = req->questions[i]->name;
@@ -1127,27 +1217,36 @@ static void
be_connect_hostname_event_cb(struct bufferevent *bev, short what, void *ctx)
{
struct be_conn_hostname_result *got = ctx;
- if (!got->what) {
- TT_BLATHER(("Got a bufferevent event %d", what));
- got->what = what;
-
- if ((what & BEV_EVENT_CONNECTED) || (what & BEV_EVENT_ERROR)) {
- int r;
- if ((r = bufferevent_socket_get_dns_error(bev))) {
- got->dnserr = r;
- TT_BLATHER(("DNS error %d: %s", r,
- evutil_gai_strerror(r)));
- } ++total_connected_or_failed;
- TT_BLATHER(("Got %d connections or errors.", total_connected_or_failed));
-
- if (total_n_accepted >= 3 && total_connected_or_failed >= 5)
- event_base_loopexit(be_connect_hostname_base,
- NULL);
- }
- } else {
+
+ if (got->what) {
TT_FAIL(("Two events on one bufferevent. %d,%d",
got->what, (int)what));
}
+
+ TT_BLATHER(("Got a bufferevent event %d", what));
+ got->what = what;
+
+ if ((what & BEV_EVENT_CONNECTED) || (what & BEV_EVENT_ERROR)) {
+ int expected = 3;
+ int r = bufferevent_socket_get_dns_error(bev);
+
+ if (r) {
+ got->dnserr = r;
+ TT_BLATHER(("DNS error %d: %s", r,
+ evutil_gai_strerror(r)));
+ }
+ ++total_connected_or_failed;
+ TT_BLATHER(("Got %d connections or errors.", total_connected_or_failed));
+
+ /** emfile test */
+ if (errno == EMFILE) {
+ expected = 0;
+ }
+
+ if (total_n_accepted >= expected && total_connected_or_failed >= 5)
+ event_base_loopexit(be_connect_hostname_base,
+ NULL);
+ }
}
static void
@@ -1155,10 +1254,9 @@ test_bufferevent_connect_hostname(void *arg)
{
struct basic_test_data *data = arg;
struct evconnlistener *listener = NULL;
- struct bufferevent *be1=NULL, *be2=NULL, *be3=NULL, *be4=NULL, *be5=NULL;
- struct be_conn_hostname_result be1_outcome={0,0}, be2_outcome={0,0},
- be3_outcome={0,0}, be4_outcome={0,0}, be5_outcome={0,0};
- int expect_err5;
+ struct bufferevent *be[5];
+ struct be_conn_hostname_result be_outcome[ARRAY_SIZE(be)];
+ int expect_err;
struct evdns_base *dns=NULL;
struct evdns_server_port *port=NULL;
struct sockaddr_in sin;
@@ -1166,6 +1264,9 @@ test_bufferevent_connect_hostname(void *arg)
ev_uint16_t dns_port=0;
int n_accept=0, n_dns=0;
char buf[128];
+ int emfile = data->setup_data && !strcmp(data->setup_data, "emfile");
+ unsigned i;
+ int ret;
be_connect_hostname_base = data->base;
@@ -1192,41 +1293,34 @@ test_bufferevent_connect_hostname(void *arg)
evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)dns_port);
evdns_base_nameserver_ip_add(dns, buf);
+#ifdef EVENT__HAVE_SETRLIMIT
+ if (emfile) {
+ int fd = socket(AF_INET, SOCK_STREAM, 0);
+ struct rlimit file = { fd, fd };
+
+ tt_int_op(fd, >=, 0);
+ tt_assert(!close(fd));
+
+ tt_assert(!setrlimit(RLIMIT_NOFILE, &file));
+ }
+#endif
+
/* Now, finally, at long last, launch the bufferevents. One should do
* a failing lookup IP, one should do a successful lookup by IP,
* and one should do a successful lookup by hostname. */
- be1 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
- be2 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
- be3 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
- be4 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
- be5 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
-
- bufferevent_setcb(be1, NULL, NULL, be_connect_hostname_event_cb,
- &be1_outcome);
- bufferevent_setcb(be2, NULL, NULL, be_connect_hostname_event_cb,
- &be2_outcome);
- bufferevent_setcb(be3, NULL, NULL, be_connect_hostname_event_cb,
- &be3_outcome);
- bufferevent_setcb(be4, NULL, NULL, be_connect_hostname_event_cb,
- &be4_outcome);
- bufferevent_setcb(be5, NULL, NULL, be_connect_hostname_event_cb,
- &be5_outcome);
+ for (i = 0; i < ARRAY_SIZE(be); ++i) {
+ memset(&be_outcome[i], 0, sizeof(be_outcome[i]));
+ be[i] = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ bufferevent_setcb(be[i], NULL, NULL, be_connect_hostname_event_cb,
+ &be_outcome[i]);
+ }
- /* Launch an async resolve that will fail. */
- tt_assert(!bufferevent_socket_connect_hostname(be1, dns, AF_INET,
- "nosuchplace.example.com", listener_port));
- /* Connect to the IP without resolving. */
- tt_assert(!bufferevent_socket_connect_hostname(be2, dns, AF_INET,
- "127.0.0.1", listener_port));
- /* Launch an async resolve that will succeed. */
- tt_assert(!bufferevent_socket_connect_hostname(be3, dns, AF_INET,
- "nobodaddy.example.com", listener_port));
/* Use the blocking resolver. This one will fail if your resolver
* can't resolve localhost to 127.0.0.1 */
- tt_assert(!bufferevent_socket_connect_hostname(be4, NULL, AF_INET,
+ tt_assert(!bufferevent_socket_connect_hostname(be[3], NULL, AF_INET,
"localhost", listener_port));
/* Use the blocking resolver with a nonexistent hostname. */
- tt_assert(!bufferevent_socket_connect_hostname(be5, NULL, AF_INET,
+ tt_assert(!bufferevent_socket_connect_hostname(be[4], NULL, AF_INET,
"nonesuch.nowhere.example.com", 80));
{
/* The blocking resolver will use the system nameserver, which
@@ -1237,26 +1331,53 @@ test_bufferevent_connect_hostname(void *arg)
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
- expect_err5 = evutil_getaddrinfo(
+ expect_err = evutil_getaddrinfo(
"nonesuch.nowhere.example.com", "80", &hints, &ai);
}
+ /* Launch an async resolve that will fail. */
+ tt_assert(!bufferevent_socket_connect_hostname(be[0], dns, AF_INET,
+ "nosuchplace.example.com", listener_port));
+ /* Connect to the IP without resolving. */
+ tt_assert(!bufferevent_socket_connect_hostname(be[1], dns, AF_INET,
+ "127.0.0.1", listener_port));
+ /* Launch an async resolve that will succeed. */
+ tt_assert(!bufferevent_socket_connect_hostname(be[2], dns, AF_INET,
+ "nobodaddy.example.com", listener_port));
- event_base_dispatch(data->base);
+ ret = event_base_dispatch(data->base);
+#ifdef __sun__
+ if (emfile && !strcmp(event_base_get_method(data->base), "devpoll")) {
+ tt_int_op(ret, ==, -1);
+ /** DP_POLL failed */
+ tt_skip();
+ } else
+#endif
+ {
+ tt_int_op(ret, ==, 0);
+ }
- tt_int_op(be1_outcome.what, ==, BEV_EVENT_ERROR);
- tt_int_op(be1_outcome.dnserr, ==, EVUTIL_EAI_NONAME);
- tt_int_op(be2_outcome.what, ==, BEV_EVENT_CONNECTED);
- tt_int_op(be2_outcome.dnserr, ==, 0);
- tt_int_op(be3_outcome.what, ==, BEV_EVENT_CONNECTED);
- tt_int_op(be3_outcome.dnserr, ==, 0);
- tt_int_op(be4_outcome.what, ==, BEV_EVENT_CONNECTED);
- tt_int_op(be4_outcome.dnserr, ==, 0);
- if (expect_err5) {
- tt_int_op(be5_outcome.what, ==, BEV_EVENT_ERROR);
- tt_int_op(be5_outcome.dnserr, ==, expect_err5);
+ tt_int_op(be_outcome[0].what, ==, BEV_EVENT_ERROR);
+ tt_int_op(be_outcome[0].dnserr, ==, EVUTIL_EAI_NONAME);
+ tt_int_op(be_outcome[1].what, ==, !emfile ? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR);
+ tt_int_op(be_outcome[1].dnserr, ==, 0);
+ tt_int_op(be_outcome[2].what, ==, !emfile ? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR);
+ tt_int_op(be_outcome[2].dnserr, ==, 0);
+ tt_int_op(be_outcome[3].what, ==, !emfile ? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR);
+ if (!emfile) {
+ tt_int_op(be_outcome[3].dnserr, ==, 0);
+ } else {
+ tt_int_op(be_outcome[3].dnserr, !=, 0);
+ }
+ if (expect_err) {
+ tt_int_op(be_outcome[4].what, ==, BEV_EVENT_ERROR);
+ tt_int_op(be_outcome[4].dnserr, ==, expect_err);
}
- tt_int_op(n_accept, ==, 3);
+ if (emfile) {
+ tt_int_op(n_accept, ==, 0);
+ } else {
+ tt_int_op(n_accept, ==, 3);
+ }
tt_int_op(n_dns, ==, 2);
end:
@@ -1266,16 +1387,10 @@ end:
evdns_close_server_port(port);
if (dns)
evdns_base_free(dns, 0);
- if (be1)
- bufferevent_free(be1);
- if (be2)
- bufferevent_free(be2);
- if (be3)
- bufferevent_free(be3);
- if (be4)
- bufferevent_free(be4);
- if (be5)
- bufferevent_free(be5);
+ for (i = 0; i < ARRAY_SIZE(be); ++i) {
+ if (be[i])
+ bufferevent_free(be[i]);
+ }
}
@@ -1314,7 +1429,7 @@ test_getaddrinfo_async(void *arg)
struct evutil_addrinfo hints, *a;
struct gai_outcome local_outcome;
struct gai_outcome a_out[12];
- int i;
+ unsigned i;
struct evdns_getaddrinfo_request *r;
char buf[128];
struct evdns_server_port *port = NULL;
@@ -1322,7 +1437,7 @@ test_getaddrinfo_async(void *arg)
int n_dns_questions = 0;
struct evdns_base *dns_base;
- memset(&a_out, 0, sizeof(a_out));
+ memset(a_out, 0, sizeof(a_out));
memset(&local_outcome, 0, sizeof(local_outcome));
dns_base = evdns_base_new(data->base, 0);
@@ -1672,8 +1787,7 @@ test_getaddrinfo_async(void *arg)
end:
if (local_outcome.ai)
evutil_freeaddrinfo(local_outcome.ai);
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
- for (i=0;i<(int)ARRAY_SIZE(a_out);++i) {
+ for (i = 0; i < ARRAY_SIZE(a_out); ++i) {
if (a_out[i].ai)
evutil_freeaddrinfo(a_out[i].ai);
}
@@ -1694,7 +1808,8 @@ struct gaic_request_status {
#define GAIC_MAGIC 0x1234abcd
-static int pending = 0;
+static int gaic_pending = 0;
+static int gaic_freed = 0;
static void
gaic_cancel_request_cb(evutil_socket_t fd, short what, void *arg)
@@ -1739,15 +1854,20 @@ gaic_getaddrinfo_cb(int result, struct evutil_addrinfo *res, void *arg)
free(status);
end:
- if (--pending <= 0)
+ if (res)
+ {
+ TT_BLATHER(("evutil_freeaddrinfo(%p)", res));
+ evutil_freeaddrinfo(res);
+ ++gaic_freed;
+ }
+ if (--gaic_pending <= 0)
event_base_loopexit(base, NULL);
}
static void
gaic_launch(struct event_base *base, struct evdns_base *dns_base)
{
- struct gaic_request_status *status = calloc(1, sizeof(*status));
- tt_assert(status);
+ struct gaic_request_status *status = calloc(1,sizeof(*status));
struct timeval tv = { 0, 10000 };
status->magic = GAIC_MAGIC;
status->base = base;
@@ -1758,7 +1878,7 @@ gaic_launch(struct event_base *base, struct evdns_base *dns_base)
"foobar.bazquux.example.com", "80", NULL, gaic_getaddrinfo_cb,
status);
event_add(&status->cancel_event, &tv);
- ++pending;
+ ++gaic_pending;
}
#ifdef EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
@@ -1886,29 +2006,22 @@ dbg_leak_resume(void *env_, int cancel, int send_err_shutdown)
tt_assert(!evdns_base_resume(env->dns_base));
}
+ event_base_loop(env->base, EVLOOP_NONBLOCK);
/**
- * Because we don't cancel request,
- * and want our callback to recieve DNS_ERR_SHUTDOWN,
- * we use deferred callback, and there was
+ * Because we don't cancel request, and want our callback to recieve
+ * DNS_ERR_SHUTDOWN, we use deferred callback, and there was:
* - one extra malloc(),
* @see reply_schedule_callback()
* - and one missing free
* @see request_finished() (req->handle->pending_cb = 1)
- * than we don't need to count in testleak_cleanup()
- *
- * So just decrement allocated_chunks to 2,
- * like we already take care about it.
+ * than we don't need to count in testleak_cleanup(), but we can clean them
+ * if we will run loop once again, but *after* evdns base freed.
*/
- if (!cancel && send_err_shutdown) {
- allocated_chunks -= 2;
- }
-
- event_base_loop(env->base, EVLOOP_NONBLOCK);
-
-end:
evdns_base_free(env->dns_base, send_err_shutdown);
env->dns_base = 0;
+ event_base_loop(env->base, EVLOOP_NONBLOCK);
+end:
event_base_free(env->base);
env->base = 0;
}
@@ -1955,7 +2068,7 @@ test_getaddrinfo_async_cancel_stress(void *ptr)
struct sockaddr_in sin;
struct sockaddr_storage ss;
ev_socklen_t slen;
- int i;
+ unsigned i;
base = event_base_new();
dns_base = evdns_base_new(base, 0);
@@ -1988,6 +2101,9 @@ test_getaddrinfo_async_cancel_stress(void *ptr)
event_base_dispatch(base);
+ // at least some was canceled via external event
+ tt_int_op(gaic_freed, !=, 1000);
+
end:
if (dns_base)
evdns_base_free(dns_base, 1);
@@ -1999,6 +2115,327 @@ end:
evutil_closesocket(fd);
}
+static void
+dns_client_fail_requests_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ int limit_inflight = data->setup_data && !strcmp(data->setup_data, "limit-inflight");
+ struct evdns_base *dns = NULL;
+ struct evdns_server_port *dns_port = NULL;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+
+ struct generic_dns_callback_result r[20];
+ unsigned i;
+
+ dns_port = regress_get_dnsserver(base, &portnum, NULL,
+ regress_dns_server_cb, reissue_table);
+ tt_assert(dns_port);
+
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+
+ if (limit_inflight)
+ tt_assert(!evdns_base_set_option(dns, "max-inflight:", "11"));
+
+ for (i = 0; i < 20; ++i)
+ evdns_base_resolve_ipv4(dns, "foof.example.com", 0, generic_dns_callback, &r[i]);
+
+ n_replies_left = 20;
+ exit_base = base;
+
+ evdns_base_free(dns, 1 /** fail requests */);
+ /** run defered callbacks, to trigger UAF */
+ event_base_dispatch(base);
+
+ tt_int_op(n_replies_left, ==, 0);
+ for (i = 0; i < 20; ++i)
+ tt_int_op(r[i].result, ==, DNS_ERR_SHUTDOWN);
+
+end:
+ evdns_close_server_port(dns_port);
+}
+
+static void
+getaddrinfo_cb(int err, struct evutil_addrinfo *res, void *ptr)
+{
+ generic_dns_callback(err, 0, 0, 0, NULL, ptr);
+}
+static void
+dns_client_fail_requests_getaddrinfo_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_base *dns = NULL;
+ struct evdns_server_port *dns_port = NULL;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+
+ struct generic_dns_callback_result r[20];
+ int i;
+
+ dns_port = regress_get_dnsserver(base, &portnum, NULL,
+ regress_dns_server_cb, reissue_table);
+ tt_assert(dns_port);
+
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+
+ for (i = 0; i < 20; ++i)
+ tt_assert(evdns_getaddrinfo(dns, "foof.example.com", "80", NULL, getaddrinfo_cb, &r[i]));
+
+ n_replies_left = 20;
+ exit_base = base;
+
+ evdns_base_free(dns, 1 /** fail requests */);
+ /** run defered callbacks, to trigger UAF */
+ event_base_dispatch(base);
+
+ tt_int_op(n_replies_left, ==, 0);
+ for (i = 0; i < 20; ++i)
+ tt_int_op(r[i].result, ==, EVUTIL_EAI_FAIL);
+
+end:
+ evdns_close_server_port(dns_port);
+}
+
+#ifdef EVTHREAD_USE_PTHREADS_IMPLEMENTED
+struct race_param
+{
+ void *lock;
+ void *reqs_cmpl_cond;
+ int bw_threads;
+ void *bw_threads_exited_cond;
+ volatile int stopping;
+ void *base;
+ void *dns;
+
+ int locked;
+};
+static void *
+race_base_run(void *arg)
+{
+ struct race_param *rp = (struct race_param *)arg;
+ event_base_loop(rp->base, EVLOOP_NO_EXIT_ON_EMPTY);
+ THREAD_RETURN();
+}
+static void *
+race_busywait_run(void *arg)
+{
+ struct race_param *rp = (struct race_param *)arg;
+ struct sockaddr_storage ss;
+ while (!rp->stopping)
+ evdns_base_get_nameserver_addr(rp->dns, 0, (struct sockaddr *)&ss, sizeof(ss));
+ EVLOCK_LOCK(rp->lock, 0);
+ if (--rp->bw_threads == 0)
+ EVTHREAD_COND_SIGNAL(rp->bw_threads_exited_cond);
+ EVLOCK_UNLOCK(rp->lock, 0);
+ THREAD_RETURN();
+}
+static void
+race_gai_cb(int result, struct evutil_addrinfo *res, void *arg)
+{
+ struct race_param *rp = arg;
+ (void)result;
+ (void)res;
+
+ --n_replies_left;
+ if (n_replies_left == 0) {
+ EVLOCK_LOCK(rp->lock, 0);
+ EVTHREAD_COND_SIGNAL(rp->reqs_cmpl_cond);
+ EVLOCK_UNLOCK(rp->lock, 0);
+ }
+}
+static void
+getaddrinfo_race_gotresolve_test(void *arg)
+{
+ struct race_param rp;
+ struct evdns_server_port *dns_port = NULL;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+ int i;
+
+ // Some stress is needed to yield inside getaddrinfo between resolve_ipv4 and resolve_ipv6
+ int n_reqs = 16384;
+#ifdef _SC_NPROCESSORS_ONLN
+ int n_threads = sysconf(_SC_NPROCESSORS_ONLN) + 1;
+#else
+ int n_threads = 17;
+#endif
+ THREAD_T thread[n_threads];
+ struct timeval tv;
+
+ (void)arg;
+
+ evthread_use_pthreads();
+
+ rp.base = event_base_new();
+ tt_assert(rp.base);
+ if (evthread_make_base_notifiable(rp.base) < 0)
+ tt_abort_msg("Couldn't make base notifiable!");
+
+ dns_port = regress_get_dnsserver(rp.base, &portnum, NULL,
+ regress_dns_server_cb, reissue_table);
+ tt_assert(dns_port);
+
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ rp.dns = evdns_base_new(rp.base, 0);
+ tt_assert(!evdns_base_nameserver_ip_add(rp.dns, buf));
+
+ n_replies_left = n_reqs;
+
+ EVTHREAD_ALLOC_LOCK(rp.lock, 0);
+ EVTHREAD_ALLOC_COND(rp.reqs_cmpl_cond);
+ EVTHREAD_ALLOC_COND(rp.bw_threads_exited_cond);
+ tt_assert(rp.lock);
+ tt_assert(rp.reqs_cmpl_cond);
+ tt_assert(rp.bw_threads_exited_cond);
+ rp.bw_threads = 0;
+ rp.stopping = 0;
+
+ // Run resolver thread
+ THREAD_START(thread[0], race_base_run, &rp);
+ // Run busy-wait threads used to force yield this thread
+ for (i = 1; i < n_threads; i++) {
+ rp.bw_threads++;
+ THREAD_START(thread[i], race_busywait_run, &rp);
+ }
+
+ EVLOCK_LOCK(rp.lock, 0);
+ rp.locked = 1;
+
+ for (i = 0; i < n_reqs; ++i) {
+ tt_assert(evdns_getaddrinfo(rp.dns, "foof.example.com", "80", NULL, race_gai_cb, &rp));
+ // This magic along with busy-wait threads make this thread yield frequently
+ if (i % 100 == 0) {
+ tv.tv_sec = 0;
+ tv.tv_usec = 10000;
+ evutil_usleep_(&tv);
+ }
+ }
+
+ exit_base = rp.base;
+
+ // Wait for some time
+ tv.tv_sec = 5;
+ tv.tv_usec = 0;
+ EVTHREAD_COND_WAIT_TIMED(rp.reqs_cmpl_cond, rp.lock, &tv);
+
+ // Stop busy-wait threads
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+ rp.stopping = 1;
+ tt_assert(EVTHREAD_COND_WAIT_TIMED(rp.bw_threads_exited_cond, rp.lock, &tv) == 0);
+
+ EVLOCK_UNLOCK(rp.lock, 0);
+ rp.locked = 0;
+
+ evdns_base_free(rp.dns, 1 /** fail requests */);
+
+ tt_int_op(n_replies_left, ==, 0);
+
+end:
+ if (rp.locked)
+ EVLOCK_UNLOCK(rp.lock, 0);
+ EVTHREAD_FREE_LOCK(rp.lock, 0);
+ EVTHREAD_FREE_COND(rp.reqs_cmpl_cond);
+ EVTHREAD_FREE_COND(rp.bw_threads_exited_cond);
+ evdns_close_server_port(dns_port);
+ event_base_loopbreak(rp.base);
+ event_base_free(rp.base);
+}
+#endif
+
+static void
+test_set_so_rcvbuf_so_sndbuf(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct evdns_base *dns_base;
+
+ dns_base = evdns_base_new(data->base, 0);
+ tt_assert(dns_base);
+
+ tt_assert(!evdns_base_set_option(dns_base, "so-rcvbuf", "10240"));
+ tt_assert(!evdns_base_set_option(dns_base, "so-sndbuf", "10240"));
+
+ /* actually check SO_RCVBUF/SO_SNDBUF not fails */
+ tt_assert(!evdns_base_nameserver_ip_add(dns_base, "127.0.0.1"));
+
+end:
+ if (dns_base)
+ evdns_base_free(dns_base, 0);
+}
+
+static void
+test_set_option(void *arg)
+{
+#define SUCCESS 0
+#define FAIL -1
+ struct basic_test_data *data = arg;
+ struct evdns_base *dns_base;
+ size_t i;
+ /* Option names are allowed to have ':' at the end.
+ * So all test option names come in pairs.
+ */
+ const char *int_options[] = {
+ "ndots", "ndots:",
+ "max-timeouts", "max-timeouts:",
+ "max-inflight", "max-inflight:",
+ "attempts", "attempts:",
+ "randomize-case", "randomize-case:",
+ "so-rcvbuf", "so-rcvbuf:",
+ "so-sndbuf", "so-sndbuf:",
+ };
+ const char *timeval_options[] = {
+ "timeout", "timeout:",
+ "getaddrinfo-allow-skew", "getaddrinfo-allow-skew:",
+ "initial-probe-timeout", "initial-probe-timeout:",
+ };
+ const char *addr_port_options[] = {
+ "bind-to", "bind-to:",
+ };
+
+ dns_base = evdns_base_new(data->base, 0);
+ tt_assert(dns_base);
+
+ for (i = 0; i < ARRAY_SIZE(int_options); ++i) {
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, int_options[i], "0"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, int_options[i], "1"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, int_options[i], "10000"));
+ tt_assert(FAIL == evdns_base_set_option(dns_base, int_options[i], "foo"));
+ tt_assert(FAIL == evdns_base_set_option(dns_base, int_options[i], "3.14"));
+ }
+
+ for (i = 0; i < ARRAY_SIZE(timeval_options); ++i) {
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, timeval_options[i], "1"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, timeval_options[i], "0.001"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, timeval_options[i], "3.14"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, timeval_options[i], "10000"));
+ tt_assert(FAIL == evdns_base_set_option(dns_base, timeval_options[i], "0"));
+ tt_assert(FAIL == evdns_base_set_option(dns_base, timeval_options[i], "foo"));
+ }
+
+ for (i = 0; i < ARRAY_SIZE(addr_port_options); ++i) {
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, addr_port_options[i], "8.8.8.8:80"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, addr_port_options[i], "1.2.3.4"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, addr_port_options[i], "::1:82"));
+ tt_assert(SUCCESS == evdns_base_set_option(dns_base, addr_port_options[i], "3::4"));
+ tt_assert(FAIL == evdns_base_set_option(dns_base, addr_port_options[i], "3.14"));
+ tt_assert(FAIL == evdns_base_set_option(dns_base, addr_port_options[i], "foo"));
+ }
+
+#undef SUCCESS
+#undef FAIL
+end:
+ if (dns_base)
+ evdns_base_free(dns_base, 0);
+}
#define DNS_LEGACY(name, flags) \
{ #name, run_legacy_test_fn, flags|TT_LEGACY, &legacy_setup, \
@@ -2010,7 +2447,9 @@ struct testcase_t dns_testcases[] = {
DNS_LEGACY(gethostbyname6, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT),
DNS_LEGACY(gethostbyaddr, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT),
{ "resolve_reverse", dns_resolve_reverse, TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
+ { "search_empty", dns_search_empty_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "search", dns_search_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "search_lower", dns_search_lower_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "search_cancel", dns_search_cancel_test,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "retry", dns_retry_test, TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
@@ -2022,10 +2461,21 @@ struct testcase_t dns_testcases[] = {
{ "inflight", dns_inflight_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "bufferevent_connect_hostname", test_bufferevent_connect_hostname,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+#ifdef EVENT__HAVE_SETRLIMIT
+ { "bufferevent_connect_hostname_emfile", test_bufferevent_connect_hostname,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"emfile" },
+#endif
{ "disable_when_inactive", dns_disable_when_inactive_test,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
{ "disable_when_inactive_no_ns", dns_disable_when_inactive_no_ns_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+
+ { "initialize_nameservers", dns_initialize_nameservers_test,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+#ifndef _WIN32
+ { "nameservers_no_default", dns_nameservers_no_default_test,
TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+#endif
{ "getaddrinfo_async", test_getaddrinfo_async,
TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"" },
@@ -2045,6 +2495,24 @@ struct testcase_t dns_testcases[] = {
TT_FORK, &testleak_funcs, NULL },
#endif
+ { "client_fail_requests", dns_client_fail_requests_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ { "client_fail_waiting_requests", dns_client_fail_requests_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, (char*)"limit-inflight" },
+ { "client_fail_requests_getaddrinfo",
+ dns_client_fail_requests_getaddrinfo_test,
+ TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+#ifdef EVTHREAD_USE_PTHREADS_IMPLEMENTED
+ { "getaddrinfo_race_gotresolve",
+ getaddrinfo_race_gotresolve_test,
+ TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
+#endif
+
+ { "set_SO_RCVBUF_SO_SNDBUF", test_set_so_rcvbuf_so_sndbuf,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "set_options", test_set_option,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+
END_OF_TESTCASES
};
diff --git a/contrib/ntp/sntp/libevent/test/regress_et.c b/contrib/ntp/sntp/libevent/test/regress_et.c
index 229a78e2d429..1b1f819eda19 100644
--- a/contrib/ntp/sntp/libevent/test/regress_et.c
+++ b/contrib/ntp/sntp/libevent/test/regress_et.c
@@ -51,6 +51,14 @@
static int was_et = 0;
+static int base_supports_et(struct event_base *base)
+{
+ return
+ (!strcmp(event_base_get_method(base), "epoll") ||
+ !strcmp(event_base_get_method(base), "epoll (with changelist)") ||
+ !strcmp(event_base_get_method(base), "kqueue"));
+}
+
static void
read_cb(evutil_socket_t fd, short event, void *arg)
{
@@ -67,23 +75,14 @@ read_cb(evutil_socket_t fd, short event, void *arg)
event_del(arg);
}
-#ifndef SHUT_WR
-#define SHUT_WR 1
-#endif
-
-#ifdef _WIN32
-#define LOCAL_SOCKETPAIR_AF AF_INET
-#else
-#define LOCAL_SOCKETPAIR_AF AF_UNIX
-#endif
-
static void
-test_edgetriggered(void *et)
+test_edgetriggered(void *data_)
{
+ struct basic_test_data *data = data_;
+ struct event_base *base = data->base;
+ evutil_socket_t *pair = data->pair;
struct event *ev = NULL;
- struct event_base *base = NULL;
const char *test = "test string";
- evutil_socket_t pair[2] = {-1,-1};
int supports_et;
/* On Linux 3.2.1 (at least, as patched by Fedora and tested by Nick),
@@ -92,39 +91,21 @@ test_edgetriggered(void *et)
* get edge-triggered behavior. Yuck! Linux 3.1.9 didn't have this
* problem.
*/
-#ifdef __linux__
- if (evutil_ersatz_socketpair_(AF_INET, SOCK_STREAM, 0, pair) == -1) {
- tt_abort_perror("socketpair");
- }
-#else
- if (evutil_socketpair(LOCAL_SOCKETPAIR_AF, SOCK_STREAM, 0, pair) == -1) {
- tt_abort_perror("socketpair");
- }
-#endif
called = was_et = 0;
tt_int_op(send(pair[0], test, (int)strlen(test)+1, 0), >, 0);
- shutdown(pair[0], SHUT_WR);
-
- /* Initalize the event library */
- base = event_base_new();
-
- if (!strcmp(event_base_get_method(base), "epoll") ||
- !strcmp(event_base_get_method(base), "epoll (with changelist)") ||
- !strcmp(event_base_get_method(base), "kqueue"))
- supports_et = 1;
- else
- supports_et = 0;
+ tt_int_op(shutdown(pair[0], EVUTIL_SHUT_WR), ==, 0);
+ supports_et = base_supports_et(base);
TT_BLATHER(("Checking for edge-triggered events with %s, which should %s"
"support edge-triggering", event_base_get_method(base),
supports_et?"":"not "));
- /* Initalize one event */
+ /* Initialize one event */
ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST, read_cb, &ev);
-
- event_add(ev, NULL);
+ tt_assert(ev != NULL);
+ tt_int_op(event_add(ev, NULL), ==, 0);
/* We're going to call the dispatch function twice. The first invocation
* will read a single byte from pair[1] in either case. If we're edge
@@ -133,8 +114,8 @@ test_edgetriggered(void *et)
* do nothing. If we're level triggered, the second invocation of
* event_base_loop will also activate the event (because there's still
* data to read). */
- event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE);
- event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE);
+ tt_int_op(event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE), ==, 0);
+ tt_int_op(event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE), ==, 0);
if (supports_et) {
tt_int_op(called, ==, 1);
@@ -144,15 +125,11 @@ test_edgetriggered(void *et)
tt_assert(!was_et);
}
- end:
+end:
if (ev) {
event_del(ev);
event_free(ev);
}
- if (base)
- event_base_free(base);
- evutil_closesocket(pair[0]);
- evutil_closesocket(pair[1]);
}
static void
@@ -200,9 +177,94 @@ end:
event_base_free(base);
}
+static int read_notification_count;
+static int last_read_notification_was_et;
+static void
+read_notification_cb(evutil_socket_t fd, short event, void *arg)
+{
+ read_notification_count++;
+ last_read_notification_was_et = (event & EV_ET);
+}
+
+static int write_notification_count;
+static int last_write_notification_was_et;
+static void
+write_notification_cb(evutil_socket_t fd, short event, void *arg)
+{
+ write_notification_count++;
+ last_write_notification_was_et = (event & EV_ET);
+}
+
+/* After two or more events have been registered for the same
+ * file descriptor using EV_ET, if one of the events is
+ * deleted, then the epoll_ctl() call issued by libevent drops
+ * the EPOLLET flag resulting in level triggered
+ * notifications.
+ */
+static void
+test_edge_triggered_multiple_events(void *data_)
+{
+ struct basic_test_data *data = data_;
+ struct event *read_ev = NULL;
+ struct event *write_ev = NULL;
+ const char c = 'A';
+ struct event_base *base = data->base;
+ evutil_socket_t *pair = data->pair;
+
+ if (!base_supports_et(base)) {
+ tt_skip();
+ return;
+ }
+
+ read_notification_count = 0;
+ last_read_notification_was_et = 0;
+ write_notification_count = 0;
+ last_write_notification_was_et = 0;
+
+ /* Make pair[1] readable */
+ tt_int_op(send(pair[0], &c, 1, 0), >, 0);
+
+ read_ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST,
+ read_notification_cb, NULL);
+ write_ev = event_new(base, pair[1], EV_WRITE|EV_ET|EV_PERSIST,
+ write_notification_cb, NULL);
+
+ event_add(read_ev, NULL);
+ event_add(write_ev, NULL);
+ event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
+ event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
+
+ tt_assert(last_read_notification_was_et);
+ tt_int_op(read_notification_count, ==, 1);
+ tt_assert(last_write_notification_was_et);
+ tt_int_op(write_notification_count, ==, 1);
+
+ event_del(read_ev);
+
+ /* trigger acitivity second time for the backend that can have multiple
+ * events for one fd (like kqueue) */
+ close(pair[0]);
+ pair[0] = -1;
+
+ /* Verify that we are still edge-triggered for write notifications */
+ event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
+ event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
+ tt_assert(last_write_notification_was_et);
+ tt_int_op(write_notification_count, ==, 2);
+
+end:
+ if (read_ev)
+ event_free(read_ev);
+ if (write_ev)
+ event_free(write_ev);
+}
+
struct testcase_t edgetriggered_testcases[] = {
- { "et", test_edgetriggered, TT_FORK, NULL, NULL },
+ { "et", test_edgetriggered,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR, &basic_setup, NULL },
{ "et_mix_error", test_edgetriggered_mix_error,
TT_FORK|TT_NEED_SOCKETPAIR|TT_NO_LOGS, &basic_setup, NULL },
+ { "et_multiple_events", test_edge_triggered_multiple_events,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR, &basic_setup, NULL },
END_OF_TESTCASES
};
diff --git a/contrib/ntp/sntp/libevent/test/regress_finalize.c b/contrib/ntp/sntp/libevent/test/regress_finalize.c
index 552210fe9d01..9e57188121d1 100644
--- a/contrib/ntp/sntp/libevent/test/regress_finalize.c
+++ b/contrib/ntp/sntp/libevent/test/regress_finalize.c
@@ -290,6 +290,53 @@ end:
;
}
+static void
+event_finalize_callback_free(struct event *ev, void *arg)
+{
+ struct event_base *base = arg;
+ int err;
+ if (base) {
+ err = event_assign(ev, base, -1, EV_TIMEOUT, NULL, NULL);
+ tt_int_op(err, ==, 0);
+ test_ok += 1;
+ } else {
+ free(ev);
+ test_ok += 1;
+ }
+
+end:
+ ;
+}
+static void
+test_fin_debug_use_after_free(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct event *ev;
+
+ tt_ptr_op(ev = event_new(base, -1, EV_TIMEOUT, NULL, base), !=, NULL);
+ tt_int_op(event_add(ev, NULL), ==, 0);
+ tt_int_op(event_finalize(0, ev, event_finalize_callback_free), ==, 0);
+
+ // Dispatch base to trigger callbacks
+ event_base_dispatch(base);
+ event_base_assert_ok_(base);
+ tt_int_op(test_ok, ==, 1);
+
+ // Now add again, since we did event_assign in event_finalize_callback_free
+ // This used to fail in event_debug_assert_is_setup_
+ tt_int_op(event_add(ev, NULL), ==, 0);
+
+ // Finalize and dispatch again
+ tt_int_op(event_finalize(0, ev, event_finalize_callback_free), ==, 0);
+ event_base_dispatch(base);
+ event_base_assert_ok_(base);
+ tt_int_op(test_ok, ==, 2);
+
+end:
+ ;
+}
+
#if 0
static void
timer_callback_3(evutil_socket_t *fd, short what, void *arg)
@@ -339,6 +386,7 @@ struct testcase_t finalize_testcases[] = {
TEST(cb_invoked, TT_FORK|TT_NEED_BASE),
TEST(free_finalize, TT_FORK),
TEST(within_cb, TT_FORK|TT_NEED_BASE),
+ TEST(debug_use_after_free, TT_FORK|TT_NEED_BASE|TT_ENABLE_DEBUG_MODE),
// TEST(many, TT_FORK|TT_NEED_BASE),
diff --git a/contrib/ntp/sntp/libevent/test/regress_http.c b/contrib/ntp/sntp/libevent/test/regress_http.c
index 147f6ff1a76a..4493907163e2 100644
--- a/contrib/ntp/sntp/libevent/test/regress_http.c
+++ b/contrib/ntp/sntp/libevent/test/regress_http.c
@@ -58,32 +58,24 @@
#include "event2/http.h"
#include "event2/buffer.h"
#include "event2/bufferevent.h"
+#include "event2/bufferevent_ssl.h"
#include "event2/util.h"
+#include "event2/listener.h"
#include "log-internal.h"
#include "http-internal.h"
#include "regress.h"
#include "regress_testutils.h"
-static struct evhttp *http;
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
+
/* set if a test needs to call loopexit on a base */
static struct event_base *exit_base;
static char const BASIC_REQUEST_BODY[] = "This is funny";
-#define IMPL_HTTP_REQUEST_ERROR_CB(name, expecting_error) \
- static void \
- http_request_error_cb_with_##name##_(enum evhttp_request_error error, \
- void *arg) \
- { \
- if (error != expecting_error) { \
- fprintf(stderr, "FAILED\n"); \
- exit(1); \
- } \
- test_ok = 1; \
- }
-IMPL_HTTP_REQUEST_ERROR_CB(cancel, EVREQ_HTTP_REQUEST_CANCEL)
-
static void http_basic_cb(struct evhttp_request *req, void *arg);
+static void http_timeout_cb(struct evhttp_request *req, void *arg);
+static void http_large_cb(struct evhttp_request *req, void *arg);
static void http_chunked_cb(struct evhttp_request *req, void *arg);
static void http_post_cb(struct evhttp_request *req, void *arg);
static void http_put_cb(struct evhttp_request *req, void *arg);
@@ -94,11 +86,15 @@ static void http_badreq_cb(struct evhttp_request *req, void *arg);
static void http_dispatcher_cb(struct evhttp_request *req, void *arg);
static void http_on_complete_cb(struct evhttp_request *req, void *arg);
+#define HTTP_BIND_IPV6 1
+#define HTTP_BIND_SSL 2
+#define HTTP_SSL_FILTER 4
static int
-http_bind(struct evhttp *myhttp, ev_uint16_t *pport, int ipv6)
+http_bind(struct evhttp *myhttp, ev_uint16_t *pport, int mask)
{
int port;
struct evhttp_bound_socket *sock;
+ int ipv6 = mask & HTTP_BIND_IPV6;
if (ipv6)
sock = evhttp_bind_socket_with_handle(myhttp, "::1", *pport);
@@ -120,19 +116,45 @@ http_bind(struct evhttp *myhttp, ev_uint16_t *pport, int ipv6)
return 0;
}
+#ifdef EVENT__HAVE_OPENSSL
+static struct bufferevent *
+https_bev(struct event_base *base, void *arg)
+{
+ SSL *ssl = SSL_new(get_ssl_ctx());
+
+ SSL_use_certificate(ssl, ssl_getcert(ssl_getkey()));
+ SSL_use_PrivateKey(ssl, ssl_getkey());
+
+ return bufferevent_openssl_socket_new(
+ base, -1, ssl, BUFFEREVENT_SSL_ACCEPTING,
+ BEV_OPT_CLOSE_ON_FREE);
+}
+#endif
static struct evhttp *
-http_setup(ev_uint16_t *pport, struct event_base *base, int ipv6)
+http_setup_gencb(ev_uint16_t *pport, struct event_base *base, int mask,
+ void (*cb)(struct evhttp_request *, void *), void *cbarg)
{
struct evhttp *myhttp;
/* Try a few different ports */
myhttp = evhttp_new(base);
- if (http_bind(myhttp, pport, ipv6) < 0)
+ if (http_bind(myhttp, pport, mask) < 0)
return NULL;
+#ifdef EVENT__HAVE_OPENSSL
+ if (mask & HTTP_BIND_SSL) {
+ init_ssl();
+ evhttp_set_bevcb(myhttp, https_bev, NULL);
+ }
+#endif
+
+ evhttp_set_gencb(myhttp, cb, cbarg);
/* Register a callback for certain types of requests */
- evhttp_set_cb(myhttp, "/test", http_basic_cb, base);
+ evhttp_set_cb(myhttp, "/test", http_basic_cb, myhttp);
+ evhttp_set_cb(myhttp, "/test nonconformant", http_basic_cb, myhttp);
+ evhttp_set_cb(myhttp, "/timeout", http_timeout_cb, myhttp);
+ evhttp_set_cb(myhttp, "/large", http_large_cb, base);
evhttp_set_cb(myhttp, "/chunked", http_chunked_cb, base);
evhttp_set_cb(myhttp, "/streamed", http_chunked_cb, base);
evhttp_set_cb(myhttp, "/postit", http_post_cb, base);
@@ -145,20 +167,23 @@ http_setup(ev_uint16_t *pport, struct event_base *base, int ipv6)
evhttp_set_cb(myhttp, "/", http_dispatcher_cb, base);
return (myhttp);
}
+static struct evhttp *
+http_setup(ev_uint16_t *pport, struct event_base *base, int mask)
+{ return http_setup_gencb(pport, base, mask, NULL, NULL); }
#ifndef NI_MAXSERV
#define NI_MAXSERV 1024
#endif
static evutil_socket_t
-http_connect(const char *address, u_short port)
+http_connect(const char *address, ev_uint16_t port)
{
/* Stupid code for connecting */
struct evutil_addrinfo ai, *aitop;
char strport[NI_MAXSERV];
struct sockaddr *sa;
- int slen;
+ size_t slen;
evutil_socket_t fd;
memset(&ai, 0, sizeof(ai));
@@ -207,6 +232,8 @@ evbuffer_datacmp(struct evbuffer *buf, const char *s)
return -1;
d = evbuffer_pullup(buf, s_sz);
+ if (!d)
+ d = (unsigned char *)"";
if ((r = memcmp(d, s, s_sz)))
return r;
@@ -276,6 +303,9 @@ http_writecb(struct bufferevent *bev, void *arg)
static void
http_errorcb(struct bufferevent *bev, short what, void *arg)
{
+ /** For ssl */
+ if (what & BEV_EVENT_CONNECTED)
+ return;
test_ok = -2;
event_base_loopexit(arg, NULL);
}
@@ -289,11 +319,30 @@ http_basic_cb(struct evhttp_request *req, void *arg)
struct evbuffer *evb = evbuffer_new();
struct evhttp_connection *evcon;
int empty = evhttp_find_header(evhttp_request_get_input_headers(req), "Empty") != NULL;
- event_debug(("%s: called\n", __func__));
+
+ TT_BLATHER(("%s: called\n", __func__));
evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
evcon = evhttp_request_get_connection(req);
- tt_assert(evhttp_connection_get_server(evcon) == http);
+ tt_assert(evhttp_connection_get_server(evcon) == arg);
+
+ {
+ const struct sockaddr *sa;
+ char addrbuf[128];
+
+ sa = evhttp_connection_get_addr(evcon);
+ tt_assert(sa);
+
+ if (sa->sa_family == AF_INET) {
+ evutil_format_sockaddr_port_((struct sockaddr *)sa, addrbuf, sizeof(addrbuf));
+ tt_assert(!strncmp(addrbuf, "127.0.0.1:", strlen("127.0.0.1:")));
+ } else if (sa->sa_family == AF_INET6) {
+ evutil_format_sockaddr_port_((struct sockaddr *)sa, addrbuf, sizeof(addrbuf));
+ tt_assert(!strncmp(addrbuf, "[::1]:", strlen("[::1]:")));
+ } else {
+ tt_fail_msg("Unsupported family");
+ }
+ }
/* For multi-line headers test */
{
@@ -329,6 +378,33 @@ end:
evbuffer_free(evb);
}
+static void http_timeout_reply_cb(evutil_socket_t fd, short events, void *arg)
+{
+ struct evhttp_request *req = arg;
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL);
+ test_ok++;
+}
+static void
+http_timeout_cb(struct evhttp_request *req, void *arg)
+{
+ struct timeval when = { 0, 100 };
+ event_base_once(exit_base, -1, EV_TIMEOUT,
+ http_timeout_reply_cb, req, &when);
+}
+
+static void
+http_large_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = evbuffer_new();
+ int i;
+
+ for (i = 0; i < 1<<20; ++i) {
+ evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
+ }
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+ evbuffer_free(evb);
+}
+
static char const* const CHUNKS[] = {
"This is funny",
"but not hilarious.",
@@ -366,11 +442,7 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
{
struct timeval when = { 0, 0 };
struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state));
- event_debug(("%s: called\n", __func__));
- if (state == NULL) {
- fprintf(stderr, "Unable to allocate memory in http_chunked_cb()\n");
- exit(1);
- }
+ TT_BLATHER(("%s: called\n", __func__));
memset(state, 0, sizeof(struct chunk_req_state));
state->req = req;
@@ -388,32 +460,65 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
event_base_once(arg, -1, EV_TIMEOUT, http_chunked_trickle_cb, state, &when);
}
+static struct bufferevent *
+create_bev(struct event_base *base, evutil_socket_t fd, int ssl_mask, int flags_)
+{
+ int flags = BEV_OPT_DEFER_CALLBACKS | flags_;
+ struct bufferevent *bev = NULL;
+
+ if (!ssl_mask) {
+ bev = bufferevent_socket_new(base, fd, flags);
+ } else {
+#ifdef EVENT__HAVE_OPENSSL
+ SSL *ssl = SSL_new(get_ssl_ctx());
+ if (ssl_mask & HTTP_SSL_FILTER) {
+ struct bufferevent *underlying =
+ bufferevent_socket_new(base, fd, flags);
+ bev = bufferevent_openssl_filter_new(
+ base, underlying, ssl, BUFFEREVENT_SSL_CONNECTING, flags);
+ } else {
+ bev = bufferevent_openssl_socket_new(
+ base, fd, ssl, BUFFEREVENT_SSL_CONNECTING, flags);
+ }
+ bufferevent_openssl_set_allow_dirty_shutdown(bev, 1);
+#endif
+ }
+
+ return bev;
+}
+
static void
-http_complete_write(evutil_socket_t fd, short what, void *arg)
+http_half_writecb(struct bufferevent *bev, void *arg)
{
- struct bufferevent *bev = arg;
- const char *http_request = "host\r\n"
- "Connection: close\r\n"
- "\r\n";
- bufferevent_write(bev, http_request, strlen(http_request));
+ if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
+ if (!test_ok) {
+ const char http_request[] = "host\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+ bufferevent_write(bev, http_request, strlen(http_request));
+ }
+ /* enable reading of the reply */
+ bufferevent_enable(bev, EV_READ);
+ test_ok++;
+ }
}
static void
-http_basic_test(void *arg)
+http_basic_test_impl(void *arg, int ssl, const char *request_line)
{
struct basic_test_data *data = arg;
- struct timeval tv;
struct bufferevent *bev = NULL;
evutil_socket_t fd;
const char *http_request;
ev_uint16_t port = 0, port2 = 0;
+ int server_flags = ssl ? HTTP_BIND_SSL : 0;
+ struct evhttp *http = http_setup(&port, data->base, server_flags);
+ struct evbuffer *out;
- test_ok = 0;
-
- http = http_setup(&port, data->base, 0);
+ exit_base = data->base;
/* bind to a second socket */
- if (http_bind(http, &port2, 0) == -1) {
+ if (http_bind(http, &port2, server_flags) == -1) {
fprintf(stdout, "FAILED (bind)\n");
exit(1);
}
@@ -421,56 +526,48 @@ http_basic_test(void *arg)
fd = http_connect("127.0.0.1", port);
/* Stupid thing to send a request */
- bev = bufferevent_socket_new(data->base, fd, 0);
- bufferevent_setcb(bev, http_readcb, http_writecb,
+ bev = create_bev(data->base, fd, ssl, BEV_OPT_CLOSE_ON_FREE);
+ bufferevent_setcb(bev, http_readcb, http_half_writecb,
http_errorcb, data->base);
+ out = bufferevent_get_output(bev);
/* first half of the http request */
- http_request =
- "GET /test HTTP/1.1\r\n"
- "Host: some";
-
- bufferevent_write(bev, http_request, strlen(http_request));
- evutil_timerclear(&tv);
- tv.tv_usec = 10000;
- event_base_once(data->base,
- -1, EV_TIMEOUT, http_complete_write, bev, &tv);
+ evbuffer_add_printf(out,
+ "%s\r\n"
+ "Host: some", request_line);
+ test_ok = 0;
event_base_dispatch(data->base);
-
- tt_assert(test_ok == 3);
+ tt_int_op(test_ok, ==, 3);
/* connect to the second port */
bufferevent_free(bev);
- evutil_closesocket(fd);
fd = http_connect("127.0.0.1", port2);
/* Stupid thing to send a request */
- bev = bufferevent_socket_new(data->base, fd, 0);
+ bev = create_bev(data->base, fd, ssl, BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb(bev, http_readcb, http_writecb,
http_errorcb, data->base);
+ out = bufferevent_get_output(bev);
- http_request =
- "GET /test HTTP/1.1\r\n"
+ evbuffer_add_printf(out,
+ "%s\r\n"
"Host: somehost\r\n"
"Connection: close\r\n"
- "\r\n";
-
- bufferevent_write(bev, http_request, strlen(http_request));
+ "\r\n", request_line);
+ test_ok = 0;
event_base_dispatch(data->base);
-
- tt_assert(test_ok == 5);
+ tt_int_op(test_ok, ==, 2);
/* Connect to the second port again. This time, send an absolute uri. */
bufferevent_free(bev);
- evutil_closesocket(fd);
fd = http_connect("127.0.0.1", port2);
/* Stupid thing to send a request */
- bev = bufferevent_socket_new(data->base, fd, 0);
+ bev = create_bev(data->base, fd, ssl, BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb(bev, http_readcb, http_writecb,
http_errorcb, data->base);
@@ -482,15 +579,19 @@ http_basic_test(void *arg)
bufferevent_write(bev, http_request, strlen(http_request));
+ test_ok = 0;
event_base_dispatch(data->base);
-
- tt_assert(test_ok == 7);
+ tt_int_op(test_ok, ==, 2);
evhttp_free(http);
- end:
+end:
if (bev)
bufferevent_free(bev);
}
+static void http_basic_test(void *arg)\
+{ http_basic_test_impl(arg, 0, "GET /test HTTP/1.1"); }
+static void http_basic_trailing_space_test(void *arg)
+{ http_basic_test_impl(arg, 0, "GET /test HTTP/1.1 "); }
static void
@@ -529,18 +630,10 @@ http_badreq_cb(struct evhttp_request *req, void *arg)
static void
http_badreq_errorcb(struct bufferevent *bev, short what, void *arg)
{
- event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+ TT_BLATHER(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
/* ignore */
}
-#ifndef SHUT_WR
-#ifdef _WIN32
-#define SHUT_WR SD_SEND
-#else
-#define SHUT_WR 1
-#endif
-#endif
-
static void
http_badreq_readcb(struct bufferevent *bev, void *arg)
{
@@ -577,13 +670,13 @@ http_badreq_readcb(struct bufferevent *bev, void *arg)
evbuffer_drain(bufferevent_get_input(bev), evbuffer_get_length(bufferevent_get_input(bev)));
}
- shutdown(bufferevent_getfd(bev), SHUT_WR);
+ shutdown(bufferevent_getfd(bev), EVUTIL_SHUT_WR);
}
static void
http_badreq_successcb(evutil_socket_t fd, short what, void *arg)
{
- event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+ TT_BLATHER(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
event_base_loopexit(exit_base, NULL);
}
@@ -593,22 +686,21 @@ http_bad_request_test(void *arg)
struct basic_test_data *data = arg;
struct timeval tv;
struct bufferevent *bev = NULL;
- evutil_socket_t fd = -1;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
const char *http_request;
ev_uint16_t port=0, port2=0;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
exit_base = data->base;
- http = http_setup(&port, data->base, 0);
-
/* bind to a second socket */
if (http_bind(http, &port2, 0) == -1)
TT_DIE(("Bind socket failed"));
/* NULL request test */
fd = http_connect("127.0.0.1", port);
- tt_int_op(fd, >=, 0);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -621,7 +713,7 @@ http_bad_request_test(void *arg)
bufferevent_write(bev, http_request, strlen(http_request));
- shutdown(fd, SHUT_WR);
+ shutdown(fd, EVUTIL_SHUT_WR);
timerclear(&tv);
tv.tv_usec = 10000;
event_base_once(data->base, -1, EV_TIMEOUT, http_badreq_successcb, bev, &tv);
@@ -640,6 +732,7 @@ http_bad_request_test(void *arg)
/* connect to the second port */
fd = http_connect("127.0.0.1", port2);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -700,7 +793,7 @@ http_delete_cb(struct evhttp_request *req, void *arg)
exit(1);
}
- event_debug(("%s: called\n", __func__));
+ TT_BLATHER(("%s: called\n", __func__));
evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
/* allow sending of an empty reply */
@@ -715,17 +808,17 @@ http_delete_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev;
- evutil_socket_t fd = -1;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
const char *http_request;
ev_uint16_t port = 0;
+ struct evhttp *http = http_setup(&port, data->base, 0);
+ exit_base = data->base;
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
tt_assert(http);
fd = http_connect("127.0.0.1", port);
- tt_int_op(fd, >=, 0);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -744,7 +837,7 @@ http_delete_test(void *arg)
bufferevent_free(bev);
evutil_closesocket(fd);
- fd = -1;
+ fd = EVUTIL_INVALID_SOCKET;
evhttp_free(http);
@@ -771,7 +864,7 @@ http_sent_cb(struct evhttp_request *req, void *arg)
exit(1);
}
- event_debug(("%s: called\n", __func__));
+ TT_BLATHER(("%s: called\n", __func__));
++test_ok;
}
@@ -783,7 +876,7 @@ http_on_complete_cb(struct evhttp_request *req, void *arg)
evhttp_request_set_on_complete_cb(req, http_sent_cb, (void *)0xDEADBEEF);
- event_debug(("%s: called\n", __func__));
+ TT_BLATHER(("%s: called\n", __func__));
evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
/* allow sending of an empty reply */
@@ -799,16 +892,16 @@ http_on_complete_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev;
- evutil_socket_t fd = -1;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
const char *http_request;
ev_uint16_t port = 0;
+ struct evhttp *http = http_setup(&port, data->base, 0);
+ exit_base = data->base;
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
fd = http_connect("127.0.0.1", port);
- tt_int_op(fd, >=, 0);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -863,14 +956,13 @@ http_allowed_methods_test(void *arg)
const char *http_request;
char *result1=NULL, *result2=NULL, *result3=NULL;
ev_uint16_t port = 0;
+ struct evhttp *http = http_setup(&port, data->base, 0);
exit_base = data->base;
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
fd1 = http_connect("127.0.0.1", port);
- tt_int_op(fd1, >=, 0);
+ tt_assert(fd1 != EVUTIL_INVALID_SOCKET);
/* GET is out; PATCH is in. */
evhttp_set_allowed_methods(http, EVHTTP_REQ_PATCH);
@@ -892,7 +984,7 @@ http_allowed_methods_test(void *arg)
event_base_dispatch(data->base);
fd2 = http_connect("127.0.0.1", port);
- tt_int_op(fd2, >=, 0);
+ tt_assert(fd2 != EVUTIL_INVALID_SOCKET);
bev2 = bufferevent_socket_new(data->base, fd2, 0);
bufferevent_enable(bev2, EV_READ|EV_WRITE);
@@ -910,7 +1002,7 @@ http_allowed_methods_test(void *arg)
event_base_dispatch(data->base);
fd3 = http_connect("127.0.0.1", port);
- tt_int_op(fd3, >=, 0);
+ tt_assert(fd3 != EVUTIL_INVALID_SOCKET);
bev3 = bufferevent_socket_new(data->base, fd3, 0);
bufferevent_enable(bev3, EV_READ|EV_WRITE);
@@ -960,26 +1052,49 @@ http_allowed_methods_test(void *arg)
evutil_closesocket(fd3);
}
+static void http_request_no_action_done(struct evhttp_request *, void *);
static void http_request_done(struct evhttp_request *, void *);
static void http_request_empty_done(struct evhttp_request *, void *);
static void
http_connection_test_(struct basic_test_data *data, int persistent,
- const char *address, struct evdns_base *dnsbase, int ipv6, int family)
+ const char *address, struct evdns_base *dnsbase, int ipv6, int family,
+ int ssl)
{
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct evhttp *http;
- test_ok = 0;
+ int mask = 0;
+ if (ipv6)
+ mask |= HTTP_BIND_IPV6;
+ if (ssl)
+ mask |= HTTP_BIND_SSL;
- http = http_setup(&port, data->base, ipv6);
+ http = http_setup(&port, data->base, mask);
+
+ test_ok = 0;
if (!http && ipv6) {
tt_skip();
}
tt_assert(http);
- evcon = evhttp_connection_base_new(data->base, dnsbase, address, port);
+ if (ssl) {
+#ifdef EVENT__HAVE_OPENSSL
+ SSL *ssl = SSL_new(get_ssl_ctx());
+ struct bufferevent *bev = bufferevent_openssl_socket_new(
+ data->base, -1, ssl,
+ BUFFEREVENT_SSL_CONNECTING, BEV_OPT_DEFER_CALLBACKS);
+ bufferevent_openssl_set_allow_dirty_shutdown(bev, 1);
+
+ evcon = evhttp_connection_base_bufferevent_new(data->base, dnsbase, bev, address, port);
+#else
+ tt_skip();
+#endif
+ } else {
+ evcon = evhttp_connection_base_new(data->base, dnsbase, address, port);
+ }
tt_assert(evcon);
evhttp_connection_set_family(evcon, family);
@@ -1055,17 +1170,17 @@ http_connection_test_(struct basic_test_data *data, int persistent,
static void
http_connection_test(void *arg)
{
- http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC);
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC, 0);
}
static void
http_persist_connection_test(void *arg)
{
- http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC);
+ http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC, 0);
}
static struct regress_dns_server_table search_table[] = {
- { "localhost", "A", "127.0.0.1", 0 },
- { NULL, NULL, NULL, 0 }
+ { "localhost", "A", "127.0.0.1", 0, 0 },
+ { NULL, NULL, NULL, 0, 0 }
};
static void
@@ -1078,6 +1193,7 @@ http_connection_async_test(void *arg)
struct evdns_base *dns_base = NULL;
ev_uint16_t portnum = 0;
char address[64];
+ struct evhttp *http = http_setup(&port, data->base, 0);
exit_base = data->base;
tt_assert(regress_dnsserver(data->base, &portnum, search_table));
@@ -1092,8 +1208,6 @@ http_connection_async_test(void *arg)
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
evcon = evhttp_connection_base_new(data->base, dns_base, "127.0.0.1", port);
tt_assert(evcon);
@@ -1170,9 +1284,10 @@ http_autofree_connection_test(void *arg)
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req[2] = { NULL };
+ struct evhttp *http = http_setup(&port, data->base, 0);
+ size_t i;
test_ok = 0;
- http = http_setup(&port, data->base, 0);
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
@@ -1185,19 +1300,14 @@ http_autofree_connection_test(void *arg)
req[1] = evhttp_request_new(http_request_empty_done, data->base);
/* Add the information that we care about */
- evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Host", "somehost");
- evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Connection", "close");
- evhttp_add_header(evhttp_request_get_output_headers(req[0]), "Empty", "itis");
- evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Host", "somehost");
- evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Connection", "close");
- evhttp_add_header(evhttp_request_get_output_headers(req[1]), "Empty", "itis");
+ for (i = 0; i < ARRAY_SIZE(req); ++i) {
+ evhttp_add_header(evhttp_request_get_output_headers(req[i]), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req[i]), "Connection", "close");
+ evhttp_add_header(evhttp_request_get_output_headers(req[i]), "Empty", "itis");
- /* We give ownership of the request to the connection */
- if (evhttp_make_request(evcon, req[0], EVHTTP_REQ_GET, "/test") == -1) {
- tt_abort_msg("couldn't make request");
- }
- if (evhttp_make_request(evcon, req[1], EVHTTP_REQ_GET, "/test") == -1) {
- tt_abort_msg("couldn't make request");
+ if (evhttp_make_request(evcon, req[i], EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
}
/*
@@ -1208,7 +1318,8 @@ http_autofree_connection_test(void *arg)
evhttp_connection_free_on_completion(evcon);
evcon = NULL;
- event_base_dispatch(data->base);
+ for (i = 0; i < ARRAY_SIZE(req); ++i)
+ event_base_dispatch(data->base);
/* at this point, the http server should have no connection */
tt_assert(TAILQ_FIRST(&http->connections) == NULL);
@@ -1226,25 +1337,116 @@ http_request_never_call(struct evhttp_request *req, void *arg)
fprintf(stdout, "FAILED\n");
exit(1);
}
+static void
+http_failed_request_done(struct evhttp_request *req, void *arg)
+{
+ tt_assert(!req);
+end:
+ event_base_loopexit(arg, NULL);
+}
+#ifndef _WIN32
+static void
+http_timed_out_request_done(struct evhttp_request *req, void *arg)
+{
+ tt_assert(req);
+ tt_int_op(evhttp_request_get_response_code(req), !=, HTTP_OK);
+end:
+ event_base_loopexit(arg, NULL);
+}
+#endif
static void
+http_request_error_cb_with_cancel(enum evhttp_request_error error, void *arg)
+{
+ if (error != EVREQ_HTTP_REQUEST_CANCEL) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+ test_ok = 1;
+
+ {
+ struct timeval tv;
+ evutil_timerclear(&tv);
+ tv.tv_sec = 0;
+ tv.tv_usec = 500 * 1000;
+ event_base_loopexit(exit_base, &tv);
+ }
+}
+static void
http_do_cancel(evutil_socket_t fd, short what, void *arg)
{
struct evhttp_request *req = arg;
- struct timeval tv;
- struct event_base *base;
- evutil_timerclear(&tv);
- tv.tv_sec = 0;
- tv.tv_usec = 500 * 1000;
-
- base = evhttp_connection_get_base(evhttp_request_get_connection(req));
evhttp_cancel_request(req);
+ ++test_ok;
+}
+static void
+http_no_write(struct evbuffer *buffer, const struct evbuffer_cb_info *info, void *arg)
+{
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+}
+static void
+http_free_evcons(struct evhttp_connection **evcons)
+{
+ struct evhttp_connection *evcon, **orig = evcons;
- event_base_loopexit(base, &tv);
+ if (!evcons)
+ return;
- ++test_ok;
+ while ((evcon = *evcons++)) {
+ evhttp_connection_free(evcon);
+ }
+ free(orig);
+}
+/** fill the backlog to force server drop packages for timeouts */
+static struct evhttp_connection **
+http_fill_backlog(struct event_base *base, int port)
+{
+#define BACKLOG_SIZE 256
+ struct evhttp_connection **evcon = malloc(sizeof(*evcon) * (BACKLOG_SIZE + 1));
+ int i;
+
+ for (i = 0; i < BACKLOG_SIZE; ++i) {
+ struct evhttp_request *req;
+
+ evcon[i] = evhttp_connection_base_new(base, NULL, "127.0.0.1", port);
+ tt_assert(evcon[i]);
+ evhttp_connection_set_timeout(evcon[i], 5);
+
+ req = evhttp_request_new(http_request_never_call, NULL);
+ tt_assert(req);
+ tt_int_op(evhttp_make_request(evcon[i], req, EVHTTP_REQ_GET, "/delay"), !=, -1);
+ }
+ evcon[i] = NULL;
+
+ return evcon;
+ end:
+ fprintf(stderr, "Couldn't fill the backlog");
+ return NULL;
}
+enum http_cancel_test_type {
+ BASIC = 1,
+ BY_HOST = 2,
+ NO_NS = 4,
+ INACTIVE_SERVER = 8,
+ SERVER_TIMEOUT = 16,
+ NS_TIMEOUT = 32,
+};
+static struct evhttp_request *
+http_cancel_test_bad_request_new(enum http_cancel_test_type type,
+ struct event_base *base)
+{
+#ifndef _WIN32
+ if (!(type & NO_NS) && (type & SERVER_TIMEOUT))
+ return evhttp_request_new(http_timed_out_request_done, base);
+ else
+#endif
+ if ((type & INACTIVE_SERVER) || (type & NO_NS))
+ return evhttp_request_new(http_failed_request_done, base);
+ else
+ return NULL;
+}
static void
http_cancel_test(void *arg)
{
@@ -1252,24 +1454,76 @@ http_cancel_test(void *arg)
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct bufferevent *bufev = NULL;
struct timeval tv;
+ struct evdns_base *dns_base = NULL;
+ ev_uint16_t portnum = 0;
+ char address[64];
+ struct evhttp *inactive_http = NULL;
+ struct event_base *inactive_base = NULL;
+ struct evhttp_connection **evcons = NULL;
+ struct event_base *base_to_fill = data->base;
+
+ enum http_cancel_test_type type =
+ (enum http_cancel_test_type)data->setup_data;
+ struct evhttp *http = http_setup(&port, data->base, 0);
+
+ if (type & BY_HOST) {
+ const char *timeout = (type & NS_TIMEOUT) ? "6" : "3";
+
+ tt_assert(regress_dnsserver(data->base, &portnum, search_table));
+
+ dns_base = evdns_base_new(data->base, 0/* init name servers */);
+ tt_assert(dns_base);
+
+ /** XXX: Hack the port to make timeout after resolving */
+ if (type & NO_NS)
+ ++portnum;
+
+ evutil_snprintf(address, sizeof(address), "127.0.0.1:%d", portnum);
+ evdns_base_nameserver_ip_add(dns_base, address);
+
+ evdns_base_set_option(dns_base, "timeout:", timeout);
+ evdns_base_set_option(dns_base, "initial-probe-timeout:", timeout);
+ evdns_base_set_option(dns_base, "attempts:", "1");
+ }
exit_base = data->base;
test_ok = 0;
- http = http_setup(&port, data->base, 0);
+ if (type & INACTIVE_SERVER) {
+ port = 0;
+ inactive_base = event_base_new();
+ inactive_http = http_setup(&port, inactive_base, 0);
- evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ base_to_fill = inactive_base;
+ }
+
+ if (type & SERVER_TIMEOUT)
+ evcons = http_fill_backlog(base_to_fill, port);
+
+ evcon = evhttp_connection_base_new(
+ data->base, dns_base,
+ type & BY_HOST ? "localhost" : "127.0.0.1",
+ port);
+ if (type & INACTIVE_SERVER)
+ evhttp_connection_set_timeout(evcon, 5);
tt_assert(evcon);
+ bufev = evhttp_connection_get_bufferevent(evcon);
+ /* Guarantee that we stack in connect() not after waiting EV_READ after
+ * write() */
+ if (type & SERVER_TIMEOUT)
+ evbuffer_add_cb(bufferevent_get_output(bufev), http_no_write, NULL);
+
/*
* At this point, we want to schedule a request to the HTTP
* server using our make request method.
*/
req = evhttp_request_new(http_request_never_call, NULL);
- evhttp_request_set_error_cb(req, http_request_error_cb_with_cancel_);
+ evhttp_request_set_error_cb(req, http_request_error_cb_with_cancel);
/* Add the information that we care about */
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
@@ -1286,12 +1540,21 @@ http_cancel_test(void *arg)
event_base_dispatch(data->base);
- tt_int_op(test_ok, ==, 3);
+ if (type & NO_NS || type & INACTIVE_SERVER)
+ tt_int_op(test_ok, ==, 2); /** no servers responses */
+ else
+ tt_int_op(test_ok, ==, 3);
/* try to make another request over the same connection */
test_ok = 0;
- req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+ http_free_evcons(evcons);
+ if (type & SERVER_TIMEOUT)
+ evcons = http_fill_backlog(base_to_fill, port);
+
+ req = http_cancel_test_bad_request_new(type, data->base);
+ if (!req)
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
/* Add the information that we care about */
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
@@ -1305,7 +1568,13 @@ http_cancel_test(void *arg)
/* make another request: request empty reply */
test_ok = 0;
- req = evhttp_request_new(http_request_empty_done, data->base);
+ http_free_evcons(evcons);
+ if (type & SERVER_TIMEOUT)
+ evcons = http_fill_backlog(base_to_fill, port);
+
+ req = http_cancel_test_bad_request_new(type, data->base);
+ if (!req)
+ req = evhttp_request_new(http_request_empty_done, data->base);
/* Add the information that we care about */
evhttp_add_header(evhttp_request_get_output_headers(req), "Empty", "itis");
@@ -1317,10 +1586,27 @@ http_cancel_test(void *arg)
event_base_dispatch(data->base);
end:
+ http_free_evcons(evcons);
+ if (bufev)
+ evbuffer_remove_cb(bufferevent_get_output(bufev), http_no_write, NULL);
if (evcon)
evhttp_connection_free(evcon);
if (http)
evhttp_free(http);
+ if (dns_base)
+ evdns_base_free(dns_base, 0);
+ regress_clean_dnsserver();
+ if (inactive_http)
+ evhttp_free(inactive_http);
+ if (inactive_base)
+ event_base_free(inactive_base);
+}
+
+static void
+http_request_no_action_done(struct evhttp_request *req, void *arg)
+{
+ EVUTIL_ASSERT(exit_base);
+ event_base_loopexit(exit_base, NULL);
}
static void
@@ -1328,6 +1614,11 @@ http_request_done(struct evhttp_request *req, void *arg)
{
const char *what = arg;
+ if (!req) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
if (evhttp_request_get_response_code(req) != HTTP_OK) {
fprintf(stderr, "FAILED\n");
exit(1);
@@ -1378,16 +1669,15 @@ http_virtual_host_test(void *arg)
evutil_socket_t fd;
struct bufferevent *bev;
const char *http_request;
+ struct evhttp *http = http_setup(&port, data->base, 0);
exit_base = data->base;
- http = http_setup(&port, data->base, 0);
-
/* virtual host */
second = evhttp_new(NULL);
- evhttp_set_cb(second, "/funnybunny", http_basic_cb, NULL);
+ evhttp_set_cb(second, "/funnybunny", http_basic_cb, http);
third = evhttp_new(NULL);
- evhttp_set_cb(third, "/blackcoffee", http_basic_cb, NULL);
+ evhttp_set_cb(third, "/blackcoffee", http_basic_cb, http);
if (evhttp_add_virtual_host(http, "foo.com", second) == -1) {
tt_abort_msg("Couldn't add vhost");
@@ -1497,6 +1787,7 @@ http_virtual_host_test(void *arg)
/* Now make a raw request with an absolute URI. */
fd = http_connect("127.0.0.1", port);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -1532,6 +1823,11 @@ http_virtual_host_test(void *arg)
static void
http_request_empty_done(struct evhttp_request *req, void *arg)
{
+ if (!req) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
if (evhttp_request_get_response_code(req) != HTTP_OK) {
fprintf(stderr, "FAILED\n");
exit(1);
@@ -1573,7 +1869,7 @@ http_dispatcher_cb(struct evhttp_request *req, void *arg)
{
struct evbuffer *evb = evbuffer_new();
- event_debug(("%s: called\n", __func__));
+ TT_BLATHER(("%s: called\n", __func__));
evbuffer_add_printf(evb, "DISPATCHER_TEST");
evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
@@ -1587,6 +1883,11 @@ http_dispatcher_test_done(struct evhttp_request *req, void *arg)
struct event_base *base = arg;
const char *what = "DISPATCHER_TEST";
+ if (!req) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
if (evhttp_request_get_response_code(req) != HTTP_OK) {
fprintf(stderr, "FAILED\n");
exit(1);
@@ -1619,11 +1920,10 @@ http_dispatcher_test(void *arg)
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
@@ -1669,11 +1969,10 @@ http_post_test(void *arg)
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
@@ -1728,7 +2027,7 @@ void
http_post_cb(struct evhttp_request *req, void *arg)
{
struct evbuffer *evb;
- event_debug(("%s: called\n", __func__));
+ TT_BLATHER(("%s: called\n", __func__));
/* Yes, we are expecting a post request */
if (evhttp_request_get_command(req) != EVHTTP_REQ_POST) {
@@ -1809,11 +2108,10 @@ http_put_test(void *arg)
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
@@ -1846,7 +2144,7 @@ void
http_put_cb(struct evhttp_request *req, void *arg)
{
struct evbuffer *evb;
- event_debug(("%s: called\n", __func__));
+ TT_BLATHER(("%s: called\n", __func__));
/* Expecting a PUT request */
if (evhttp_request_get_command(req) != EVHTTP_REQ_PUT) {
@@ -1932,16 +2230,15 @@ http_failure_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev;
- evutil_socket_t fd = -1;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
const char *http_request;
ev_uint16_t port = 0;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
fd = http_connect("127.0.0.1", port);
- tt_int_op(fd, >=, 0);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -2026,9 +2323,9 @@ http_close_detection_(struct basic_test_data *data, int with_delay)
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
const struct timeval sec_tenth = { 0, 100000 };
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
- http = http_setup(&port, data->base, 0);
/* .1 second timeout */
evhttp_set_timeout_tv(http, &sec_tenth);
@@ -2200,6 +2497,27 @@ http_parse_query_test(void *ptr)
end:
evhttp_clear_headers(&headers);
}
+static void
+http_parse_query_str_test(void *ptr)
+{
+ struct evkeyvalq headers;
+ int r;
+
+ TAILQ_INIT(&headers);
+
+ r = evhttp_parse_query_str("http://www.test.com/?q=test", &headers);
+ tt_assert(evhttp_find_header(&headers, "q") == NULL);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query_str("q=test", &headers);
+ tt_want(validate_header(&headers, "q", "test") == 0);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+end:
+ evhttp_clear_headers(&headers);
+}
static void
http_parse_uri_test(void *ptr)
@@ -2702,14 +3020,15 @@ http_base_test(void *ptr)
evutil_socket_t fd;
const char *http_request;
ev_uint16_t port = 0;
-
+ struct evhttp *http;
+
test_ok = 0;
base = event_base_new();
tt_assert(base);
http = http_setup(&port, base, 0);
fd = http_connect("127.0.0.1", port);
- tt_int_op(fd, >=, 0);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(base, fd, 0);
@@ -2754,6 +3073,10 @@ http_incomplete_readcb(struct bufferevent *bev, void *arg)
static void
http_incomplete_errorcb(struct bufferevent *bev, short what, void *arg)
{
+ /** For ssl */
+ if (what & BEV_EVENT_CONNECTED)
+ return;
+
if (what == (BEV_EVENT_READING|BEV_EVENT_EOF))
test_ok++;
else
@@ -2767,7 +3090,7 @@ http_incomplete_writecb(struct bufferevent *bev, void *arg)
if (arg != NULL) {
evutil_socket_t fd = *(evutil_socket_t *)arg;
/* terminate the write side to simulate EOF */
- shutdown(fd, SHUT_WR);
+ shutdown(fd, EVUTIL_SHUT_WR);
}
if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
/* enable reading of the reply */
@@ -2777,26 +3100,25 @@ http_incomplete_writecb(struct bufferevent *bev, void *arg)
}
static void
-http_incomplete_test_(struct basic_test_data *data, int use_timeout)
+http_incomplete_test_(struct basic_test_data *data, int use_timeout, int ssl)
{
struct bufferevent *bev;
evutil_socket_t fd;
const char *http_request;
ev_uint16_t port = 0;
struct timeval tv_start, tv_end;
+ struct evhttp *http = http_setup(&port, data->base, ssl ? HTTP_BIND_SSL : 0);
exit_base = data->base;
-
test_ok = 0;
- http = http_setup(&port, data->base, 0);
evhttp_set_timeout(http, 1);
fd = http_connect("127.0.0.1", port);
- tt_int_op(fd, >=, 0);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
- bev = bufferevent_socket_new(data->base, fd, 0);
+ bev = create_bev(data->base, fd, ssl, 0);
bufferevent_setcb(bev,
http_incomplete_readcb, http_incomplete_writecb,
http_incomplete_errorcb, use_timeout ? NULL : &fd);
@@ -2817,7 +3139,7 @@ http_incomplete_test_(struct basic_test_data *data, int use_timeout)
bufferevent_free(bev);
if (use_timeout) {
evutil_closesocket(fd);
- fd = -1;
+ fd = EVUTIL_INVALID_SOCKET;
}
evhttp_free(http);
@@ -2834,16 +3156,11 @@ http_incomplete_test_(struct basic_test_data *data, int use_timeout)
if (fd >= 0)
evutil_closesocket(fd);
}
-static void
-http_incomplete_test(void *arg)
-{
- http_incomplete_test_(arg, 0);
-}
-static void
-http_incomplete_timeout_test(void *arg)
-{
- http_incomplete_test_(arg, 1);
-}
+static void http_incomplete_test(void *arg)
+{ http_incomplete_test_(arg, 0, 0); }
+static void http_incomplete_timeout_test(void *arg)
+{ http_incomplete_test_(arg, 1, 0); }
+
/*
* the server is going to reply with chunked data.
@@ -2860,6 +3177,10 @@ http_chunked_errorcb(struct bufferevent *bev, short what, void *arg)
{
struct evhttp_request *req = NULL;
+ /** SSL */
+ if (what & BEV_EVENT_CONNECTED)
+ return;
+
if (!test_ok)
goto out;
@@ -2994,10 +3315,10 @@ http_chunked_request_done(struct evhttp_request *req, void *arg)
}
static void
-http_chunk_out_test(void *arg)
+http_chunk_out_test_impl(void *arg, int ssl)
{
struct basic_test_data *data = arg;
- struct bufferevent *bev;
+ struct bufferevent *bev = NULL;
evutil_socket_t fd;
const char *http_request;
ev_uint16_t port = 0;
@@ -3005,16 +3326,16 @@ http_chunk_out_test(void *arg)
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
int i;
+ struct evhttp *http = http_setup(&port, data->base, ssl ? HTTP_BIND_SSL : 0);
exit_base = data->base;
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
fd = http_connect("127.0.0.1", port);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
- bev = bufferevent_socket_new(data->base, fd, 0);
+ bev = create_bev(data->base, fd, ssl, BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb(bev,
http_chunked_readcb, http_chunked_writecb,
http_chunked_errorcb, data->base);
@@ -3032,6 +3353,7 @@ http_chunk_out_test(void *arg)
event_base_dispatch(data->base);
bufferevent_free(bev);
+ bev = NULL;
evutil_gettimeofday(&tv_end, NULL);
evutil_timersub(&tv_end, &tv_start, &tv_end);
@@ -3041,20 +3363,21 @@ http_chunk_out_test(void *arg)
tt_int_op(test_ok, ==, 2);
/* now try again with the regular connection object */
- evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ bev = create_bev(data->base, -1, ssl, BEV_OPT_CLOSE_ON_FREE);
+ evcon = evhttp_connection_base_bufferevent_new(
+ data->base, NULL, bev, "127.0.0.1", port);
tt_assert(evcon);
/* make two requests to check the keepalive behavior */
for (i = 0; i < 2; i++) {
test_ok = 0;
- req = evhttp_request_new(http_chunked_request_done,data->base);
+ req = evhttp_request_new(http_chunked_request_done, data->base);
/* Add the information that we care about */
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
/* We give ownership of the request to the connection */
- if (evhttp_make_request(evcon, req,
- EVHTTP_REQ_GET, "/chunked") == -1) {
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/chunked") == -1) {
tt_abort_msg("Couldn't make request");
}
@@ -3069,21 +3392,25 @@ http_chunk_out_test(void *arg)
if (http)
evhttp_free(http);
}
+static void http_chunk_out_test(void *arg)
+{ http_chunk_out_test_impl(arg, 0); }
static void
-http_stream_out_test(void *arg)
+http_stream_out_test_impl(void *arg, int ssl)
{
struct basic_test_data *data = arg;
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct bufferevent *bev;
+ struct evhttp *http = http_setup(&port, data->base, ssl ? HTTP_BIND_SSL : 0);
test_ok = 0;
exit_base = data->base;
- http = http_setup(&port, data->base, 0);
-
- evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ bev = create_bev(data->base, -1, ssl, 0);
+ evcon = evhttp_connection_base_bufferevent_new(
+ data->base, NULL, bev, "127.0.0.1", port);
tt_assert(evcon);
/*
@@ -3111,6 +3438,8 @@ http_stream_out_test(void *arg)
if (http)
evhttp_free(http);
}
+static void http_stream_out_test(void *arg)
+{ http_stream_out_test_impl(arg, 0); }
static void
http_stream_in_chunk(struct evhttp_request *req, void *arg)
@@ -3147,9 +3476,9 @@ http_stream_in_test_(struct basic_test_data *data, char const *url,
struct evbuffer *reply = evbuffer_new();
struct evhttp_request *req = NULL;
ev_uint16_t port = 0;
+ struct evhttp *http = http_setup(&port, data->base, 0);
exit_base = data->base;
- http = http_setup(&port, data->base, 0);
evcon = evhttp_connection_base_new(data->base, NULL,"127.0.0.1", port);
tt_assert(evcon);
@@ -3219,8 +3548,7 @@ http_stream_in_cancel_test(void *arg)
struct evhttp_connection *evcon;
struct evhttp_request *req = NULL;
ev_uint16_t port = 0;
-
- http = http_setup(&port, data->base, 0);
+ struct evhttp *http = http_setup(&port, data->base, 0);
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
@@ -3245,65 +3573,69 @@ http_stream_in_cancel_test(void *arg)
static void
http_connection_fail_done(struct evhttp_request *req, void *arg)
{
- struct evhttp_connection *evcon = arg;
- struct event_base *base = evhttp_connection_get_base(evcon);
+ struct evhttp_connection *evcon = arg;
+ struct event_base *base = evhttp_connection_get_base(evcon);
- /* An ENETUNREACH error results in an unrecoverable
- * evhttp_connection error (see evhttp_connection_fail_()). The
- * connection will be reset, and the user will be notified with a NULL
- * req parameter. */
- tt_assert(!req);
+ /* An ENETUNREACH error results in an unrecoverable
+ * evhttp_connection error (see evhttp_connection_fail_()). The
+ * connection will be reset, and the user will be notified with a NULL
+ * req parameter. */
+ tt_assert(!req);
- evhttp_connection_free(evcon);
+ evhttp_connection_free(evcon);
- test_ok = 1;
+ test_ok = 1;
end:
- event_base_loopexit(base, NULL);
+ event_base_loopexit(base, NULL);
}
/* Test unrecoverable evhttp_connection errors by generating an ENETUNREACH
* error on connection. */
static void
-http_connection_fail_test(void *arg)
+http_connection_fail_test_impl(void *arg, int ssl)
{
- struct basic_test_data *data = arg;
- ev_uint16_t port = 0;
- struct evhttp_connection *evcon = NULL;
- struct evhttp_request *req = NULL;
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct bufferevent *bev;
+ struct evhttp *http = http_setup(&port, data->base, ssl ? HTTP_BIND_SSL : 0);
- exit_base = data->base;
- test_ok = 0;
+ exit_base = data->base;
+ test_ok = 0;
- /* auto detect a port */
- http = http_setup(&port, data->base, 0);
- evhttp_free(http);
- http = NULL;
+ /* auto detect a port */
+ evhttp_free(http);
- /* Pick an unroutable address. This administratively scoped multicast
- * address should do when working with TCP. */
- evcon = evhttp_connection_base_new(data->base, NULL, "239.10.20.30", 80);
- tt_assert(evcon);
+ bev = create_bev(data->base, -1, ssl, 0);
+ /* Pick an unroutable address. This administratively scoped multicast
+ * address should do when working with TCP. */
+ evcon = evhttp_connection_base_bufferevent_new(
+ data->base, NULL, bev, "239.10.20.30", 80);
+ tt_assert(evcon);
- /*
- * At this point, we want to schedule an HTTP GET request
- * server using our make request method.
- */
+ /*
+ * At this point, we want to schedule an HTTP GET request
+ * server using our make request method.
+ */
- req = evhttp_request_new(http_connection_fail_done, evcon);
- tt_assert(req);
+ req = evhttp_request_new(http_connection_fail_done, evcon);
+ tt_assert(req);
- if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/") == -1) {
- tt_abort_msg("Couldn't make request");
- }
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
- event_base_dispatch(data->base);
+ event_base_dispatch(data->base);
- tt_int_op(test_ok, ==, 1);
+ tt_int_op(test_ok, ==, 1);
end:
- ;
+ ;
}
+static void http_connection_fail_test(void *arg)
+{ http_connection_fail_test_impl(arg, 0); }
static void
http_connection_retry_done(struct evhttp_request *req, void *arg)
@@ -3321,33 +3653,85 @@ http_connection_retry_done(struct evhttp_request *req, void *arg)
event_base_loopexit(arg,NULL);
}
+struct http_server
+{
+ ev_uint16_t port;
+ int ssl;
+ struct evhttp *http;
+};
static struct event_base *http_make_web_server_base=NULL;
static void
http_make_web_server(evutil_socket_t fd, short what, void *arg)
{
- ev_uint16_t port = *(ev_uint16_t*)arg;
- http = http_setup(&port, http_make_web_server_base, 0);
+ struct http_server *hs = (struct http_server *)arg;
+ hs->http = http_setup(&hs->port, http_make_web_server_base, hs->ssl ? HTTP_BIND_SSL : 0);
}
static void
-http_connection_retry_test(void *arg)
+http_simple_test_impl(void *arg, int ssl, int dirty, const char *uri)
+{
+ struct basic_test_data *data = arg;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct bufferevent *bev;
+ struct http_server hs = { 0, ssl, NULL, };
+ struct evhttp *http = http_setup(&hs.port, data->base, ssl ? HTTP_BIND_SSL : 0);
+
+ exit_base = data->base;
+ test_ok = 0;
+
+ bev = create_bev(data->base, -1, ssl, 0);
+#ifdef EVENT__HAVE_OPENSSL
+ bufferevent_openssl_set_allow_dirty_shutdown(bev, dirty);
+#endif
+
+ evcon = evhttp_connection_base_bufferevent_new(
+ data->base, NULL, bev, "127.0.0.1", hs.port);
+ tt_assert(evcon);
+ evhttp_connection_set_local_address(evcon, "127.0.0.1");
+
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+ tt_assert(req);
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, uri) == -1)
+ tt_abort_msg("Couldn't make request");
+
+ event_base_dispatch(data->base);
+ tt_int_op(test_ok, ==, 1);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+static void http_simple_test(void *arg)
+{ http_simple_test_impl(arg, 0, 0, "/test"); }
+static void http_simple_nonconformant_test(void *arg)
+{ http_simple_test_impl(arg, 0, 0, "/test nonconformant"); }
+
+static void
+http_connection_retry_test_basic(void *arg, const char *addr, struct evdns_base *dns_base, int ssl)
{
struct basic_test_data *data = arg;
- ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
struct timeval tv, tv_start, tv_end;
+ struct bufferevent *bev;
+ struct http_server hs = { 0, ssl, NULL, };
+ struct evhttp *http = http_setup(&hs.port, data->base, ssl ? HTTP_BIND_SSL : 0);
exit_base = data->base;
test_ok = 0;
/* auto detect a port */
- http = http_setup(&port, data->base, 0);
evhttp_free(http);
- http = NULL;
- evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ bev = create_bev(data->base, -1, ssl, 0);
+ evcon = evhttp_connection_base_bufferevent_new(data->base, dns_base, bev, addr, hs.port);
tt_assert(evcon);
+ if (dns_base)
+ tt_assert(!evhttp_connection_set_flags(evcon, EVHTTP_CON_REUSE_CONNECTED_ADDR));
evhttp_connection_set_timeout(evcon, 1);
/* also bind to local host */
@@ -3381,6 +3765,9 @@ http_connection_retry_test(void *arg)
* now test the same but with retries
*/
test_ok = 0;
+ /** Shutdown dns server, to test conn_address reusing */
+ if (dns_base)
+ regress_clean_dnsserver();
{
const struct timeval tv_timeout = { 0, 500000 };
@@ -3436,7 +3823,7 @@ http_connection_retry_test(void *arg)
evutil_timerclear(&tv);
tv.tv_usec = 200000;
http_make_web_server_base = data->base;
- event_base_once(data->base, -1, EV_TIMEOUT, http_make_web_server, &port, &tv);
+ event_base_once(data->base, -1, EV_TIMEOUT, http_make_web_server, &hs, &tv);
evutil_gettimeofday(&tv_start, NULL);
event_base_dispatch(data->base);
@@ -3450,8 +3837,44 @@ http_connection_retry_test(void *arg)
if (evcon)
evhttp_connection_free(evcon);
if (http)
- evhttp_free(http);
+ evhttp_free(hs.http);
+}
+
+static void
+http_connection_retry_conn_address_test_impl(void *arg, int ssl)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t portnum = 0;
+ struct evdns_base *dns_base = NULL;
+ char address[64];
+
+ tt_assert(regress_dnsserver(data->base, &portnum, search_table));
+ dns_base = evdns_base_new(data->base, 0/* init name servers */);
+ tt_assert(dns_base);
+
+ /* Add ourself as the only nameserver, and make sure we really are
+ * the only nameserver. */
+ evutil_snprintf(address, sizeof(address), "127.0.0.1:%d", portnum);
+ evdns_base_nameserver_ip_add(dns_base, address);
+
+ http_connection_retry_test_basic(arg, "localhost", dns_base, ssl);
+
+ end:
+ if (dns_base)
+ evdns_base_free(dns_base, 0);
+ /** dnsserver will be cleaned in http_connection_retry_test_basic() */
+}
+static void http_connection_retry_conn_address_test(void *arg)
+{ http_connection_retry_conn_address_test_impl(arg, 0); }
+
+static void
+http_connection_retry_test_impl(void *arg, int ssl)
+{
+ http_connection_retry_test_basic(arg, "127.0.0.1", NULL, ssl);
}
+static void
+http_connection_retry_test(void *arg)
+{ http_connection_retry_test_impl(arg, 0); }
static void
http_primitives(void *ptr)
@@ -3470,11 +3893,11 @@ http_primitives(void *ptr)
http = evhttp_new(NULL);
tt_assert(http);
- tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, NULL), ==, 0);
- tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, NULL), ==, -1);
+ tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, http), ==, 0);
+ tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, http), ==, -1);
tt_int_op(evhttp_del_cb(http, "/test"), ==, 0);
tt_int_op(evhttp_del_cb(http, "/test"), ==, -1);
- tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, NULL), ==, 0);
+ tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, http), ==, 0);
end:
if (escaped)
@@ -3488,19 +3911,18 @@ http_multi_line_header_test(void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev= NULL;
- evutil_socket_t fd = -1;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
const char *http_start_request;
ev_uint16_t port = 0;
+ struct evhttp *http = http_setup(&port, data->base, 0);
+ exit_base = data->base;
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
tt_ptr_op(http, !=, NULL);
fd = http_connect("127.0.0.1", port);
-
- tt_int_op(fd, !=, -1);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -3556,11 +3978,10 @@ http_negative_content_length_test(void *arg)
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
- http = http_setup(&port, data->base, 0);
-
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
@@ -3597,7 +4018,6 @@ http_data_length_constraints_test_done(struct evhttp_request *req, void *arg)
end:
event_base_loopexit(arg, NULL);
}
-
static void
http_large_entity_test_done(struct evhttp_request *req, void *arg)
{
@@ -3606,41 +4026,56 @@ http_large_entity_test_done(struct evhttp_request *req, void *arg)
end:
event_base_loopexit(arg, NULL);
}
+static void
+http_expectation_failed_done(struct evhttp_request *req, void *arg)
+{
+ tt_assert(req);
+ tt_int_op(evhttp_request_get_response_code(req), ==, HTTP_EXPECTATIONFAILED);
+end:
+ event_base_loopexit(arg, NULL);
+}
static void
-http_data_length_constraints_test(void *arg)
+http_data_length_constraints_test_impl(void *arg, int read_on_write_error)
{
struct basic_test_data *data = arg;
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
- char long_str[8192];
+ char *long_str = NULL;
+ const size_t continue_size = 1<<20;
+ const size_t size = (1<<20) * 3;
+ void (*cb)(struct evhttp_request *, void *);
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
+ cb = http_failed_request_done;
+ if (read_on_write_error)
+ cb = http_data_length_constraints_test_done;
- http = http_setup(&port, data->base, 0);
+ tt_assert(continue_size < size);
+ long_str = malloc(size);
+ memset(long_str, 'a', size);
+ long_str[size - 1] = '\0';
+
+ TT_BLATHER(("Creating connection to :%i", port));
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
- /* also bind to local host */
+ if (read_on_write_error)
+ tt_assert(!evhttp_connection_set_flags(evcon, EVHTTP_CON_READ_ON_WRITE_ERROR));
+
evhttp_connection_set_local_address(evcon, "127.0.0.1");
- /*
- * At this point, we want to schedule an HTTP GET request
- * server using our make request method.
- */
+ evhttp_set_max_headers_size(http, size - 1);
+ TT_BLATHER(("Set max header size %zu", size - 1));
req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
tt_assert(req);
-
- memset(long_str, 'a', 8192);
- long_str[8191] = '\0';
- /* Add the information that we care about */
- evhttp_set_max_headers_size(http, 8191);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evhttp_add_header(evhttp_request_get_output_headers(req), "Longheader", long_str);
-
+ TT_BLATHER(("GET /?arg=val"));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/?arg=val") == -1) {
tt_abort_msg("Couldn't make request");
}
@@ -3649,17 +4084,22 @@ http_data_length_constraints_test(void *arg)
req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
tt_assert(req);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
-
/* GET /?arg=verylongvalue HTTP/1.1 */
+ TT_BLATHER(("GET %s", long_str));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, long_str) == -1) {
tt_abort_msg("Couldn't make request");
}
event_base_dispatch(data->base);
- evhttp_set_max_body_size(http, 8190);
- req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
+ evhttp_set_max_body_size(http, size - 2);
+ TT_BLATHER(("Set body header size %zu", size - 2));
+
+ if (read_on_write_error)
+ cb = http_large_entity_test_done;
+ req = evhttp_request_new(cb, data->base);
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
+ TT_BLATHER(("POST /"));
if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
tt_abort_msg("Couldn't make request");
}
@@ -3669,6 +4109,89 @@ http_data_length_constraints_test(void *arg)
evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "100-continue");
evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
+ TT_BLATHER(("POST / (Expect: 100-continue, http_large_entity_test_done)"));
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ event_base_dispatch(data->base);
+
+ long_str[continue_size] = '\0';
+
+ req = evhttp_request_new(http_dispatcher_test_done, data->base);
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "100-continue");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
+ TT_BLATHER(("POST / (Expect: 100-continue, http_dispatcher_test_done)"));
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ event_base_dispatch(data->base);
+
+ if (read_on_write_error)
+ cb = http_expectation_failed_done;
+ req = evhttp_request_new(cb, data->base);
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "101-continue");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
+ TT_BLATHER(("POST / (Expect: 101-continue)"));
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ event_base_dispatch(data->base);
+
+ test_ok = 1;
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+ if (long_str)
+ free(long_str);
+}
+static void http_data_length_constraints_test(void *arg)
+{ http_data_length_constraints_test_impl(arg, 0); }
+static void http_read_on_write_error_test(void *arg)
+{ http_data_length_constraints_test_impl(arg, 1); }
+
+static void
+http_lingering_close_test_impl(void *arg, int lingering)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ char *long_str = NULL;
+ size_t size = (1<<20) * 3;
+ void (*cb)(struct evhttp_request *, void *);
+ struct evhttp *http = http_setup(&port, data->base, 0);
+
+ test_ok = 0;
+
+ if (lingering)
+ tt_assert(!evhttp_set_flags(http, EVHTTP_SERVER_LINGERING_CLOSE));
+ evhttp_set_max_body_size(http, size / 2);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+ evhttp_connection_set_local_address(evcon, "127.0.0.1");
+
+ /*
+ * At this point, we want to schedule an HTTP GET request
+ * server using our make request method.
+ */
+
+ long_str = malloc(size);
+ memset(long_str, 'a', size);
+ long_str[size - 1] = '\0';
+
+ if (lingering)
+ cb = http_large_entity_test_done;
+ else
+ cb = http_failed_request_done;
+ req = evhttp_request_new(cb, data->base);
+ tt_assert(req);
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
tt_abort_msg("Couldn't make request");
}
@@ -3680,7 +4203,13 @@ http_data_length_constraints_test(void *arg)
evhttp_connection_free(evcon);
if (http)
evhttp_free(http);
+ if (long_str)
+ free(long_str);
}
+static void http_non_lingering_close_test(void *arg)
+{ http_lingering_close_test_impl(arg, 0); }
+static void http_lingering_close_test(void *arg)
+{ http_lingering_close_test_impl(arg, 1); }
/*
* Testing client reset of server chunked connections
@@ -3692,6 +4221,7 @@ struct terminate_state {
struct bufferevent *bev;
evutil_socket_t fd;
int gotclosecb: 1;
+ int oneshot: 1;
};
static void
@@ -3699,7 +4229,10 @@ terminate_chunked_trickle_cb(evutil_socket_t fd, short events, void *arg)
{
struct terminate_state *state = arg;
struct evbuffer *evb;
- struct timeval tv;
+
+ if (!state->req) {
+ return;
+ }
if (evhttp_request_get_connection(state->req) == NULL) {
test_ok = 1;
@@ -3713,11 +4246,14 @@ terminate_chunked_trickle_cb(evutil_socket_t fd, short events, void *arg)
evhttp_send_reply_chunk(state->req, evb);
evbuffer_free(evb);
- tv.tv_sec = 0;
- tv.tv_usec = 3000;
- EVUTIL_ASSERT(state);
- EVUTIL_ASSERT(state->base);
- event_base_once(state->base, -1, EV_TIMEOUT, terminate_chunked_trickle_cb, arg, &tv);
+ if (!state->oneshot) {
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 3000;
+ EVUTIL_ASSERT(state);
+ EVUTIL_ASSERT(state->base);
+ event_base_once(state->base, -1, EV_TIMEOUT, terminate_chunked_trickle_cb, arg, &tv);
+ }
}
static void
@@ -3725,6 +4261,13 @@ terminate_chunked_close_cb(struct evhttp_connection *evcon, void *arg)
{
struct terminate_state *state = arg;
state->gotclosecb = 1;
+
+ /** TODO: though we can do this unconditionally */
+ if (state->oneshot) {
+ evhttp_request_free(state->req);
+ state->req = NULL;
+ event_base_loopexit(state->base,NULL);
+ }
}
static void
@@ -3764,24 +4307,25 @@ terminate_readcb(struct bufferevent *bev, void *arg)
static void
-http_terminate_chunked_test(void *arg)
+http_terminate_chunked_test_impl(void *arg, int oneshot)
{
struct basic_test_data *data = arg;
struct bufferevent *bev = NULL;
struct timeval tv;
const char *http_request;
ev_uint16_t port = 0;
- evutil_socket_t fd = -1;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
struct terminate_state terminate_state;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
- http = http_setup(&port, data->base, 0);
evhttp_del_cb(http, "/test");
tt_assert(evhttp_set_cb(http, "/test",
terminate_chunked_cb, &terminate_state) == 0);
fd = http_connect("127.0.0.1", port);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
/* Stupid thing to send a request */
bev = bufferevent_socket_new(data->base, fd, 0);
@@ -3793,6 +4337,7 @@ http_terminate_chunked_test(void *arg)
terminate_state.fd = fd;
terminate_state.bev = bev;
terminate_state.gotclosecb = 0;
+ terminate_state.oneshot = oneshot;
/* first half of the http request */
http_request =
@@ -3816,10 +4361,20 @@ http_terminate_chunked_test(void *arg)
if (http)
evhttp_free(http);
}
+static void
+http_terminate_chunked_test(void *arg)
+{
+ http_terminate_chunked_test_impl(arg, 0);
+}
+static void
+http_terminate_chunked_oneshot_test(void *arg)
+{
+ http_terminate_chunked_test_impl(arg, 1);
+}
static struct regress_dns_server_table ipv6_search_table[] = {
- { "localhost", "AAAA", "::1", 0 },
- { NULL, NULL, NULL, 0 }
+ { "localhost", "AAAA", "::1", 0, 0 },
+ { NULL, NULL, NULL, 0, 0 }
};
static void
@@ -3841,7 +4396,7 @@ http_ipv6_for_domain_test_impl(void *arg, int family)
evdns_base_nameserver_ip_add(dns_base, address);
http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base,
- 1 /* ipv6 */, family);
+ 1 /* ipv6 */, family, 0);
end:
if (dns_base)
@@ -3884,12 +4439,11 @@ http_get_addr_test(void *arg)
ev_uint16_t port = 0;
struct evhttp_connection *evcon = NULL;
struct evhttp_request *req = NULL;
+ struct evhttp *http = http_setup(&port, data->base, 0);
test_ok = 0;
exit_base = data->base;
- http = http_setup(&port, data->base, 0);
-
evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
tt_assert(evcon);
evhttp_connection_set_closecb(evcon, http_request_get_addr_on_close, arg);
@@ -3920,12 +4474,12 @@ http_get_addr_test(void *arg)
static void
http_set_family_test(void *arg)
{
- http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC);
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC, 0);
}
static void
http_set_family_ipv4_test(void *arg)
{
- http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_INET);
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_INET, 0);
}
static void
http_set_family_ipv6_test(void *arg)
@@ -3933,23 +4487,244 @@ http_set_family_ipv6_test(void *arg)
http_ipv6_for_domain_test_impl(arg, AF_INET6);
}
+static void
+http_write_during_read(evutil_socket_t fd, short what, void *arg)
+{
+ struct bufferevent *bev = arg;
+ struct timeval tv;
+
+ bufferevent_write(bev, "foobar", strlen("foobar"));
+
+ evutil_timerclear(&tv);
+ tv.tv_sec = 1;
+ event_base_loopexit(exit_base, &tv);
+}
+static void
+http_write_during_read_test_impl(void *arg, int ssl)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct bufferevent *bev = NULL;
+ struct timeval tv;
+ evutil_socket_t fd;
+ const char *http_request;
+ struct evhttp *http = http_setup(&port, data->base, ssl ? HTTP_BIND_SSL : 0);
+
+ test_ok = 0;
+ exit_base = data->base;
+
+ fd = http_connect("127.0.0.1", port);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
+ bev = create_bev(data->base, fd, 0, 0);
+ bufferevent_setcb(bev, NULL, NULL, NULL, data->base);
+ bufferevent_disable(bev, EV_READ);
+
+ http_request =
+ "GET /large HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+ evutil_timerclear(&tv);
+ tv.tv_usec = 10000;
+ event_base_once(data->base, -1, EV_TIMEOUT, http_write_during_read, bev, &tv);
+
+ event_base_dispatch(data->base);
+
+end:
+ if (bev)
+ bufferevent_free(bev);
+ if (http)
+ evhttp_free(http);
+}
+static void http_write_during_read_test(void *arg)
+{ http_write_during_read_test_impl(arg, 0); }
+
+static void
+http_request_own_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct evhttp *http = http_setup(&port, data->base, 0);
+
+ test_ok = 0;
+ exit_base = data->base;
+
+ evhttp_free(http);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ req = evhttp_request_new(http_request_no_action_done, NULL);
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ evhttp_request_own(req);
+
+ event_base_dispatch(data->base);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (req)
+ evhttp_request_free(req);
+
+ test_ok = 1;
+}
+
+static void http_run_bev_request(struct event_base *base, int port,
+ const char *fmt, ...)
+{
+ struct bufferevent *bev = NULL;
+ va_list ap;
+ evutil_socket_t fd;
+ struct evbuffer *out;
+
+ fd = http_connect("127.0.0.1", port);
+ tt_assert(fd != EVUTIL_INVALID_SOCKET);
+
+ /* Stupid thing to send a request */
+ bev = create_bev(base, fd, 0, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, base);
+ out = bufferevent_get_output(bev);
+
+ va_start(ap, fmt);
+ evbuffer_add_vprintf(out, fmt, ap);
+ va_end(ap);
+
+ event_base_dispatch(base);
+
+end:
+ if (bev)
+ bufferevent_free(bev);
+}
+static void
+http_request_extra_body_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev = NULL;
+ ev_uint16_t port = 0;
+ int i;
+ struct evhttp *http =
+ http_setup_gencb(&port, data->base, 0, http_timeout_cb, NULL);
+ struct evbuffer *body = NULL;
+
+ exit_base = data->base;
+ test_ok = 0;
+
+ body = evbuffer_new();
+ for (i = 0; i < 10000; ++i)
+ evbuffer_add_printf(body, "this is the body that HEAD should not have");
+
+ http_run_bev_request(data->base, port,
+ "HEAD /timeout HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "Content-Length: %i\r\n"
+ "\r\n%s",
+ (int)evbuffer_get_length(body),
+ evbuffer_pullup(body, -1)
+ );
+ tt_assert(test_ok == -2);
+
+ http_run_bev_request(data->base, port,
+ "HEAD /__gencb__ HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "Content-Length: %i\r\n"
+ "\r\n%s",
+ (int)evbuffer_get_length(body),
+ evbuffer_pullup(body, -1)
+ );
+ tt_assert(test_ok == -2);
+
+ end:
+ evhttp_free(http);
+ if (bev)
+ bufferevent_free(bev);
+ if (body)
+ evbuffer_free(body);
+}
+
#define HTTP_LEGACY(name) \
{ #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \
http_##name##_test }
-#define HTTP(name) \
- { #name, http_##name##_test, TT_ISOLATED, &basic_setup, NULL }
+#define HTTP_CAST_ARG(a) ((void *)(a))
+#define HTTP_OFF_N(title, name, arg) \
+ { #title, http_##name##_test, TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, HTTP_CAST_ARG(arg) }
+#define HTTP_RET_N(title, name, test_opts, arg) \
+ { #title, http_##name##_test, TT_ISOLATED|TT_RETRIABLE|test_opts, &basic_setup, HTTP_CAST_ARG(arg) }
+#define HTTP_N(title, name, test_opts, arg) \
+ { #title, http_##name##_test, TT_ISOLATED|test_opts, &basic_setup, HTTP_CAST_ARG(arg) }
+#define HTTP(name) HTTP_N(name, name, 0, NULL)
+#define HTTPS(name) \
+ { "https_" #name, https_##name##_test, TT_ISOLATED, &basic_setup, NULL }
+
+#ifdef EVENT__HAVE_OPENSSL
+static void https_basic_test(void *arg)
+{ http_basic_test_impl(arg, 1, "GET /test HTTP/1.1"); }
+static void https_filter_basic_test(void *arg)
+{ http_basic_test_impl(arg, 1 | HTTP_SSL_FILTER, "GET /test HTTP/1.1"); }
+static void https_incomplete_test(void *arg)
+{ http_incomplete_test_(arg, 0, 1); }
+static void https_incomplete_timeout_test(void *arg)
+{ http_incomplete_test_(arg, 1, 1); }
+static void https_simple_test(void *arg)
+{ http_simple_test_impl(arg, 1, 0, "/test"); }
+static void https_simple_dirty_test(void *arg)
+{ http_simple_test_impl(arg, 1, 1, "/test"); }
+static void https_connection_retry_conn_address_test(void *arg)
+{ http_connection_retry_conn_address_test_impl(arg, 1); }
+static void https_connection_retry_test(void *arg)
+{ http_connection_retry_test_impl(arg, 1); }
+static void https_chunk_out_test(void *arg)
+{ http_chunk_out_test_impl(arg, 1); }
+static void https_filter_chunk_out_test(void *arg)
+{ http_chunk_out_test_impl(arg, 1 | HTTP_SSL_FILTER); }
+static void https_stream_out_test(void *arg)
+{ http_stream_out_test_impl(arg, 1); }
+static void https_connection_fail_test(void *arg)
+{ http_connection_fail_test_impl(arg, 1); }
+static void https_write_during_read_test(void *arg)
+{ http_write_during_read_test_impl(arg, 1); }
+static void https_connection_test(void *arg)
+{ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
+static void https_persist_connection_test(void *arg)
+{ http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
+#endif
struct testcase_t http_testcases[] = {
{ "primitives", http_primitives, 0, NULL, NULL },
{ "base", http_base_test, TT_FORK, NULL, NULL },
{ "bad_headers", http_bad_header_test, 0, NULL, NULL },
{ "parse_query", http_parse_query_test, 0, NULL, NULL },
+ { "parse_query_str", http_parse_query_str_test, 0, NULL, NULL },
{ "parse_uri", http_parse_uri_test, 0, NULL, NULL },
{ "parse_uri_nc", http_parse_uri_test, 0, &basic_setup, (void*)"nc" },
{ "uriencode", http_uriencode_test, 0, NULL, NULL },
HTTP(basic),
- HTTP(cancel),
+ HTTP(basic_trailing_space),
+ HTTP(simple),
+ HTTP(simple_nonconformant),
+
+ HTTP_N(cancel, cancel, 0, BASIC),
+ HTTP_RET_N(cancel_by_host, cancel, 0, BY_HOST),
+ HTTP_RET_N(cancel_by_host_inactive_server, cancel, TT_NO_LOGS, BY_HOST | INACTIVE_SERVER),
+ HTTP_RET_N(cancel_by_host_no_ns, cancel, TT_NO_LOGS, BY_HOST | NO_NS),
+ HTTP_N(cancel_inactive_server, cancel, 0, INACTIVE_SERVER),
+ HTTP_N(cancel_by_host_no_ns_inactive_server, cancel, TT_NO_LOGS, BY_HOST | NO_NS | INACTIVE_SERVER),
+ HTTP_OFF_N(cancel_by_host_server_timeout, cancel, BY_HOST | INACTIVE_SERVER | SERVER_TIMEOUT),
+ HTTP_OFF_N(cancel_server_timeout, cancel, INACTIVE_SERVER | SERVER_TIMEOUT),
+ HTTP_OFF_N(cancel_by_host_no_ns_server_timeout, cancel, BY_HOST | NO_NS | INACTIVE_SERVER | SERVER_TIMEOUT),
+ HTTP_OFF_N(cancel_by_host_ns_timeout_server_timeout, cancel, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER | SERVER_TIMEOUT),
+ HTTP_RET_N(cancel_by_host_ns_timeout, cancel, TT_NO_LOGS, BY_HOST | NO_NS | NS_TIMEOUT),
+ HTTP_RET_N(cancel_by_host_ns_timeout_inactive_server, cancel, TT_NO_LOGS, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER),
+
HTTP(virtual_host),
HTTP(post),
HTTP(put),
@@ -3966,6 +4741,7 @@ struct testcase_t http_testcases[] = {
HTTP(incomplete),
HTTP(incomplete_timeout),
HTTP(terminate_chunked),
+ HTTP(terminate_chunked_oneshot),
HTTP(on_complete),
HTTP(highport),
@@ -3980,8 +4756,13 @@ struct testcase_t http_testcases[] = {
HTTP(connection_fail),
{ "connection_retry", http_connection_retry_test, TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, NULL },
+ { "connection_retry_conn_address", http_connection_retry_conn_address_test,
+ TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, NULL },
HTTP(data_length_constraints),
+ HTTP(read_on_write_error),
+ HTTP(non_lingering_close),
+ HTTP(lingering_close),
HTTP(ipv6_for_domain),
HTTP(get_addr),
@@ -3990,6 +4771,37 @@ struct testcase_t http_testcases[] = {
HTTP(set_family_ipv4),
HTTP(set_family_ipv6),
+ HTTP(write_during_read),
+ HTTP(request_own),
+
+ HTTP(request_extra_body),
+
+#ifdef EVENT__HAVE_OPENSSL
+ HTTPS(basic),
+ HTTPS(filter_basic),
+ HTTPS(simple),
+ HTTPS(simple_dirty),
+ HTTPS(incomplete),
+ HTTPS(incomplete_timeout),
+ { "https_connection_retry", https_connection_retry_test, TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, NULL },
+ { "https_connection_retry_conn_address", https_connection_retry_conn_address_test,
+ TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, NULL },
+ HTTPS(chunk_out),
+ HTTPS(filter_chunk_out),
+ HTTPS(stream_out),
+ HTTPS(connection_fail),
+ HTTPS(write_during_read),
+ HTTPS(connection),
+ HTTPS(persist_connection),
+#endif
+
END_OF_TESTCASES
};
+struct testcase_t http_iocp_testcases[] = {
+ { "simple", http_simple_test, TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
+#ifdef EVENT__HAVE_OPENSSL
+ { "https_simple", https_simple_test, TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
+#endif
+ END_OF_TESTCASES
+};
diff --git a/contrib/ntp/sntp/libevent/test/regress_listener.c b/contrib/ntp/sntp/libevent/test/regress_listener.c
index 4db102df68ca..871da4c62ce9 100644
--- a/contrib/ntp/sntp/libevent/test/regress_listener.c
+++ b/contrib/ntp/sntp/libevent/test/regress_listener.c
@@ -40,6 +40,9 @@
# endif
#include <unistd.h>
#endif
+#ifdef EVENT__HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
#include <string.h>
@@ -77,8 +80,9 @@ regress_pick_a_port(void *arg)
ev_socklen_t slen1 = sizeof(ss1), slen2 = sizeof(ss2);
unsigned int flags =
LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_EXEC;
+ evutil_socket_t fd1, fd2, fd3;
- evutil_socket_t fd1 = -1, fd2 = -1, fd3 = -1;
+ fd1 = fd2 = fd3 = EVUTIL_INVALID_SOCKET;
if (data->setup_data && strstr((char*)data->setup_data, "ts")) {
flags |= LEV_OPT_THREADSAFE;
@@ -96,8 +100,8 @@ regress_pick_a_port(void *arg)
flags, -1, (struct sockaddr *)&sin, sizeof(sin));
tt_assert(listener2);
- tt_int_op(evconnlistener_get_fd(listener1), >=, 0);
- tt_int_op(evconnlistener_get_fd(listener2), >=, 0);
+ tt_assert(evconnlistener_get_fd(listener1) != EVUTIL_INVALID_SOCKET);
+ tt_assert(evconnlistener_get_fd(listener2) != EVUTIL_INVALID_SOCKET);
tt_assert(getsockname(evconnlistener_get_fd(listener1),
(struct sockaddr*)&ss1, &slen1) == 0);
tt_assert(getsockname(evconnlistener_get_fd(listener2),
@@ -114,7 +118,7 @@ regress_pick_a_port(void *arg)
tt_ptr_op(evconnlistener_get_base(listener1), ==, base);
tt_ptr_op(evconnlistener_get_base(listener2), ==, base);
- fd1 = fd2 = fd3 = -1;
+ fd1 = fd2 = fd3 = EVUTIL_INVALID_SOCKET;
evutil_socket_connect_(&fd1, (struct sockaddr*)&ss1, slen1);
evutil_socket_connect_(&fd2, (struct sockaddr*)&ss1, slen1);
evutil_socket_connect_(&fd3, (struct sockaddr*)&ss2, slen2);
@@ -182,6 +186,124 @@ end:
evconnlistener_free(listener);
}
+static void
+acceptcb_free(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *addr, int socklen, void *arg)
+{
+ int *ptr = arg;
+ --*ptr;
+ TT_BLATHER(("Got one for %p", ptr));
+ evutil_closesocket(fd);
+
+ if (! *ptr)
+ evconnlistener_free(listener);
+}
+static void
+regress_listener_close_accepted_fd(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evconnlistener *listener = NULL;
+ struct sockaddr_in sin;
+ struct sockaddr_storage ss;
+ ev_socklen_t slen = sizeof(ss);
+ int count = 1;
+ unsigned int flags = LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE;
+ evutil_socket_t fd = EVUTIL_INVALID_SOCKET;
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */
+ sin.sin_port = 0; /* "You pick!" */
+
+ /* Start a listener with a bogus socket. */
+ listener = evconnlistener_new_bind(base, acceptcb_free, &count,
+ flags, -1, (struct sockaddr *)&sin, sizeof(sin));
+ tt_assert(listener);
+
+ tt_assert(getsockname(evconnlistener_get_fd(listener),
+ (struct sockaddr*)&ss, &slen) == 0);
+ evutil_socket_connect_(&fd, (struct sockaddr*)&ss, slen);
+
+ event_base_dispatch(base);
+
+end:
+ ;
+}
+
+static void
+regress_listener_immediate_close(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evconnlistener *listener = NULL;
+ struct sockaddr_in sin;
+ struct sockaddr_storage ss;
+ ev_socklen_t slen = sizeof(ss);
+ int count = 1;
+ unsigned int flags = LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE;
+ evutil_socket_t fd1 = EVUTIL_INVALID_SOCKET, fd2 = EVUTIL_INVALID_SOCKET;
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */
+ sin.sin_port = 0; /* "You pick!" */
+
+ /* Start a listener with a bogus socket. */
+ listener = evconnlistener_new_bind(base, acceptcb, &count,
+ flags, -1, (struct sockaddr *)&sin, sizeof(sin));
+ tt_assert(listener);
+
+ tt_assert(getsockname(evconnlistener_get_fd(listener),
+ (struct sockaddr*)&ss, &slen) == 0);
+
+ evutil_socket_connect_(&fd1, (struct sockaddr*)&ss, slen);
+ evutil_socket_connect_(&fd2, (struct sockaddr*)&ss, slen);
+
+ event_base_dispatch(base);
+
+ tt_int_op(count, ==, 0);
+
+end:
+ if (listener)
+ evconnlistener_free(listener);
+}
+
+#ifdef EVENT__HAVE_SETRLIMIT
+static void
+regress_listener_error_unlock(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evconnlistener *listener = NULL;
+ unsigned int flags =
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE|LEV_OPT_THREADSAFE;
+
+ tt_int_op(send(data->pair[1], "hello", 5, 0), >, 0);
+
+ /* Start a listener with a bogus socket. */
+ listener = evconnlistener_new(base, acceptcb, NULL, flags, 0, data->pair[0]);
+ tt_assert(listener);
+
+ /** accept() must errored out with EMFILE */
+ {
+ struct rlimit rl;
+ rl.rlim_cur = rl.rlim_max = data->pair[1];
+ if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
+ TT_DIE(("Can't change RLIMIT_NOFILE"));
+ }
+ }
+
+ event_base_loop(base, EVLOOP_ONCE);
+
+ /** with lock debugging, can fail on lock->count assertion */
+
+end:
+ if (listener)
+ evconnlistener_free(listener);
+}
+#endif
+
struct testcase_t listener_testcases[] = {
{ "randport", regress_pick_a_port, TT_FORK|TT_NEED_BASE,
@@ -190,6 +312,12 @@ struct testcase_t listener_testcases[] = {
{ "randport_ts", regress_pick_a_port, TT_FORK|TT_NEED_BASE,
&basic_setup, (char*)"ts"},
+#ifdef EVENT__HAVE_SETRLIMIT
+ { "error_unlock", regress_listener_error_unlock,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR|TT_NO_LOGS,
+ &basic_setup, NULL},
+#endif
+
{ "error", regress_listener_error,
TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR,
&basic_setup, NULL},
@@ -198,6 +326,12 @@ struct testcase_t listener_testcases[] = {
TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR,
&basic_setup, (char*)"ts"},
+ { "close_accepted_fd", regress_listener_close_accepted_fd,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL, },
+
+ { "immediate_close", regress_listener_immediate_close,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL, },
+
END_OF_TESTCASES,
};
diff --git a/contrib/ntp/sntp/libevent/test/regress_main.c b/contrib/ntp/sntp/libevent/test/regress_main.c
index 3198ced1da35..266561214b8e 100644
--- a/contrib/ntp/sntp/libevent/test/regress_main.c
+++ b/contrib/ntp/sntp/libevent/test/regress_main.c
@@ -33,6 +33,14 @@
#include <fcntl.h>
#endif
+/* move_pthread_to_realtime_scheduling_class() */
+#ifdef EVENT__HAVE_MACH_MACH_H
+#include <mach/mach.h>
+#endif
+#ifdef EVENT__HAVE_MACH_MACH_TIME_H
+#include <mach/mach_time.h>
+#endif
+
#if defined(__APPLE__) && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060 && \
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
@@ -43,10 +51,6 @@
#include "event2/event-config.h"
-#ifdef EVENT____func__
-#define __func__ EVENT____func__
-#endif
-
#if 0
#include <sys/types.h>
#include <sys/stat.h>
@@ -85,10 +89,12 @@
#include "event2/event-config.h"
#include "regress.h"
+#include "regress_thread.h"
#include "tinytest.h"
#include "tinytest_macros.h"
#include "../iocp-internal.h"
#include "../event-internal.h"
+#include "../evthread-internal.h"
struct evutil_weakrand_state test_weakrand_state;
@@ -190,18 +196,65 @@ ignore_log_cb(int s, const char *msg)
{
}
-static void *
+/**
+ * Put into the real time scheduling class for better timers latency.
+ * https://developer.apple.com/library/archive/technotes/tn2169/_index.html#//apple_ref/doc/uid/DTS40013172-CH1-TNTAG6000
+ */
+#if defined(__APPLE__)
+static void move_pthread_to_realtime_scheduling_class(pthread_t pthread)
+{
+ mach_timebase_info_data_t info;
+ mach_timebase_info(&info);
+
+ const uint64_t NANOS_PER_MSEC = 1000000ULL;
+ double clock2abs =
+ ((double)info.denom / (double)info.numer) * NANOS_PER_MSEC;
+
+ thread_time_constraint_policy_data_t policy;
+ policy.period = 0;
+ policy.computation = (uint32_t)(5 * clock2abs); // 5 ms of work
+ policy.constraint = (uint32_t)(10 * clock2abs);
+ policy.preemptible = FALSE;
+
+ int kr = thread_policy_set(pthread_mach_thread_np(pthread),
+ THREAD_TIME_CONSTRAINT_POLICY,
+ (thread_policy_t)&policy,
+ THREAD_TIME_CONSTRAINT_POLICY_COUNT);
+ if (kr != KERN_SUCCESS) {
+ mach_error("thread_policy_set:", kr);
+ exit(1);
+ }
+}
+
+void thread_setup(THREAD_T pthread)
+{
+ move_pthread_to_realtime_scheduling_class(pthread);
+}
+#else /** \__APPLE__ */
+void thread_setup(THREAD_T pthread) {}
+#endif /** \!__APPLE__ */
+
+
+void *
basic_test_setup(const struct testcase_t *testcase)
{
struct event_base *base = NULL;
evutil_socket_t spair[2] = { -1, -1 };
struct basic_test_data *data = NULL;
+ thread_setup(THREAD_SELF());
+
#ifndef _WIN32
if (testcase->flags & TT_ENABLE_IOCP_FLAG)
return (void*)TT_SKIP;
#endif
+ if (testcase->flags & TT_ENABLE_DEBUG_MODE &&
+ !libevent_tests_running_in_debug_mode) {
+ event_enable_debug_mode();
+ libevent_tests_running_in_debug_mode = 1;
+ }
+
if (testcase->flags & TT_NEED_THREADS) {
if (!(testcase->flags & TT_FORK))
return NULL;
@@ -266,7 +319,7 @@ basic_test_setup(const struct testcase_t *testcase)
return data;
}
-static int
+int
basic_test_cleanup(const struct testcase_t *testcase, void *ptr)
{
struct basic_test_data *data = ptr;
@@ -388,6 +441,7 @@ struct testgroup_t testgroups[] = {
{ "iocp/", iocp_testcases },
{ "iocp/bufferevent/", bufferevent_iocp_testcases },
{ "iocp/listener/", listener_iocp_testcases },
+ { "iocp/http/", http_iocp_testcases },
#endif
#ifdef EVENT__HAVE_OPENSSL
{ "ssl/", ssl_testcases },
@@ -407,6 +461,7 @@ const char *finetimetests[] = {
"+util/monotonic_res_fallback",
"+thread/deferred_cb_skew",
"+http/connection_retry",
+ "+http/https_connection_retry",
NULL
};
struct testlist_alias_t testaliases[] = {
@@ -437,6 +492,8 @@ main(int argc, const char **argv)
#ifdef _WIN32
tinytest_skip(testgroups, "http/connection_retry");
+ tinytest_skip(testgroups, "http/https_connection_retry");
+ tinytest_skip(testgroups, "http/read_on_write_error");
#endif
#ifndef EVENT__DISABLE_THREAD_SUPPORT
@@ -456,6 +513,11 @@ main(int argc, const char **argv)
evutil_weakrand_seed_(&test_weakrand_state, 0);
+ if (getenv("EVENT_NO_FILE_BUFFERING")) {
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+ }
+
if (tinytest_main(argc,argv,testgroups))
return 1;
diff --git a/contrib/ntp/sntp/libevent/test/regress_minheap.c b/contrib/ntp/sntp/libevent/test/regress_minheap.c
index 24ff2933be2c..05db32e26f4d 100644
--- a/contrib/ntp/sntp/libevent/test/regress_minheap.c
+++ b/contrib/ntp/sntp/libevent/test/regress_minheap.c
@@ -63,7 +63,6 @@ test_heap_randomized(void *ptr)
for (i = 0; i < 1024; ++i) {
inserted[i] = malloc(sizeof(struct event));
- assert(inserted[i] != NULL);
set_random_timeout(inserted[i]);
min_heap_push_(&heap, inserted[i]);
}
diff --git a/contrib/ntp/sntp/libevent/test/regress_rpc.c b/contrib/ntp/sntp/libevent/test/regress_rpc.c
index 01a058cbb2b8..87a7efa12fc3 100644
--- a/contrib/ntp/sntp/libevent/test/regress_rpc.c
+++ b/contrib/ntp/sntp/libevent/test/regress_rpc.c
@@ -61,7 +61,6 @@
#include "event2/http_compat.h"
#include "event2/http_struct.h"
#include "event2/rpc.h"
-#include "event2/rpc.h"
#include "event2/rpc_struct.h"
#include "event2/tag.h"
#include "log-internal.h"
@@ -880,6 +879,53 @@ end:
evbuffer_free(tmp);
}
+static void
+rpc_invalid_type(void)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ rpc_setup(&http, &port, &base);
+
+ evcon = evhttp_connection_new("127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule an HTTP POST request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(rpc_postrequest_failure, NULL);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(req->output_headers, "Host", "somehost");
+ evbuffer_add_printf(req->output_buffer, "Some Nonsense");
+
+ if (evhttp_make_request(evcon, req,
+ EVHTTP_REQ_GET,
+ "/.rpc.Message") == -1) {
+ tt_abort();
+ }
+
+ test_ok = 0;
+
+ event_dispatch();
+
+ evhttp_connection_free(evcon);
+
+ rpc_teardown(base);
+
+ tt_assert(test_ok == 1);
+
+end:
+ evhttp_free(http);
+}
+
+
#define RPC_LEGACY(name) \
{ #name, run_legacy_test_fn, TT_FORK|TT_NEED_BASE|TT_LEGACY, \
&legacy_setup, \
@@ -898,6 +944,7 @@ struct testcase_t rpc_testcases[] = {
RPC_LEGACY(basic_client),
RPC_LEGACY(basic_queued_client),
RPC_LEGACY(basic_client_with_pause),
+ RPC_LEGACY(invalid_type),
RPC_LEGACY(client_timeout),
RPC_LEGACY(test),
diff --git a/contrib/ntp/sntp/libevent/test/regress_ssl.c b/contrib/ntp/sntp/libevent/test/regress_ssl.c
index 226a2a3a7e82..37dc334dcafa 100644
--- a/contrib/ntp/sntp/libevent/test/regress_ssl.c
+++ b/contrib/ntp/sntp/libevent/test/regress_ssl.c
@@ -34,6 +34,8 @@
#include <windows.h>
#endif
+#include "util-internal.h"
+
#ifndef _WIN32
#include <sys/types.h>
#include <sys/socket.h>
@@ -43,6 +45,7 @@
#include "event2/util.h"
#include "event2/event.h"
#include "event2/bufferevent_ssl.h"
+#include "event2/bufferevent_struct.h"
#include "event2/buffer.h"
#include "event2/listener.h"
@@ -50,38 +53,53 @@
#include "tinytest.h"
#include "tinytest_macros.h"
-#include <openssl/asn1.h>
-#include <openssl/ssl.h>
-#include <openssl/bio.h>
-#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/pem.h>
-#include <openssl/opensslv.h>
-#include <openssl/x509.h>
+#include "openssl-compat.h"
#include <string.h>
+#ifdef _WIN32
+#include <io.h>
+#define read _read
+#define write _write
+#else
+#include <unistd.h>
+#endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
-#define OpenSSL_version_num SSLeay
-#endif /* OPENSSL_VERSION_NUMBER */
-
-/* A short pre-generated key, to save the cost of doing an RSA key generation
- * step during the unit tests. It's only 512 bits long, and it is published
- * in this file, so you would have to be very foolish to consider using it in
- * your own code. */
+/* A pre-generated key, to save the cost of doing an RSA key generation step
+ * during the unit tests. It is published in this file, so you would have to
+ * be very foolish to consider using it in your own code. */
static const char KEY[] =
"-----BEGIN RSA PRIVATE KEY-----\n"
- "MIIBOgIBAAJBAKibTEzXjj+sqpipePX1lEk5BNFuL/dDBbw8QCXgaJWikOiKHeJq\n"
- "3FQ0OmCnmpkdsPFE4x3ojYmmdgE2i0dJwq0CAwEAAQJAZ08gpUS+qE1IClps/2gG\n"
- "AAer6Bc31K2AaiIQvCSQcH440cp062QtWMC3V5sEoWmdLsbAHFH26/9ZHn5zAflp\n"
- "gQIhANWOx/UYeR8HD0WREU5kcuSzgzNLwUErHLzxP7U6aojpAiEAyh2H35CjN/P7\n"
- "NhcZ4QYw3PeUWpqgJnaE/4i80BSYkSUCIQDLHFhLYLJZ80HwHTADif/ISn9/Ow6b\n"
- "p6BWh3DbMar/eQIgBPS6azH5vpp983KXkNv9AL4VZi9ac/b+BeINdzC6GP0CIDmB\n"
- "U6GFEQTZ3IfuiVabG5pummdC4DNbcdI+WKrSFNmQ\n"
+ "MIIEogIBAAKCAQEAtK07Ili0dkJb79m/sFmHoVJTWyLoveXex2yX/BtUzzcvZEOu\n"
+ "QLon/++5YOA48kzZm5K9mIwZkZhui1ZgJ5Bjq0LGAWTZGIn+NXjLFshPYvTKpOCW\n"
+ "uzL0Ir0LXMsBLYJQ5A4FomLNxs4I3H/dhDSGy/rSiJB1B4w2xNiwPK08/VL3zZqk\n"
+ "V+GsSvGIIkzhTMbqPJy9K8pqyjwOU2pgORS794yXciTGxWYjTDzJPgQ35YMDATaG\n"
+ "jr4HHo1zxU/Lj0pndSUK5rKLYxYQ3Uc8B3AVYDl9CP/GbOoQ4LBzS68JjcAUyp6i\n"
+ "6NfXlc2D9S9XgqVqwI+JqgJs0eW/+zPY2UEDWwIDAQABAoIBAD2HzV66FOM9YDAD\n"
+ "2RtGskEHV2nvLpIVadRCsFPkPvK+2X3s6rgSbbLkwh4y3lHuSCGKTNVZyQ9jeSos\n"
+ "xVxT+Q2HFQW+gYyw2gj91TQyDY8mzKhv8AVaqff2p5r3a7RC8CdqexK9UVUGL9Bg\n"
+ "H2F5vfpTtkVZ5PEoGDLblNFlMiMW/t1SobUeBVx+Msco/xqk9lFv1A9nnepGy0Gi\n"
+ "D+i6YNGTBsX22YhoCZl/ICxCL8lgqPei4FvBr9dBVh/jQgjuUBm2jz55p2r7+7Aw\n"
+ "khmXHReejoVokQ2+htgSgZNKlKuDy710ZpBqnDi8ynQi82Y2qCpyg/p/xcER54B6\n"
+ "hSftaiECgYEA2RkSoxU+nWk+BClQEUZRi88QK5W/M8oo1DvUs36hvPFkw3Jk/gz0\n"
+ "fgd5bnA+MXj0Fc0QHvbddPjIkyoI/evq9GPV+JYIuH5zabrlI3Jvya8q9QpAcEDO\n"
+ "KkL/O09qXVEW52S6l05nh4PLejyI7aTyTIN5nbVLac/+M8MY/qOjZksCgYEA1Q1o\n"
+ "L8kjSavU2xhQmSgZb9W62Do60sa3e73ljrDPoiyvbExldpSdziFYxHBD/Rep0ePf\n"
+ "eVSGS3VSwevt9/jSGo2Oa83TYYns9agBm03oR/Go/DukESdI792NsEM+PRFypVNy\n"
+ "AohWRLj0UU6DV+zLKp0VBavtx0ATeLFX0eN17TECgYBI2O/3Bz7uhQ0JSm+SjFz6\n"
+ "o+2SInp5P2G57aWu4VQWWY3tQ2p+EQzNaWam10UXRrXoxtmc+ktPX9e2AgnoYoyB\n"
+ "myqGcpnUhqHlnZAb999o9r1cYidDQ4uqhLauSTSwwXAFDzjJYsa8o03Y440y6QFh\n"
+ "CVD6yYXXqLJs3g96CqDexwKBgAHxq1+0QCQt8zVElYewO/svQhMzBNJjic0RQIT6\n"
+ "zAo4yij80XgxhvcYiszQEW6/xobpw2JCCS+rFGQ8mOFIXfJsFD6blDAxp/3d2JXo\n"
+ "MhRl+hrDGI4ng5zcsqxHEMxR2m/zwPiQ8eiSn3gWdVBaEsiCwmxY00ScKxFQ3PJH\n"
+ "Vw4hAoGAdZLd8KfjjG6lg7hfpVqavstqVi9LOgkHeCfdjn7JP+76kYrgLk/XdkrP\n"
+ "N/BHhtFVFjOi/mTQfQ5YfZImkm/1ePBy7437DT8BDkOxspa50kK4HPggHnU64h1w\n"
+ "lhdEOj7mAgHwGwwVZWOgs9Lq6vfztnSuhqjha1daESY6kDscPIQ=\n"
"-----END RSA PRIVATE KEY-----\n";
-static EVP_PKEY *
-getkey(void)
+EVP_PKEY *
+ssl_getkey(void)
{
EVP_PKEY *key;
BIO *bio;
@@ -99,15 +117,14 @@ end:
return NULL;
}
-static X509 *
-getcert(void)
+X509 *
+ssl_getcert(EVP_PKEY *key)
{
/* Dummy code to make a quick-and-dirty valid certificate with
OpenSSL. Don't copy this code into your own program! It does a
number of things in a stupid and insecure way. */
X509 *x509 = NULL;
X509_NAME *name = NULL;
- EVP_PKEY *key = getkey();
int nid;
time_t now = time(NULL);
@@ -129,29 +146,25 @@ getcert(void)
X509_set_subject_name(x509, name);
X509_set_issuer_name(x509, name);
+ X509_NAME_free(name);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
- X509_time_adj(X509_get_notBefore(x509), 0, &now);
- now += 3600;
- X509_time_adj(X509_get_notAfter(x509), 0, &now);
-#else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
X509_time_adj(X509_getm_notBefore(x509), 0, &now);
now += 3600;
X509_time_adj(X509_getm_notAfter(x509), 0, &now);
-#endif /* OPENSSL_VERSION_NUMBER */
X509_set_pubkey(x509, key);
tt_assert(0 != X509_sign(x509, key, EVP_sha1()));
return x509;
end:
X509_free(x509);
+ X509_NAME_free(name);
return NULL;
}
static int disable_tls_11_and_12 = 0;
static SSL_CTX *the_ssl_ctx = NULL;
-static SSL_CTX *
+SSL_CTX *
get_ssl_ctx(void)
{
if (the_ssl_ctx)
@@ -170,31 +183,137 @@ get_ssl_ctx(void)
return the_ssl_ctx;
}
-static void
+static int test_is_done;
+static int n_connected;
+static int got_close;
+static int got_error;
+static int got_timeout;
+static int renegotiate_at = -1;
+static int stop_when_connected;
+static int pending_connect_events;
+static struct event_base *exit_base;
+static X509 *the_cert;
+EVP_PKEY *the_key;
+
+void
init_ssl(void)
{
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
SSL_library_init();
ERR_load_crypto_strings();
SSL_load_error_strings();
OpenSSL_add_all_algorithms();
- if (OpenSSL_version_num() != OPENSSL_VERSION_NUMBER) {
- TT_DECLARE("WARN", ("Version mismatch for openssl: compiled with %lx but running with %lx", (unsigned long)OPENSSL_VERSION_NUMBER, (unsigned long) OpenSSL_version_num()));
+ if (SSLeay() != OPENSSL_VERSION_NUMBER) {
+ TT_DECLARE("WARN",
+ ("Version mismatch for openssl: compiled with %lx but running with %lx",
+ (unsigned long)OPENSSL_VERSION_NUMBER, (unsigned long)SSLeay()));
}
+#endif
}
+static void *
+ssl_test_setup(const struct testcase_t *testcase)
+{
+ init_ssl();
+
+ the_key = ssl_getkey();
+ EVUTIL_ASSERT(the_key);
+
+ the_cert = ssl_getcert(the_key);
+ EVUTIL_ASSERT(the_cert);
+
+ disable_tls_11_and_12 = 0;
+
+ return basic_test_setup(testcase);
+}
+static int
+ssl_test_cleanup(const struct testcase_t *testcase, void *ptr)
+{
+ int ret = basic_test_cleanup(testcase, ptr);
+ if (!ret) {
+ return ret;
+ }
+
+ test_is_done = 0;
+ n_connected = 0;
+ got_close = 0;
+ got_error = 0;
+ got_timeout = 0;
+ renegotiate_at = -1;
+ stop_when_connected = 0;
+ pending_connect_events = 0;
+ exit_base = NULL;
+
+ X509_free(the_cert);
+ EVP_PKEY_free(the_key);
+
+ SSL_CTX_free(the_ssl_ctx);
+ the_ssl_ctx = NULL;
+
+ return 1;
+}
+const struct testcase_setup_t ssl_setup = {
+ ssl_test_setup, ssl_test_cleanup
+};
+
+
/* ====================
Here's a simple test: we read a number from the input, increment it, and
reply, until we get to 1001.
*/
-static int test_is_done = 0;
-static int n_connected = 0;
-static int got_close = 0;
-static int got_error = 0;
-static int renegotiate_at = -1;
-static int stop_when_connected = 0;
-static int pending_connect_events = 0;
-static struct event_base *exit_base = NULL;
+enum regress_openssl_type
+{
+ REGRESS_OPENSSL_SOCKETPAIR = 1,
+ REGRESS_OPENSSL_FILTER = 2,
+ REGRESS_OPENSSL_RENEGOTIATE = 4,
+ REGRESS_OPENSSL_OPEN = 8,
+ REGRESS_OPENSSL_DIRTY_SHUTDOWN = 16,
+ REGRESS_OPENSSL_FD = 32,
+
+ REGRESS_OPENSSL_CLIENT = 64,
+ REGRESS_OPENSSL_SERVER = 128,
+
+ REGRESS_OPENSSL_FREED = 256,
+ REGRESS_OPENSSL_TIMEOUT = 512,
+ REGRESS_OPENSSL_SLEEP = 1024,
+
+ REGRESS_OPENSSL_CLIENT_WRITE = 2048,
+
+ REGRESS_DEFERRED_CALLBACKS = 4096,
+};
+
+static void
+bufferevent_openssl_check_fd(struct bufferevent *bev, int filter)
+{
+ tt_fd_op(bufferevent_getfd(bev), !=, EVUTIL_INVALID_SOCKET);
+ tt_fd_op(bufferevent_setfd(bev, EVUTIL_INVALID_SOCKET), ==, 0);
+ if (filter) {
+ tt_fd_op(bufferevent_getfd(bev), !=, EVUTIL_INVALID_SOCKET);
+ } else {
+ tt_fd_op(bufferevent_getfd(bev), ==, EVUTIL_INVALID_SOCKET);
+ }
+
+end:
+ ;
+}
+static void
+bufferevent_openssl_check_freed(struct bufferevent *bev)
+{
+ tt_int_op(event_pending(&bev->ev_read, EVLIST_ALL, NULL), ==, 0);
+ tt_int_op(event_pending(&bev->ev_write, EVLIST_ALL, NULL), ==, 0);
+
+end:
+ ;
+}
+
+static void
+free_on_cb(struct bufferevent *bev, void *ctx)
+{
+ TT_BLATHER(("free_on_cb: %p", bev));
+ bufferevent_free(bev);
+}
static void
respond_to_number(struct bufferevent *bev, void *ctx)
@@ -202,6 +321,10 @@ respond_to_number(struct bufferevent *bev, void *ctx)
struct evbuffer *b = bufferevent_get_input(bev);
char *line;
int n;
+
+ enum regress_openssl_type type;
+ type = (enum regress_openssl_type)ctx;
+
line = evbuffer_readln(b, NULL, EVBUFFER_EOL_LF);
if (! line)
return;
@@ -215,7 +338,7 @@ respond_to_number(struct bufferevent *bev, void *ctx)
bufferevent_free(bev); /* Should trigger close on other side. */
return;
}
- if (!strcmp(ctx, "client") && n == renegotiate_at) {
+ if ((type & REGRESS_OPENSSL_CLIENT) && n == renegotiate_at) {
SSL_renegotiate(bufferevent_openssl_get_ssl(bev));
}
++n;
@@ -240,15 +363,19 @@ done_writing_cb(struct bufferevent *bev, void *ctx)
static void
eventcb(struct bufferevent *bev, short what, void *ctx)
{
+ X509 *peer_cert = NULL;
+ enum regress_openssl_type type;
+
+ type = (enum regress_openssl_type)ctx;
+
TT_BLATHER(("Got event %d", (int)what));
if (what & BEV_EVENT_CONNECTED) {
SSL *ssl;
- X509 *peer_cert;
++n_connected;
ssl = bufferevent_openssl_get_ssl(bev);
tt_assert(ssl);
peer_cert = SSL_get_peer_certificate(ssl);
- if (0==strcmp(ctx, "server")) {
+ if (type & REGRESS_OPENSSL_SERVER) {
tt_assert(peer_cert == NULL);
} else {
tt_assert(peer_cert != NULL);
@@ -257,26 +384,55 @@ eventcb(struct bufferevent *bev, short what, void *ctx)
if (--pending_connect_events == 0)
event_base_loopexit(exit_base, NULL);
}
+
+ if ((type & REGRESS_OPENSSL_CLIENT_WRITE) && (type & REGRESS_OPENSSL_CLIENT))
+ evbuffer_add_printf(bufferevent_get_output(bev), "1\n");
} else if (what & BEV_EVENT_EOF) {
TT_BLATHER(("Got a good EOF"));
++got_close;
+ if (type & REGRESS_OPENSSL_FD) {
+ bufferevent_openssl_check_fd(bev, type & REGRESS_OPENSSL_FILTER);
+ }
+ if (type & REGRESS_OPENSSL_FREED) {
+ bufferevent_openssl_check_freed(bev);
+ }
bufferevent_free(bev);
} else if (what & BEV_EVENT_ERROR) {
TT_BLATHER(("Got an error."));
++got_error;
+ if (type & REGRESS_OPENSSL_FD) {
+ bufferevent_openssl_check_fd(bev, type & REGRESS_OPENSSL_FILTER);
+ }
+ if (type & REGRESS_OPENSSL_FREED) {
+ bufferevent_openssl_check_freed(bev);
+ }
+ bufferevent_free(bev);
+ } else if (what & BEV_EVENT_TIMEOUT) {
+ TT_BLATHER(("Got timeout."));
+ ++got_timeout;
+ if (type & REGRESS_OPENSSL_FD) {
+ bufferevent_openssl_check_fd(bev, type & REGRESS_OPENSSL_FILTER);
+ }
+ if (type & REGRESS_OPENSSL_FREED) {
+ bufferevent_openssl_check_freed(bev);
+ }
bufferevent_free(bev);
}
+
end:
- ;
+ if (peer_cert)
+ X509_free(peer_cert);
}
static void
open_ssl_bufevs(struct bufferevent **bev1_out, struct bufferevent **bev2_out,
struct event_base *base, int is_open, int flags, SSL *ssl1, SSL *ssl2,
- evutil_socket_t *fd_pair, struct bufferevent **underlying_pair)
+ evutil_socket_t *fd_pair, struct bufferevent **underlying_pair,
+ enum regress_openssl_type type)
{
int state1 = is_open ? BUFFEREVENT_SSL_OPEN :BUFFEREVENT_SSL_CONNECTING;
int state2 = is_open ? BUFFEREVENT_SSL_OPEN :BUFFEREVENT_SSL_ACCEPTING;
+ int dirty_shutdown = type & REGRESS_OPENSSL_DIRTY_SHUTDOWN;
if (fd_pair) {
*bev1_out = bufferevent_openssl_socket_new(
base, fd_pair[0], ssl1, state1, flags);
@@ -290,9 +446,12 @@ open_ssl_bufevs(struct bufferevent **bev1_out, struct bufferevent **bev2_out,
}
bufferevent_setcb(*bev1_out, respond_to_number, done_writing_cb,
- eventcb, (void*)"client");
+ eventcb, (void*)(REGRESS_OPENSSL_CLIENT | (long)type));
bufferevent_setcb(*bev2_out, respond_to_number, done_writing_cb,
- eventcb, (void*)"server");
+ eventcb, (void*)(REGRESS_OPENSSL_SERVER | (long)type));
+
+ bufferevent_openssl_set_allow_dirty_shutdown(*bev1_out, dirty_shutdown);
+ bufferevent_openssl_set_allow_dirty_shutdown(*bev2_out, dirty_shutdown);
}
static void
@@ -302,22 +461,16 @@ regress_bufferevent_openssl(void *arg)
struct bufferevent *bev1, *bev2;
SSL *ssl1, *ssl2;
- X509 *cert = getcert();
- EVP_PKEY *key = getkey();
- const int start_open = strstr((char*)data->setup_data, "open")!=NULL;
- const int filter = strstr((char*)data->setup_data, "filter")!=NULL;
int flags = BEV_OPT_DEFER_CALLBACKS;
struct bufferevent *bev_ll[2] = { NULL, NULL };
evutil_socket_t *fd_pair = NULL;
- tt_assert(cert);
- tt_assert(key);
-
- init_ssl();
+ enum regress_openssl_type type;
+ type = (enum regress_openssl_type)data->setup_data;
- if (strstr((char*)data->setup_data, "renegotiate")) {
- if (OpenSSL_version_num() >= 0x10001000 &&
- OpenSSL_version_num() < 0x1000104f) {
+ if (type & REGRESS_OPENSSL_RENEGOTIATE) {
+ if (OPENSSL_VERSION_NUMBER >= 0x10001000 &&
+ OPENSSL_VERSION_NUMBER < 0x1000104f) {
/* 1.0.1 up to 1.0.1c has a bug where TLS1.1 and 1.2
* can't renegotiate with themselves. Disable. */
disable_tls_11_and_12 = 1;
@@ -328,14 +481,14 @@ regress_bufferevent_openssl(void *arg)
ssl1 = SSL_new(get_ssl_ctx());
ssl2 = SSL_new(get_ssl_ctx());
- SSL_use_certificate(ssl2, cert);
- SSL_use_PrivateKey(ssl2, key);
+ SSL_use_certificate(ssl2, the_cert);
+ SSL_use_PrivateKey(ssl2, the_key);
- if (! start_open)
+ if (!(type & REGRESS_OPENSSL_OPEN))
flags |= BEV_OPT_CLOSE_ON_FREE;
- if (!filter) {
- tt_assert(strstr((char*)data->setup_data, "socketpair"));
+ if (!(type & REGRESS_OPENSSL_FILTER)) {
+ tt_assert(type & REGRESS_OPENSSL_SOCKETPAIR);
fd_pair = data->pair;
} else {
bev_ll[0] = bufferevent_socket_new(data->base, data->pair[0],
@@ -345,15 +498,15 @@ regress_bufferevent_openssl(void *arg)
}
open_ssl_bufevs(&bev1, &bev2, data->base, 0, flags, ssl1, ssl2,
- fd_pair, bev_ll);
+ fd_pair, bev_ll, type);
- if (!filter) {
- tt_int_op(bufferevent_getfd(bev1), ==, data->pair[0]);
+ if (!(type & REGRESS_OPENSSL_FILTER)) {
+ tt_fd_op(bufferevent_getfd(bev1), ==, data->pair[0]);
} else {
tt_ptr_op(bufferevent_get_underlying(bev1), ==, bev_ll[0]);
}
- if (start_open) {
+ if (type & REGRESS_OPENSSL_OPEN) {
pending_connect_events = 2;
stop_when_connected = 1;
exit_base = data->base;
@@ -365,52 +518,209 @@ regress_bufferevent_openssl(void *arg)
bufferevent_free(bev2);
bev1 = bev2 = NULL;
open_ssl_bufevs(&bev1, &bev2, data->base, 1, flags, ssl1, ssl2,
- fd_pair, bev_ll);
+ fd_pair, bev_ll, type);
}
- bufferevent_enable(bev1, EV_READ|EV_WRITE);
- bufferevent_enable(bev2, EV_READ|EV_WRITE);
+ if (!(type & REGRESS_OPENSSL_TIMEOUT)) {
+ bufferevent_enable(bev1, EV_READ|EV_WRITE);
+ bufferevent_enable(bev2, EV_READ|EV_WRITE);
+
+ if (!(type & REGRESS_OPENSSL_CLIENT_WRITE))
+ evbuffer_add_printf(bufferevent_get_output(bev1), "1\n");
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_is_done == 1);
+ tt_assert(n_connected == 2);
+
+ /* We don't handle shutdown properly yet */
+ if (type & REGRESS_OPENSSL_DIRTY_SHUTDOWN) {
+ tt_int_op(got_close, ==, 1);
+ tt_int_op(got_error, ==, 0);
+ } else {
+ tt_int_op(got_error, ==, 1);
+ }
+ tt_int_op(got_timeout, ==, 0);
+ } else {
+ struct timeval t = { 2, 0 };
+
+ bufferevent_enable(bev1, EV_READ|EV_WRITE);
+ bufferevent_disable(bev2, EV_READ|EV_WRITE);
- evbuffer_add_printf(bufferevent_get_output(bev1), "1\n");
+ bufferevent_set_timeouts(bev1, &t, &t);
- event_base_dispatch(data->base);
+ if (!(type & REGRESS_OPENSSL_CLIENT_WRITE))
+ evbuffer_add_printf(bufferevent_get_output(bev1), "1\n");
- tt_assert(test_is_done == 1);
- tt_assert(n_connected == 2);
+ event_base_dispatch(data->base);
+
+ tt_assert(test_is_done == 0);
+ tt_assert(n_connected == 0);
+
+ tt_int_op(got_close, ==, 0);
+ tt_int_op(got_error, ==, 0);
+ tt_int_op(got_timeout, ==, 1);
+
+ bufferevent_free(bev2);
+ }
- /* We don't handle shutdown properly yet.
- tt_int_op(got_close, ==, 1);
- tt_int_op(got_error, ==, 0);
- */
end:
return;
}
static void
+acceptcb_deferred(evutil_socket_t fd, short events, void *arg)
+{
+ struct bufferevent *bev = arg;
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+}
+static void
acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
struct sockaddr *addr, int socklen, void *arg)
{
struct basic_test_data *data = arg;
struct bufferevent *bev;
+ enum regress_openssl_type type;
SSL *ssl = SSL_new(get_ssl_ctx());
- SSL_use_certificate(ssl, getcert());
- SSL_use_PrivateKey(ssl, getkey());
+ type = (enum regress_openssl_type)data->setup_data;
+
+ SSL_use_certificate(ssl, the_cert);
+ SSL_use_PrivateKey(ssl, the_key);
bev = bufferevent_openssl_socket_new(
- data->base,
- fd,
- ssl,
- BUFFEREVENT_SSL_ACCEPTING,
+ data->base, fd, ssl, BUFFEREVENT_SSL_ACCEPTING,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ tt_assert(bev);
bufferevent_setcb(bev, respond_to_number, NULL, eventcb,
- (void*)"server");
+ (void*)(REGRESS_OPENSSL_SERVER));
- bufferevent_enable(bev, EV_READ|EV_WRITE);
+ if (type & REGRESS_OPENSSL_SLEEP) {
+ struct timeval when = { 1, 0 };
+ event_base_once(data->base, -1, EV_TIMEOUT,
+ acceptcb_deferred, bev, &when);
+ bufferevent_disable(bev, EV_READ|EV_WRITE);
+ } else {
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+ }
/* Only accept once, then disable ourself. */
evconnlistener_disable(listener);
+
+end:
+ ;
+}
+
+struct rwcount
+{
+ evutil_socket_t fd;
+ size_t read;
+ size_t write;
+};
+static int
+bio_rwcount_new(BIO *b)
+{
+ BIO_set_init(b, 0);
+ BIO_set_data(b, NULL);
+ return 1;
+}
+static int
+bio_rwcount_free(BIO *b)
+{
+ TT_BLATHER(("bio_rwcount_free: %p", b));
+ if (!b)
+ return 0;
+ if (BIO_get_shutdown(b)) {
+ BIO_set_init(b, 0);
+ BIO_set_data(b, NULL);
+ }
+ return 1;
+}
+static int
+bio_rwcount_read(BIO *b, char *out, int outlen)
+{
+ struct rwcount *rw = BIO_get_data(b);
+ ev_ssize_t ret = recv(rw->fd, out, outlen, 0);
+ ++rw->read;
+ if (ret == -1 && EVUTIL_ERR_RW_RETRIABLE(EVUTIL_SOCKET_ERROR())) {
+ BIO_set_retry_read(b);
+ }
+ return ret;
+}
+static int
+bio_rwcount_write(BIO *b, const char *in, int inlen)
+{
+ struct rwcount *rw = BIO_get_data(b);
+ ev_ssize_t ret = send(rw->fd, in, inlen, 0);
+ ++rw->write;
+ if (ret == -1 && EVUTIL_ERR_RW_RETRIABLE(EVUTIL_SOCKET_ERROR())) {
+ BIO_set_retry_write(b);
+ }
+ return ret;
+}
+static long
+bio_rwcount_ctrl(BIO *b, int cmd, long num, void *ptr)
+{
+ struct rwcount *rw = BIO_get_data(b);
+ long ret = 0;
+ switch (cmd) {
+ case BIO_C_GET_FD:
+ ret = rw->fd;
+ break;
+ case BIO_CTRL_GET_CLOSE:
+ ret = BIO_get_shutdown(b);
+ break;
+ case BIO_CTRL_SET_CLOSE:
+ BIO_set_shutdown(b, (int)num);
+ break;
+ case BIO_CTRL_PENDING:
+ ret = 0;
+ break;
+ case BIO_CTRL_WPENDING:
+ ret = 0;
+ break;
+ case BIO_CTRL_DUP:
+ case BIO_CTRL_FLUSH:
+ ret = 1;
+ break;
+ }
+ return ret;
+}
+static int
+bio_rwcount_puts(BIO *b, const char *s)
+{
+ return bio_rwcount_write(b, s, strlen(s));
+}
+#define BIO_TYPE_LIBEVENT_RWCOUNT 0xff1
+static BIO_METHOD *methods_rwcount;
+
+static BIO_METHOD *
+BIO_s_rwcount(void)
+{
+ if (methods_rwcount == NULL) {
+ methods_rwcount = BIO_meth_new(BIO_TYPE_LIBEVENT_RWCOUNT, "rwcount");
+ if (methods_rwcount == NULL)
+ return NULL;
+ BIO_meth_set_write(methods_rwcount, bio_rwcount_write);
+ BIO_meth_set_read(methods_rwcount, bio_rwcount_read);
+ BIO_meth_set_puts(methods_rwcount, bio_rwcount_puts);
+ BIO_meth_set_ctrl(methods_rwcount, bio_rwcount_ctrl);
+ BIO_meth_set_create(methods_rwcount, bio_rwcount_new);
+ BIO_meth_set_destroy(methods_rwcount, bio_rwcount_free);
+ }
+ return methods_rwcount;
+}
+static BIO *
+BIO_new_rwcount(int close_flag)
+{
+ BIO *result;
+ if (!(result = BIO_new(BIO_s_rwcount())))
+ return NULL;
+ BIO_set_init(result, 1);
+ BIO_set_data(result, NULL);
+ BIO_set_shutdown(result, !!close_flag);
+ return result;
}
static void
@@ -425,8 +735,11 @@ regress_bufferevent_openssl_connect(void *arg)
struct sockaddr_in sin;
struct sockaddr_storage ss;
ev_socklen_t slen;
+ SSL *ssl;
+ struct rwcount rw = { -1, 0, 0 };
+ enum regress_openssl_type type;
- init_ssl();
+ type = (enum regress_openssl_type)data->setup_data;
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
@@ -442,51 +755,324 @@ regress_bufferevent_openssl_connect(void *arg)
tt_assert(listener);
tt_assert(evconnlistener_get_fd(listener) >= 0);
+ ssl = SSL_new(get_ssl_ctx());
+ tt_assert(ssl);
+
bev = bufferevent_openssl_socket_new(
- data->base, -1, SSL_new(get_ssl_ctx()),
+ data->base, -1, ssl,
BUFFEREVENT_SSL_CONNECTING,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
tt_assert(bev);
- bufferevent_setcb(bev, respond_to_number, NULL, eventcb,
- (void*)"client");
+ bufferevent_setcb(bev, respond_to_number, free_on_cb, eventcb,
+ (void*)(REGRESS_OPENSSL_CLIENT));
tt_assert(getsockname(evconnlistener_get_fd(listener),
(struct sockaddr*)&ss, &slen) == 0);
tt_assert(slen == sizeof(struct sockaddr_in));
tt_int_op(((struct sockaddr*)&ss)->sa_family, ==, AF_INET);
- tt_int_op(((struct sockaddr*)&ss)->sa_family, ==, AF_INET);
tt_assert(0 ==
bufferevent_socket_connect(bev, (struct sockaddr*)&ss, slen));
+ /* Possible only when we have fd, since be_openssl can and will overwrite
+ * bio otherwise before */
+ if (type & REGRESS_OPENSSL_SLEEP) {
+ BIO *bio;
+
+ rw.fd = bufferevent_getfd(bev);
+ bio = BIO_new_rwcount(0);
+ tt_assert(bio);
+ BIO_set_data(bio, &rw);
+ SSL_set_bio(ssl, bio, bio);
+ }
evbuffer_add_printf(bufferevent_get_output(bev), "1\n");
bufferevent_enable(bev, EV_READ|EV_WRITE);
event_base_dispatch(base);
+
+ tt_int_op(rw.read, <=, 100);
+ tt_int_op(rw.write, <=, 100);
end:
- ;
+ evconnlistener_free(listener);
}
-struct testcase_t ssl_testcases[] = {
+struct wm_context
+{
+ int server;
+ int flags;
+ struct evbuffer *data;
+ size_t to_read;
+ size_t wm_high;
+ size_t limit;
+ size_t get;
+ struct bufferevent *bev;
+ struct wm_context *neighbour;
+};
+static void
+wm_transfer(struct bufferevent *bev, void *arg)
+{
+ struct wm_context *ctx = arg;
+ struct evbuffer *in = bufferevent_get_input(bev);
+ struct evbuffer *out = bufferevent_get_output(bev);
+ size_t len = evbuffer_get_length(in);
+ size_t drain = len < ctx->to_read ? len : ctx->to_read;
+
+ if (ctx->get >= ctx->limit) {
+ TT_BLATHER(("wm_transfer-%s(%p): break",
+ ctx->server ? "server" : "client", bev));
+ bufferevent_setcb(bev, NULL, NULL, NULL, NULL);
+ bufferevent_disable(bev, EV_READ);
+ if (ctx->neighbour->get >= ctx->neighbour->limit) {
+ event_base_loopbreak(bufferevent_get_base(bev));
+ }
+ } else {
+ ctx->get += drain;
+ evbuffer_drain(in, drain);
+ }
+
+ TT_BLATHER(("wm_transfer-%s(%p): "
+ "in: " EV_SIZE_FMT ", "
+ "out: " EV_SIZE_FMT ", "
+ "got: " EV_SIZE_FMT "",
+ ctx->server ? "server" : "client", bev,
+ evbuffer_get_length(in),
+ evbuffer_get_length(out),
+ ctx->get));
+
+ evbuffer_add_buffer_reference(out, ctx->data);
+}
+static void
+wm_eventcb(struct bufferevent *bev, short what, void *arg)
+{
+ struct wm_context *ctx = arg;
+ TT_BLATHER(("wm_eventcb-%s(%p): %i",
+ ctx->server ? "server" : "client", bev, what));
+ if (what & BEV_EVENT_CONNECTED) {
+ } else {
+ ctx->get = 0;
+ }
+}
+static void
+wm_acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *addr, int socklen, void *arg)
+{
+ struct wm_context *ctx = arg;
+ struct bufferevent *bev;
+ struct event_base *base = evconnlistener_get_base(listener);
+ SSL *ssl = SSL_new(get_ssl_ctx());
+
+ SSL_use_certificate(ssl, the_cert);
+ SSL_use_PrivateKey(ssl, the_key);
+
+ bev = bufferevent_openssl_socket_new(
+ base, fd, ssl, BUFFEREVENT_SSL_ACCEPTING, ctx->flags);
+
+ TT_BLATHER(("wm_transfer-%s(%p): accept",
+ ctx->server ? "server" : "client", bev));
- { "bufferevent_socketpair", regress_bufferevent_openssl, TT_ISOLATED,
- &basic_setup, (void*)"socketpair" },
+ bufferevent_setwatermark(bev, EV_READ, 0, ctx->wm_high);
+ bufferevent_setcb(bev, wm_transfer, NULL, wm_eventcb, ctx);
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+ ctx->bev = bev;
+
+ /* Only accept once, then disable ourself. */
+ evconnlistener_disable(listener);
+}
+static void
+regress_bufferevent_openssl_wm(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+
+ struct evconnlistener *listener;
+ struct bufferevent *bev;
+ struct sockaddr_in sin;
+ struct sockaddr_storage ss;
+ enum regress_openssl_type type =
+ (enum regress_openssl_type)data->setup_data;
+ int bev_flags = BEV_OPT_CLOSE_ON_FREE;
+ ev_socklen_t slen;
+ SSL *ssl;
+ struct wm_context client, server;
+ char *payload;
+ size_t payload_len = 1<<10;
+ size_t wm_high = 5<<10;
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001);
+
+ memset(&ss, 0, sizeof(ss));
+ slen = sizeof(ss);
+
+ if (type & REGRESS_DEFERRED_CALLBACKS)
+ bev_flags |= BEV_OPT_DEFER_CALLBACKS;
+
+ memset(&client, 0, sizeof(client));
+ memset(&server, 0, sizeof(server));
+ client.server = 0;
+ server.server = 1;
+ client.flags = server.flags = bev_flags;
+ client.data = evbuffer_new();
+ server.data = evbuffer_new();
+ payload = calloc(1, payload_len);
+ memset(payload, 'A', payload_len);
+ evbuffer_add(server.data, payload, payload_len);
+ evbuffer_add(client.data, payload, payload_len);
+ client.wm_high = server.wm_high = wm_high;
+ client.limit = server.limit = wm_high<<3;
+ client.to_read = server.to_read = payload_len>>1;
+
+ TT_BLATHER(("openssl_wm: "
+ "payload_len = " EV_SIZE_FMT ", "
+ "wm_high = " EV_SIZE_FMT ", "
+ "limit = " EV_SIZE_FMT ", "
+ "to_read: " EV_SIZE_FMT "",
+ payload_len,
+ wm_high,
+ server.limit,
+ server.to_read));
+
+ listener = evconnlistener_new_bind(base, wm_acceptcb, &server,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
+ -1, (struct sockaddr *)&sin, sizeof(sin));
+
+ tt_assert(listener);
+ tt_assert(evconnlistener_get_fd(listener) >= 0);
+
+ ssl = SSL_new(get_ssl_ctx());
+ tt_assert(ssl);
+
+ if (type & REGRESS_OPENSSL_FILTER) {
+ bev = bufferevent_socket_new(data->base, -1, client.flags);
+ tt_assert(bev);
+ bev = bufferevent_openssl_filter_new(
+ base, bev, ssl, BUFFEREVENT_SSL_CONNECTING, client.flags);
+ } else {
+ bev = bufferevent_openssl_socket_new(
+ data->base, -1, ssl,
+ BUFFEREVENT_SSL_CONNECTING,
+ client.flags);
+ }
+ tt_assert(bev);
+ client.bev = bev;
+
+ server.neighbour = &client;
+ client.neighbour = &server;
+
+ bufferevent_setwatermark(bev, EV_READ, 0, client.wm_high);
+ bufferevent_setcb(bev, wm_transfer, NULL, wm_eventcb, &client);
+
+ tt_assert(getsockname(evconnlistener_get_fd(listener),
+ (struct sockaddr*)&ss, &slen) == 0);
+
+ tt_assert(!bufferevent_socket_connect(bev, (struct sockaddr*)&ss, slen));
+ tt_assert(!evbuffer_add_buffer_reference(bufferevent_get_output(bev), client.data));
+ tt_assert(!bufferevent_enable(bev, EV_READ|EV_WRITE));
+
+ event_base_dispatch(base);
+
+ tt_int_op(client.get, ==, client.limit);
+ tt_int_op(server.get, ==, server.limit);
+
+end:
+ free(payload);
+ evbuffer_free(client.data);
+ evbuffer_free(server.data);
+ evconnlistener_free(listener);
+ bufferevent_free(client.bev);
+ bufferevent_free(server.bev);
+
+ /* XXX: by some reason otherise there is a leak */
+ if (!(type & REGRESS_OPENSSL_FILTER))
+ event_base_loop(base, EVLOOP_ONCE);
+}
+
+struct testcase_t ssl_testcases[] = {
+#define T(a) ((void *)(a))
+ { "bufferevent_socketpair", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup, T(REGRESS_OPENSSL_SOCKETPAIR) },
+ { "bufferevent_socketpair_write_after_connect", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR|REGRESS_OPENSSL_CLIENT_WRITE) },
{ "bufferevent_filter", regress_bufferevent_openssl,
- TT_ISOLATED,
- &basic_setup, (void*)"filter" },
+ TT_ISOLATED, &ssl_setup, T(REGRESS_OPENSSL_FILTER) },
+ { "bufferevent_filter_write_after_connect", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_FILTER|REGRESS_OPENSSL_CLIENT_WRITE) },
{ "bufferevent_renegotiate_socketpair", regress_bufferevent_openssl,
- TT_ISOLATED,
- &basic_setup, (void*)"socketpair renegotiate" },
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_RENEGOTIATE) },
{ "bufferevent_renegotiate_filter", regress_bufferevent_openssl,
- TT_ISOLATED,
- &basic_setup, (void*)"filter renegotiate" },
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_RENEGOTIATE) },
{ "bufferevent_socketpair_startopen", regress_bufferevent_openssl,
- TT_ISOLATED, &basic_setup, (void*)"socketpair open" },
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_OPEN) },
{ "bufferevent_filter_startopen", regress_bufferevent_openssl,
- TT_ISOLATED, &basic_setup, (void*)"filter open" },
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_OPEN) },
+
+ { "bufferevent_socketpair_dirty_shutdown", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
+ { "bufferevent_filter_dirty_shutdown", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
+ { "bufferevent_renegotiate_socketpair_dirty_shutdown",
+ regress_bufferevent_openssl,
+ TT_ISOLATED,
+ &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_RENEGOTIATE | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
+ { "bufferevent_renegotiate_filter_dirty_shutdown",
+ regress_bufferevent_openssl,
+ TT_ISOLATED,
+ &ssl_setup,
+ T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_RENEGOTIATE | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
+ { "bufferevent_socketpair_startopen_dirty_shutdown",
+ regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_OPEN | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
+ { "bufferevent_filter_startopen_dirty_shutdown",
+ regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_OPEN | REGRESS_OPENSSL_DIRTY_SHUTDOWN) },
+
+ { "bufferevent_socketpair_fd", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_FD) },
+ { "bufferevent_socketpair_freed", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_FREED) },
+ { "bufferevent_socketpair_freed_fd", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_FREED | REGRESS_OPENSSL_FD) },
+ { "bufferevent_filter_freed_fd", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_FILTER | REGRESS_OPENSSL_FREED | REGRESS_OPENSSL_FD) },
+
+ { "bufferevent_socketpair_timeout", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_TIMEOUT) },
+ { "bufferevent_socketpair_timeout_freed_fd", regress_bufferevent_openssl,
+ TT_ISOLATED, &ssl_setup,
+ T(REGRESS_OPENSSL_SOCKETPAIR | REGRESS_OPENSSL_TIMEOUT | REGRESS_OPENSSL_FREED | REGRESS_OPENSSL_FD) },
{ "bufferevent_connect", regress_bufferevent_openssl_connect,
- TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ TT_FORK|TT_NEED_BASE, &ssl_setup, NULL },
+ { "bufferevent_connect_sleep", regress_bufferevent_openssl_connect,
+ TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_OPENSSL_SLEEP) },
+
+ { "bufferevent_wm", regress_bufferevent_openssl_wm,
+ TT_FORK|TT_NEED_BASE, &ssl_setup, NULL },
+ { "bufferevent_wm_filter", regress_bufferevent_openssl_wm,
+ TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_OPENSSL_FILTER) },
+ { "bufferevent_wm_defer", regress_bufferevent_openssl_wm,
+ TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_DEFERRED_CALLBACKS) },
+ { "bufferevent_wm_filter_defer", regress_bufferevent_openssl_wm,
+ TT_FORK|TT_NEED_BASE, &ssl_setup, T(REGRESS_OPENSSL_FILTER|REGRESS_DEFERRED_CALLBACKS) },
+
+#undef T
END_OF_TESTCASES,
};
diff --git a/contrib/ntp/sntp/libevent/test/regress_testutils.c b/contrib/ntp/sntp/libevent/test/regress_testutils.c
index 1f0046031fd4..b0ce7dbba2a6 100644
--- a/contrib/ntp/sntp/libevent/test/regress_testutils.c
+++ b/contrib/ntp/sntp/libevent/test/regress_testutils.c
@@ -110,7 +110,7 @@ regress_get_dnsserver(struct event_base *base,
memset(&my_addr, 0, sizeof(my_addr));
my_addr.sin_family = AF_INET;
my_addr.sin_port = htons(*portnum);
- my_addr.sin_addr.s_addr = htonl(0x7f000001UL);
+ my_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr)) < 0) {
evutil_closesocket(sock);
tt_abort_perror("bind");
@@ -129,17 +129,28 @@ end:
void
regress_clean_dnsserver(void)
{
- if (dns_port)
+ if (dns_port) {
evdns_close_server_port(dns_port);
- if (dns_sock >= 0)
+ dns_port = NULL;
+ }
+ if (dns_sock >= 0) {
evutil_closesocket(dns_sock);
+ dns_sock = -1;
+ }
}
+static void strtolower(char *s)
+{
+ while (*s) {
+ *s = EVUTIL_TOLOWER_(*s);
+ ++s;
+ }
+}
void
regress_dns_server_cb(struct evdns_server_request *req, void *data)
{
struct regress_dns_server_table *tab = data;
- const char *question;
+ char *question;
if (req->nquestions != 1)
TT_DIE(("Only handling one question at a time; got %d",
@@ -155,6 +166,9 @@ regress_dns_server_cb(struct evdns_server_request *req, void *data)
++tab->seen;
+ if (tab->lower)
+ strtolower(question);
+
if (!strcmp(tab->anstype, "err")) {
int err = atoi(tab->ans);
tt_assert(! evdns_server_request_respond(req, err));
diff --git a/contrib/ntp/sntp/libevent/test/regress_testutils.h b/contrib/ntp/sntp/libevent/test/regress_testutils.h
index f90b9c997ab5..040516a5858e 100644
--- a/contrib/ntp/sntp/libevent/test/regress_testutils.h
+++ b/contrib/ntp/sntp/libevent/test/regress_testutils.h
@@ -34,6 +34,7 @@ struct regress_dns_server_table {
const char *anstype;
const char *ans;
int seen;
+ int lower;
};
struct evdns_server_port *
diff --git a/contrib/ntp/sntp/libevent/test/regress_thread.c b/contrib/ntp/sntp/libevent/test/regress_thread.c
index c42668ea8839..1e0ce41ff95e 100644
--- a/contrib/ntp/sntp/libevent/test/regress_thread.c
+++ b/contrib/ntp/sntp/libevent/test/regress_thread.c
@@ -376,7 +376,7 @@ thread_conditions_simple(void *arg)
}
evutil_timeradd(target_delay, &launched_at, &target_time);
test_timeval_diff_leq(&target_time, &alerted[i].alerted_at,
- 0, 50);
+ 0, 200);
}
tt_int_op(n_broadcast + n_signal + n_timed_out, ==, NUM_THREADS);
tt_int_op(n_signal, ==, 1);
@@ -564,8 +564,8 @@ end:
;
}
-#define TEST(name) \
- { #name, thread_##name, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE, \
+#define TEST(name, f) \
+ { #name, thread_##name, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE|(f), \
&basic_setup, NULL }
struct testcase_t thread_testcases[] = {
@@ -575,11 +575,16 @@ struct testcase_t thread_testcases[] = {
{ "forking", thread_basic, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE,
&basic_setup, (char*)"forking" },
#endif
- TEST(conditions_simple),
+ TEST(conditions_simple, TT_RETRIABLE),
{ "deferred_cb_skew", thread_deferred_cb_skew,
TT_FORK|TT_NEED_THREADS|TT_OFF_BY_DEFAULT,
&basic_setup, NULL },
- TEST(no_events),
+#ifndef _WIN32
+ /****** XXX TODO FIXME windows seems to be having some timing trouble,
+ * looking into it now. / ellzey
+ ******/
+ TEST(no_events, TT_RETRIABLE),
+#endif
END_OF_TESTCASES
};
diff --git a/contrib/ntp/sntp/libevent/test/regress_thread.h b/contrib/ntp/sntp/libevent/test/regress_thread.h
index 831b51e50739..a954fefa5611 100644
--- a/contrib/ntp/sntp/libevent/test/regress_thread.h
+++ b/contrib/ntp/sntp/libevent/test/regress_thread.h
@@ -27,22 +27,30 @@
#ifndef REGRESS_THREAD_H_INCLUDED_
#define REGRESS_THREAD_H_INCLUDED_
-#ifdef EVENT__HAVE_PTHREADS
+#if defined(_WIN32) /** _WIN32 */
+#define THREAD_T void * /* HANDLE */
+#define THREAD_FN unsigned __stdcall
+#define THREAD_RETURN() return (0)
+#define THREAD_SELF() GetCurrentThreadId()
+#define THREAD_START(threadvar, fn, arg) do { \
+ uintptr_t threadhandle = _beginthreadex(NULL,0,fn,(arg),0,NULL); \
+ (threadvar) = (THREAD_T)threadhandle; \
+ thread_setup(threadvar); \
+} while (0)
+#define THREAD_JOIN(th) WaitForSingleObject(th, INFINITE)
+#else /* !_WIN32 */
+#include <pthread.h>
#define THREAD_T pthread_t
#define THREAD_FN void *
#define THREAD_RETURN() return (NULL)
-#define THREAD_START(threadvar, fn, arg) \
- pthread_create(&(threadvar), NULL, fn, arg)
+#define THREAD_SELF() pthread_self()
+#define THREAD_START(threadvar, fn, arg) do { \
+ if (!pthread_create(&(threadvar), NULL, fn, arg)) \
+ thread_setup(threadvar); \
+} while (0)
#define THREAD_JOIN(th) pthread_join(th, NULL)
-#else
-#define THREAD_T HANDLE
-#define THREAD_FN unsigned __stdcall
-#define THREAD_RETURN() return (0)
-#define THREAD_START(threadvar, fn, arg) do { \
- uintptr_t threadhandle = _beginthreadex(NULL,0,fn,(arg),0,NULL); \
- (threadvar) = (HANDLE) threadhandle; \
- } while (0)
-#define THREAD_JOIN(th) WaitForSingleObject(th, INFINITE)
-#endif
+#endif /* \!_WIN32 */
+
+void thread_setup(THREAD_T pthread);
#endif
diff --git a/contrib/ntp/sntp/libevent/test/regress_util.c b/contrib/ntp/sntp/libevent/test/regress_util.c
index 60f085bf1db3..45caa2700a40 100644
--- a/contrib/ntp/sntp/libevent/test/regress_util.c
+++ b/contrib/ntp/sntp/libevent/test/regress_util.c
@@ -23,6 +23,10 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+/** For event_debug() usage/coverage */
+#define EVENT_VISIBILITY_WANT_DLLIMPORT
+
#include "../util-internal.h"
#ifdef _WIN32
@@ -207,6 +211,65 @@ regress_ipv6_parse(void *ptr)
#endif
}
+static struct ipv6_entry_scope {
+ const char *addr;
+ ev_uint32_t res[4];
+ unsigned scope;
+ enum entry_status status;
+} ipv6_entries_scope[] = {
+ { "2001:DB8::", { 0x20010db8, 0, 0 }, 0, NORMAL },
+ { "2001:DB8::%0", { 0x20010db8, 0, 0, 0 }, 0, NORMAL },
+ { "2001:DB8::%1", { 0x20010db8, 0, 0, 0 }, 1, NORMAL },
+ { "foobar.", { 0, 0, 0, 0 }, 0, BAD },
+ { "2001:DB8::%does-not-exist", { 0, 0, 0, 0 }, 0, BAD },
+ { NULL, { 0, 0, 0, 0, }, 0, BAD },
+};
+static void
+regress_ipv6_parse_scope(void *ptr)
+{
+#ifdef AF_INET6
+ int i, j;
+ unsigned if_scope;
+
+ for (i = 0; ipv6_entries_scope[i].addr; ++i) {
+ struct ipv6_entry_scope *ent = &ipv6_entries_scope[i];
+ struct in6_addr in6;
+ int r;
+ r = evutil_inet_pton_scope(AF_INET6, ent->addr, &in6,
+ &if_scope);
+ if (r == 0) {
+ if (ent->status != BAD)
+ TT_FAIL(("%s did not parse, but it's a good address!",
+ ent->addr));
+ continue;
+ }
+ if (ent->status == BAD) {
+ TT_FAIL(("%s parsed, but we expected an error", ent->addr));
+ continue;
+ }
+ for (j = 0; j < 4; ++j) {
+ /* Can't use s6_addr32 here; some don't have it. */
+ ev_uint32_t u =
+ ((ev_uint32_t)in6.s6_addr[j*4 ] << 24) |
+ ((ev_uint32_t)in6.s6_addr[j*4+1] << 16) |
+ ((ev_uint32_t)in6.s6_addr[j*4+2] << 8) |
+ ((ev_uint32_t)in6.s6_addr[j*4+3]);
+ if (u != ent->res[j]) {
+ TT_FAIL(("%s did not parse as expected.", ent->addr));
+ continue;
+ }
+ }
+ if (if_scope != ent->scope) {
+ TT_FAIL(("%s did not parse as expected.", ent->addr));
+ continue;
+ }
+ }
+#else
+ TT_BLATHER(("Skipping IPv6 address parsing."));
+#endif
+}
+
+
static struct sa_port_ent {
const char *parse;
int safamily;
@@ -922,6 +985,16 @@ end:
}
static void
+test_EVUTIL_IS_(void *arg)
+{
+ tt_int_op(EVUTIL_ISDIGIT_('0'), ==, 1);
+ tt_int_op(EVUTIL_ISDIGIT_('a'), ==, 0);
+ tt_int_op(EVUTIL_ISDIGIT_('\xff'), ==, 0);
+end:
+ ;
+}
+
+static void
test_evutil_getaddrinfo(void *arg)
{
struct evutil_addrinfo *ai = NULL, *a;
@@ -1117,6 +1190,41 @@ end:
evutil_freeaddrinfo(ai);
}
+static void
+test_evutil_getaddrinfo_AI_ADDRCONFIG(void *arg)
+{
+ struct evutil_addrinfo *ai = NULL;
+ struct evutil_addrinfo hints;
+ int r;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = EVUTIL_AI_PASSIVE|EVUTIL_AI_ADDRCONFIG;
+
+ /* IPv4 */
+ r = evutil_getaddrinfo("127.0.0.1", "80", &hints, &ai);
+ tt_int_op(r, ==, 0);
+ tt_assert(ai);
+ tt_ptr_op(ai->ai_next, ==, NULL);
+ test_ai_eq(ai, "127.0.0.1:80", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ /* IPv6 */
+ r = evutil_getaddrinfo("::1", "80", &hints, &ai);
+ tt_int_op(r, ==, 0);
+ tt_assert(ai);
+ tt_ptr_op(ai->ai_next, ==, NULL);
+ test_ai_eq(ai, "[::1]:80", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+end:
+ if (ai)
+ evutil_freeaddrinfo(ai);
+}
+
#ifdef _WIN32
static void
test_evutil_loadsyslib(void *arg)
@@ -1378,9 +1486,164 @@ end:
;
}
+static void
+create_tm_from_unix_epoch(struct tm *cur_p, const time_t t)
+{
+#ifdef _WIN32
+ struct tm *tmp = gmtime(&t);
+ if (!tmp) {
+ fprintf(stderr, "gmtime: %s (%i)", strerror(errno), (int)t);
+ exit(1);
+ }
+ *cur_p = *tmp;
+#else
+ gmtime_r(&t, cur_p);
+#endif
+}
+
+static struct date_rfc1123_case {
+ time_t t;
+ char date[30];
+} date_rfc1123_cases[] = {
+ { 0, "Thu, 01 Jan 1970 00:00:00 GMT"} /* UNIX time of zero */,
+ { 946684799, "Fri, 31 Dec 1999 23:59:59 GMT"} /* the last moment of the 20th century */,
+ { 946684800, "Sat, 01 Jan 2000 00:00:00 GMT"} /* the first moment of the 21st century */,
+ { 981072000, "Fri, 02 Feb 2001 00:00:00 GMT"},
+ { 1015113600, "Sun, 03 Mar 2002 00:00:00 GMT"},
+ { 1049414400, "Fri, 04 Apr 2003 00:00:00 GMT"},
+ { 1083715200, "Wed, 05 May 2004 00:00:00 GMT"},
+ { 1118016000, "Mon, 06 Jun 2005 00:00:00 GMT"},
+ { 1152230400, "Fri, 07 Jul 2006 00:00:00 GMT"},
+ { 1186531200, "Wed, 08 Aug 2007 00:00:00 GMT"},
+ { 1220918400, "Tue, 09 Sep 2008 00:00:00 GMT"},
+ { 1255132800, "Sat, 10 Oct 2009 00:00:00 GMT"},
+ { 1289433600, "Thu, 11 Nov 2010 00:00:00 GMT"},
+ { 1323648000, "Mon, 12 Dec 2011 00:00:00 GMT"},
+#ifndef _WIN32
+#if EVENT__SIZEOF_TIME_T > 4
+ /** In win32 case we have max "23:59:59 January 18, 2038, UTC" for time32 */
+ { 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */,
+ /** In win32 case we have max "23:59:59, December 31, 3000, UTC" for time64 */
+ {253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */,
+#endif /* time_t != 32bit */
+ { 1456704000, "Mon, 29 Feb 2016 00:00:00 GMT"} /* leap year */,
+#endif
+ { 1435708800, "Wed, 01 Jul 2015 00:00:00 GMT"} /* leap second */,
+ { 1481866376, "Fri, 16 Dec 2016 05:32:56 GMT"} /* the time this test case is generated */,
+ {0, ""} /* end of test cases. */
+};
+
+static void
+test_evutil_date_rfc1123(void *arg)
+{
+ struct tm query;
+ char result[30];
+ size_t i = 0;
+
+ /* Checks if too small buffers are safely accepted. */
+ {
+ create_tm_from_unix_epoch(&query, 0);
+ evutil_date_rfc1123(result, 8, &query);
+ tt_str_op(result, ==, "Thu, 01");
+ }
+
+ /* Checks for testcases. */
+ for (i = 0; ; i++) {
+ struct date_rfc1123_case c = date_rfc1123_cases[i];
+
+ if (strlen(c.date) == 0)
+ break;
+
+ create_tm_from_unix_epoch(&query, c.t);
+ evutil_date_rfc1123(result, sizeof(result), &query);
+ tt_str_op(result, ==, c.date);
+ }
+
+end:
+ ;
+}
+
+static void
+test_evutil_v4addr_is_local(void *arg)
+{
+ struct sockaddr_in sin;
+ sin.sin_family = AF_INET;
+
+ /* we use evutil_inet_pton() here to fill in network-byte order */
+#define LOCAL(str, yes) do { \
+ tt_int_op(evutil_inet_pton(AF_INET, str, &sin.sin_addr), ==, 1); \
+ tt_int_op(evutil_v4addr_is_local_(&sin.sin_addr), ==, yes); \
+} while (0)
+
+ /** any */
+ sin.sin_addr.s_addr = INADDR_ANY;
+ tt_int_op(evutil_v4addr_is_local_(&sin.sin_addr), ==, 1);
+
+ /** loopback */
+ sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ tt_int_op(evutil_v4addr_is_local_(&sin.sin_addr), ==, 1);
+ LOCAL("127.0.0.1", 1);
+ LOCAL("127.255.255.255", 1);
+ LOCAL("121.0.0.1", 0);
+
+ /** link-local */
+ LOCAL("169.254.0.1", 1);
+ LOCAL("169.254.255.255", 1);
+ LOCAL("170.0.0.0", 0);
+
+ /** Multicast */
+ LOCAL("224.0.0.0", 1);
+ LOCAL("239.255.255.255", 1);
+ LOCAL("240.0.0.0", 0);
+end:
+ ;
+}
+
+static void
+test_evutil_v6addr_is_local(void *arg)
+{
+ struct sockaddr_in6 sin6;
+ struct in6_addr anyaddr = IN6ADDR_ANY_INIT;
+ struct in6_addr loopback = IN6ADDR_LOOPBACK_INIT;
+
+ sin6.sin6_family = AF_INET6;
+#define LOCAL6(str, yes) do { \
+ tt_int_op(evutil_inet_pton(AF_INET6, str, &sin6.sin6_addr), ==, 1);\
+ tt_int_op(evutil_v6addr_is_local_(&sin6.sin6_addr), ==, yes); \
+} while (0)
+
+ /** any */
+ tt_int_op(evutil_v6addr_is_local_(&anyaddr), ==, 1);
+ LOCAL6("::0", 1);
+
+ /** loopback */
+ tt_int_op(evutil_v6addr_is_local_(&loopback), ==, 1);
+ LOCAL6("::1", 1);
+
+ /** IPV4 mapped */
+ LOCAL6("::ffff:0:0", 1);
+ /** IPv4 translated */
+ LOCAL6("::ffff:0:0:0", 1);
+ /** IPv4/IPv6 translation */
+ LOCAL6("64:ff9b::", 0);
+ /** Link-local */
+ LOCAL6("fe80::", 1);
+ /** Multicast */
+ LOCAL6("ff00::", 1);
+ /** Unspecified */
+ LOCAL6("::", 1);
+
+ /** Global Internet */
+ LOCAL6("2001::", 0);
+ LOCAL6("2001:4860:4802:32::1b", 0);
+end:
+ ;
+}
+
struct testcase_t util_testcases[] = {
{ "ipv4_parse", regress_ipv4_parse, 0, NULL, NULL },
{ "ipv6_parse", regress_ipv6_parse, 0, NULL, NULL },
+ { "ipv6_parse_scope", regress_ipv6_parse_scope, 0, NULL, NULL },
{ "sockaddr_port_parse", regress_sockaddr_port_parse, 0, NULL, NULL },
{ "sockaddr_port_format", regress_sockaddr_port_format, 0, NULL, NULL },
{ "sockaddr_predicates", test_evutil_sockaddr_predicates, 0,NULL,NULL },
@@ -1393,21 +1656,26 @@ struct testcase_t util_testcases[] = {
{ "upcast", test_evutil_upcast, 0, NULL, NULL },
{ "integers", test_evutil_integers, 0, NULL, NULL },
{ "rand", test_evutil_rand, TT_FORK, NULL, NULL },
+ { "EVUTIL_IS_", test_EVUTIL_IS_, 0, NULL, NULL },
{ "getaddrinfo", test_evutil_getaddrinfo, TT_FORK, NULL, NULL },
{ "getaddrinfo_live", test_evutil_getaddrinfo_live, TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
+ { "getaddrinfo_AI_ADDRCONFIG", test_evutil_getaddrinfo_AI_ADDRCONFIG, TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
#ifdef _WIN32
{ "loadsyslib", test_evutil_loadsyslib, TT_FORK, NULL, NULL },
#endif
{ "mm_malloc", test_event_malloc, 0, NULL, NULL },
{ "mm_calloc", test_event_calloc, 0, NULL, NULL },
{ "mm_strdup", test_event_strdup, 0, NULL, NULL },
- { "usleep", test_evutil_usleep, 0, NULL, NULL },
+ { "usleep", test_evutil_usleep, TT_RETRIABLE, NULL, NULL },
{ "monotonic_res", test_evutil_monotonic_res, 0, &basic_setup, (void*)"" },
{ "monotonic_res_precise", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"precise" },
{ "monotonic_res_fallback", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"fallback" },
{ "monotonic_prc", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"" },
- { "monotonic_prc_precise", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"precise" },
+ { "monotonic_prc_precise", test_evutil_monotonic_prc, TT_RETRIABLE, &basic_setup, (void*)"precise" },
{ "monotonic_prc_fallback", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"fallback" },
+ { "date_rfc1123", test_evutil_date_rfc1123, 0, NULL, NULL },
+ { "evutil_v4addr_is_local", test_evutil_v4addr_is_local, 0, NULL, NULL },
+ { "evutil_v6addr_is_local", test_evutil_v6addr_is_local, 0, NULL, NULL },
END_OF_TESTCASES,
};
diff --git a/contrib/ntp/sntp/libevent/test/regress_zlib.c b/contrib/ntp/sntp/libevent/test/regress_zlib.c
index 8406676932ed..5fe774913e26 100644
--- a/contrib/ntp/sntp/libevent/test/regress_zlib.c
+++ b/contrib/ntp/sntp/libevent/test/regress_zlib.c
@@ -143,14 +143,14 @@ zlib_input_filter(struct evbuffer *src, struct evbuffer *dst,
n = evbuffer_peek(src, -1, NULL, v_in, 1);
if (n) {
p->avail_in = v_in[0].iov_len;
- p->next_in = v_in[0].iov_base;
+ p->next_in = (unsigned char *)v_in[0].iov_base;
} else {
p->avail_in = 0;
p->next_in = 0;
}
evbuffer_reserve_space(dst, 4096, v_out, 1);
- p->next_out = v_out[0].iov_base;
+ p->next_out = (unsigned char *)v_out[0].iov_base;
p->avail_out = v_out[0].iov_len;
/* we need to flush zlib if we got a flush */
@@ -197,14 +197,14 @@ zlib_output_filter(struct evbuffer *src, struct evbuffer *dst,
n = evbuffer_peek(src, -1, NULL, v_in, 1);
if (n) {
p->avail_in = v_in[0].iov_len;
- p->next_in = v_in[0].iov_base;
+ p->next_in = (unsigned char *)v_in[0].iov_base;
} else {
p->avail_in = 0;
p->next_in = 0;
}
evbuffer_reserve_space(dst, 4096, v_out, 1);
- p->next_out = v_out[0].iov_base;
+ p->next_out = (unsigned char *)v_out[0].iov_base;
p->avail_out = v_out[0].iov_len;
/* we need to flush zlib if we got a flush */
diff --git a/contrib/ntp/sntp/libevent/test/rpcgen_wrapper.sh b/contrib/ntp/sntp/libevent/test/rpcgen_wrapper.sh
index aaa03031a1f6..fe582d57bd33 100755
--- a/contrib/ntp/sntp/libevent/test/rpcgen_wrapper.sh
+++ b/contrib/ntp/sntp/libevent/test/rpcgen_wrapper.sh
@@ -25,19 +25,10 @@ exit_failed() {
echo "Could not generate regress.gen.\[ch\] using event_rpcgen.sh" >&2
exit 1
}
-
-if [ -x /usr/bin/python2 ] ; then
- PYTHON2=/usr/bin/python2
-elif [ "x`which python2`" != x ] ; then
- PYTHON2=python2
-else
- PYTHON2=python
-fi
-
srcdir=$1
srcdir=${srcdir:-.}
-${PYTHON2} ${srcdir}/../event_rpcgen.py --quiet ${srcdir}/regress.rpc \
+${srcdir}/../event_rpcgen.py --quiet ${srcdir}/regress.rpc \
test/regress.gen.h test/regress.gen.c
case "$?" in
diff --git a/contrib/ntp/sntp/libevent/test/test-changelist.c b/contrib/ntp/sntp/libevent/test/test-changelist.c
index 6e2466d5a55c..fd1a17f5bd59 100644
--- a/contrib/ntp/sntp/libevent/test/test-changelist.c
+++ b/contrib/ntp/sntp/libevent/test/test-changelist.c
@@ -182,11 +182,11 @@ main(int argc, char **argv)
if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
return (1);
- /* Initalize the event library */
+ /* Initialize the event library */
if (!(base = event_base_new()))
return (1);
- /* Initalize a timeout to terminate the test */
+ /* Initialize a timeout to terminate the test */
timeout = evtimer_new(base,timeout_cb,&timeout);
/* and watch for writability on one end of the pipe */
ev = event_new(base,pair[1],EV_WRITE | EV_PERSIST, write_cb, &ev);
diff --git a/contrib/ntp/sntp/libevent/test/test-closed.c b/contrib/ntp/sntp/libevent/test/test-closed.c
index 5b04f354acc9..9e6050408d64 100644
--- a/contrib/ntp/sntp/libevent/test/test-closed.c
+++ b/contrib/ntp/sntp/libevent/test/test-closed.c
@@ -24,6 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "../util-internal.h"
#include "event2/event-config.h"
#ifdef _WIN32
@@ -48,10 +49,6 @@
#include <event.h>
#include <evutil.h>
-#ifdef EVENT____func__
-#define __func__ EVENT____func__
-#endif
-
struct timeval timeout = {3, 0};
static void
@@ -71,10 +68,6 @@ closed_cb(evutil_socket_t fd, short event, void *arg)
exit(1);
}
-#ifndef SHUT_WR
-#define SHUT_WR 1
-#endif
-
int
main(int argc, char **argv)
{
@@ -103,7 +96,7 @@ main(int argc, char **argv)
/* Send some data on socket 0 and immediately close it */
if (send(pair[0], test, (int)strlen(test)+1, 0) < 0)
return (1);
- shutdown(pair[0], SHUT_WR);
+ shutdown(pair[0], EVUTIL_SHUT_WR);
/* Dispatch */
ev = event_new(base, pair[1], EV_CLOSED | EV_TIMEOUT, closed_cb, event_self_cbarg());
@@ -111,6 +104,7 @@ main(int argc, char **argv)
event_base_dispatch(base);
/* Finalize library */
+ event_free(ev);
event_base_free(base);
return 0;
}
diff --git a/contrib/ntp/sntp/libevent/test/test-eof.c b/contrib/ntp/sntp/libevent/test/test-eof.c
index a9ca5343a2ce..de2fd88b991e 100644
--- a/contrib/ntp/sntp/libevent/test/test-eof.c
+++ b/contrib/ntp/sntp/libevent/test/test-eof.c
@@ -24,6 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "../util-internal.h"
#include "event2/event-config.h"
#ifdef _WIN32
@@ -48,10 +49,6 @@
#include <event.h>
#include <evutil.h>
-#ifdef EVENT____func__
-#define __func__ EVENT____func__
-#endif
-
int test_okay = 1;
int called = 0;
struct timeval timeout = {60, 0};
@@ -81,10 +78,6 @@ read_cb(evutil_socket_t fd, short event, void *arg)
called++;
}
-#ifndef SHUT_WR
-#define SHUT_WR 1
-#endif
-
int
main(int argc, char **argv)
{
@@ -107,12 +100,12 @@ main(int argc, char **argv)
if (send(pair[0], test, (int)strlen(test)+1, 0) < 0)
return (1);
- shutdown(pair[0], SHUT_WR);
+ shutdown(pair[0], EVUTIL_SHUT_WR);
- /* Initalize the event library */
+ /* Initialize the event library */
event_init();
- /* Initalize one event */
+ /* Initialize one event */
event_set(&ev, pair[1], EV_READ | EV_TIMEOUT, read_cb, &ev);
event_add(&ev, &timeout);
diff --git a/contrib/ntp/sntp/libevent/test/test-fdleak.c b/contrib/ntp/sntp/libevent/test/test-fdleak.c
index 4c4eba25e70e..a1fb4ed13bd2 100644
--- a/contrib/ntp/sntp/libevent/test/test-fdleak.c
+++ b/contrib/ntp/sntp/libevent/test/test-fdleak.c
@@ -95,8 +95,11 @@ server_event_cb(struct bufferevent *bev, short events, void *ctx)
if (events & BEV_EVENT_ERROR) {
my_perror("Error from bufferevent");
exit(1);
- } else if (events & (BEV_EVENT_EOF | BEV_EVENT_ERROR)) {
+ } else if (events & BEV_EVENT_EOF) {
bufferevent_free(bev);
+ if (num_requests == MAX_REQUESTS) {
+ event_base_loopbreak(bufferevent_get_base(bev));
+ }
}
}
@@ -107,8 +110,7 @@ listener_accept_cb(struct evconnlistener *listener, evutil_socket_t sock,
{
struct event_base *base = evconnlistener_get_base(listener);
struct bufferevent *bev = bufferevent_socket_new(base, sock,
- BEV_OPT_CLOSE_ON_FREE);
-
+ BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb(bev, server_read_cb, NULL, server_event_cb, NULL);
bufferevent_enable(bev, EV_READ|EV_WRITE);
}
@@ -154,6 +156,9 @@ start_loop(void)
start_client(base);
event_base_dispatch(base);
+
+ evconnlistener_free(listener);
+ event_base_free(base);
}
/*
@@ -178,9 +183,7 @@ client_read_cb(struct bufferevent *bev, void *ctx)
bufferevent_free(bev);
num_requests++;
- if (num_requests == MAX_REQUESTS) {
- event_base_loopbreak(base);
- } else {
+ if (++num_requests < MAX_REQUESTS) {
start_client(base);
}
}
diff --git a/contrib/ntp/sntp/libevent/test/test-init.c b/contrib/ntp/sntp/libevent/test/test-init.c
index 92fbc6b14659..aea49ee94288 100644
--- a/contrib/ntp/sntp/libevent/test/test-init.c
+++ b/contrib/ntp/sntp/libevent/test/test-init.c
@@ -57,7 +57,7 @@ main(int argc, char **argv)
(void) WSAStartup(wVersionRequested, &wsaData);
#endif
- /* Initalize the event library */
+ /* Initialize the event library */
event_init();
return (0);
diff --git a/contrib/ntp/sntp/libevent/test/test-ratelim.c b/contrib/ntp/sntp/libevent/test/test-ratelim.c
index 40a1b95984ef..34112e39e14d 100644
--- a/contrib/ntp/sntp/libevent/test/test-ratelim.c
+++ b/contrib/ntp/sntp/libevent/test/test-ratelim.c
@@ -50,6 +50,10 @@
#include "event2/listener.h"
#include "event2/thread.h"
+#ifndef MIN
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+
static struct evutil_weakrand_state weakrand_state;
static int cfg_verbose = 0;
@@ -85,6 +89,18 @@ struct client_state {
};
static const struct timeval *ms100_common=NULL;
+/* Timers bias for slow CPUs, affects:
+ * - cfg_connlimit_tolerance (--check-connlimit)
+ * - cfg_grouplimit_tolerance (--check-grouplimit)
+ * - cfg_stddev_tolerance (--check-stddev)
+ */
+static int timer_bias_events;
+static struct timeval timer_bias_start;
+double timer_bias_spend;
+/* Real cost is less (approximately ~5 usec),
+ * this macros adjusted to make the bias less */
+#define TIMER_MAX_COST_USEC 10
+
/* info from check_bucket_levels_cb */
static int total_n_bev_checks = 0;
static ev_int64_t total_rbucket_level=0;
@@ -244,6 +260,64 @@ group_drain_cb(evutil_socket_t fd, short events, void *arg)
bufferevent_rate_limit_group_decrement_write(ratelim_group, cfg_group_drain);
}
+static void
+timer_bias_cb(evutil_socket_t fd, short events, void *arg)
+{
+ struct event *event = arg;
+ struct timeval end;
+ struct timeval diff;
+
+ /** XXX: use rdtsc? (portability issues?) */
+ evutil_gettimeofday(&end, NULL);
+ evutil_timersub(&end, &timer_bias_start, &diff);
+ timer_bias_spend += diff.tv_sec + diff.tv_usec * 1e6;
+ timer_bias_start = end;
+
+ if (++timer_bias_events == 100)
+ event_del(event);
+}
+static double
+timer_bias_calculate(void)
+{
+ struct event_config *cfg = NULL;
+ struct event_base *base = NULL;
+ struct event *timer = NULL;
+ struct timeval tv = { 0, 1 };
+ int done = 0;
+
+ cfg = event_config_new();
+ if (!cfg)
+ goto err;
+ if (event_config_set_flag(cfg, EVENT_BASE_FLAG_PRECISE_TIMER))
+ goto err;
+ base = event_base_new_with_config(cfg);
+ if (!base)
+ goto err;
+
+ timer = event_new(base, -1, EV_PERSIST, timer_bias_cb, event_self_cbarg());
+ if (!timer || event_add(timer, &tv)) {
+ goto err;
+ }
+
+ evutil_gettimeofday(&timer_bias_start, NULL);
+ event_base_dispatch(base);
+ done = 1;
+
+err:
+ if (cfg)
+ event_config_free(cfg);
+ if (timer)
+ event_free(timer);
+ if (base)
+ event_base_free(base);
+
+ if (done)
+ return MIN(timer_bias_spend / 1e6 / timer_bias_events / TIMER_MAX_COST_USEC, 5);
+
+ fprintf(stderr, "Couldn't create event for CPU cycle counter bias\n");
+ return -1;
+}
+
static int
test_ratelimiting(void)
{
@@ -266,6 +340,7 @@ test_ratelimiting(void)
struct event_config *base_cfg;
struct event *periodic_level_check;
struct event *group_drain_event=NULL;
+ double timer_bias;
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
@@ -275,11 +350,23 @@ test_ratelimiting(void)
if (0)
event_enable_debug_mode();
+ timer_bias = timer_bias_calculate();
+ if (timer_bias > 1) {
+ fprintf(stderr, "CPU is slow, timers bias is %f\n", timer_bias);
+ cfg_connlimit_tolerance *= timer_bias;
+ cfg_grouplimit_tolerance *= timer_bias;
+ cfg_stddev_tolerance *= timer_bias;
+ } else {
+ printf("CPU is fast enough, timers bias is %f\n", timer_bias);
+ }
+
base_cfg = event_config_new();
#ifdef _WIN32
if (cfg_enable_iocp) {
+#ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
evthread_use_windows_threads();
+#endif
event_config_set_flag(base_cfg, EVENT_BASE_FLAG_STARTUP_IOCP);
}
#endif
@@ -340,10 +427,6 @@ test_ratelimiting(void)
bevs = calloc(cfg_n_connections, sizeof(struct bufferevent *));
states = calloc(cfg_n_connections, sizeof(struct client_state));
- if (bevs == NULL || states == NULL) {
- printf("Unable to allocate memory...\n");
- return 1;
- }
for (i = 0; i < cfg_n_connections; ++i) {
bevs[i] = bufferevent_socket_new(base, -1,
@@ -378,7 +461,7 @@ test_ratelimiting(void)
ratelim_group = NULL; /* So no more responders get added */
event_free(periodic_level_check);
if (group_drain_event)
- event_del(group_drain_event);
+ event_free(group_drain_event);
for (i = 0; i < cfg_n_connections; ++i) {
bufferevent_free(bevs[i]);
diff --git a/contrib/ntp/sntp/libevent/test/test-time.c b/contrib/ntp/sntp/libevent/test/test-time.c
index e7dff7d7265a..a8b384626385 100644
--- a/contrib/ntp/sntp/libevent/test/test-time.c
+++ b/contrib/ntp/sntp/libevent/test/test-time.c
@@ -25,6 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event2/event-config.h"
+#include "util-internal.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -41,7 +42,6 @@
#include "event2/event.h"
#include "event2/event_compat.h"
#include "event2/event_struct.h"
-#include "util-internal.h"
int called = 0;
@@ -81,8 +81,10 @@ time_cb(evutil_socket_t fd, short event, void *arg)
int
main(int argc, char **argv)
{
+ struct event_base *base;
struct timeval tv;
int i;
+
#ifdef _WIN32
WORD wVersionRequested;
WSADATA wsaData;
@@ -94,24 +96,28 @@ main(int argc, char **argv)
evutil_weakrand_seed_(&weakrand_state, 0);
- /* Initalize the event library */
- event_init();
+ if (getenv("EVENT_DEBUG_LOGGING_ALL")) {
+ event_enable_debug_logging(EVENT_DBG_ALL);
+ }
- for (i = 0; i < NEVENT; i++) {
- ev[i] = malloc(sizeof(struct event));
- assert(ev[i] != NULL);
+ base = event_base_new();
- /* Initalize one event */
- evtimer_set(ev[i], time_cb, ev[i]);
+ for (i = 0; i < NEVENT; i++) {
+ ev[i] = evtimer_new(base, time_cb, event_self_cbarg());
tv.tv_sec = 0;
tv.tv_usec = rand_int(50000);
evtimer_add(ev[i], &tv);
}
- event_dispatch();
+ i = event_base_dispatch(base);
+ printf("event_base_dispatch=%d, called=%d, EVENT=%d\n",
+ i, called, NEVENT);
- printf("%d, %d\n", called, NEVENT);
- return (called < NEVENT);
+ if (i == 1 && called >= NEVENT) {
+ return EXIT_SUCCESS;
+ } else {
+ return EXIT_FAILURE;
+ }
}
diff --git a/contrib/ntp/sntp/libevent/test/test-weof.c b/contrib/ntp/sntp/libevent/test/test-weof.c
index c379f287cb50..68e7cd45792d 100644
--- a/contrib/ntp/sntp/libevent/test/test-weof.c
+++ b/contrib/ntp/sntp/libevent/test/test-weof.c
@@ -24,6 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "../util-internal.h"
#include "event2/event-config.h"
#ifdef _WIN32
@@ -51,10 +52,6 @@
#include "event2/event_compat.h"
#include "event2/util.h"
-#ifdef EVENT____func__
-#define __func__ EVENT____func__
-#endif
-
evutil_socket_t pair[2];
int test_okay = 1;
int called = 0;
@@ -102,10 +99,10 @@ main(int argc, char **argv)
if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
return (1);
- /* Initalize the event library */
+ /* Initialize the event library */
event_init();
- /* Initalize one event */
+ /* Initialize one event */
event_set(&ev, pair[1], EV_WRITE, write_cb, &ev);
event_add(&ev, NULL);
diff --git a/contrib/ntp/sntp/libevent/test/test.sh b/contrib/ntp/sntp/libevent/test/test.sh
index 2b083ac7f3c9..f91a8b044598 100755
--- a/contrib/ntp/sntp/libevent/test/test.sh
+++ b/contrib/ntp/sntp/libevent/test/test.sh
@@ -28,7 +28,7 @@ fi
TEST_DIR=.
TEST_SRC_DIR=.
-T=`echo "$0" | sed -e 's/test.sh$//' | sed -e 's/test-script.sh//' `
+T=`echo "$0" | sed -e 's/test.sh$//'`
if test -x "$T/test-init"
then
TEST_DIR="$T"
@@ -82,8 +82,8 @@ run_tests () {
fi
done
announce_n " test-dumpevents: "
- if python2 -c 'import sys; assert(sys.version_info >= (2, 4))' 2>/dev/null && test -f $TEST_SRC_DIR/check-dumpevents.py; then
- if $TEST_DIR/test-dumpevents | python2 $TEST_SRC_DIR/check-dumpevents.py >> "$TEST_OUTPUT_FILE" ;
+ if python -c 'import sys; assert(sys.version_info >= (2, 4))' 2>/dev/null && test -f $TEST_SRC_DIR/check-dumpevents.py; then
+ if $TEST_DIR/test-dumpevents | $TEST_SRC_DIR/check-dumpevents.py >> "$TEST_OUTPUT_FILE" ;
then
announce OKAY ;
else
@@ -97,6 +97,7 @@ run_tests () {
announce "FAILED (output not checked)" ;
fi
fi
+
test -x $TEST_DIR/regress || return
announce_n " regress: "
if test "$TEST_OUTPUT_FILE" = "/dev/null" ;
@@ -112,6 +113,21 @@ run_tests () {
announce FAILED ;
FAILED=yes
fi
+
+ announce_n " regress_debug: "
+ if test "$TEST_OUTPUT_FILE" = "/dev/null" ;
+ then
+ EVENT_DEBUG_MODE=1 $TEST_DIR/regress --quiet $REGRESS_ARGS
+ else
+ EVENT_DEBUG_MODE=1 $TEST_DIR/regress $REGRESS_ARGS >>"$TEST_OUTPUT_FILE"
+ fi
+ if test "$?" = "0" ;
+ then
+ announce OKAY ;
+ else
+ announce FAILED ;
+ FAILED=yes
+ fi
}
do_test() {
@@ -130,15 +146,43 @@ do_test() {
run_tests
}
-announce "Running tests:"
+usage()
+{
+ cat <<EOL
+ -b - specify backends
+ -t - run timerfd test
+ -c - run changelist test
+ -T - run timerfd+changelist test
+EOL
+}
+main()
+{
+ backends=$BACKENDS
+ timerfd=0
+ changelist=0
+ timerfd_changelist=0
-do_test EPOLL "(timerfd)"
-do_test EPOLL "(changelist)"
-do_test EPOLL "(timerfd+changelist)"
-for i in $BACKENDS; do
- do_test $i
-done
+ while getopts "b:tcT" c; do
+ case "$c" in
+ b) backends="$OPTARG";;
+ t) timerfd=1;;
+ c) changelist=1;;
+ T) timerfd_changelist=1;;
+ ?*) usage && exit 1;;
+ esac
+ done
-if test "$FAILED" = "yes"; then
- exit 1
-fi
+ announce "Running tests:"
+
+ [ $timerfd -eq 0 ] || do_test EPOLL "(timerfd)"
+ [ $changelist -eq 0 ] || do_test EPOLL "(changelist)"
+ [ $timerfd_changelist -eq 0 ] || do_test EPOLL "(timerfd+changelist)"
+ for i in $backends; do
+ do_test $i
+ done
+
+ if test "$FAILED" = "yes"; then
+ exit 1
+ fi
+}
+main "$@"
diff --git a/contrib/ntp/sntp/libevent/test/tinytest.c b/contrib/ntp/sntp/libevent/test/tinytest.c
index 3a8e33105501..85dfe74a720e 100644
--- a/contrib/ntp/sntp/libevent/test/tinytest.c
+++ b/contrib/ntp/sntp/libevent/test/tinytest.c
@@ -60,6 +60,8 @@
#include "tinytest_macros.h"
#define LONGEST_TEST_NAME 16384
+#define DEFAULT_TESTCASE_TIMEOUT 30U
+#define MAGIC_EXITCODE 42
static int in_tinytest_main = 0; /**< true if we're in tinytest_main().*/
static int n_ok = 0; /**< Number of tests that have passed */
@@ -69,6 +71,7 @@ static int n_skipped = 0; /**< Number of tests that have been skipped. */
static int opt_forked = 0; /**< True iff we're called from inside a win32 fork*/
static int opt_nofork = 0; /**< Suppress calls to fork() for debugging. */
static int opt_verbosity = 1; /**< -==quiet,0==terse,1==normal,2==verbose */
+static unsigned int opt_timeout = DEFAULT_TESTCASE_TIMEOUT; /**< Timeout for every test (using alarm()) */
const char *verbosity_flag = "";
const struct testlist_alias_t *cfg_aliases=NULL;
@@ -79,14 +82,73 @@ const char *cur_test_prefix = NULL; /**< prefix of the current test group */
/** Name of the current test, if we haven't logged is yet. Used for --quiet */
const char *cur_test_name = NULL;
+static void usage(struct testgroup_t *groups, int list_groups)
+ __attribute__((noreturn));
+static int process_test_option(struct testgroup_t *groups, const char *test);
+
#ifdef _WIN32
/* Copy of argv[0] for win32. */
static char commandname[MAX_PATH+1];
-#endif
-static void usage(struct testgroup_t *groups, int list_groups)
- __attribute__((noreturn));
-static int process_test_option(struct testgroup_t *groups, const char *test);
+struct timeout_thread_args {
+ const testcase_fn *fn;
+ void *env;
+};
+
+static DWORD WINAPI
+timeout_thread_proc_(LPVOID arg)
+{
+ struct timeout_thread_args *args = arg;
+ (*(args->fn))(args->env);
+ ExitThread(cur_test_outcome == FAIL ? 1 : 0);
+}
+
+static enum outcome
+testcase_run_in_thread_(const struct testcase_t *testcase, void *env)
+{
+ /* We will never run testcase in a new thread when the
+ timeout is set to zero */
+ assert(opt_timeout);
+ DWORD ret, tid;
+ HANDLE handle;
+ struct timeout_thread_args args = {
+ &(testcase->fn),
+ env
+ };
+
+ handle =CreateThread(NULL, 0, timeout_thread_proc_,
+ (LPVOID)&args, 0, &tid);
+ ret = WaitForSingleObject(handle, opt_timeout * 1000U);
+ if (ret == WAIT_OBJECT_0) {
+ ret = 0;
+ if (!GetExitCodeThread(handle, &ret)) {
+ printf("GetExitCodeThread failed\n");
+ ret = 1;
+ }
+ } else if (ret == WAIT_TIMEOUT) {
+ printf("timeout\n");
+ } else {
+ printf("Wait failed\n");
+ }
+ CloseHandle(handle);
+ if (ret == 0)
+ return OK;
+ else if (ret == MAGIC_EXITCODE)
+ return SKIP;
+ else
+ return FAIL;
+}
+#else
+static unsigned int testcase_set_timeout_(void)
+{
+ return alarm(opt_timeout);
+}
+
+static unsigned int testcase_reset_timeout_(void)
+{
+ return alarm(0);
+}
+#endif
static enum outcome
testcase_run_bare_(const struct testcase_t *testcase)
@@ -102,7 +164,19 @@ testcase_run_bare_(const struct testcase_t *testcase)
}
cur_test_outcome = OK;
- testcase->fn(env);
+ {
+ if (opt_timeout) {
+#ifdef _WIN32
+ cur_test_outcome = testcase_run_in_thread_(testcase, env);
+#else
+ testcase_set_timeout_();
+ testcase->fn(env);
+ testcase_reset_timeout_();
+#endif
+ } else {
+ testcase->fn(env);
+ }
+ }
outcome = cur_test_outcome;
if (testcase->setup) {
@@ -113,7 +187,6 @@ testcase_run_bare_(const struct testcase_t *testcase)
return outcome;
}
-#define MAGIC_EXITCODE 42
#ifndef NO_FORKING
@@ -134,7 +207,7 @@ testcase_run_forked_(const struct testgroup_t *group,
char buffer[LONGEST_TEST_NAME+256];
STARTUPINFOA si;
PROCESS_INFORMATION info;
- DWORD exitcode;
+ DWORD ret;
if (!in_tinytest_main) {
printf("\nERROR. On Windows, testcase_run_forked_ must be"
@@ -144,7 +217,7 @@ testcase_run_forked_(const struct testgroup_t *group,
if (opt_verbosity>0)
printf("[forking] ");
- snprintf(buffer, sizeof(buffer), "%s --RUNNING-FORKED %s %s%s",
+ snprintf(buffer, sizeof(buffer), "%s --RUNNING-FORKED %s --timeout 0 %s%s",
commandname, verbosity_flag, group->prefix, testcase->name);
memset(&si, 0, sizeof(si));
@@ -155,15 +228,23 @@ testcase_run_forked_(const struct testgroup_t *group,
0, NULL, NULL, &si, &info);
if (!ok) {
printf("CreateProcess failed!\n");
- return 0;
+ return FAIL;
+ }
+ ret = WaitForSingleObject(info.hProcess,
+ (opt_timeout ? opt_timeout * 1000U : INFINITE));
+
+ if (ret == WAIT_OBJECT_0) {
+ GetExitCodeProcess(info.hProcess, &ret);
+ } else if (ret == WAIT_TIMEOUT) {
+ printf("timeout\n");
+ } else {
+ printf("Wait failed\n");
}
- WaitForSingleObject(info.hProcess, INFINITE);
- GetExitCodeProcess(info.hProcess, &exitcode);
CloseHandle(info.hProcess);
CloseHandle(info.hThread);
- if (exitcode == 0)
+ if (ret == 0)
return OK;
- else if (exitcode == MAGIC_EXITCODE)
+ else if (ret == MAGIC_EXITCODE)
return SKIP;
else
return FAIL;
@@ -198,7 +279,7 @@ testcase_run_forked_(const struct testgroup_t *group,
return FAIL; /* unreachable */
} else {
/* parent */
- int status, r;
+ int status, r, exitcode;
char b[1];
/* Close this now, so that if the other side closes it,
* our read fails. */
@@ -206,12 +287,20 @@ testcase_run_forked_(const struct testgroup_t *group,
r = (int)read(outcome_pipe[0], b, 1);
if (r == 0) {
printf("[Lost connection!] ");
- return 0;
+ return FAIL;
} else if (r != 1) {
perror("read outcome from pipe");
}
waitpid(pid, &status, 0);
+ exitcode = WEXITSTATUS(status);
close(outcome_pipe[0]);
+ if (opt_verbosity>1)
+ printf("%s%s: exited with %i (%i)\n", group->prefix, testcase->name, exitcode, status);
+ if (exitcode != 0)
+ {
+ printf("[atexit failure!] ");
+ return FAIL;
+ }
return b[0]=='Y' ? OK : (b[0]=='S' ? SKIP : FAIL);
}
#endif
@@ -253,15 +342,12 @@ testcase_run_one(const struct testgroup_t *group,
}
if (outcome == OK) {
- ++n_ok;
if (opt_verbosity>0 && !opt_forked)
puts(opt_verbosity==1?"OK":"");
} else if (outcome == SKIP) {
- ++n_skipped;
if (opt_verbosity>0 && !opt_forked)
puts("SKIPPED");
} else {
- ++n_bad;
if (!opt_forked)
printf("\n [%s FAILED]\n", testcase->name);
}
@@ -312,7 +398,7 @@ tinytest_set_flag_(struct testgroup_t *groups, const char *arg, int set, unsigne
static void
usage(struct testgroup_t *groups, int list_groups)
{
- puts("Options are: [--verbose|--quiet|--terse] [--no-fork]");
+ puts("Options are: [--verbose|--quiet|--terse] [--no-fork] [--timeout <sec>]");
puts(" Specify tests by name, or using a prefix ending with '..'");
puts(" To skip a test, prefix its name with a colon.");
puts(" To enable a disabled test, prefix its name with a plus.");
@@ -409,8 +495,15 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
usage(groups, 0);
} else if (!strcmp(v[i], "--list-tests")) {
usage(groups, 1);
+ } else if (!strcmp(v[i], "--timeout")) {
+ ++i;
+ if (i >= c) {
+ fprintf(stderr, "--timeout requires argument\n");
+ return -1;
+ }
+ opt_timeout = (unsigned)atoi(v[i]);
} else {
- printf("Unknown option %s. Try --help\n",v[i]);
+ fprintf(stderr, "Unknown option %s. Try --help\n", v[i]);
return -1;
}
} else {
@@ -428,11 +521,35 @@ tinytest_main(int c, const char **v, struct testgroup_t *groups)
#endif
++in_tinytest_main;
- for (i=0; groups[i].prefix; ++i)
- for (j=0; groups[i].cases[j].name; ++j)
- if (groups[i].cases[j].flags & TT_ENABLED_)
- testcase_run_one(&groups[i],
- &groups[i].cases[j]);
+ for (i = 0; groups[i].prefix; ++i) {
+ struct testgroup_t *group = &groups[i];
+ for (j = 0; group->cases[j].name; ++j) {
+ struct testcase_t *testcase = &group->cases[j];
+ int test_attempts = 3;
+ int test_ret_err;
+
+ if (!(testcase->flags & TT_ENABLED_))
+ continue;
+
+ for (;;) {
+ test_ret_err = testcase_run_one(group, testcase);
+
+ if (test_ret_err == OK)
+ break;
+ if (!(testcase->flags & TT_RETRIABLE))
+ break;
+ printf("\n [RETRYING %s (%i)]\n", testcase->name, test_attempts);
+ if (!test_attempts--)
+ break;
+ }
+
+ switch (test_ret_err) {
+ case OK: ++n_ok; break;
+ case SKIP: ++n_skipped; break;
+ default: ++n_bad; break;
+ }
+ }
+ }
--in_tinytest_main;
@@ -462,7 +579,7 @@ tinytest_set_test_failed_(void)
printf("%s%s: ", cur_test_prefix, cur_test_name);
cur_test_name = NULL;
}
- cur_test_outcome = 0;
+ cur_test_outcome = FAIL;
}
void
diff --git a/contrib/ntp/sntp/libevent/test/tinytest.h b/contrib/ntp/sntp/libevent/test/tinytest.h
index ed07b26bc006..d321dd467542 100644
--- a/contrib/ntp/sntp/libevent/test/tinytest.h
+++ b/contrib/ntp/sntp/libevent/test/tinytest.h
@@ -34,8 +34,11 @@
#define TT_ENABLED_ (1<<2)
/** Flag for a test that's off by default. */
#define TT_OFF_BY_DEFAULT (1<<3)
+/** Flag for a test that should be runned again in case of failure (but not
+ * more then 3 times). */
+#define TT_RETRIABLE (1<<4)
/** If you add your own flags, make them start at this point. */
-#define TT_FIRST_USER_FLAG (1<<4)
+#define TT_FIRST_USER_FLAG (1<<5)
typedef void (*testcase_fn)(void *);
diff --git a/contrib/ntp/sntp/libevent/test/tinytest_macros.h b/contrib/ntp/sntp/libevent/test/tinytest_macros.h
index c3728d1fdd61..e01f5d56cb33 100644
--- a/contrib/ntp/sntp/libevent/test/tinytest_macros.h
+++ b/contrib/ntp/sntp/libevent/test/tinytest_macros.h
@@ -113,8 +113,8 @@
#define tt_assert_test_fmt_type(a,b,str_test,type,test,printf_type,printf_fmt, \
setup_block,cleanup_block,die_on_fail) \
TT_STMT_BEGIN \
- type val1_ = (a); \
- type val2_ = (b); \
+ type val1_ = (type)(a); \
+ type val2_ = (type)(b); \
int tt_status_ = (test); \
if (!tt_status_ || tinytest_get_verbosity_()>1) { \
printf_type print_; \
@@ -158,6 +158,14 @@
tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_), \
"%ld",TT_EXIT_TEST_FUNCTION)
+/** To compare SOCKET(windows)/fd */
+#define tt_fd_op(a,op,b) do { \
+ int _a = (int)(a); \
+ int _b = (int)(b); \
+ tt_assert_test_type(_a,_b,#a" "#op" "#b,long,(val1_ op val2_), \
+ "%ld",TT_EXIT_TEST_FUNCTION); \
+} while (0)
+
#define tt_uint_op(a,op,b) \
tt_assert_test_type(a,b,#a" "#op" "#b,unsigned long, \
(val1_ op val2_),"%lu",TT_EXIT_TEST_FUNCTION)
@@ -166,6 +174,12 @@
tt_assert_test_type(a,b,#a" "#op" "#b,const void*, \
(val1_ op val2_),"%p",TT_EXIT_TEST_FUNCTION)
+/** XXX: have some issues with printing this non-NUL terminated strings */
+#define tt_nstr_op(n,a,op,b) \
+ tt_assert_test_type_opt(a,b,#a" "#op" "#b,const char *, \
+ (val1_ && val2_ && strncmp(val1_,val2_,(n)) op 0),"<%s>", \
+ TT_EXIT_TEST_FUNCTION)
+
#define tt_str_op(a,op,b) \
tt_assert_test_type_opt(a,b,#a" "#op" "#b,const char *, \
(val1_ && val2_ && strcmp(val1_,val2_) op 0),"<%s>", \
diff --git a/contrib/ntp/sntp/libevent/time-internal.h b/contrib/ntp/sntp/libevent/time-internal.h
index 2c584fa75263..e79e6a528dee 100644
--- a/contrib/ntp/sntp/libevent/time-internal.h
+++ b/contrib/ntp/sntp/libevent/time-internal.h
@@ -54,6 +54,7 @@ extern "C" {
#endif
long evutil_tv_to_msec_(const struct timeval *tv);
+EVENT2_EXPORT_SYMBOL
void evutil_usleep_(const struct timeval *tv);
#ifdef _WIN32
@@ -86,8 +87,10 @@ struct evutil_monotonic_timer {
struct timeval last_time;
};
+EVENT2_EXPORT_SYMBOL
int evutil_configure_monotonic_time_(struct evutil_monotonic_timer *mt,
int flags);
+EVENT2_EXPORT_SYMBOL
int evutil_gettime_monotonic_(struct evutil_monotonic_timer *mt, struct timeval *tv);
diff --git a/contrib/ntp/sntp/libevent/util-internal.h b/contrib/ntp/sntp/libevent/util-internal.h
index 4fdedeaf93c5..39576c71ca22 100644
--- a/contrib/ntp/sntp/libevent/util-internal.h
+++ b/contrib/ntp/sntp/libevent/util-internal.h
@@ -50,12 +50,40 @@
extern "C" {
#endif
+/* __has_attribute() wrapper */
+#ifdef __has_attribute
+# define EVUTIL_HAS_ATTRIBUTE __has_attribute
+#endif
+/** clang 3 __has_attribute misbehaves in some versions */
+#if defined(__clang__) && __clang__ == 1
+# if defined(__apple_build_version__)
+# if __clang_major__ <= 6
+# undef EVUTIL_HAS_ATTRIBUTE
+# endif
+# else /* !__apple_build_version__ */
+# if __clang_major__ == 3 && __clang_minor__ >= 2 && __clang_minor__ <= 5
+# undef EVUTIL_HAS_ATTRIBUTE
+# endif
+# endif /* __apple_build_version__ */
+#endif /*\ defined(__clang__) && __clang__ == 1 */
+#ifndef EVUTIL_HAS_ATTRIBUTE
+# define EVUTIL_HAS_ATTRIBUTE(x) 0
+#endif
+
/* If we need magic to say "inline", get it for free internally. */
#ifdef EVENT__inline
#define inline EVENT__inline
#endif
-#ifdef EVENT____func__
-#define __func__ EVENT____func__
+
+/* Define to appropriate substitute if compiler doesnt have __func__ */
+#if defined(EVENT__HAVE___func__)
+# ifndef __func__
+# define __func__ __func__
+# endif
+#elif defined(EVENT__HAVE___FUNCTION__)
+# define __func__ __FUNCTION__
+#else
+# define __func__ __FILE__
#endif
/* A good no-op to use in macro definitions. */
@@ -134,7 +162,7 @@ extern "C" {
#ifdef SHUT_WR
#define EVUTIL_SHUT_WR SHUT_WR
#else
-#define EVUTIL_SHUT_WR 1
+#define EVUTIL_SHUT_WR 1 /* SD_SEND */
#endif
#ifdef SHUT_BOTH
#define EVUTIL_SHUT_BOTH SHUT_BOTH
@@ -219,19 +247,26 @@ extern "C" {
* when you care about ASCII's notion of character types, because you are about
* to send those types onto the wire.
*/
+EVENT2_EXPORT_SYMBOL
int EVUTIL_ISALPHA_(char c);
+EVENT2_EXPORT_SYMBOL
int EVUTIL_ISALNUM_(char c);
int EVUTIL_ISSPACE_(char c);
+EVENT2_EXPORT_SYMBOL
int EVUTIL_ISDIGIT_(char c);
+EVENT2_EXPORT_SYMBOL
int EVUTIL_ISXDIGIT_(char c);
int EVUTIL_ISPRINT_(char c);
int EVUTIL_ISLOWER_(char c);
int EVUTIL_ISUPPER_(char c);
+EVENT2_EXPORT_SYMBOL
char EVUTIL_TOUPPER_(char c);
+EVENT2_EXPORT_SYMBOL
char EVUTIL_TOLOWER_(char c);
/** Remove all trailing horizontal whitespace (space or tab) from the end of a
* string */
+EVENT2_EXPORT_SYMBOL
void evutil_rtrim_lws_(char *);
@@ -258,13 +293,16 @@ void evutil_rtrim_lws_(char *);
*/
int evutil_open_closeonexec_(const char *pathname, int flags, unsigned mode);
+EVENT2_EXPORT_SYMBOL
int evutil_read_file_(const char *filename, char **content_out, size_t *len_out,
int is_binary);
-int evutil_socket_connect_(evutil_socket_t *fd_ptr, struct sockaddr *sa, int socklen);
+EVENT2_EXPORT_SYMBOL
+int evutil_socket_connect_(evutil_socket_t *fd_ptr, const struct sockaddr *sa, int socklen);
int evutil_socket_finished_connecting_(evutil_socket_t fd);
+EVENT2_EXPORT_SYMBOL
int evutil_ersatz_socketpair_(int, int , int, evutil_socket_t[]);
int evutil_resolve_(int family, const char *hostname, struct sockaddr *sa,
@@ -289,15 +327,18 @@ struct evutil_weakrand_state {
* attacker can't predict, or which passes strong statistical tests, use the
* evutil_secure_rng* functions instead.
*/
+EVENT2_EXPORT_SYMBOL
ev_uint32_t evutil_weakrand_seed_(struct evutil_weakrand_state *state, ev_uint32_t seed);
/* Return a pseudorandom value between 0 and EVUTIL_WEAKRAND_MAX inclusive.
* Updates the state in 'seed' as needed -- this value must be protected by a
* lock.
*/
+EVENT2_EXPORT_SYMBOL
ev_int32_t evutil_weakrand_(struct evutil_weakrand_state *seed);
/* Return a pseudorandom value x such that 0 <= x < top. top must be no more
* than EVUTIL_WEAKRAND_MAX. Updates the state in 'seed' as needed -- this
* value must be proteced by a lock */
+EVENT2_EXPORT_SYMBOL
ev_int32_t evutil_weakrand_range_(struct evutil_weakrand_state *seed, ev_int32_t top);
/* Evaluates to the same boolean value as 'p', and hints to the compiler that
@@ -308,6 +349,12 @@ ev_int32_t evutil_weakrand_range_(struct evutil_weakrand_state *seed, ev_int32_t
#define EVUTIL_UNLIKELY(p) (p)
#endif
+#if EVUTIL_HAS_ATTRIBUTE(fallthrough)
+#define EVUTIL_FALLTHROUGH __attribute__((fallthrough))
+#else
+#define EVUTIL_FALLTHROUGH /* fallthrough */
+#endif
+
/* Replacement for assert() that calls event_errx on failure. */
#ifdef NDEBUG
#define EVUTIL_ASSERT(cond) EVUTIL_NIL_CONDITION_(cond)
@@ -357,24 +404,35 @@ typedef struct evdns_getaddrinfo_request* (*evdns_getaddrinfo_fn)(
const char *nodename, const char *servname,
const struct evutil_addrinfo *hints_in,
void (*cb)(int, struct evutil_addrinfo *, void *), void *arg);
-
+EVENT2_EXPORT_SYMBOL
void evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo_fn fn);
+typedef void (*evdns_getaddrinfo_cancel_fn)(
+ struct evdns_getaddrinfo_request *req);
+EVENT2_EXPORT_SYMBOL
+void evutil_set_evdns_getaddrinfo_cancel_fn_(evdns_getaddrinfo_cancel_fn fn);
+EVENT2_EXPORT_SYMBOL
struct evutil_addrinfo *evutil_new_addrinfo_(struct sockaddr *sa,
ev_socklen_t socklen, const struct evutil_addrinfo *hints);
+EVENT2_EXPORT_SYMBOL
struct evutil_addrinfo *evutil_addrinfo_append_(struct evutil_addrinfo *first,
struct evutil_addrinfo *append);
+EVENT2_EXPORT_SYMBOL
void evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints);
+EVENT2_EXPORT_SYMBOL
int evutil_getaddrinfo_common_(const char *nodename, const char *servname,
struct evutil_addrinfo *hints, struct evutil_addrinfo **res, int *portnum);
-int evutil_getaddrinfo_async_(struct evdns_base *dns_base,
+struct evdns_getaddrinfo_request *evutil_getaddrinfo_async_(
+ struct evdns_base *dns_base,
const char *nodename, const char *servname,
const struct evutil_addrinfo *hints_in,
void (*cb)(int, struct evutil_addrinfo *, void *), void *arg);
+void evutil_getaddrinfo_cancel_async_(struct evdns_getaddrinfo_request *data);
/** Return true iff sa is a looback address. (That is, it is 127.0.0.1/8, or
* ::1). */
+EVENT2_EXPORT_SYMBOL
int evutil_sockaddr_is_loopback_(const struct sockaddr *sa);
@@ -383,6 +441,7 @@ int evutil_sockaddr_is_loopback_(const struct sockaddr *sa);
Returns a pointer to out. Always writes something into out, so it's safe
to use the output of this function without checking it for NULL.
*/
+EVENT2_EXPORT_SYMBOL
const char *evutil_format_sockaddr_port_(const struct sockaddr *sa, char *out, size_t outlen);
int evutil_hex_char_to_int_(char c);
@@ -392,6 +451,7 @@ void evutil_free_secure_rng_globals_(void);
void evutil_free_globals_(void);
#ifdef _WIN32
+EVENT2_EXPORT_SYMBOL
HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#endif
@@ -417,7 +477,7 @@ HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#define EV_SOCK_ARG(x) (x)
#endif
-#if defined(__STDC__) && defined(__STDC_VERSION__)
+#if defined(__STDC__) && defined(__STDC_VERSION__) && !defined(__MINGW64_VERSION_MAJOR)
#if (__STDC_VERSION__ >= 199901L)
#define EV_SIZE_FMT "%zu"
#define EV_SSIZE_FMT "%zd"
@@ -440,6 +500,7 @@ HMODULE evutil_load_windows_system_library_(const TCHAR *library_name);
#endif
#endif
+EVENT2_EXPORT_SYMBOL
evutil_socket_t evutil_socket_(int domain, int type, int protocol);
evutil_socket_t evutil_accept4_(evutil_socket_t sockfd, struct sockaddr *addr,
ev_socklen_t *addrlen, int flags);
@@ -472,6 +533,17 @@ evutil_socket_t evutil_eventfd_(unsigned initval, int flags);
void evutil_memclear_(void *mem, size_t len);
+struct in_addr;
+struct in6_addr;
+
+/* This is a any, loopback, link-local, multicast */
+EVENT2_EXPORT_SYMBOL
+int evutil_v4addr_is_local_(const struct in_addr *in);
+/* This is a reserved, ipv4compat, ipv4map, loopback,
+ * link-local, multicast, or unspecified address. */
+EVENT2_EXPORT_SYMBOL
+int evutil_v6addr_is_local_(const struct in6_addr *in);
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/sntp/libevent/whatsnew-2.1.txt b/contrib/ntp/sntp/libevent/whatsnew-2.1.txt
index 0be54ae11b50..c1f4df8f7878 100644
--- a/contrib/ntp/sntp/libevent/whatsnew-2.1.txt
+++ b/contrib/ntp/sntp/libevent/whatsnew-2.1.txt
@@ -164,10 +164,6 @@
1.3. Event finalization
- [NOTE: This is an experimental feature in Libevent 2.1.3-alpha. Though
- it seems solid so far, its API might change between now and the first
- release candidate for Libevent 2.1.]
-
1.3.1. Why event finalization?
Libevent 2.1 now supports an API for safely "finalizing" events that
@@ -320,6 +316,9 @@
evbuffer_readln() now supports an EVBUFFER_EOL_NUL argument to fetch
NUL-terminated strings from buffers.
+ There's a new evbuffer_set_flags()/evbuffer_clear_flags() that you can use to
+ set EVBUFFER_FLAG_DRAINS_TO_FD.
+
1.6. New functions and features: bufferevents
You can now use the bufferevent_getcb() function to find out a
@@ -348,6 +347,17 @@
You can manually trigger a bufferevent's callbacks via
bufferevent_trigger() and bufferevent_trigger_event().
+ Also you can manually increment/decrement reference for bufferevent with
+ bufferevent_incref()/bufferevent_decref(), it is useful in situations where a
+ user may reference the bufferevent somewhere else.
+
+ Now bufferevent_openssl supports "dirty" shutdown (when the peer closes the
+ TCP connection before closing the SSL channel), see
+ bufferevent_openssl_get_allow_dirty_shutdown() and
+ bufferevent_openssl_set_allow_dirty_shutdown().
+
+ And also libevent supports openssl 1.1.
+
1.7. New functions and features: evdns
The previous evdns interface used an "open a test UDP socket" trick in
@@ -366,6 +376,9 @@
There is a new evdns_base_clear_host_addresses() function to remove
all the /etc/hosts addresses registered with an evdns instance.
+ Also there is evdns_base_get_nameserver_addr() for retrieve the address of
+ the 'idx'th configured nameserver.
+
1.8. New functions and features: evconnlistener
Libevent 2.1 adds the following evconnlistener flags:
@@ -376,6 +389,10 @@
HTTP where the client always speaks first. On operating systems
that don't support this functionality, this option has no effect.
+ LEV_OPT_REUSEABLE_PORT -- Indicates that we ask to allow multiple servers
+ to bind to the same port if they each set the option Ionly on Linux and
+ >=3.9)
+
LEV_OPT_DISABLED -- Creates an evconnlistener in the disabled (not
listening) state.
@@ -398,6 +415,9 @@
evhttp_connection_set_timeout_tv() to configure
microsecond-granularity timeouts.
+ Also there is evhttp_connection_set_initial_retry_tv() to change initial
+ retry timeout.
+
There are a new pair of functions: evhttp_set_bevcb() and
evhttp_connection_base_bufferevent_new(), that you can use to
configure which bufferevents will be used for incoming and outgoing
@@ -437,12 +457,53 @@
The evhttp_request_set_on_complete_cb() facility adds a callback to be
invoked on request completion.
+ You can add linger-close for http server by passing
+ EVHTTP_SERVER_LINGERING_CLOSE to evhttp_set_flags(), with this flag server
+ read all the clients body, and only after this respond with an error if the
+ clients body exceed max_body_size (since some clients cannot read response
+ otherwise).
+
+ The evhttp_connection_set_family() can bypass family hint to evdns.
+
+ There are some flags available for connections, which can be installed with
+ evhttp_connection_set_flags():
+ - EVHTTP_CON_REUSE_CONNECTED_ADDR -- reuse connection address on retry (avoid
+ extra DNS request).
+ - EVHTTP_CON_READ_ON_WRITE_ERROR - try read error, since server may already
+ close the connection.
+
+ The evhttp_connection_free_on_completion() can be used to tell libevent to
+ free the connection object after the last request has completed or failed.
+
+ There is evhttp_request_get_response_code_line() if
+ evhttp_request_get_response_code() is not enough for you.
+
+ There are *evhttp_uri_parse_with_flags() that accepts
+ EVHTTP_URI_NONCONFORMANT to tolerate URIs that do not conform to RFC3986.
+ The evhttp_uri_set_flags() can changes the flags on URI.
+
1.10. New functions and features: evutil
There's a function "evutil_secure_rng_set_urandom_device_file()" that
you can use to override the default file that Libevent uses to seed
its (sort-of) secure RNG.
+ The evutil_date_rfc1123() returns date in RFC1123
+
+ There are new API to work with monotonic timer -- monotonic time is
+ guaranteed never to run in reverse, but is not necessarily epoch-based. Use
+ it to make reliable measurements of elapsed time between events even when the
+ system time may be changed:
+ - evutil_monotonic_timer_new()/evutil_monotonic_timer_free()
+ - evutil_configure_monotonic_time()
+ - evutil_gettime_monotonic()
+
+ Use evutil_make_listen_socket_reuseable_port() to set SO_REUSEPORT (linux >=
+ 3.9)
+
+ The evutil_make_tcp_listen_socket_deferred() can make a tcp listener socket
+ defer accept()s until there is data to read (TCP_DEFER_ACCEPT).
+
2. Cross-platform performance improvements
2.1. Better data structures
@@ -686,5 +747,22 @@
5. Testing
Libevent's test coverage level is more or less unchanged since before:
- we still have over 80% line coverage in our tests on Linux and OSX.
+ we still have over 80% line coverage in our tests on Linux, FreeBSD, NetBSD,
+ Windows, OSX.
There are some under-tested modules, though: we need to fix those.
+
+ And now we have CI:
+ - https://travis-ci.org/libevent/libevent
+ - https://ci.appveyor.com/project/nmathewson/libevent
+
+ And code coverage:
+ - https://coveralls.io/github/libevent/libevent
+
+ Plus there is vagrant boxes if you what to test it on more OS'es then
+ travis-ci allows, and there is a wrapper (in python) that will parse logs and
+ provide report:
+ - https://github.com/libevent/libevent-extras/blob/master/tools/vagrant-tests.py
+
+6. Contributing
+
+ From now we have contributing guide and checkpatch.sh.
diff --git a/contrib/ntp/sntp/libevent/win32select.c b/contrib/ntp/sntp/libevent/win32select.c
index a50a2df7b4e7..d005b587d451 100644
--- a/contrib/ntp/sntp/libevent/win32select.c
+++ b/contrib/ntp/sntp/libevent/win32select.c
@@ -57,7 +57,7 @@ extern struct event_list timequeue;
extern struct event_list addqueue;
struct win_fd_set {
- u_int fd_count;
+ unsigned int fd_count;
SOCKET fd_array[1];
};
@@ -326,6 +326,8 @@ win32_dispatch(struct event_base *base, struct timeval *tv)
event_debug(("%s: select returned %d", __func__, res));
if (res <= 0) {
+ event_debug(("%s: %s", __func__,
+ evutil_socket_error_to_string(EVUTIL_SOCKET_ERROR())));
return res;
}
@@ -350,7 +352,6 @@ win32_dispatch(struct event_base *base, struct timeval *tv)
}
}
if (win32op->writeset_out->fd_count) {
- SOCKET s;
i = evutil_weakrand_range_(&base->weakrand_seed,
win32op->writeset_out->fd_count);
for (j=0; j<win32op->writeset_out->fd_count; ++j) {
diff --git a/contrib/ntp/sntp/libopts/COPYING.gplv3 b/contrib/ntp/sntp/libopts/COPYING.gplv3
index 26d6fd2e7b11..7718bd18f430 100644
--- a/contrib/ntp/sntp/libopts/COPYING.gplv3
+++ b/contrib/ntp/sntp/libopts/COPYING.gplv3
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/contrib/ntp/sntp/libopts/COPYING.lgplv3 b/contrib/ntp/sntp/libopts/COPYING.lgplv3
index b6db23288f8c..f7b8c6397624 100644
--- a/contrib/ntp/sntp/libopts/COPYING.lgplv3
+++ b/contrib/ntp/sntp/libopts/COPYING.lgplv3
@@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -10,7 +10,7 @@
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
- 0. Additional Definitions.
+ 0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
@@ -111,7 +111,7 @@ the following:
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
- Version.
+ Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
diff --git a/contrib/ntp/sntp/libopts/COPYING.mbsd b/contrib/ntp/sntp/libopts/COPYING.mbsd
index 74948befa59e..b74eb0027948 100644
--- a/contrib/ntp/sntp/libopts/COPYING.mbsd
+++ b/contrib/ntp/sntp/libopts/COPYING.mbsd
@@ -1,4 +1,4 @@
-Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/contrib/ntp/sntp/libopts/Makefile.am b/contrib/ntp/sntp/libopts/Makefile.am
index c67460cd65d5..7490a75e6ca5 100644
--- a/contrib/ntp/sntp/libopts/Makefile.am
+++ b/contrib/ntp/sntp/libopts/Makefile.am
@@ -7,12 +7,13 @@ noinst_LTLIBRARIES = libopts.la
endif
libopts_la_SOURCES = libopts.c
libopts_la_CPPFLAGS = -I$(srcdir)
-libopts_la_LDFLAGS = -version-info 41:0:16
+libopts_la_LDFLAGS = -version-info 42:1:17
+
EXTRA_DIST =
BUILT_SOURCES =
MOSTLYCLEANFILES =
-AM_CFLAGS = $(NTP_HARD_CFLAGS)
+AM_CFLAGS = $(NTP_HARD_CFLAGS) $(CC_NOFORMAT)
AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
@@ -22,8 +23,8 @@ libopts.c: $(BUILT_SOURCES)
# Makefile fragment from gnulib-s stdnoreturn module:
#
-_NORETURN_H=$(srcdir)/compat/_Noreturn.h
-EXTRA_DIST += $(srcdir)/compat/_Noreturn.h
+_NORETURN_H=$(srcdir)/_Noreturn.h
+EXTRA_DIST += _Noreturn.h
BUILT_SOURCES += $(STDNORETURN_H)
if GL_GENERATE_STDNORETURN_H
stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H)
@@ -42,23 +43,24 @@ EXTRA_DIST += stdnoreturn.in.h
EXTRA_DIST += \
COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd \
- MakeDefs.inc README ag-char-map.h \
- alias.c ao-strs.c ao-strs.h \
- autoopts/project.h autoopts/options.h autoopts/usage-txt.h \
- autoopts.c autoopts.h boolean.c \
- check.c compat/snprintf.c compat/strchr.c \
- compat/strdup.c compat/_Noreturn.h compat/pathfind.c \
- compat/compat.h compat/windows-config.h configfile.c \
+ MakeDefs.inc README _Noreturn.h \
+ ag-char-map.h alias.c ao-strs.c \
+ ao-strs.h autoopts.c autoopts.h \
+ autoopts/options.h autoopts/project.h autoopts/usage-txt.h \
+ boolean.c check.c compat/compat.h \
+ compat/pathfind.c compat/snprintf.c compat/strchr.c \
+ compat/strdup.c compat/windows-config.h configfile.c \
cook.c enum.c env.c \
file.c find.c genshell.c \
genshell.h gettext.h init.c \
- intprops.h load.c m4/stdnoreturn.m4 \
- m4/liboptschk.m4 m4/libopts.m4 makeshell.c \
+ intprops.h load.c m4/libopts.m4 \
+ m4/liboptschk.m4 m4/stdnoreturn.m4 makeshell.c \
nested.c numeric.c option-value-type.c \
option-value-type.h option-xat-attribute.c option-xat-attribute.h \
parse-duration.c parse-duration.h pgusage.c \
proto.h putshell.c reset.c \
- restore.c save.c sort.c \
- stack.c stdnoreturn.in.h streqvcmp.c \
- text_mmap.c time.c tokenize.c \
- usage.c version.c
+ restore.c save-flags.c save-flags.h \
+ save.c sort.c stack.c \
+ stdnoreturn.in.h streqvcmp.c text_mmap.c \
+ time.c tokenize.c usage.c \
+ version.c
diff --git a/contrib/ntp/sntp/libopts/Makefile.in b/contrib/ntp/sntp/libopts/Makefile.in
index f7b7d4e14714..448142558e46 100644
--- a/contrib/ntp/sntp/libopts/Makefile.in
+++ b/contrib/ntp/sntp/libopts/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -178,7 +178,8 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/libopts_la-libopts.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -222,8 +223,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -244,6 +243,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -251,6 +251,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -262,6 +264,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@@ -447,6 +450,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -461,31 +465,31 @@ MAINTAINERCLEANFILES = Makefile.in
@INSTALL_LIBOPTS_FALSE@noinst_LTLIBRARIES = libopts.la
libopts_la_SOURCES = libopts.c
libopts_la_CPPFLAGS = -I$(srcdir)
-libopts_la_LDFLAGS = -version-info 41:0:16
-EXTRA_DIST = $(srcdir)/compat/_Noreturn.h stdnoreturn.in.h \
- COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd MakeDefs.inc README \
- ag-char-map.h alias.c ao-strs.c ao-strs.h autoopts/project.h \
- autoopts/options.h autoopts/usage-txt.h autoopts.c autoopts.h \
- boolean.c check.c compat/snprintf.c compat/strchr.c \
- compat/strdup.c compat/_Noreturn.h compat/pathfind.c \
- compat/compat.h compat/windows-config.h configfile.c cook.c \
- enum.c env.c file.c find.c genshell.c genshell.h gettext.h \
- init.c intprops.h load.c m4/stdnoreturn.m4 m4/liboptschk.m4 \
- m4/libopts.m4 makeshell.c nested.c numeric.c \
+libopts_la_LDFLAGS = -version-info 42:1:17
+EXTRA_DIST = _Noreturn.h stdnoreturn.in.h COPYING.gplv3 COPYING.lgplv3 \
+ COPYING.mbsd MakeDefs.inc README _Noreturn.h ag-char-map.h \
+ alias.c ao-strs.c ao-strs.h autoopts.c autoopts.h \
+ autoopts/options.h autoopts/project.h autoopts/usage-txt.h \
+ boolean.c check.c compat/compat.h compat/pathfind.c \
+ compat/snprintf.c compat/strchr.c compat/strdup.c \
+ compat/windows-config.h configfile.c cook.c enum.c env.c \
+ file.c find.c genshell.c genshell.h gettext.h init.c \
+ intprops.h load.c m4/libopts.m4 m4/liboptschk.m4 \
+ m4/stdnoreturn.m4 makeshell.c nested.c numeric.c \
option-value-type.c option-value-type.h option-xat-attribute.c \
option-xat-attribute.h parse-duration.c parse-duration.h \
- pgusage.c proto.h putshell.c reset.c restore.c save.c sort.c \
- stack.c stdnoreturn.in.h streqvcmp.c text_mmap.c time.c \
- tokenize.c usage.c version.c
+ pgusage.c proto.h putshell.c reset.c restore.c save-flags.c \
+ save-flags.h save.c sort.c stack.c stdnoreturn.in.h \
+ streqvcmp.c text_mmap.c time.c tokenize.c usage.c version.c
BUILT_SOURCES = $(STDNORETURN_H)
MOSTLYCLEANFILES = stdnoreturn.h stdnoreturn.h-t
-AM_CFLAGS = $(NTP_HARD_CFLAGS)
+AM_CFLAGS = $(NTP_HARD_CFLAGS) $(CC_NOFORMAT)
AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
# Makefile fragment from gnulib-s stdnoreturn module:
#
-_NORETURN_H = $(srcdir)/compat/_Noreturn.h
+_NORETURN_H = $(srcdir)/_Noreturn.h
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -508,8 +512,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -576,25 +580,34 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopts_la-libopts.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopts_la-libopts.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -663,8 +676,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -704,7 +719,8 @@ installdirs:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -742,7 +758,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libopts_la-libopts.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -788,7 +804,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libopts_la-libopts.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -807,22 +823,22 @@ ps-am:
uninstall-am: uninstall-libLTLIBRARIES
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
- cscopelist-am ctags ctags-am distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-libLTLIBRARIES \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
- uninstall-am uninstall-libLTLIBRARIES
+.MAKE: all check install install-am install-exec install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
.PRECIOUS: Makefile
diff --git a/contrib/ntp/sntp/libopts/README b/contrib/ntp/sntp/libopts/README
index 98e4f3c677c8..5c8b9d7673db 100644
--- a/contrib/ntp/sntp/libopts/README
+++ b/contrib/ntp/sntp/libopts/README
@@ -115,7 +115,7 @@ These macros work as follows:
LICENSING:
-This material is Copyright (C) 1992-2015 by Bruce Korb. You are
+This material is Copyright (C) 1992-2018 by Bruce Korb. You are
licensed to use this under the terms of either the GNU Lesser General
Public License (see: COPYING.lgpl), or, at your option, the modified
Berkeley Software Distribution License (see: COPYING.mbsd). Both of
diff --git a/contrib/ntp/sntp/libopts/compat/_Noreturn.h b/contrib/ntp/sntp/libopts/_Noreturn.h
index c44ad89b7c09..c44ad89b7c09 100644
--- a/contrib/ntp/sntp/libopts/compat/_Noreturn.h
+++ b/contrib/ntp/sntp/libopts/_Noreturn.h
diff --git a/contrib/ntp/sntp/libopts/ag-char-map.h b/contrib/ntp/sntp/libopts/ag-char-map.h
index e905118ca242..cced2303ab5e 100644
--- a/contrib/ntp/sntp/libopts/ag-char-map.h
+++ b/contrib/ntp/sntp/libopts/ag-char-map.h
@@ -1,6 +1,6 @@
/*
* 29 bits for 46 character classifications
- * generated by char-mapper on 04/25/15 at 09:53:03
+ * generated by char-mapper on 08/26/18 at 10:44:22
*
* This file contains the character classifications
* used by AutoGen and AutoOpts for identifying tokens.
@@ -8,7 +8,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
diff --git a/contrib/ntp/sntp/libopts/alias.c b/contrib/ntp/sntp/libopts/alias.c
index 49e1f1fdd1a9..231f275d5043 100644
--- a/contrib/ntp/sntp/libopts/alias.c
+++ b/contrib/ntp/sntp/libopts/alias.c
@@ -12,7 +12,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -31,7 +31,7 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-LOCAL tSuccess
+static tSuccess
too_many_occurrences(tOptions * opts, tOptDesc * od)
{
if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0) {
diff --git a/contrib/ntp/sntp/libopts/ao-strs.c b/contrib/ntp/sntp/libopts/ao-strs.c
index 857aa73528b9..7f5937260171 100644
--- a/contrib/ntp/sntp/libopts/ao-strs.c
+++ b/contrib/ntp/sntp/libopts/ao-strs.c
@@ -6,7 +6,7 @@
* From the definitions ao-strs.def
* and the template file strings
*
- * Copyright (C) 2011-2015 Bruce Korb, all rights reserved.
+ * Copyright (C) 2011-2018 Bruce Korb, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the
* Modified (3 clause) Berkeley Software Distribution License
@@ -38,159 +38,164 @@
*/
#include "ao-strs.h"
-char const ao_strs_strtable[6633] =
+char const ao_strs_strtable[6714] =
/* 0 */ "-_^\0"
/* 4 */ " %s%s\n\0"
-/* 12 */ "auto-options\0"
-/* 25 */ "program\0"
-/* 33 */ "%%-%ds %%s\n\0"
-/* 45 */ "\n"
+/* 12 */ "<?auto-options\0"
+/* 27 */ "<?program\0"
+/* 37 */ "%%-%ds %%s\n\0"
+/* 49 */ "<?program %s>\n\0"
+/* 64 */ "\n"
"%s\n\n\0"
-/* 51 */ "=file\0"
-/* 57 */ "=Mbr\0"
-/* 62 */ "=Cplx\0"
-/* 68 */ "[=arg]\0"
-/* 75 */ "--%2$s%1$s\0"
-/* 86 */ "=Tim\0"
-/* 91 */ "none\0"
-/* 96 */ "# preset/initialization file\n"
+/* 70 */ "=file\0"
+/* 76 */ "=Mbr\0"
+/* 81 */ "=Cplx\0"
+/* 87 */ "[=arg]\0"
+/* 94 */ "--%2$s%1$s\0"
+/* 105 */ "=Tim\0"
+/* 110 */ "none\0"
+/* 115 */ "# preset/initialization file\n"
"# %s#\n\0"
-/* 134 */ " %3s %-14s %s\0"
-/* 148 */ "%s\0"
-/* 151 */ "T/F\0"
-/* 155 */ "\n"
+/* 153 */ " %3s %-14s %s\0"
+/* 167 */ "%s\0"
+/* 170 */ "T/F\0"
+/* 174 */ "\n"
"%s\n\n"
"%s\0"
-/* 163 */ "Fil\0"
-/* 167 */ "KWd\0"
-/* 171 */ "Mbr\0"
-/* 175 */ "Cpx\0"
-/* 179 */ "no \0"
-/* 183 */ "Num\0"
-/* 187 */ "opt\0"
-/* 191 */ "YES\0"
-/* 195 */ "Str\0"
-/* 199 */ "Tim\0"
-/* 203 */ "\t\t\t\t- \0"
-/* 210 */ "\t\t\t\t \0"
-/* 217 */ "\t\t\t\t-- and \0"
-/* 229 */ "\t\t\t\t%s\n\0"
-/* 237 */ " \0"
-/* 244 */ " \0"
-/* 250 */ " \0"
-/* 254 */ " \0"
-/* 257 */ "all\0"
-/* 261 */ " \t\n"
+/* 182 */ "Fil\0"
+/* 186 */ "KWd\0"
+/* 190 */ "Mbr\0"
+/* 194 */ "Cpx\0"
+/* 198 */ "no \0"
+/* 202 */ "Num\0"
+/* 206 */ "opt\0"
+/* 210 */ "YES\0"
+/* 214 */ "Str\0"
+/* 218 */ "Tim\0"
+/* 222 */ "\t\t\t\t- \0"
+/* 229 */ "\t\t\t\t \0"
+/* 236 */ "\t\t\t\t-- and \0"
+/* 248 */ "\t\t\t\t%s\n\0"
+/* 256 */ " \0"
+/* 263 */ " \0"
+/* 269 */ " \0"
+/* 273 */ " \0"
+/* 276 */ "all\0"
+/* 280 */ " \t\n"
":=\0"
-/* 267 */ "%s_%s_%d=\0"
-/* 277 */ "''\0"
-/* 280 */ " ;;\n\n\0"
-/* 293 */ "'\n\n\0"
-/* 297 */ "</%s>\n\0"
-/* 304 */ " %s\n\0"
-/* 310 */ "%%-%ds\0"
-/* 317 */ "\n"
+/* 286 */ "%s_%s_%d=\0"
+/* 296 */ "''\0"
+/* 299 */ " ;;\n\n\0"
+/* 312 */ "'\n\n\0"
+/* 316 */ "</%s>\n\0"
+/* 323 */ " %s\n\0"
+/* 329 */ "%%-%ds\0"
+/* 336 */ "\n"
"export %s_%s_%d\n\0"
-/* 335 */ "false\0"
-/* 341 */ " -* )\n\0"
-/* 351 */ "flag\0"
-/* 356 */ "INVALID-%d\0"
-/* 367 */ "*INVALID*\0"
-/* 377 */ "\\n\\\n\0"
-/* 382 */ " --* )\n\0"
-/* 393 */ "--\0"
-/* 396 */ "LONGUSAGE\0"
-/* 406 */ " %s\n\0"
-/* 422 */ "\\%03o\0"
-/* 428 */ "more\0"
-/* 433 */ "<%s type=nested>\n\0"
-/* 451 */ "%s\n\0"
-/* 455 */ "%s\n"
+/* 354 */ "false\0"
+/* 360 */ " -* )\n\0"
+/* 370 */ "flag\0"
+/* 375 */ "INVALID-%d\0"
+/* 386 */ "*INVALID*\0"
+/* 396 */ "\\n\\\n\0"
+/* 401 */ " --* )\n\0"
+/* 412 */ "--\0"
+/* 415 */ "LONGUSAGE\0"
+/* 425 */ " %s\n\0"
+/* 441 */ "\\%03o\0"
+/* 447 */ "more\0"
+/* 452 */ "<%s type=nested>\n\0"
+/* 470 */ "%s\n\0"
+/* 474 */ "%s\n"
" \0"
-/* 461 */ "OPT_ARG_NEEDED=NO\0"
-/* 479 */ "<%s/>\n\0"
-/* 486 */ "OPT_ARG_NEEDED=OK\0"
-/* 504 */ "\t\0"
-/* 506 */ "<%s>\0"
-/* 511 */ "option\0"
-/* 518 */ "\n"
+/* 480 */ "OPT_ARG_NEEDED=NO\0"
+/* 498 */ "<%s/>\n\0"
+/* 505 */ "OPT_ARG_NEEDED=OK\0"
+/* 523 */ "\t\0"
+/* 525 */ "<%s>\0"
+/* 530 */ "option\0"
+/* 537 */ "\n"
"export %s_%s\n\0"
-/* 533 */ "%s_%s=\0"
-/* 540 */ " | \0"
-/* 544 */ "PAGER\0"
-/* 550 */ " + \0"
-/* 554 */ " puts(_(%s));\n\0"
-/* 570 */ "\\'\0"
-/* 573 */ "'%s'\0"
-/* 578 */ " -- %s\0"
-/* 585 */ "%s_%s_TEXT='\0"
-/* 598 */ "#! %s\n\0"
-/* 605 */ "\n"
+/* 552 */ "%s_%s=\0"
+/* 559 */ " | \0"
+/* 563 */ "PAGER\0"
+/* 569 */ "%1$s %2$s ; rm -f %2$s\0"
+/* 592 */ " + \0"
+/* 596 */ " puts(_(%s));\n\0"
+/* 612 */ "\\'\0"
+/* 615 */ "'%s'\0"
+/* 620 */ " -- %s\0"
+/* 627 */ "%s_%s_TEXT='\0"
+/* 640 */ "#! %s\n\0"
+/* 647 */ "\n"
"env | grep '^%s_'\n\0"
-/* 625 */ "=%1$lu # 0x%1$lX\n\0"
-/* 643 */ "stdout\0"
-/* 650 */ "%A %B %e, %Y at %r %Z\0"
-/* 672 */ "%s/use-%u.XXXXXX\0"
-/* 689 */ "true\0"
-/* 694 */ "<%s type=%s>\0"
-/* 707 */ "VERSION\0"
-/* 715 */ "#x%02X;\0"
-/* 723 */ "OPT_ARG_NEEDED=YES\0"
-/* 742 */ "'\\''\0"
-/* 747 */ " '%s'\0"
-/* 753 */ "\n"
+/* 667 */ "=%1$lu # 0x%1$lX\n\0"
+/* 685 */ "stdout\0"
+/* 692 */ "%A %B %e, %Y at %r %Z\0"
+/* 714 */ "TMPDIR\0"
+/* 721 */ "%s/use-%u.XXXXXX\0"
+/* 738 */ "true\0"
+/* 743 */ "<%s type=%s>\0"
+/* 756 */ "VERSION\0"
+/* 764 */ "#x%02X;\0"
+/* 772 */ "OPT_ARG_NEEDED=YES\0"
+/* 791 */ "\n"
+ "# %s -- %s\n\0"
+/* 804 */ "# DEFAULT: \0"
+/* 816 */ "'\\''\0"
+/* 821 */ " '%s'\0"
+/* 827 */ "libopts misguessed length of string\n\0"
+/* 864 */ "\n"
"OPTION_CT=0\n\0"
-/* 767 */ "set --\0"
-/* 774 */ " ;;\n\n\0"
-/* 791 */ " '%c' )\n\0"
-/* 807 */ " '%s' )\n\0"
-/* 823 */ " '%s' | \\\n\0"
-/* 841 */ "TMPDIR\0"
-/* 848 */ "/tmp\0"
-/* 853 */ "%1$s %2$s ; rm -f %2$s\0"
-/* 876 */ "<%1$s type=boolean>%2$s</%1$s>\n\0"
-/* 908 */ "# From the %s option definitions\n"
+/* 878 */ "set --\0"
+/* 885 */ "/tmp\0"
+/* 890 */ " ;;\n\n\0"
+/* 907 */ " '%c' )\n\0"
+/* 923 */ " '%s' )\n\0"
+/* 939 */ " '%s' | \\\n\0"
+/* 957 */ "<%1$s type=boolean>%2$s</%1$s>\n\0"
+/* 989 */ "# From the %s option definitions\n"
"#\n\0"
-/* 945 */ "echo 'Warning: Cannot load options files' >&2\0"
-/* 992 */ "echo 'Warning: Cannot save options files' >&2\0"
-/* 1039 */ "echo 'Warning: Cannot suppress the loading of options files' >&2\0"
-/* 1105 */ "<%1$s type=integer>0x%2$lX</%1$s>\n\0"
-/* 1140 */ "%1$s_%2$s_TEXT='no %2$s text'\n\0"
-/* 1171 */ "%1$s_%2$s_MODE='%3$s'\n"
+/* 1026 */ "echo 'Warning: Cannot load options files' >&2\0"
+/* 1073 */ "echo 'Warning: Cannot save options files' >&2\0"
+/* 1120 */ "echo 'Warning: Cannot suppress the loading of options files' >&2\0"
+/* 1186 */ "<%1$s type=integer>0x%2$lX</%1$s>\n\0"
+/* 1221 */ "%1$s_%2$s_TEXT='no %2$s text'\n\0"
+/* 1252 */ "%1$s_%2$s_MODE='%3$s'\n"
"export %1$s_%2$s_MODE\n\0"
-/* 1216 */ "%1$s_%2$s='%3$s'\n"
+/* 1297 */ "%1$s_%2$s='%3$s'\n"
"export %1$s_%2$s\n\0"
-/* 1251 */ "%1$s_%2$s_CT=%3$d\n"
+/* 1332 */ "%1$s_%2$s_CT=%3$d\n"
"export %1$s_%2$s_CT\n\0"
-/* 1290 */ "OPTION_CT=%d\n"
+/* 1371 */ "OPTION_CT=%d\n"
"export OPTION_CT\n\0"
-/* 1321 */ "%1$s_%2$s=%3$s\n"
+/* 1402 */ "%1$s_%2$s=%3$s\n"
"export %1$s_%2$s\n\0"
-/* 1354 */ "%1$s_%2$s=%3$d # 0x%3$X\n"
+/* 1435 */ "%1$s_%2$s=%3$d # 0x%3$X\n"
"export %1$s_%2$s\n\0"
-/* 1396 */ " case \"${OPT_CODE}\" in\n\0"
-/* 1427 */ " if [ $%1$s_%2$s_CT -gt %3$u ] ; then\n"
+/* 1477 */ " case \"${OPT_CODE}\" in\n\0"
+/* 1508 */ " if [ $%1$s_%2$s_CT -gt %3$u ] ; then\n"
" echo 'Error: more than %3$d %2$s options'\n"
" echo \"$%1$s_USAGE_TEXT\"\n"
" exit 1\n"
" fi >&2\n\0"
-/* 1618 */ "test ${%1$s_%2$s_CT-0} -ge %3$u || {\n"
+/* 1699 */ "test ${%1$s_%2$s_CT-0} -ge %3$u || {\n"
" echo %1$s_%2$s has not been set\n"
" exit 1\n"
"} 1>&2\n\0"
-/* 1710 */ "test -n \"$%1$s_%2$s\" || {\n"
+/* 1791 */ "test -n \"$%1$s_%2$s\" || {\n"
" echo %1$s_%2$s has not been set\n"
" exit 1\n"
"} 1>&2\n\0"
-/* 1791 */ " echo \"$%s_%s_TEXT\"\n"
+/* 1872 */ " echo \"$%s_%s_TEXT\"\n"
" exit 0\n\0"
-/* 1842 */ "\n"
+/* 1923 */ "\n"
"# # # # # # # # # #\n"
"#\n"
"# END OF AUTOMATED OPTION PROCESSING\n"
"#\n"
"# # # # # # # # # # -- do not modify this marker --\n\0"
-/* 1958 */ " if [ -n \"${OPT_ARG_VAL}\" ]\n"
+/* 2039 */ " if [ -n \"${OPT_ARG_VAL}\" ]\n"
" then\n"
" eval %1$s_${OPT_NAME}${OPT_ELEMENT}=\"'${OPT_ARG_VAL}'\"\n"
" export %1$s_${OPT_NAME}${OPT_ELEMENT}\n"
@@ -205,15 +210,15 @@ char const ao_strs_strtable[6633] =
"unset OPT_NAME || :\n"
"unset OPT_CODE || :\n"
"unset OPT_ARG_VAL || :\n\0"
-/* 2337 */ " OPT_CODE=`echo \"X${OPT_ARG}\"|sed 's/^X-*//'`\n"
+/* 2418 */ " OPT_CODE=`echo \"X${OPT_ARG}\"|sed 's/^X-*//'`\n"
" shift\n"
" OPT_ARG=$1\n"
" case \"${OPT_CODE}\" in *=* )\n"
" OPT_ARG_VAL=`echo \"${OPT_CODE}\"|sed 's/^[^=]*=//'`\n"
" OPT_CODE=`echo \"${OPT_CODE}\"|sed 's/=.*$//'` ;; esac\n\0"
-/* 2588 */ " OPT_CODE=`echo \"X${OPT_ARG}\" | sed 's/X-\\(.\\).*/\\1/'`\n"
+/* 2669 */ " OPT_CODE=`echo \"X${OPT_ARG}\" | sed 's/X-\\(.\\).*/\\1/'`\n"
" OPT_ARG=` echo \"X${OPT_ARG}\" | sed 's/X-.//'`\n\0"
-/* 2705 */ "\n"
+/* 2786 */ "\n"
"ARG_COUNT=$#\n"
"OPT_PROCESS=true\n"
"OPT_ARG=$1\n"
@@ -226,7 +231,7 @@ char const ao_strs_strtable[6633] =
" OPT_PROCESS=false\n"
" shift\n"
" ;;\n\0"
-/* 2912 */ " case \"${OPT_ARG_NEEDED}\" in\n"
+/* 2993 */ " case \"${OPT_ARG_NEEDED}\" in\n"
" NO )\n"
" OPT_ARG_VAL=''\n"
" ;;\n"
@@ -254,10 +259,10 @@ char const ao_strs_strtable[6633] =
" fi\n"
" ;;\n"
" esac\n\0"
-/* 3691 */ " %1$s_%2$s_CT=`expr ${%1$s_%2$s_CT} + 1`\n"
+/* 3772 */ " %1$s_%2$s_CT=`expr ${%1$s_%2$s_CT} + 1`\n"
" OPT_ELEMENT=\"_${%1$s_%2$s_CT}\"\n"
" OPT_NAME='%2$s'\n\0"
-/* 3815 */ "\n"
+/* 3896 */ "\n"
"if test -z \"${%1$s_%2$s}\"\n"
"then\n"
" %1$s_%2$s_CT=0\n"
@@ -267,16 +272,16 @@ char const ao_strs_strtable[6633] =
" %1$s_%2$s_1=${%1$s_%2$s}\n"
" export %1$s_%2$s_CT %1$s_%2$s_1\n"
"fi\n\0"
-/* 3973 */ " * )\n"
+/* 4054 */ " * )\n"
" OPT_PROCESS=false\n"
" ;;\n"
" esac\n\0"
-/* 4030 */ " %1$s_%2$s_CT=0\n"
+/* 4111 */ " %1$s_%2$s_CT=0\n"
" OPT_ELEMENT=''\n"
" %1$s_%2$s='%3$s'\n"
" export %1$s_%2$s\n"
" OPT_NAME='%2$s'\n\0"
-/* 4171 */ " if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
+/* 4252 */ " if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
" echo 'Error: duplicate %2$s option'\n"
" echo \"$%1$s_USAGE_TEXT\"\n"
" exit 1\n"
@@ -285,7 +290,7 @@ char const ao_strs_strtable[6633] =
" %1$s_%2$s='%3$s'\n"
" export %1$s_%2$s\n"
" OPT_NAME='%2$s'\n\0"
-/* 4488 */ "\n"
+/* 4569 */ "\n"
"ARG_COUNT=$#\n"
"OPT_ARG=$1\n"
"while [ $# -gt 0 ]\n"
@@ -293,7 +298,7 @@ char const ao_strs_strtable[6633] =
" OPT_ELEMENT=''\n"
" OPT_ARG_VAL=''\n"
" OPT_ARG=${1}\n\0"
-/* 4591 */ " case \"${OPT_ARG_NEEDED}\" in\n"
+/* 4672 */ " case \"${OPT_ARG_NEEDED}\" in\n"
" NO )\n"
" if [ -n \"${OPT_ARG}\" ]\n"
" then\n"
@@ -338,33 +343,33 @@ char const ao_strs_strtable[6633] =
" fi\n"
" ;;\n"
" esac\n\0"
-/* 5745 */ " echo \"$%s_LONGUSAGE_TEXT\" | ${PAGER-more}\n"
+/* 5826 */ " echo \"$%s_LONGUSAGE_TEXT\" | ${PAGER-more}\n"
" exit 0\n\0"
-/* 5819 */ "%s OF %s\n"
+/* 5900 */ "%s OF %s\n"
"#\n"
"# From here to the next `-- do not modify this marker --',\n"
"# the text has been generated %s\n\0"
-/* 5925 */ " eval %1$s_%2$s${OPT_ELEMENT}=true\n"
+/* 6006 */ " eval %1$s_%2$s${OPT_ELEMENT}=true\n"
" export %1$s_%2$s${OPT_ELEMENT}\n\0"
-/* 6015 */ " if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
+/* 6096 */ " if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
" echo 'Error: duplicate %2$s option'\n"
" echo \"$%1$s_USAGE_TEXT\"\n"
" exit 1\n"
" fi >&2\n"
" %1$s_%2$s_set=true\n"
" OPT_NAME='%2$s'\n\0"
-/* 6274 */ "\n"
+/* 6355 */ "\n"
"%1$s_%2$s=${%1$s_%2$s-'%3$s'}\n"
"%1$s_%2$s_set=false\n"
"export %1$s_%2$s\n\0"
-/* 6343 */ "\n"
+/* 6424 */ "\n"
"%1$s_%2$s=${%1$s_%2$s}\n"
"%1$s_%2$s_set=false\n"
"export %1$s_%2$s\n\0"
-/* 6405 */ "# # # # # # # # # # -- do not modify this marker --\n"
+/* 6486 */ "# # # # # # # # # # -- do not modify this marker --\n"
"#\n"
"# DO NOT EDIT THIS SECTION\n\0"
-/* 6488 */ " * )\n"
+/* 6569 */ " * )\n"
" echo Unknown %s: \"${OPT_CODE}\" >&2\n"
" echo \"$%s_USAGE_TEXT\" >&2\n"
" exit 1\n"
diff --git a/contrib/ntp/sntp/libopts/ao-strs.h b/contrib/ntp/sntp/libopts/ao-strs.h
index 864fc48ac5c4..95036ef726b3 100644
--- a/contrib/ntp/sntp/libopts/ao-strs.h
+++ b/contrib/ntp/sntp/libopts/ao-strs.h
@@ -6,7 +6,7 @@
* From the definitions ao-strs.def
* and the template file strings
*
- * Copyright (C) 2011-2015 Bruce Korb, all rights reserved.
+ * Copyright (C) 2011-2018 Bruce Korb, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the
* Modified (3 clause) Berkeley Software Distribution License
@@ -39,292 +39,300 @@
#ifndef STRINGS_AO_STRS_H_GUARD
#define STRINGS_AO_STRS_H_GUARD 1
/*
- * 142 strings in ao_strs_strtable string table
+ * 146 strings in ao_strs_strtable string table
*/
-#define ARG_BREAK_STR (ao_strs_strtable+261)
+#define ARG_BREAK_STR (ao_strs_strtable+280)
#define ARG_BREAK_STR_LEN 5
-#define ARG_BY_NUM_FMT (ao_strs_strtable+267)
+#define ARG_BY_NUM_FMT (ao_strs_strtable+286)
#define ARG_BY_NUM_FMT_LEN 9
-#define BOOL_ATR_FMT (ao_strs_strtable+876)
+#define BOOL_ATR_FMT (ao_strs_strtable+957)
#define BOOL_ATR_FMT_LEN 31
-#define CHK_MAX_COUNT (ao_strs_strtable+1427)
+#define CHK_MAX_COUNT (ao_strs_strtable+1508)
#define CHK_MAX_COUNT_LEN 190
-#define CHK_MIN_COUNT (ao_strs_strtable+1618)
+#define CHK_MIN_COUNT (ao_strs_strtable+1699)
#define CHK_MIN_COUNT_LEN 91
-#define CHK_ONE_REQUIRED (ao_strs_strtable+1710)
+#define CHK_ONE_REQUIRED (ao_strs_strtable+1791)
#define CHK_ONE_REQUIRED_LEN 80
-#define ECHO_N_EXIT (ao_strs_strtable+1791)
+#define ECHO_N_EXIT (ao_strs_strtable+1872)
#define ECHO_N_EXIT_LEN 50
-#define EMPTY_ARG (ao_strs_strtable+277)
+#define EMPTY_ARG (ao_strs_strtable+296)
#define EMPTY_ARG_LEN 2
-#define END_MARK (ao_strs_strtable+1842)
+#define END_MARK (ao_strs_strtable+1923)
#define END_MARK_LEN 115
-#define END_OPT_SEL_STR (ao_strs_strtable+280)
+#define END_OPT_SEL_STR (ao_strs_strtable+299)
#define END_OPT_SEL_STR_LEN 12
-#define END_PRE_FMT (ao_strs_strtable+908)
+#define END_PRE_FMT (ao_strs_strtable+989)
#define END_PRE_FMT_LEN 36
-#define END_SET_TEXT (ao_strs_strtable+293)
+#define END_SET_TEXT (ao_strs_strtable+312)
#define END_SET_TEXT_LEN 3
-#define END_XML_FMT (ao_strs_strtable+297)
+#define END_XML_FMT (ao_strs_strtable+316)
#define END_XML_FMT_LEN 6
-#define ENUM_ERR_LINE (ao_strs_strtable+304)
+#define ENUM_ERR_LINE (ao_strs_strtable+323)
#define ENUM_ERR_LINE_LEN 5
-#define ENUM_ERR_WIDTH (ao_strs_strtable+310)
+#define ENUM_ERR_WIDTH (ao_strs_strtable+329)
#define ENUM_ERR_WIDTH_LEN 6
-#define EXPORT_ARG_FMT (ao_strs_strtable+317)
+#define EXPORT_ARG_FMT (ao_strs_strtable+336)
#define EXPORT_ARG_FMT_LEN 17
-#define FALSE_STR (ao_strs_strtable+335)
+#define FALSE_STR (ao_strs_strtable+354)
#define FALSE_STR_LEN 5
-#define FINISH_LOOP (ao_strs_strtable+1958)
+#define FINISH_LOOP (ao_strs_strtable+2039)
#define FINISH_LOOP_LEN 378
-#define FLAG_OPT_MARK (ao_strs_strtable+341)
+#define FLAG_OPT_MARK (ao_strs_strtable+360)
#define FLAG_OPT_MARK_LEN 9
-#define FLAG_STR (ao_strs_strtable+351)
+#define FLAG_STR (ao_strs_strtable+370)
#define FLAG_STR_LEN 4
-#define INIT_LOPT_STR (ao_strs_strtable+2337)
+#define INIT_LOPT_STR (ao_strs_strtable+2418)
#define INIT_LOPT_STR_LEN 250
-#define INIT_OPT_STR (ao_strs_strtable+2588)
+#define INIT_OPT_STR (ao_strs_strtable+2669)
#define INIT_OPT_STR_LEN 116
-#define INVALID_FMT (ao_strs_strtable+356)
+#define INVALID_FMT (ao_strs_strtable+375)
#define INVALID_FMT_LEN 10
-#define INVALID_STR (ao_strs_strtable+367)
+#define INVALID_STR (ao_strs_strtable+386)
#define INVALID_STR_LEN 9
-#define LINE_SPLICE (ao_strs_strtable+377)
+#define LINE_SPLICE (ao_strs_strtable+396)
#define LINE_SPLICE_LEN 4
-#define LONG_OPT_MARK (ao_strs_strtable+382)
-#define LONG_OPT_MARKER (ao_strs_strtable+393)
+#define LONG_OPT_MARK (ao_strs_strtable+401)
+#define LONG_OPT_MARKER (ao_strs_strtable+412)
#define LONG_OPT_MARKER_LEN 2
#define LONG_OPT_MARK_LEN 10
-#define LONG_USE_STR (ao_strs_strtable+396)
+#define LONG_USE_STR (ao_strs_strtable+415)
#define LONG_USE_STR_LEN 9
-#define LOOP_STR (ao_strs_strtable+2705)
+#define LOOP_STR (ao_strs_strtable+2786)
#define LOOP_STR_LEN 206
-#define LOPT_ARG_FMT (ao_strs_strtable+2912)
+#define LOPT_ARG_FMT (ao_strs_strtable+2993)
#define LOPT_ARG_FMT_LEN 778
-#define LVL3_CMD (ao_strs_strtable+406)
+#define LVL3_CMD (ao_strs_strtable+425)
#define LVL3_CMD_LEN 15
-#define MK_STR_OCT_FMT (ao_strs_strtable+422)
+#define MK_STR_OCT_FMT (ao_strs_strtable+441)
#define MK_STR_OCT_FMT_LEN 5
-#define MORE_STR (ao_strs_strtable+428)
+#define MORE_STR (ao_strs_strtable+447)
#define MORE_STR_LEN 4
-#define MULTI_ARG_FMT (ao_strs_strtable+3691)
+#define MULTI_ARG_FMT (ao_strs_strtable+3772)
#define MULTI_ARG_FMT_LEN 123
-#define MULTI_DEF_FMT (ao_strs_strtable+3815)
+#define MULTI_DEF_FMT (ao_strs_strtable+3896)
#define MULTI_DEF_FMT_LEN 157
-#define NESTED_OPT_FMT (ao_strs_strtable+433)
+#define NESTED_OPT_FMT (ao_strs_strtable+452)
#define NESTED_OPT_FMT_LEN 17
-#define NLSTR_FMT (ao_strs_strtable+451)
+#define NLSTR_FMT (ao_strs_strtable+470)
#define NLSTR_FMT_LEN 3
-#define NLSTR_SPACE_FMT (ao_strs_strtable+455)
+#define NLSTR_SPACE_FMT (ao_strs_strtable+474)
#define NLSTR_SPACE_FMT_LEN 5
-#define NONE_STR (ao_strs_strtable+91)
+#define NONE_STR (ao_strs_strtable+110)
#define NONE_STR_LEN 4
-#define NOT_FOUND_STR (ao_strs_strtable+3973)
+#define NOT_FOUND_STR (ao_strs_strtable+4054)
#define NOT_FOUND_STR_LEN 56
-#define NO_ARG_NEEDED (ao_strs_strtable+461)
+#define NO_ARG_NEEDED (ao_strs_strtable+480)
#define NO_ARG_NEEDED_LEN 17
-#define NO_LOAD_WARN (ao_strs_strtable+945)
+#define NO_LOAD_WARN (ao_strs_strtable+1026)
#define NO_LOAD_WARN_LEN 46
-#define NO_MULTI_ARG_FMT (ao_strs_strtable+4030)
+#define NO_MULTI_ARG_FMT (ao_strs_strtable+4111)
#define NO_MULTI_ARG_FMT_LEN 140
-#define NO_SAVE_OPTS (ao_strs_strtable+992)
+#define NO_SAVE_OPTS (ao_strs_strtable+1073)
#define NO_SAVE_OPTS_LEN 46
-#define NO_SGL_ARG_FMT (ao_strs_strtable+4171)
+#define NO_SGL_ARG_FMT (ao_strs_strtable+4252)
#define NO_SGL_ARG_FMT_LEN 316
-#define NO_SUPPRESS_LOAD (ao_strs_strtable+1039)
+#define NO_SUPPRESS_LOAD (ao_strs_strtable+1120)
#define NO_SUPPRESS_LOAD_LEN 65
-#define NULL_ATR_FMT (ao_strs_strtable+479)
+#define NULL_ATR_FMT (ao_strs_strtable+498)
#define NULL_ATR_FMT_LEN 6
-#define NUMB_ATR_FMT (ao_strs_strtable+1105)
+#define NUMB_ATR_FMT (ao_strs_strtable+1186)
#define NUMB_ATR_FMT_LEN 34
-#define OK_NEED_OPT_ARG (ao_strs_strtable+486)
+#define OK_NEED_OPT_ARG (ao_strs_strtable+505)
#define OK_NEED_OPT_ARG_LEN 17
-#define ONE_TAB_STR (ao_strs_strtable+504)
+#define ONE_TAB_STR (ao_strs_strtable+523)
#define ONE_TAB_STR_LEN 1
-#define ONLY_OPTS_LOOP (ao_strs_strtable+4488)
+#define ONLY_OPTS_LOOP (ao_strs_strtable+4569)
#define ONLY_OPTS_LOOP_LEN 102
-#define OPEN_CLOSE_FMT (ao_strs_strtable+479)
+#define OPEN_CLOSE_FMT (ao_strs_strtable+498)
#define OPEN_CLOSE_FMT_LEN 6
-#define OPEN_XML_FMT (ao_strs_strtable+506)
+#define OPEN_XML_FMT (ao_strs_strtable+525)
#define OPEN_XML_FMT_LEN 4
-#define OPTION_STR (ao_strs_strtable+511)
+#define OPTION_STR (ao_strs_strtable+530)
#define OPTION_STR_LEN 6
-#define OPT_ARG_FMT (ao_strs_strtable+4591)
+#define OPT_ARG_FMT (ao_strs_strtable+4672)
#define OPT_ARG_FMT_LEN 1153
-#define OPT_END_FMT (ao_strs_strtable+518)
+#define OPT_END_FMT (ao_strs_strtable+537)
#define OPT_END_FMT_LEN 14
-#define OPT_VAL_FMT (ao_strs_strtable+533)
+#define OPT_VAL_FMT (ao_strs_strtable+552)
#define OPT_VAL_FMT_LEN 6
-#define OR_STR (ao_strs_strtable+540)
+#define OR_STR (ao_strs_strtable+559)
#define OR_STR_LEN 3
-#define PAGER_NAME (ao_strs_strtable+544)
+#define PAGER_NAME (ao_strs_strtable+563)
#define PAGER_NAME_LEN 5
-#define PAGE_USAGE_FMT (ao_strs_strtable+853)
+#define PAGE_USAGE_FMT (ao_strs_strtable+569)
#define PAGE_USAGE_FMT_LEN 22
-#define PAGE_USAGE_TEXT (ao_strs_strtable+5745)
+#define PAGE_USAGE_TEXT (ao_strs_strtable+5826)
#define PAGE_USAGE_TEXT_LEN 73
-#define PLUS_STR (ao_strs_strtable+550)
+#define PLUS_STR (ao_strs_strtable+592)
#define PLUS_STR_LEN 3
-#define PREAMBLE_FMT (ao_strs_strtable+5819)
+#define PREAMBLE_FMT (ao_strs_strtable+5900)
#define PREAMBLE_FMT_LEN 105
-#define PUTS_FMT (ao_strs_strtable+554)
+#define PUTS_FMT (ao_strs_strtable+596)
#define PUTS_FMT_LEN 15
-#define QUOT_APOS (ao_strs_strtable+570)
+#define QUOT_APOS (ao_strs_strtable+612)
#define QUOT_APOS_LEN 2
-#define QUOT_ARG_FMT (ao_strs_strtable+573)
+#define QUOT_ARG_FMT (ao_strs_strtable+615)
#define QUOT_ARG_FMT_LEN 4
-#define SET_MULTI_ARG (ao_strs_strtable+5925)
+#define SET_MULTI_ARG (ao_strs_strtable+6006)
#define SET_MULTI_ARG_LEN 89
-#define SET_NO_TEXT_FMT (ao_strs_strtable+1140)
+#define SET_NO_TEXT_FMT (ao_strs_strtable+1221)
#define SET_NO_TEXT_FMT_LEN 30
-#define SET_OFF_FMT (ao_strs_strtable+578)
+#define SET_OFF_FMT (ao_strs_strtable+620)
#define SET_OFF_FMT_LEN 6
-#define SET_TEXT_FMT (ao_strs_strtable+585)
+#define SET_TEXT_FMT (ao_strs_strtable+627)
#define SET_TEXT_FMT_LEN 12
-#define SGL_ARG_FMT (ao_strs_strtable+6015)
+#define SGL_ARG_FMT (ao_strs_strtable+6096)
#define SGL_ARG_FMT_LEN 258
-#define SGL_DEF_FMT (ao_strs_strtable+6274)
+#define SGL_DEF_FMT (ao_strs_strtable+6355)
#define SGL_DEF_FMT_LEN 68
-#define SGL_NO_DEF_FMT (ao_strs_strtable+6343)
+#define SGL_NO_DEF_FMT (ao_strs_strtable+6424)
#define SGL_NO_DEF_FMT_LEN 61
-#define SHELL_MAGIC (ao_strs_strtable+598)
+#define SHELL_MAGIC (ao_strs_strtable+640)
#define SHELL_MAGIC_LEN 6
-#define SHOW_PROG_ENV (ao_strs_strtable+605)
+#define SHOW_PROG_ENV (ao_strs_strtable+647)
#define SHOW_PROG_ENV_LEN 19
-#define SHOW_VAL_FMT (ao_strs_strtable+625)
+#define SHOW_VAL_FMT (ao_strs_strtable+667)
#define SHOW_VAL_FMT_LEN 17
-#define START_MARK (ao_strs_strtable+6405)
+#define START_MARK (ao_strs_strtable+6486)
#define START_MARK_LEN 82
-#define STDOUT (ao_strs_strtable+643)
+#define STDOUT (ao_strs_strtable+685)
#define STDOUT_LEN 6
-#define TIME_FMT (ao_strs_strtable+650)
+#define TIME_FMT (ao_strs_strtable+692)
#define TIME_FMT_LEN 21
-#define TMPDIR (ao_strs_strtable+841)
+#define TMPDIR (ao_strs_strtable+714)
#define TMPDIR_LEN 6
-#define TMP_FILE_FMT (ao_strs_strtable+672)
+#define TMP_FILE_FMT (ao_strs_strtable+721)
#define TMP_FILE_FMT_LEN 16
-#define TMP_USAGE_FMT (ao_strs_strtable+672)
+#define TMP_USAGE_FMT (ao_strs_strtable+721)
#define TMP_USAGE_FMT_LEN 16
-#define TRUE_STR (ao_strs_strtable+689)
+#define TRUE_STR (ao_strs_strtable+738)
#define TRUE_STR_LEN 4
-#define TWO_SPACES_STR (ao_strs_strtable+254)
+#define TWO_SPACES_STR (ao_strs_strtable+273)
#define TWO_SPACES_STR_LEN 2
-#define TYPE_ATR_FMT (ao_strs_strtable+694)
+#define TYPE_ATR_FMT (ao_strs_strtable+743)
#define TYPE_ATR_FMT_LEN 12
-#define UNK_OPT_FMT (ao_strs_strtable+6488)
+#define UNK_OPT_FMT (ao_strs_strtable+6569)
#define UNK_OPT_FMT_LEN 144
-#define VER_STR (ao_strs_strtable+707)
+#define VER_STR (ao_strs_strtable+756)
#define VER_STR_LEN 7
-#define XML_HEX_BYTE_FMT (ao_strs_strtable+715)
+#define XML_HEX_BYTE_FMT (ao_strs_strtable+764)
#define XML_HEX_BYTE_FMT_LEN 7
-#define YES_NEED_OPT_ARG (ao_strs_strtable+723)
+#define YES_NEED_OPT_ARG (ao_strs_strtable+772)
#define YES_NEED_OPT_ARG_LEN 18
-#define apostrophe (ao_strs_strtable+742)
+#define ao_default_use (ao_strs_strtable+804)
+#define ao_default_use_LEN 11
+#define ao_name_use_fmt (ao_strs_strtable+791)
+#define ao_name_use_fmt_LEN 12
+#define apostrophe (ao_strs_strtable+816)
#define apostrophe_LEN 4
-#define arg_fmt (ao_strs_strtable+747)
+#define arg_fmt (ao_strs_strtable+821)
#define arg_fmt_LEN 5
-#define init_optct (ao_strs_strtable+753)
+#define init_optct (ao_strs_strtable+864)
#define init_optct_LEN 13
-#define set_dash (ao_strs_strtable+767)
+#define misguess_len (ao_strs_strtable+827)
+#define misguess_len_LEN 36
+#define set_dash (ao_strs_strtable+878)
#define set_dash_LEN 6
-#define tmp_dir (ao_strs_strtable+848)
+#define tmp_dir (ao_strs_strtable+885)
#define tmp_dir_LEN 4
-#define zAll (ao_strs_strtable+257)
+#define zAll (ao_strs_strtable+276)
#define zAll_LEN 3
#define zCfgAO_Flags (ao_strs_strtable+12)
-#define zCfgAO_Flags_LEN 12
-#define zCfgProg (ao_strs_strtable+25)
-#define zCfgProg_LEN 7
-#define zEquivMode (ao_strs_strtable+1171)
+#define zCfgAO_Flags_LEN 14
+#define zCfgProg (ao_strs_strtable+27)
+#define zCfgProg_LEN 9
+#define zEquivMode (ao_strs_strtable+1252)
#define zEquivMode_LEN 44
-#define zFiveSpaces (ao_strs_strtable+244)
+#define zFiveSpaces (ao_strs_strtable+263)
#define zFiveSpaces_LEN 5
-#define zFmtFmt (ao_strs_strtable+33)
+#define zFmtFmt (ao_strs_strtable+37)
#define zFmtFmt_LEN 11
-#define zFullOptFmt (ao_strs_strtable+1216)
+#define zFmtProg (ao_strs_strtable+49)
+#define zFmtProg_LEN 14
+#define zFullOptFmt (ao_strs_strtable+1297)
#define zFullOptFmt_LEN 34
-#define zGnuBreak (ao_strs_strtable+45)
+#define zGnuBreak (ao_strs_strtable+64)
#define zGnuBreak_LEN 5
-#define zGnuFileArg (ao_strs_strtable+51)
+#define zGnuFileArg (ao_strs_strtable+70)
#define zGnuFileArg_LEN 5
-#define zGnuKeyLArg (ao_strs_strtable+57)
+#define zGnuKeyLArg (ao_strs_strtable+76)
#define zGnuKeyLArg_LEN 4
-#define zGnuNestArg (ao_strs_strtable+62)
+#define zGnuNestArg (ao_strs_strtable+81)
#define zGnuNestArg_LEN 5
-#define zGnuOptArg (ao_strs_strtable+68)
+#define zGnuOptArg (ao_strs_strtable+87)
#define zGnuOptArg_LEN 6
-#define zGnuOptFmt (ao_strs_strtable+75)
+#define zGnuOptFmt (ao_strs_strtable+94)
#define zGnuOptFmt_LEN 10
-#define zGnuTimeArg (ao_strs_strtable+86)
+#define zGnuTimeArg (ao_strs_strtable+105)
#define zGnuTimeArg_LEN 4
-#define zNone (ao_strs_strtable+91)
+#define zNone (ao_strs_strtable+110)
#define zNone_LEN 4
-#define zOptCookieCt (ao_strs_strtable+1251)
+#define zOptCookieCt (ao_strs_strtable+1332)
#define zOptCookieCt_LEN 38
-#define zOptCtFmt (ao_strs_strtable+1290)
+#define zOptCtFmt (ao_strs_strtable+1371)
#define zOptCtFmt_LEN 30
-#define zOptDisabl (ao_strs_strtable+1321)
+#define zOptDisabl (ao_strs_strtable+1402)
#define zOptDisabl_LEN 32
-#define zOptNumFmt (ao_strs_strtable+1354)
+#define zOptNumFmt (ao_strs_strtable+1435)
#define zOptNumFmt_LEN 41
-#define zOptionCase (ao_strs_strtable+1396)
+#define zOptionCase (ao_strs_strtable+1477)
#define zOptionCase_LEN 30
-#define zOptionEndSelect (ao_strs_strtable+774)
+#define zOptionEndSelect (ao_strs_strtable+890)
#define zOptionEndSelect_LEN 16
-#define zOptionFlag (ao_strs_strtable+791)
+#define zOptionFlag (ao_strs_strtable+907)
#define zOptionFlag_LEN 15
-#define zOptionFullName (ao_strs_strtable+807)
+#define zOptionFullName (ao_strs_strtable+923)
#define zOptionFullName_LEN 15
-#define zOptionPartName (ao_strs_strtable+823)
+#define zOptionPartName (ao_strs_strtable+939)
#define zOptionPartName_LEN 17
-#define zPresetFile (ao_strs_strtable+96)
+#define zPresetFile (ao_strs_strtable+115)
#define zPresetFile_LEN 37
-#define zReqOptFmt (ao_strs_strtable+134)
+#define zReqOptFmt (ao_strs_strtable+153)
#define zReqOptFmt_LEN 13
#define zSepChars (ao_strs_strtable+0)
#define zSepChars_LEN 3
-#define zShrtGnuOptFmt (ao_strs_strtable+148)
+#define zShrtGnuOptFmt (ao_strs_strtable+167)
#define zShrtGnuOptFmt_LEN 2
-#define zSixSpaces (ao_strs_strtable+237)
+#define zSixSpaces (ao_strs_strtable+256)
#define zSixSpaces_LEN 6
-#define zStdBoolArg (ao_strs_strtable+151)
+#define zStdBoolArg (ao_strs_strtable+170)
#define zStdBoolArg_LEN 3
-#define zStdBreak (ao_strs_strtable+155)
+#define zStdBreak (ao_strs_strtable+174)
#define zStdBreak_LEN 7
-#define zStdFileArg (ao_strs_strtable+163)
+#define zStdFileArg (ao_strs_strtable+182)
#define zStdFileArg_LEN 3
-#define zStdKeyArg (ao_strs_strtable+167)
+#define zStdKeyArg (ao_strs_strtable+186)
#define zStdKeyArg_LEN 3
-#define zStdKeyLArg (ao_strs_strtable+171)
+#define zStdKeyLArg (ao_strs_strtable+190)
#define zStdKeyLArg_LEN 3
-#define zStdNestArg (ao_strs_strtable+175)
+#define zStdNestArg (ao_strs_strtable+194)
#define zStdNestArg_LEN 3
-#define zStdNoArg (ao_strs_strtable+179)
+#define zStdNoArg (ao_strs_strtable+198)
#define zStdNoArg_LEN 3
-#define zStdNumArg (ao_strs_strtable+183)
+#define zStdNumArg (ao_strs_strtable+202)
#define zStdNumArg_LEN 3
-#define zStdOptArg (ao_strs_strtable+187)
+#define zStdOptArg (ao_strs_strtable+206)
#define zStdOptArg_LEN 3
-#define zStdReqArg (ao_strs_strtable+191)
+#define zStdReqArg (ao_strs_strtable+210)
#define zStdReqArg_LEN 3
-#define zStdStrArg (ao_strs_strtable+195)
+#define zStdStrArg (ao_strs_strtable+214)
#define zStdStrArg_LEN 3
-#define zStdTimeArg (ao_strs_strtable+199)
+#define zStdTimeArg (ao_strs_strtable+218)
#define zStdTimeArg_LEN 3
-#define zTabHyp (ao_strs_strtable+203)
-#define zTabHypAnd (ao_strs_strtable+217)
+#define zTabHyp (ao_strs_strtable+222)
+#define zTabHypAnd (ao_strs_strtable+236)
#define zTabHypAnd_LEN 11
#define zTabHyp_LEN 6
-#define zTabSpace (ao_strs_strtable+210)
+#define zTabSpace (ao_strs_strtable+229)
#define zTabSpace_LEN 6
-#define zTabout (ao_strs_strtable+229)
+#define zTabout (ao_strs_strtable+248)
#define zTabout_LEN 7
-#define zThreeSpaces (ao_strs_strtable+250)
+#define zThreeSpaces (ao_strs_strtable+269)
#define zThreeSpaces_LEN 3
-#define zTwoSpaces (ao_strs_strtable+254)
+#define zTwoSpaces (ao_strs_strtable+273)
#define zTwoSpaces_LEN 2
#define zambig_file (ao_strs_strtable+4)
#define zambig_file_LEN 7
-extern char const ao_strs_strtable[6633];
+extern char const ao_strs_strtable[6714];
#endif /* STRINGS_AO_STRS_H_GUARD */
diff --git a/contrib/ntp/sntp/libopts/autoopts.c b/contrib/ntp/sntp/libopts/autoopts.c
index 4b15acafbb63..643d27723952 100644
--- a/contrib/ntp/sntp/libopts/autoopts.c
+++ b/contrib/ntp/sntp/libopts/autoopts.c
@@ -13,7 +13,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -35,7 +35,7 @@
/**
* The number of tab characters to skip when printing continuation lines.
*/
-static unsigned int tab_skip_ct = 0;
+ static unsigned int tab_skip_ct = 0;
#ifndef HAVE_PATHFIND
# define pathfind(_p, _n, _m) option_pathfind(_p, _n, _m)
@@ -59,7 +59,7 @@ static unsigned int tab_skip_ct = 0;
# include "compat/strchr.c"
#endif
-LOCAL void *
+static void *
ao_malloc(size_t sz)
{
void * res = malloc(sz);
@@ -69,10 +69,8 @@ ao_malloc(size_t sz)
}
return res;
}
-#undef malloc
-#define malloc(_s) ao_malloc(_s)
-LOCAL void *
+static void *
ao_realloc(void *p, size_t sz)
{
void * res = (p == NULL) ? malloc(sz) : realloc(p, sz);
@@ -82,10 +80,8 @@ ao_realloc(void *p, size_t sz)
}
return res;
}
-#undef realloc
-#define realloc(_p,_s) ao_realloc(_p,_s)
-LOCAL char *
+static char *
ao_strdup(char const *str)
{
char * res = strdup(str);
@@ -95,8 +91,6 @@ ao_strdup(char const *str)
}
return res;
}
-#undef strdup
-#define strdup(_p) ao_strdup(_p)
/**
* handle an option.
@@ -104,7 +98,7 @@ ao_strdup(char const *str)
* This routine handles equivalencing, sets the option state flags and
* invokes the handler procedure, if any.
*/
-LOCAL tSuccess
+static tSuccess
handle_opt(tOptions * opts, tOptState * o_st)
{
/*
@@ -217,7 +211,7 @@ handle_opt(tOptions * opts, tOptState * o_st)
* @param opts the program option descriptor
* @param o_st the state of the next found option
*/
-LOCAL tSuccess
+static tSuccess
next_opt(tOptions * opts, tOptState * o_st)
{
{
@@ -244,7 +238,7 @@ next_opt(tOptions * opts, tOptState * o_st)
* @param[in,out] opts program options descriptor
* @returns SUCCESS or FAILURE
*/
-LOCAL tSuccess
+static tSuccess
regular_opts(tOptions * opts)
{
/* assert: opts->fOptSet & OPTPROC_IMMEDIATE == 0 */
diff --git a/contrib/ntp/sntp/libopts/autoopts.h b/contrib/ntp/sntp/libopts/autoopts.h
index 6f75f9e44e55..f7a64f17af05 100644
--- a/contrib/ntp/sntp/libopts/autoopts.h
+++ b/contrib/ntp/sntp/libopts/autoopts.h
@@ -11,7 +11,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -41,6 +41,9 @@
# ifdef PATH_MAX
# define AG_PATH_MAX ((size_t)PATH_MAX)
# else
+# ifdef __gnu_hurd__
+# define size_t unsigned long
+# endif
# define AG_PATH_MAX ((size_t)4096)
# endif
#else
@@ -460,6 +463,13 @@ static char const * program_pkgdatadir = pkgdatadir_default;
static tOptionLoadMode option_load_mode = OPTION_LOAD_UNCOOKED;
static tePagerState pagerState = PAGER_STATE_INITIAL;
+static lo_noreturn void option_exits(int exit_code);
+static lo_noreturn void fserr_exit(char const * prog, char const * op,
+ char const * fname);
+static void fserr_warn(char const * prog, char const * op,
+ char const * fname);
+static lo_noreturn void ao_bug(char const * msg);
+
FILE * option_usage_fp = NULL;
static char const * pz_enum_err_fmt;
diff --git a/contrib/ntp/sntp/libopts/autoopts/options.h b/contrib/ntp/sntp/libopts/autoopts/options.h
index 09aac10bce73..08dc546214e0 100644
--- a/contrib/ntp/sntp/libopts/autoopts/options.h
+++ b/contrib/ntp/sntp/libopts/autoopts/options.h
@@ -9,11 +9,11 @@
* This file defines all the global structures and special values
* used in the automated option processing library.
*
- * Automated Options Copyright (C) 1992-2015 by Bruce Korb
+ * Automated Options Copyright (C) 1992-2018 by Bruce Korb
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -64,7 +64,7 @@
# if defined(HAVE_STDBOOL_H)
# include <stdbool.h>
-# else
+# elif ! defined(bool)
typedef enum { false = 0, true = 1 } _Bool;
# define bool _Bool
@@ -109,15 +109,15 @@
* @{
*/
/// autoopts structure version
-#define OPTIONS_STRUCT_VERSION 167937
+#define OPTIONS_STRUCT_VERSION 172033
/// autoopts structure version string
-#define OPTIONS_VERSION_STRING "41:0:16"
+#define OPTIONS_VERSION_STRING "42:1:17"
/// minimum version the autoopts library supports
#define OPTIONS_MINIMUM_VERSION 102400
/// minimum version the autoopts library supports as a string
#define OPTIONS_MIN_VER_STRING "25:0:0"
/// the display version of the autoopts library, as a string
-#define OPTIONS_DOTTED_VERSION "41.0"
+#define OPTIONS_DOTTED_VERSION "42.1"
/// convert a version/release number pair to an integer value
#define OPTIONS_VER_TO_NUM(_v, _r) (((_v) * 4096) + (_r))
/// @}
@@ -140,7 +140,8 @@ typedef enum {
OPARG_TYPE_FLOAT = 9, ///< opt arg is a floating point num
OPARG_TYPE_DOUBLE = 10, ///< opt arg is a double prec. float
OPARG_TYPE_LONG_DOUBLE = 11, ///< opt arg is a long double prec.
- OPARG_TYPE_LONG_LONG = 12 ///< opt arg is a long long int
+ OPARG_TYPE_LONG_LONG = 12, ///< opt arg is a long long int
+ OPARG_TYPE_STATIC = 13 ///<
} teOptArgType;
/**
@@ -641,6 +642,7 @@ struct options {
void * pSavedState;
/// The procedure to call to print usage text
+ /* __attribute__((__noreturn__)) */
// coverity[+kill]
tpUsageProc pUsageProc;
/// The procedure to call to translate translatable option messages
diff --git a/contrib/ntp/sntp/libopts/autoopts/project.h b/contrib/ntp/sntp/libopts/autoopts/project.h
index 1e7f156ec6e8..05ebe5e92f87 100644
--- a/contrib/ntp/sntp/libopts/autoopts/project.h
+++ b/contrib/ntp/sntp/libopts/autoopts/project.h
@@ -4,7 +4,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -71,7 +71,17 @@ typedef int tSuccess;
# define MODE extern
#endif
+#undef NUL
+#define NUL '\0'
+
+#define MOD_LOCAL static
#define parse_duration option_parse_duration
+#ifdef _MSC_VER
+#define lo_noreturn __declspec(noreturn)
+#else
+#define lo_noreturn noreturn
+#endif
+
#endif /* AUTOGEN_PROJECT_H */
/* end of project.h */
diff --git a/contrib/ntp/sntp/libopts/autoopts/usage-txt.h b/contrib/ntp/sntp/libopts/autoopts/usage-txt.h
index f5831e6d2996..e94337d69b81 100644
--- a/contrib/ntp/sntp/libopts/autoopts/usage-txt.h
+++ b/contrib/ntp/sntp/libopts/autoopts/usage-txt.h
@@ -8,7 +8,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2017 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -29,7 +29,7 @@
/** @file usage-txt.h
*
* This file handles all the bookkeeping required for tracking all the little
- * tiny strings used by the AutoOpts library. There are 108
+ * tiny strings used by the AutoOpts library. There are 107
* of them. This is not versioned because it is entirely internal to the
* library and accessed by client code only in a very well-controlled way:
* they may substitute translated strings using a procedure that steps through
@@ -47,7 +47,7 @@ typedef struct {
char * utpz_GnuKeyArg;
char * utpz_GnuNumArg;
char * utpz_GnuStrArg;
- char const * apz_str[104];
+ char const * apz_str[103];
} usage_text_t;
/*
@@ -55,7 +55,7 @@ typedef struct {
* strings and the text array containing untranslatable strings.
*/
extern usage_text_t option_xlateable_txt;
-extern char const option_lib_text[4285];
+extern char const option_lib_text[4267];
#if defined(AUTOOPTS_INTERNAL)
/*
@@ -110,67 +110,66 @@ extern char const option_lib_text[4285];
#define zNoState (option_xlateable_txt.apz_str[ 40])
#define zNotCmdOpt (option_xlateable_txt.apz_str[ 41])
#define zNotDate (option_xlateable_txt.apz_str[ 42])
-#define zNotDef (option_xlateable_txt.apz_str[ 43])
-#define zNotDuration (option_xlateable_txt.apz_str[ 44])
-#define zneed_more (option_xlateable_txt.apz_str[ 45])
-#define zNotNumber (option_xlateable_txt.apz_str[ 46])
-#define znum_too_large (option_xlateable_txt.apz_str[ 47])
-#define zoffer_usage_fmt (option_xlateable_txt.apz_str[ 48])
-#define zonly_one (option_xlateable_txt.apz_str[ 49])
-#define zstdout_name (option_xlateable_txt.apz_str[ 50])
-#define zstderr_name (option_xlateable_txt.apz_str[ 51])
-#define zwriting (option_xlateable_txt.apz_str[ 52])
-#define zRangeErr (option_xlateable_txt.apz_str[ 53])
-#define zneed_fmt (option_xlateable_txt.apz_str[ 54])
-#define zsave_warn (option_xlateable_txt.apz_str[ 55])
-#define zalt_opt (option_xlateable_txt.apz_str[ 56])
-#define zAuto (option_xlateable_txt.apz_str[ 57])
-#define zDefaultOpt (option_xlateable_txt.apz_str[ 58])
-#define zDis (option_xlateable_txt.apz_str[ 59])
-#define zDisabledOpt (option_xlateable_txt.apz_str[ 60])
-#define zDisabledWhy (option_xlateable_txt.apz_str[ 61])
-#define zEnab (option_xlateable_txt.apz_str[ 62])
-#define ztoo_often_fmt (option_xlateable_txt.apz_str[ 63])
-#define zExamineFmt (option_xlateable_txt.apz_str[ 64])
-#define zFileCannotExist (option_xlateable_txt.apz_str[ 65])
-#define zFileMustExist (option_xlateable_txt.apz_str[ 66])
-#define zFlagOkay (option_xlateable_txt.apz_str[ 67])
-#define zGenshell (option_xlateable_txt.apz_str[ 68])
-#define zLowerBits (option_xlateable_txt.apz_str[ 69])
-#define zMembers (option_xlateable_txt.apz_str[ 70])
-#define zMust (option_xlateable_txt.apz_str[ 71])
-#define zNoFlags (option_xlateable_txt.apz_str[ 72])
-#define zNoLim (option_xlateable_txt.apz_str[ 73])
-#define zNoPreset (option_xlateable_txt.apz_str[ 74])
-#define zNoRq_NoShrtTtl (option_xlateable_txt.apz_str[ 75])
-#define zNoRq_ShrtTtl (option_xlateable_txt.apz_str[ 76])
-#define zNrmOptFmt (option_xlateable_txt.apz_str[ 77])
-#define zNumberOpt (option_xlateable_txt.apz_str[ 78])
-#define zOptsOnly (option_xlateable_txt.apz_str[ 79])
-#define zPathFmt (option_xlateable_txt.apz_str[ 80])
-#define zPlsSendBugs (option_xlateable_txt.apz_str[ 81])
-#define zPreset (option_xlateable_txt.apz_str[ 82])
-#define zPresetIntro (option_xlateable_txt.apz_str[ 83])
-#define zProhib (option_xlateable_txt.apz_str[ 84])
-#define zProhibOne (option_xlateable_txt.apz_str[ 85])
-#define zRange (option_xlateable_txt.apz_str[ 86])
-#define zRangeAbove (option_xlateable_txt.apz_str[ 87])
-#define zRangeExact (option_xlateable_txt.apz_str[ 88])
-#define zRangeLie (option_xlateable_txt.apz_str[ 89])
-#define zRangeOnly (option_xlateable_txt.apz_str[ 90])
-#define zRangeOr (option_xlateable_txt.apz_str[ 91])
-#define zRangeScaled (option_xlateable_txt.apz_str[ 92])
-#define zRangeUpto (option_xlateable_txt.apz_str[ 93])
-#define zReorder (option_xlateable_txt.apz_str[ 94])
-#define zReqOne (option_xlateable_txt.apz_str[ 95])
-#define zReqThese (option_xlateable_txt.apz_str[ 96])
-#define zReq_NoShrtTtl (option_xlateable_txt.apz_str[ 97])
-#define zReq_ShrtTtl (option_xlateable_txt.apz_str[ 98])
-#define zSetMemberSettings (option_xlateable_txt.apz_str[ 99])
-#define zUpTo (option_xlateable_txt.apz_str[100])
-#define zValidKeys (option_xlateable_txt.apz_str[101])
-#define zVendIntro (option_xlateable_txt.apz_str[102])
-#define zVendOptsAre (option_xlateable_txt.apz_str[103])
+#define zNotDuration (option_xlateable_txt.apz_str[ 43])
+#define zneed_more (option_xlateable_txt.apz_str[ 44])
+#define zNotNumber (option_xlateable_txt.apz_str[ 45])
+#define znum_too_large (option_xlateable_txt.apz_str[ 46])
+#define zoffer_usage_fmt (option_xlateable_txt.apz_str[ 47])
+#define zonly_one (option_xlateable_txt.apz_str[ 48])
+#define zstdout_name (option_xlateable_txt.apz_str[ 49])
+#define zstderr_name (option_xlateable_txt.apz_str[ 50])
+#define zwriting (option_xlateable_txt.apz_str[ 51])
+#define zRangeErr (option_xlateable_txt.apz_str[ 52])
+#define zneed_fmt (option_xlateable_txt.apz_str[ 53])
+#define zsave_warn (option_xlateable_txt.apz_str[ 54])
+#define zalt_opt (option_xlateable_txt.apz_str[ 55])
+#define zAuto (option_xlateable_txt.apz_str[ 56])
+#define zDefaultOpt (option_xlateable_txt.apz_str[ 57])
+#define zDis (option_xlateable_txt.apz_str[ 58])
+#define zDisabledOpt (option_xlateable_txt.apz_str[ 59])
+#define zDisabledWhy (option_xlateable_txt.apz_str[ 60])
+#define zEnab (option_xlateable_txt.apz_str[ 61])
+#define ztoo_often_fmt (option_xlateable_txt.apz_str[ 62])
+#define zExamineFmt (option_xlateable_txt.apz_str[ 63])
+#define zFileCannotExist (option_xlateable_txt.apz_str[ 64])
+#define zFileMustExist (option_xlateable_txt.apz_str[ 65])
+#define zFlagOkay (option_xlateable_txt.apz_str[ 66])
+#define zGenshell (option_xlateable_txt.apz_str[ 67])
+#define zLowerBits (option_xlateable_txt.apz_str[ 68])
+#define zMembers (option_xlateable_txt.apz_str[ 69])
+#define zMust (option_xlateable_txt.apz_str[ 70])
+#define zNoFlags (option_xlateable_txt.apz_str[ 71])
+#define zNoLim (option_xlateable_txt.apz_str[ 72])
+#define zNoPreset (option_xlateable_txt.apz_str[ 73])
+#define zNoRq_NoShrtTtl (option_xlateable_txt.apz_str[ 74])
+#define zNoRq_ShrtTtl (option_xlateable_txt.apz_str[ 75])
+#define zNrmOptFmt (option_xlateable_txt.apz_str[ 76])
+#define zNumberOpt (option_xlateable_txt.apz_str[ 77])
+#define zOptsOnly (option_xlateable_txt.apz_str[ 78])
+#define zPathFmt (option_xlateable_txt.apz_str[ 79])
+#define zPlsSendBugs (option_xlateable_txt.apz_str[ 80])
+#define zPreset (option_xlateable_txt.apz_str[ 81])
+#define zPresetIntro (option_xlateable_txt.apz_str[ 82])
+#define zProhib (option_xlateable_txt.apz_str[ 83])
+#define zProhibOne (option_xlateable_txt.apz_str[ 84])
+#define zRange (option_xlateable_txt.apz_str[ 85])
+#define zRangeAbove (option_xlateable_txt.apz_str[ 86])
+#define zRangeExact (option_xlateable_txt.apz_str[ 87])
+#define zRangeLie (option_xlateable_txt.apz_str[ 88])
+#define zRangeOnly (option_xlateable_txt.apz_str[ 89])
+#define zRangeOr (option_xlateable_txt.apz_str[ 90])
+#define zRangeScaled (option_xlateable_txt.apz_str[ 91])
+#define zRangeUpto (option_xlateable_txt.apz_str[ 92])
+#define zReorder (option_xlateable_txt.apz_str[ 93])
+#define zReqOne (option_xlateable_txt.apz_str[ 94])
+#define zReqThese (option_xlateable_txt.apz_str[ 95])
+#define zReq_NoShrtTtl (option_xlateable_txt.apz_str[ 96])
+#define zReq_ShrtTtl (option_xlateable_txt.apz_str[ 97])
+#define zSetMemberSettings (option_xlateable_txt.apz_str[ 98])
+#define zUpTo (option_xlateable_txt.apz_str[ 99])
+#define zValidKeys (option_xlateable_txt.apz_str[100])
+#define zVendIntro (option_xlateable_txt.apz_str[101])
+#define zVendOptsAre (option_xlateable_txt.apz_str[102])
/*
* First, set up the strings. Some of these are writable. These are all in
@@ -181,7 +180,7 @@ static char eng_zGnuBoolArg[] = "=T/F";
static char eng_zGnuKeyArg[] = "=KWd";
static char eng_zGnuNumArg[] = "=num";
static char eng_zGnuStrArg[] = "=str";
-char const option_lib_text[4285] =
+char const option_lib_text[4267] =
/* 0 */ "allocation of %d bytes failed\n\0"
/* 31 */ "AutoOpts function called without option descriptor\n\0"
/* 83 */ "\tThis exceeds the compiled library version: \0"
@@ -190,7 +189,7 @@ char const option_lib_text[4285] =
/* 228 */ "realloc of %d bytes at 0x%p failed\n\0"
/* 264 */ "\tThis is less than the minimum library version: \0"
/* 314 */ "Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n\0"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n\0"
/* 405 */ "(AutoOpts bug): %s.\n\0"
/* 427 */ "optionResetOpt() called, but reset-option not configured\0"
/* 484 */ "could not locate the 'help' option\0"
@@ -231,76 +230,75 @@ char const option_lib_text[4285] =
/* 1771 */ "%s error: no saved option state\n\0"
/* 1804 */ "'%s' is not a command line option.\n\0"
/* 1840 */ "%s error: '%s' is not a recognizable date/time.\n\0"
-/* 1890 */ "'%s' not defined\n\0"
-/* 1908 */ "%s error: '%s' is not a recognizable time duration.\n\0"
-/* 1962 */ "%s error: The %s option must appear %d times.\n\0"
-/* 2010 */ "%s error: '%s' is not a recognizable number.\n\0"
-/* 2057 */ "%s error: %s exceeds %s keyword count\n\0"
-/* 2097 */ "Try '%s %s' for more information.\n\0"
-/* 2132 */ "one %s%s option allowed\n\0"
-/* 2157 */ "standard output\0"
-/* 2173 */ "standard error\0"
-/* 2188 */ "write\0"
-/* 2194 */ "%s error: %s option value %ld is out of range.\n\0"
-/* 2243 */ "%s error: %s option requires the %s option\n\0"
-/* 2288 */ "%s warning: cannot save options - %s not regular file\n\0"
-/* 2344 */ "\t\t\t\t- an alternate for '%s'\n\0"
-/* 2373 */ "Version, usage and configuration options:\0"
-/* 2415 */ "\t\t\t\t- default option for unnamed options\n\0"
-/* 2457 */ "\t\t\t\t- disabled as '--%s'\n\0"
-/* 2483 */ " --- %-14s %s\n\0"
-/* 2498 */ "This option has been disabled\0"
-/* 2528 */ "\t\t\t\t- enabled by default\n\0"
-/* 2554 */ "%s error: only \0"
-/* 2571 */ " - examining environment variables named %s_*\n\0"
-/* 2618 */ "\t\t\t\t- file must not pre-exist\n\0"
-/* 2649 */ "\t\t\t\t- file must pre-exist\n\0"
-/* 2676 */ "Options are specified by doubled hyphens and their name or by a single\n"
+/* 1890 */ "%s error: '%s' is not a recognizable time duration.\n\0"
+/* 1944 */ "%s error: The %s option must appear %d times.\n\0"
+/* 1992 */ "%s error: '%s' is not a recognizable number.\n\0"
+/* 2039 */ "%s error: %s exceeds %s keyword count\n\0"
+/* 2079 */ "Try '%s %s' for more information.\n\0"
+/* 2114 */ "one %s%s option allowed\n\0"
+/* 2139 */ "standard output\0"
+/* 2155 */ "standard error\0"
+/* 2170 */ "write\0"
+/* 2176 */ "%s error: %s option value %ld is out of range.\n\0"
+/* 2225 */ "%s error: %s option requires the %s option\n\0"
+/* 2270 */ "%s warning: cannot save options - %s not regular file\n\0"
+/* 2326 */ "\t\t\t\t- an alternate for '%s'\n\0"
+/* 2355 */ "Version, usage and configuration options:\0"
+/* 2397 */ "\t\t\t\t- default option for unnamed options\n\0"
+/* 2439 */ "\t\t\t\t- disabled as '--%s'\n\0"
+/* 2465 */ " --- %-14s %s\n\0"
+/* 2480 */ "This option has been disabled\0"
+/* 2510 */ "\t\t\t\t- enabled by default\n\0"
+/* 2536 */ "%s error: only \0"
+/* 2553 */ " - examining environment variables named %s_*\n\0"
+/* 2600 */ "\t\t\t\t- file must not pre-exist\n\0"
+/* 2631 */ "\t\t\t\t- file must pre-exist\n\0"
+/* 2658 */ "Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n\0"
-/* 2779 */ "\n"
+/* 2761 */ "\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n\0"
-/* 2885 */ " or an integer mask with any of the lower %d bits set\n\0"
-/* 2941 */ "\t\t\t\t- is a set membership option\n\0"
-/* 2975 */ "\t\t\t\t- must appear between %d and %d times\n\0"
-/* 3018 */ "Options are specified by single or double hyphens and their name.\n\0"
-/* 3085 */ "\t\t\t\t- may appear multiple times\n\0"
-/* 3118 */ "\t\t\t\t- may not be preset\n\0"
-/* 3143 */ " Arg Option-Name Description\n\0"
-/* 3178 */ " Flg Arg Option-Name Description\n\0"
-/* 3216 */ " %3s %s\0"
-/* 3224 */ "The '-#<number>' option may omit the hash char\n\0"
-/* 3272 */ "All arguments are named options.\n\0"
-/* 3306 */ " - reading file %s\0"
-/* 3325 */ "\n"
+/* 2867 */ " or an integer mask with any of the lower %d bits set\n\0"
+/* 2923 */ "\t\t\t\t- is a set membership option\n\0"
+/* 2957 */ "\t\t\t\t- must appear between %d and %d times\n\0"
+/* 3000 */ "Options are specified by single or double hyphens and their name.\n\0"
+/* 3067 */ "\t\t\t\t- may appear multiple times\n\0"
+/* 3100 */ "\t\t\t\t- may not be preset\n\0"
+/* 3125 */ " Arg Option-Name Description\n\0"
+/* 3160 */ " Flg Arg Option-Name Description\n\0"
+/* 3198 */ " %3s %s\0"
+/* 3206 */ "The '-#<number>' option may omit the hash char\n\0"
+/* 3254 */ "All arguments are named options.\n\0"
+/* 3288 */ " - reading file %s\0"
+/* 3307 */ "\n"
"Please send bug reports to: <%s>\n\0"
-/* 3361 */ "\t\t\t\t- may NOT appear - preset only\n\0"
-/* 3397 */ "\n"
+/* 3343 */ "\t\t\t\t- may NOT appear - preset only\n\0"
+/* 3379 */ "\n"
"The following option preset mechanisms are supported:\n\0"
-/* 3453 */ "prohibits these options:\n\0"
-/* 3479 */ "prohibits the option '%s'\n\0"
-/* 3506 */ "%s%ld to %ld\0"
-/* 3519 */ "%sgreater than or equal to %ld\0"
-/* 3550 */ "%s%ld exactly\0"
-/* 3564 */ "%sit must lie in one of the ranges:\n\0"
-/* 3601 */ "%sit must be in the range:\n\0"
-/* 3629 */ ", or\n\0"
-/* 3635 */ "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
-/* 3681 */ "%sless than or equal to %ld\0"
-/* 3709 */ "Operands and options may be intermixed. They will be reordered.\n\0"
-/* 3775 */ "requires the option '%s'\n\0"
-/* 3801 */ "requires these options:\n\0"
-/* 3826 */ " Arg Option-Name Req? Description\n\0"
-/* 3866 */ " Flg Arg Option-Name Req? Description\n\0"
-/* 3909 */ "or you may use a numeric representation. Preceding these with a '!'\n"
+/* 3435 */ "prohibits these options:\n\0"
+/* 3461 */ "prohibits the option '%s'\n\0"
+/* 3488 */ "%s%ld to %ld\0"
+/* 3501 */ "%sgreater than or equal to %ld\0"
+/* 3532 */ "%s%ld exactly\0"
+/* 3546 */ "%sit must lie in one of the ranges:\n\0"
+/* 3583 */ "%sit must be in the range:\n\0"
+/* 3611 */ ", or\n\0"
+/* 3617 */ "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
+/* 3663 */ "%sless than or equal to %ld\0"
+/* 3691 */ "Operands and options may be intermixed. They will be reordered.\n\0"
+/* 3757 */ "requires the option '%s'\n\0"
+/* 3783 */ "requires these options:\n\0"
+/* 3808 */ " Arg Option-Name Req? Description\n\0"
+/* 3848 */ " Flg Arg Option-Name Req? Description\n\0"
+/* 3891 */ "or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n\0"
-/* 4128 */ "\t\t\t\t- may appear up to %d times\n\0"
-/* 4161 */ "The valid \"%s\" option keywords are:\n\0"
-/* 4198 */ "The next option supports vendor supported extra options:\0"
-/* 4255 */ "These additional options are:";
+/* 4110 */ "\t\t\t\t- may appear up to %d times\n\0"
+/* 4143 */ "The valid \"%s\" option keywords are:\n\0"
+/* 4180 */ "The next option supports vendor supported extra options:\0"
+/* 4237 */ "These additional options are:";
/*
* Now, define (and initialize) the structure that contains
@@ -308,7 +306,7 @@ char const option_lib_text[4285] =
* Aren't you glad you don't maintain this by hand?
*/
usage_text_t option_xlateable_txt = {
- 108,
+ 107,
eng_zGnuBoolArg, eng_zGnuKeyArg, eng_zGnuNumArg, eng_zGnuStrArg,
{
option_lib_text + 0, option_lib_text + 31, option_lib_text + 83,
@@ -325,27 +323,27 @@ usage_text_t option_xlateable_txt = {
option_lib_text + 1490, option_lib_text + 1528, option_lib_text + 1574,
option_lib_text + 1619, option_lib_text + 1646, option_lib_text + 1695,
option_lib_text + 1744, option_lib_text + 1771, option_lib_text + 1804,
- option_lib_text + 1840, option_lib_text + 1890, option_lib_text + 1908,
- option_lib_text + 1962, option_lib_text + 2010, option_lib_text + 2057,
- option_lib_text + 2097, option_lib_text + 2132, option_lib_text + 2157,
- option_lib_text + 2173, option_lib_text + 2188, option_lib_text + 2194,
- option_lib_text + 2243, option_lib_text + 2288, option_lib_text + 2344,
- option_lib_text + 2373, option_lib_text + 2415, option_lib_text + 2457,
- option_lib_text + 2483, option_lib_text + 2498, option_lib_text + 2528,
- option_lib_text + 2554, option_lib_text + 2571, option_lib_text + 2618,
- option_lib_text + 2649, option_lib_text + 2676, option_lib_text + 2779,
- option_lib_text + 2885, option_lib_text + 2941, option_lib_text + 2975,
- option_lib_text + 3018, option_lib_text + 3085, option_lib_text + 3118,
- option_lib_text + 3143, option_lib_text + 3178, option_lib_text + 3216,
- option_lib_text + 3224, option_lib_text + 3272, option_lib_text + 3306,
- option_lib_text + 3325, option_lib_text + 3361, option_lib_text + 3397,
- option_lib_text + 3453, option_lib_text + 3479, option_lib_text + 3506,
- option_lib_text + 3519, option_lib_text + 3550, option_lib_text + 3564,
- option_lib_text + 3601, option_lib_text + 3629, option_lib_text + 3635,
- option_lib_text + 3681, option_lib_text + 3709, option_lib_text + 3775,
- option_lib_text + 3801, option_lib_text + 3826, option_lib_text + 3866,
- option_lib_text + 3909, option_lib_text + 4128, option_lib_text + 4161,
- option_lib_text + 4198, option_lib_text + 4255
+ option_lib_text + 1840, option_lib_text + 1890, option_lib_text + 1944,
+ option_lib_text + 1992, option_lib_text + 2039, option_lib_text + 2079,
+ option_lib_text + 2114, option_lib_text + 2139, option_lib_text + 2155,
+ option_lib_text + 2170, option_lib_text + 2176, option_lib_text + 2225,
+ option_lib_text + 2270, option_lib_text + 2326, option_lib_text + 2355,
+ option_lib_text + 2397, option_lib_text + 2439, option_lib_text + 2465,
+ option_lib_text + 2480, option_lib_text + 2510, option_lib_text + 2536,
+ option_lib_text + 2553, option_lib_text + 2600, option_lib_text + 2631,
+ option_lib_text + 2658, option_lib_text + 2761, option_lib_text + 2867,
+ option_lib_text + 2923, option_lib_text + 2957, option_lib_text + 3000,
+ option_lib_text + 3067, option_lib_text + 3100, option_lib_text + 3125,
+ option_lib_text + 3160, option_lib_text + 3198, option_lib_text + 3206,
+ option_lib_text + 3254, option_lib_text + 3288, option_lib_text + 3307,
+ option_lib_text + 3343, option_lib_text + 3379, option_lib_text + 3435,
+ option_lib_text + 3461, option_lib_text + 3488, option_lib_text + 3501,
+ option_lib_text + 3532, option_lib_text + 3546, option_lib_text + 3583,
+ option_lib_text + 3611, option_lib_text + 3617, option_lib_text + 3663,
+ option_lib_text + 3691, option_lib_text + 3757, option_lib_text + 3783,
+ option_lib_text + 3808, option_lib_text + 3848, option_lib_text + 3891,
+ option_lib_text + 4110, option_lib_text + 4143, option_lib_text + 4180,
+ option_lib_text + 4237
} };
#endif /* AUTOOPTS_INTERNAL */
@@ -364,234 +362,230 @@ static void dummy_func(void) {
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -600,17 +594,17 @@ static void dummy_func(void) {
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -628,28 +622,28 @@ static void dummy_func(void) {
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/sntp/libopts/boolean.c b/contrib/ntp/sntp/libopts/boolean.c
index 2bea8e7f2aeb..80e0b0e97c24 100644
--- a/contrib/ntp/sntp/libopts/boolean.c
+++ b/contrib/ntp/sntp/libopts/boolean.c
@@ -13,7 +13,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -64,8 +64,8 @@ optionBooleanVal(tOptions * opts, tOptDesc * od)
long val = strtol(od->optArg.argString, &pz, 0);
if ((val != 0) || (*pz != NUL))
break;
- /* FALLTHROUGH */
}
+ /* FALLTHROUGH */
case 'N':
case 'n':
case 'F':
diff --git a/contrib/ntp/sntp/libopts/check.c b/contrib/ntp/sntp/libopts/check.c
index eff8ec013354..7e75e7eca6d5 100644
--- a/contrib/ntp/sntp/libopts/check.c
+++ b/contrib/ntp/sntp/libopts/check.c
@@ -9,7 +9,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -100,7 +100,7 @@ occurs_enough(tOptions * pOpts, tOptDesc * pOD)
*
* Make sure that the argument list passes our consistency tests.
*/
-LOCAL bool
+static bool
is_consistent(tOptions * pOpts)
{
tOptDesc * pOD = pOpts->pOptDesc;
diff --git a/contrib/ntp/sntp/libopts/compat/compat.h b/contrib/ntp/sntp/libopts/compat/compat.h
index 561d55db3c3e..70a5652a23b7 100644
--- a/contrib/ntp/sntp/libopts/compat/compat.h
+++ b/contrib/ntp/sntp/libopts/compat/compat.h
@@ -1,9 +1,9 @@
-/* -*- Mode: C -*-
+/* -*- Mode: C -*-
*
* compat.h is free software.
* This file is part of AutoGen and AutoOpts.
*
- * AutoGen Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoGen Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -182,9 +182,9 @@
# include <unistd.h>
#endif
-#ifdef HAVE_STDBOOL_H
+#if defined(HAVE_STDBOOL_H)
# include <stdbool.h>
-#else
+#elif ! defined(bool)
typedef enum { false = 0, true = 1 } _Bool;
# define bool _Bool
diff --git a/contrib/ntp/sntp/libopts/compat/pathfind.c b/contrib/ntp/sntp/libopts/compat/pathfind.c
index d343dcc643de..5c477caf07a6 100644
--- a/contrib/ntp/sntp/libopts/compat/pathfind.c
+++ b/contrib/ntp/sntp/libopts/compat/pathfind.c
@@ -115,15 +115,9 @@ make_absolute( char const * string, char const * dot_path )
if (!dot_path || *string == '/') {
result = strdup( string );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
} else {
if (dot_path && dot_path[0]) {
result = malloc( 2 + strlen( dot_path ) + strlen( string ) );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
strcpy( result, dot_path );
result_len = (int)strlen(result);
if (result[result_len - 1] != '/') {
@@ -132,9 +126,6 @@ make_absolute( char const * string, char const * dot_path )
}
} else {
result = malloc( 3 + strlen( string ) );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
result[0] = '.'; result[1] = '/'; result[2] = '\0';
result_len = 2;
}
@@ -164,9 +155,7 @@ canonicalize_pathname( char *path )
/* The result cannot be larger than the input PATH. */
result = strdup( path );
- if (result == NULL) {
- return NULL; /* couldn't allocate memory */
- }
+
stub_char = (*path == '/') ? '/' : '.';
/* Walk along RESULT looking for things to compact. */
diff --git a/contrib/ntp/sntp/libopts/compat/windows-config.h b/contrib/ntp/sntp/libopts/compat/windows-config.h
index fb4e048e6482..7ce163641641 100644
--- a/contrib/ntp/sntp/libopts/compat/windows-config.h
+++ b/contrib/ntp/sntp/libopts/compat/windows-config.h
@@ -9,7 +9,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
diff --git a/contrib/ntp/sntp/libopts/configfile.c b/contrib/ntp/sntp/libopts/configfile.c
index 8244371e56be..783a9d8acde5 100644
--- a/contrib/ntp/sntp/libopts/configfile.c
+++ b/contrib/ntp/sntp/libopts/configfile.c
@@ -9,7 +9,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -28,50 +28,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static void
-file_preset(tOptions * opts, char const * fname, int dir);
-
-static char *
-handle_comment(char * txt);
-
-static char *
-handle_cfg(tOptions * opts, tOptState * ost, char * txt, int dir);
-
-static char *
-handle_directive(tOptions * opts, char * txt);
-
-static char *
-aoflags_directive(tOptions * opts, char * txt);
-
-static char *
-program_directive(tOptions * opts, char * txt);
-
-static char *
-handle_section(tOptions * opts, char * txt);
-
-static int
-parse_xml_encoding(char ** ppz);
-
-static char *
-trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode);
-
-static void
-cook_xml_text(char * pzData);
-
-static char *
-handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir);
-
-static char const *
-parse_keyword(tOptions * opts, char const * txt, tOptionValue * typ);
-
-static char const *
-parse_set_mem(tOptions * opts, char const * txt, tOptionValue * typ);
-
-static char const *
-parse_value(char const * txt, tOptionValue * typ);
-/* = = = END-STATIC-FORWARD = = = */
-
/**
* Skip over some unknown attribute
* @param[in] txt start of skpped text
@@ -182,9 +138,9 @@ optionFindValue(const tOptDesc * odesc, char const * name, char const * val)
}
else do {
- tArgList * argl = odesc->optCookie;
- int argct = argl->useCt;
- const void ** poptv = VOIDP(argl->apzArgs);
+ tArgList * argl = odesc->optCookie;
+ int argct = argl->useCt;
+ void ** poptv = (void **)(argl->apzArgs);
if (argct == 0) {
errno = ENOENT;
@@ -192,7 +148,7 @@ optionFindValue(const tOptDesc * odesc, char const * name, char const * val)
}
if (name == NULL) {
- res = (const tOptionValue *)*poptv;
+ res = (tOptionValue *)*poptv;
break;
}
@@ -249,7 +205,7 @@ optionFindNextValue(const tOptDesc * odesc, const tOptionValue * pPrevVal,
char const * pzName, char const * pzVal)
{
bool old_found = false;
- const tOptionValue * res = NULL;
+ tOptionValue * res = NULL;
(void)pzName;
(void)pzVal;
@@ -264,12 +220,12 @@ optionFindNextValue(const tOptDesc * odesc, const tOptionValue * pPrevVal,
}
else do {
- tArgList * argl = odesc->optCookie;
- int ct = argl->useCt;
- const void ** poptv = VOIDP(argl->apzArgs);
+ tArgList * argl = odesc->optCookie;
+ int ct = argl->useCt;
+ void ** poptv = (void **)argl->apzArgs;
while (--ct >= 0) {
- const tOptionValue * pOV = *(poptv++);
+ tOptionValue * pOV = *(poptv++);
if (old_found) {
res = pOV;
break;
@@ -315,8 +271,8 @@ optionFindNextValue(const tOptDesc * odesc, const tOptionValue * pPrevVal,
tOptionValue const *
optionGetValue(tOptionValue const * oov, char const * vname)
{
- tArgList * arg_list;
- const tOptionValue * res = NULL;
+ tArgList * arg_list;
+ tOptionValue * res = NULL;
if ((oov == NULL) || (oov->valType != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
@@ -325,14 +281,14 @@ optionGetValue(tOptionValue const * oov, char const * vname)
arg_list = oov->v.nestVal;
if (arg_list->useCt > 0) {
- int ct = arg_list->useCt;
- const void ** ovlist = VOIDP(arg_list->apzArgs);
+ int ct = arg_list->useCt;
+ void ** ovlist = (void **)(arg_list->apzArgs);
if (vname == NULL) {
- res = (const tOptionValue *)*ovlist;
+ res = (tOptionValue *)*ovlist;
} else do {
- const tOptionValue * opt_val = *(ovlist++);
+ tOptionValue * opt_val = *(ovlist++);
if (strcmp(opt_val->pzName, vname) == 0) {
res = opt_val;
break;
@@ -374,9 +330,9 @@ optionGetValue(tOptionValue const * oov, char const * vname)
tOptionValue const *
optionNextValue(tOptionValue const * ov_list,tOptionValue const * oov )
{
- tArgList * arg_list;
- const tOptionValue * res = NULL;
- int err = EINVAL;
+ tArgList * arg_list;
+ tOptionValue * res = NULL;
+ int err = EINVAL;
if ((ov_list == NULL) || (ov_list->valType != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
@@ -384,18 +340,18 @@ optionNextValue(tOptionValue const * ov_list,tOptionValue const * oov )
}
arg_list = ov_list->v.nestVal;
{
- int ct = arg_list->useCt;
- const void ** o_list = VOIDP(arg_list->apzArgs);
+ int ct = arg_list->useCt;
+ void ** o_list = (void **)(arg_list->apzArgs);
while (ct-- > 0) {
- const tOptionValue * nov = *(o_list++);
+ tOptionValue * nov = *(o_list++);
if (nov == oov) {
if (ct == 0) {
err = ENOENT;
} else {
err = 0;
- res = (const tOptionValue *)*o_list;
+ res = (tOptionValue *)*o_list;
}
break;
}
@@ -466,6 +422,7 @@ file_preset(tOptions * opts, char const * fname, int dir)
ftext = strchr(ftext + 2, '>');
if (ftext++ != NULL)
break;
+ /* FALLTHROUGH */
default:
ftext = NULL;
@@ -626,9 +583,9 @@ handle_directive(tOptions * opts, char * txt)
for (ix = 0; ix < dir_ct; ix++) {
size_t len = strlen(dir_names[ix]);
- if ( (strncmp(txt + 2, dir_names[ix], len) == 0)
- && (! IS_VALUE_NAME_CHAR(txt[len+2])) )
- return dir_disp[ix](opts, txt + len + 2);
+ if ( (strncmp(txt, dir_names[ix], len) == 0)
+ && (! IS_VALUE_NAME_CHAR(txt[len])) )
+ return dir_disp[ix](opts, txt + len);
}
/*
@@ -681,44 +638,35 @@ aoflags_directive(tOptions * opts, char * txt)
static char *
program_directive(tOptions * opts, char * txt)
{
- static char const ttlfmt[] = "<?";
- size_t ttl_len = sizeof(ttlfmt) + strlen(zCfgProg);
- char * ttl = AGALOC(ttl_len, "prog title");
size_t name_len = strlen(opts->pzProgName);
- memcpy(ttl, ttlfmt, sizeof(ttlfmt) - 1);
- memcpy(ttl + sizeof(ttlfmt) - 1, zCfgProg, ttl_len - (sizeof(ttlfmt) - 1));
-
- do {
- txt = SPN_WHITESPACE_CHARS(txt+1);
+ for (;; txt += zCfgProg_LEN) {
+ txt = SPN_WHITESPACE_CHARS(txt);
if ( (strneqvcmp(txt, opts->pzProgName, (int)name_len) == 0)
- && (IS_END_XML_TOKEN_CHAR(txt[name_len])) ) {
- txt += name_len;
- break;
- }
+ && (IS_END_XML_TOKEN_CHAR(txt[name_len])) )
- txt = strstr(txt, ttl);
- } while (txt != NULL);
+ return txt + name_len;
- AGFREE(ttl);
- if (txt != NULL)
- for (;;) {
- if (*txt == NUL) {
- txt = NULL;
- break;
- }
- if (*(txt++) == '>')
- break;
- }
+ txt = strstr(txt, zCfgProg);
+ if (txt == NULL)
+ return txt;
+ }
- return txt;
+ for (;;) {
+ if (*txt == NUL)
+ return NULL;
+
+ if (*(txt++) == '>')
+ return txt;
+ }
}
/**
* "txt" points to a '[' character.
* The "traditional" [PROG_NAME] segmentation of the config file.
* Do not ever mix with the "<?program prog-name>" variation.
+ * The templates reject program names over 16 characters.
*
* @param[in,out] opts program option descriptor
* @param[in] txt scanning pointer
@@ -736,8 +684,10 @@ handle_section(tOptions * opts, char * txt)
return NULL;
{
- char z[24];
- sprintf(z, "[%s]", opts->pzPROGNAME);
+ char z[24] = "[";
+ memcpy(z+1, opts->pzPROGNAME, len);
+ z[++len] = ']';
+ z[++len] = NUL;
txt = strstr(txt, z);
}
@@ -839,16 +789,22 @@ parse_xml_encoding(char ** ppz)
static char *
trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode)
{
- static char const fmt[] = "</%s>";
- size_t len = strlen(pznm) + sizeof(fmt) - 2 /* for %s */;
+ size_t nm_len = strlen(pznm);
char * etext;
{
char z[64], *pz = z;
- if (len >= sizeof(z))
- pz = AGALOC(len, "scan name");
- len = (size_t)sprintf(pz, fmt, pznm);
+ if (nm_len + 4 >= sizeof(z))
+ pz = AGALOC(nm_len + 4, "scan name");
+
+ pz[0] = '<';
+ pz[1] = '/';
+ memcpy(pz+2, pznm, nm_len);
+ nm_len += 2;
+ pz[nm_len++] = '>';
+ pz[nm_len] = NUL;
+
*intxt = ' ';
etext = strstr(intxt, pz);
if (pz != z) AGFREE(pz);
@@ -858,7 +814,7 @@ trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode)
return etext;
{
- char * result = etext + len;
+ char * result = etext + nm_len;
if (mode != OPTION_LOAD_UNCOOKED)
etext = SPN_WHITESPACE_BACK(intxt, etext);
@@ -997,7 +953,7 @@ handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir)
* scanning the "homerc" list, or from a specific file request.
* (see "optionFileLoad()", the implementation for --load-opts)
*/
-LOCAL void
+static void
intern_file_load(tOptions * opts)
{
uint32_t svfl;
@@ -1198,7 +1154,7 @@ optionLoadOpt(tOptions * opts, tOptDesc * odesc)
*
* @returns NULL on failure, otherwise the scan point
*/
-LOCAL char const *
+static char const *
parse_attrs(tOptions * opts, char const * txt, tOptionLoadMode * pMode,
tOptionValue * pType)
{
diff --git a/contrib/ntp/sntp/libopts/cook.c b/contrib/ntp/sntp/libopts/cook.c
index 65260a27222d..5240540f3a68 100644
--- a/contrib/ntp/sntp/libopts/cook.c
+++ b/contrib/ntp/sntp/libopts/cook.c
@@ -10,7 +10,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -29,11 +29,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static bool
-contiguous_quote(char ** pps, char * pq, int * lnct_p);
-/* = = = END-STATIC-FORWARD = = = */
-
/*=export_func ao_string_cook_escape_char
* private:
*
@@ -135,6 +130,18 @@ ao_string_cook_escape_char(char const * pzIn, char * pRes, uint_t nl)
return res;
}
+/**
+ * count newlines between start and end
+ */
+static char *
+nl_count(char * start, char * end, int * lnct_p)
+{
+ while (start < end) {
+ if (*(start++) == NL)
+ (*lnct_p)++;
+ }
+ return end;
+}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
@@ -168,38 +175,22 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
*/
switch (ps[1]) {
default:
- *pps = NULL;
- return false;
+ goto fail_return;
case '/':
/*
* Skip to end of line
*/
ps = strchr(ps, NL);
- if (ps == NULL) {
- *pps = NULL;
- return false;
- }
+ if (ps == NULL)
+ goto fail_return;
break;
case '*':
- {
- char * p = strstr( ps+2, "*/" );
- /*
- * Skip to terminating star slash
- */
- if (p == NULL) {
- *pps = NULL;
- return false;
- }
-
- while (ps < p) {
- if (*(ps++) == NL)
- (*lnct_p)++;
- }
-
- ps = p + 2;
- }
+ ps = nl_count(ps + 2, strstr(ps + 2, "*/"), lnct_p);
+ if (ps == NULL)
+ goto fail_return;
+ ps += 2;
}
continue;
@@ -212,6 +203,10 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
return false;
}
}
+
+ fail_return:
+ *pps = NULL;
+ return false;
}
/*=export_func ao_string_cook
diff --git a/contrib/ntp/sntp/libopts/enum.c b/contrib/ntp/sntp/libopts/enum.c
index e9bba83644cb..7f92e0b0222a 100644
--- a/contrib/ntp/sntp/libopts/enum.c
+++ b/contrib/ntp/sntp/libopts/enum.c
@@ -14,7 +14,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -33,31 +33,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static void
-enum_err(tOptions * pOpts, tOptDesc * pOD,
- char const * const * paz_names, int name_ct);
-
-static uintptr_t
-find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
- char const * const * paz_names, unsigned int name_ct);
-
-static void
-set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
- unsigned int name_ct);
-
-static void
-set_memb_names(tOptions * opts, tOptDesc * od, char const * const * nm_list,
- unsigned int nm_ct);
-
-static uintptr_t
-check_membership_start(tOptDesc * od, char const ** argp, bool * invert);
-
-static uintptr_t
-find_member_bit(tOptions * opts, tOptDesc * od, char const * pz, int len,
- char const * const * nm_list, unsigned int nm_ct);
-/* = = = END-STATIC-FORWARD = = = */
-
static void
enum_err(tOptions * pOpts, tOptDesc * pOD,
char const * const * paz_names, int name_ct)
@@ -130,9 +105,10 @@ enum_err(tOptions * pOpts, tOptDesc * pOD,
*/
else {
unsigned int ent_no = 0;
- char zFmt[16]; /* format for all-but-last entries on a line */
+ char fmt[16]; /* format for all-but-last entries on a line */
- sprintf(zFmt, ENUM_ERR_WIDTH, (int)max_len);
+ if (snprintf(fmt, 16, ENUM_ERR_WIDTH, (int)max_len) >= 16)
+ option_exits(EXIT_FAILURE);
max_len = 78 / max_len; /* max_len is now max entries on a line */
fputs(TWO_SPACES_STR, option_usage_fp);
@@ -150,7 +126,7 @@ enum_err(tOptions * pOpts, tOptDesc * pOD,
}
else
- fprintf(option_usage_fp, zFmt, *(paz_names++) );
+ fprintf(option_usage_fp, fmt, *(paz_names++) );
}
fprintf(option_usage_fp, NLSTR_FMT, *paz_names);
}
@@ -189,12 +165,12 @@ find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
* The result gets stashed in a char * pointer.
*/
uintptr_t res = name_ct;
- size_t len = strlen(name);
+ size_t len = strlen((char *)name);
uintptr_t idx;
if (IS_DEC_DIGIT_CHAR(*name)) {
- char * pz;
- unsigned long val = strtoul(name, &pz, 0);
+ char * pz = VOIDP(name);
+ unsigned long val = strtoul(pz, &pz, 0);
if ((*pz == NUL) && (val < name_ct))
return (uintptr_t)val;
pz_enum_err_fmt = znum_too_large;
@@ -215,7 +191,7 @@ find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
* Multiple partial matches means we have an ambiguous match.
*/
for (idx = 0; idx < name_ct; idx++) {
- if (strncmp(paz_names[idx], name, len) == 0) {
+ if (strncmp((char *)paz_names[idx], (char *)name, len) == 0) {
if (paz_names[idx][len] == NUL)
return idx; /* full match */
@@ -500,7 +476,7 @@ find_member_bit(tOptions * opts, tOptDesc * od, char const * pz, int len,
if (shift_ct >= nm_ct)
return 0UL;
- return (uintptr_t)1U << shift_ct;
+ return 1UL << shift_ct;
}
}
diff --git a/contrib/ntp/sntp/libopts/env.c b/contrib/ntp/sntp/libopts/env.c
index 36ae2e535a6c..16f0e9513d47 100644
--- a/contrib/ntp/sntp/libopts/env.c
+++ b/contrib/ntp/sntp/libopts/env.c
@@ -13,7 +13,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -32,19 +32,13 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static void
-do_env_opt(tOptState * os, char * env_name,
- tOptions * pOpts, teEnvPresetType type);
-/* = = = END-STATIC-FORWARD = = = */
-
/*
* doPrognameEnv - check for preset values from the ${PROGNAME}
* environment variable. This is accomplished by parsing the text into
* tokens, temporarily replacing the arg vector and calling
* immediate_opts and/or regular_opts.
*/
-LOCAL void
+static void
doPrognameEnv(tOptions * pOpts, teEnvPresetType type)
{
char const * env_opts = getenv(pOpts->pzPROGNAME);
@@ -187,7 +181,7 @@ do_env_opt(tOptState * os, char * env_name,
* env_presets - check for preset values from the envrionment
* This routine should process in all, immediate or normal modes....
*/
-LOCAL void
+static void
env_presets(tOptions * pOpts, teEnvPresetType type)
{
int ct;
diff --git a/contrib/ntp/sntp/libopts/file.c b/contrib/ntp/sntp/libopts/file.c
index 7d92875d84c3..14efe8fe3371 100644
--- a/contrib/ntp/sntp/libopts/file.c
+++ b/contrib/ntp/sntp/libopts/file.c
@@ -10,7 +10,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
diff --git a/contrib/ntp/sntp/libopts/find.c b/contrib/ntp/sntp/libopts/find.c
index 97a24df47216..03ae10373140 100644
--- a/contrib/ntp/sntp/libopts/find.c
+++ b/contrib/ntp/sntp/libopts/find.c
@@ -12,7 +12,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -31,36 +31,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static int
-parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz);
-
-static void
-opt_ambiguities(tOptions * opts, char const * name, int nm_len);
-
-static int
-opt_match_ct(tOptions * opts, char const * name, int nm_len,
- int * ixp, bool * disable);
-
-static tSuccess
-opt_set(tOptions * opts, char * arg, int idx, bool disable, tOptState * st);
-
-static tSuccess
-opt_unknown(tOptions * opts, char const * name, char * arg, tOptState * st);
-
-static tSuccess
-opt_ambiguous(tOptions * opts, char const * name, int match_ct);
-
-static tSuccess
-get_opt_arg_must(tOptions * opts, tOptState * o_st);
-
-static tSuccess
-get_opt_arg_may(tOptions * pOpts, tOptState * o_st);
-
-static tSuccess
-get_opt_arg_none(tOptions * pOpts, tOptState * o_st);
-/* = = = END-STATIC-FORWARD = = = */
-
/**
* find the name and name length we are looking for
*/
@@ -80,7 +50,7 @@ parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz)
buf[res] = NUL;
*nm_pp = buf;
- *arg_pp = VOIDP(p);
+ *arg_pp = (char *)p;
return res;
default:
@@ -367,7 +337,7 @@ optionVendorOption(tOptions * pOpts, tOptDesc * pOD)
*
* @return success status
*/
-LOCAL tSuccess
+static tSuccess
opt_find_long(tOptions * opts, char const * opt_name, tOptState * state)
{
char name_buf[128];
@@ -408,7 +378,7 @@ opt_find_long(tOptions * opts, char const * opt_name, tOptState * state)
* @param optValue option flag character
* @param pOptState state about current option
*/
-LOCAL tSuccess
+static tSuccess
opt_find_short(tOptions * pOpts, uint_t optValue, tOptState * pOptState)
{
tOptDesc * pRes = pOpts->pOptDesc;
@@ -638,6 +608,7 @@ get_opt_arg_none(tOptions * pOpts, tOptState * o_st)
*/
else
pOpts->pzCurOpt = NULL;
+
return SUCCESS;
}
@@ -648,7 +619,7 @@ get_opt_arg_none(tOptions * pOpts, tOptState * o_st)
* @param[in,out] o_st the option processing state
* @returns SUCCESS or FAILURE
*/
-LOCAL tSuccess
+static tSuccess
get_opt_arg(tOptions * opts, tOptState * o_st)
{
o_st->flags |= (o_st->pOD->fOptState & OPTST_PERSISTENT_MASK);
@@ -658,10 +629,24 @@ get_opt_arg(tOptions * opts, tOptState * o_st)
* are handled with the "none" procedure. Otherwise, check the
* optional flag and call either the "may" or "must" function.
*/
- if ( ((o_st->flags & OPTST_DISABLED) != 0)
- || (OPTST_GET_ARGTYPE(o_st->flags) == OPARG_TYPE_NONE))
+ if ((o_st->flags & OPTST_DISABLED) != 0)
return get_opt_arg_none(opts, o_st);
-
+
+ switch (OPTST_GET_ARGTYPE(o_st->flags)) {
+ case OPARG_TYPE_STATIC:
+ {
+ /*
+ * Propagate the static arg
+ */
+ tSuccess res = get_opt_arg_none(opts, o_st);
+ o_st->pzOptArg = o_st->pOD->optArg.argString;
+ return res;
+ }
+
+ case OPARG_TYPE_NONE:
+ return get_opt_arg_none(opts, o_st);
+ }
+
if (o_st->flags & OPTST_ARG_OPTIONAL)
return get_opt_arg_may( opts, o_st);
@@ -675,7 +660,7 @@ get_opt_arg(tOptions * opts, tOptState * o_st)
* @param[in,out] o_st the option processing state
* @returns SUCCESS or FAILURE
*/
-LOCAL tSuccess
+static tSuccess
find_opt(tOptions * opts, tOptState * o_st)
{
/*
diff --git a/contrib/ntp/sntp/libopts/genshell.c b/contrib/ntp/sntp/libopts/genshell.c
index 0f05b3efbc44..05182a6014f1 100644
--- a/contrib/ntp/sntp/libopts/genshell.c
+++ b/contrib/ntp/sntp/libopts/genshell.c
@@ -6,7 +6,7 @@
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 41:0:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -19,7 +19,7 @@
* The genshellopt program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1999-2014 Bruce Korb, all rights reserved.
+ * Copyright (C) 1999-2018 Bruce Korb, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the GNU Lesser General Public License,
* version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
@@ -43,10 +43,15 @@
#define OPTION_CODE_COMPILE 1
#include "genshell.h"
#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -66,7 +71,7 @@ extern tUsageProc genshelloptUsage;
*/
static char const genshellopt_opt_strs[1769] =
/* 0 */ "genshellopt 1\n"
- "Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n"
+ "Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the GNU Lesser General Public License,\n"
"version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
@@ -258,7 +263,7 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
#define zDetail (genshellopt_opt_strs+1534)
/** The full version string for genshellopt. */
#define zFullVersion (genshellopt_opt_strs+1755)
-/* extracted from optcode.tlib near line 364 */
+/* extracted from optcode.tlib near line 342 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -290,7 +295,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
ex_code = GENSHELLOPT_EXIT_SUCCESS;
genshelloptUsage(&genshelloptOptions, ex_code);
/* NOTREACHED */
- exit(1);
+ exit(GENSHELLOPT_EXIT_FAILURE);
(void)opts;
(void)od;
}
@@ -481,19 +486,19 @@ static void bogus_function(void) {
extract the correct strings. These strings are actually referenced
by a field name in the genshelloptOptions structure noted in the
comments below. The literal text is defined in genshellopt_opt_strs.
-
+
NOTE: the strings below are segmented with respect to the source string
genshellopt_opt_strs. The strings above are handed off for translation
at run time a paragraph at a time. Consequently, they are presented here
for translation a paragraph at a time.
-
+
ALSO: often the description for an option will reference another option
by name. These are set off with apostrophe quotes (I hope). Do not
translate option names.
*/
/* referenced via genshelloptOptions.pzCopyright */
puts(_("genshellopt 1\n\
-Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n\
+Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the GNU Lesser General Public License,\n\
version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
@@ -551,234 +556,230 @@ by the newly generated text. The first '#!' line will be regenerated.\n"));
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -787,17 +788,17 @@ by the newly generated text. The first '#!' line will be regenerated.\n"));
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -815,28 +816,28 @@ by the newly generated text. The first '#!' line will be regenerated.\n"));
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/sntp/libopts/genshell.h b/contrib/ntp/sntp/libopts/genshell.h
index 44825567bc7f..994af1690927 100644
--- a/contrib/ntp/sntp/libopts/genshell.h
+++ b/contrib/ntp/sntp/libopts/genshell.h
@@ -6,7 +6,7 @@
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 41:0:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -19,7 +19,7 @@
* The genshellopt program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1999-2014 Bruce Korb, all rights reserved.
+ * Copyright (C) 1999-2018 Bruce Korb, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the GNU Lesser General Public License,
* version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
@@ -47,6 +47,8 @@
#ifndef AUTOOPTS_GENSHELL_H_GUARD
#define AUTOOPTS_GENSHELL_H_GUARD 1
#include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
/**
* Ensure that the library used for compiling this generated header is at
@@ -55,13 +57,19 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
/**
* Enumeration of each option type for genshellopt
*/
@@ -150,6 +158,12 @@ typedef enum {
#ifdef __cplusplus
extern "C" {
#endif
+/*
+ * global exported definitions
+ */
+#define ch_t unsigned char
+#define cc_t const unsigned char
+#define cch_t char const
/* * * * * *
@@ -201,6 +215,7 @@ static inline char* aoGetsText(char const* pz) {
# endif
#endif /* ENABLE_NLS */
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/sntp/libopts/gettext.h b/contrib/ntp/sntp/libopts/gettext.h
index 7d3ea3cbf160..87ec81930d6c 100644
--- a/contrib/ntp/sntp/libopts/gettext.h
+++ b/contrib/ntp/sntp/libopts/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2015 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,13 +13,14 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
-/* NLS can be disabled through the configure --disable-nls option. */
-#if ENABLE_NLS
+/* NLS can be disabled through the configure --disable-nls option
+ or through "#define ENABLE NLS 0" before including this file. */
+#if defined ENABLE_NLS && ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
@@ -184,7 +185,8 @@ npgettext_aux (const char *domain,
#include <string.h>
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
- /* || __STDC_VERSION__ >= 199901L */ )
+ /* || __STDC_VERSION__ == 199901L
+ || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
#else
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
@@ -225,15 +227,17 @@ dcpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
+ found_translation = (translation != msg_ctxt_id);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (translation != msg_ctxt_id)
+ if (found_translation)
return translation;
}
return msgid;
@@ -271,15 +275,17 @@ dcnpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ if (found_translation)
return translation;
}
return (n == 1 ? msgid : msgid_plural);
diff --git a/contrib/ntp/sntp/libopts/init.c b/contrib/ntp/sntp/libopts/init.c
index 81d4eee32d0c..b65e593914a8 100644
--- a/contrib/ntp/sntp/libopts/init.c
+++ b/contrib/ntp/sntp/libopts/init.c
@@ -9,7 +9,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -28,11 +28,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static tSuccess
-do_presets(tOptions * opts);
-/* = = = END-STATIC-FORWARD = = = */
-
/**
* Make sure the option descriptor is there and that we understand it.
* This should be called from any user entry point where one needs to
@@ -46,7 +41,7 @@ do_presets(tOptions * opts);
* @param[in] pname name of program, from argv[]
* @returns SUCCESS or FAILURE
*/
-LOCAL tSuccess
+static tSuccess
validate_struct(tOptions * opts, char const * pname)
{
if (opts == NULL) {
@@ -97,14 +92,15 @@ validate_struct(tOptions * opts, char const * pname)
*/
if (opts->pzProgName == NULL) {
char const * pz = strrchr(pname, DIRCH);
- char const ** pp = VOIDP(&(opts->pzProgName));
+ char const ** pp =
+ (char const **)(void **)&(opts->pzProgName);
if (pz != NULL)
*pp = pz+1;
else
*pp = pname;
- pz = pathfind(getenv("PATH"), pname, "rx");
+ pz = pathfind(getenv("PATH"), (char *)pname, "rx");
if (pz != NULL)
pname = VOIDP(pz);
@@ -141,7 +137,7 @@ validate_struct(tOptions * opts, char const * pname)
* @param pOpts program options descriptor
* @returns SUCCESS or FAILURE
*/
-LOCAL tSuccess
+static tSuccess
immediate_opts(tOptions * opts)
{
tSuccess res;
@@ -246,7 +242,7 @@ do_presets(tOptions * opts)
* @param[in] a_ct program argument count
* @param[in] a_v program argument vector
*/
-LOCAL bool
+static bool
ao_initialize(tOptions * opts, int a_ct, char ** a_v)
{
if ((opts->fOptSet & OPTPROC_INITDONE) != 0)
diff --git a/contrib/ntp/sntp/libopts/intprops.h b/contrib/ntp/sntp/libopts/intprops.h
index 2ae151b92953..af456ff589c5 100644
--- a/contrib/ntp/sntp/libopts/intprops.h
+++ b/contrib/ntp/sntp/libopts/intprops.h
@@ -1,10 +1,10 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2005, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2018 Free Software Foundation, Inc.
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
@@ -22,12 +22,11 @@
#include <limits.h>
-/* Return an integer value, converted to the same type as the integer
- expression E after integer type promotion. V is the unconverted value. */
+/* Return a value with the common real type of E and V and the value of V. */
#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
/* The extra casts in the following macros work around compiler bugs,
@@ -37,59 +36,55 @@
an integer. */
#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
-/* True if negative values of the signed integer type T use two's
- complement, ones' complement, or signed magnitude representation,
- respectively. Much GNU code assumes two's complement, but some
- people like to be portable to all possible C hosts. */
-#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the signed integer expression E uses two's complement. */
-#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
-
-/* True if the arithmetic type T is signed. */
+/* True if the real type T is signed. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-/* Return 1 if the integer expression E, after integer promotion, has
- a signed type. */
-#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+/* Return 1 if the real expression E, after promotion, has a
+ signed or floating type. */
+#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
-/* Minimum and maximum values for integer types and expressions. These
- macros have undefined behavior if T is signed and has padding bits.
- If this is a problem for you, please let us know how to fix it for
- your host. */
+/* Minimum and maximum values for integer types and expressions. */
+
+/* The width in bits of the integer type or expression T.
+ Padding bits are not supported; this is checked at compile-time below. */
+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
/* The maximum and minimum values for the integer type T. */
-#define TYPE_MINIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) 0 \
- : TYPE_SIGNED_MAGNITUDE (t) \
- ? ~ (t) 0 \
- : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
#define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
/* The maximum and minimum values for the type of the expression E,
after integer promotion. E should not have side effects. */
#define _GL_INT_MINIMUM(e) \
- (_GL_INT_SIGNED (e) \
- ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \
+ (EXPR_SIGNED (e) \
+ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_CONVERT (e, 0))
#define _GL_INT_MAXIMUM(e) \
- (_GL_INT_SIGNED (e) \
+ (EXPR_SIGNED (e) \
? _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_NEGATE_CONVERT (e, 1))
#define _GL_SIGNED_INT_MAXIMUM(e) \
- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
+/* Work around OpenVMS incompatibility with C99. */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+
+/* This include file assumes that signed types are two's complement without
+ padding bits; the above macros have undefined behavior otherwise.
+ If this is a problem for you, please let us know how to fix it for your host.
+ This assumption is tested by the intprops-tests module. */
-/* Return 1 if the __typeof__ keyword works. This could be done by
+/* Does the __typeof__ keyword work? This could be done by
'configure', but for now it's easier to do it by hand. */
-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+#if (2 <= __GNUC__ \
+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
|| (0x5110 <= __SUNPRO_C && !__STDC__))
# define _GL_HAVE___TYPEOF__ 1
#else
@@ -118,8 +113,7 @@
signed, this macro may overestimate the true bound by one byte when
applied to unsigned types of size 2, 4, 16, ... bytes. */
#define INT_STRLEN_BOUND(t) \
- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
- - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ _GL_SIGNED_TYPE_OR_EXPR (t))
/* Bound on buffer size needed to represent an integer type or expression T,
@@ -185,7 +179,7 @@
/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Avoid && and || as they tickle
bugs in Sun C 5.11 2010/08/13 and other compilers; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
+ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
((b) < 0 \
? ((a) < 0 \
@@ -224,24 +218,42 @@
? (a) < (min) >> (b) \
: (max) >> (b) < (a))
+/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
+#if 5 <= __GNUC__ && !defined __ICC
+# define _GL_HAS_BUILTIN_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW 0
+#endif
+
+/* True if __builtin_add_overflow_p (A, B, C) works. */
+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
(e.g., A and B) have the same type as MIN and MAX. Instead, they assume
that the result (e.g., A + B) has that type. */
-#define _GL_ADD_OVERFLOW(a, b, min, max) \
- ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
- : (a) < 0 ? (b) <= (a) + (b) \
- : (b) < 0 ? (a) <= (a) + (b) \
- : (a) + (b) < (b))
-#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
- ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \
- : (a) < 0 ? 1 \
- : (b) < 0 ? (a) - (b) <= (a) \
- : (a) < (b))
-#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
- (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
- || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
+#else
+# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
+ : (a) < 0 ? (b) <= (a) + (b) \
+ : (b) < 0 ? (a) <= (a) + (b) \
+ : (a) + (b) < (b))
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \
+ : (a) < 0 ? 1 \
+ : (b) < 0 ? (a) - (b) <= (a) \
+ : (a) < (b))
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
+ || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#endif
#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
: (a) < 0 ? (b) <= (a) + (b) - 1 \
@@ -263,22 +275,29 @@
: (a) % - (b)) \
== 0)
-
-/* Integer overflow checks.
+/* Check for integer overflow, and report low order bits of answer.
The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
might not yield numerically correct answers due to arithmetic overflow.
- They work correctly on all known practical hosts, and do not rely
+ The INT_<op>_WRAPV macros also store the low-order bits of the answer.
+ These macros work correctly on all known practical hosts, and do not rely
on undefined behavior due to signed arithmetic overflow.
- Example usage:
+ Example usage, assuming A and B are long int:
- long int i = ...;
- long int j = ...;
- if (INT_MULTIPLY_OVERFLOW (i, j))
- printf ("multiply would overflow");
+ if (INT_MULTIPLY_OVERFLOW (a, b))
+ printf ("result would overflow\n");
else
- printf ("product is %ld", i * j);
+ printf ("result is %ld (no overflow)\n", a * b);
+
+ Example usage with WRAPV flavor:
+
+ long int result;
+ bool overflow = INT_MULTIPLY_WRAPV (a, b, &result);
+ printf ("result is %ld (%s)\n", result,
+ overflow ? "after overflow" : "no overflow");
+
+ Restrictions on these macros:
These macros do not check for all possible numerical problems or
undefined or unspecified behavior: they do not check for division
@@ -287,6 +306,9 @@
These macros may evaluate their arguments zero or multiple times, so the
arguments should not have side effects.
+ The WRAPV macros are not constant expressions. They support only
+ +, binary -, and *. The result type must be signed.
+
These macros are tuned for their last argument being a constant.
Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
@@ -296,8 +318,12 @@
_GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
#define INT_SUBTRACT_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#define INT_NEGATE_OVERFLOW(a) \
- INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
+#else
+# define INT_NEGATE_OVERFLOW(a) \
+ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
#define INT_MULTIPLY_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
#define INT_DIVIDE_OVERFLOW(a, b) \
@@ -317,4 +343,111 @@
_GL_INT_MINIMUM (0 * (b) + (a)), \
_GL_INT_MAXIMUM (0 * (b) + (a)))
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
+ Return 1 if the result overflows. See above for restrictions. */
+#define INT_ADD_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
+#define INT_SUBTRACT_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW)
+#define INT_MULTIPLY_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
+
+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+ https://llvm.org/bugs/show_bug.cgi?id=25390
+ For now, assume all versions of GCC-like compilers generate bogus
+ warnings for _Generic. This matters only for older compilers that
+ lack __builtin_add_overflow. */
+#if __GNUC__
+# define _GL__GENERIC_BOGUS 1
+#else
+# define _GL__GENERIC_BOGUS 0
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+ the operation. BUILTIN is the builtin operation, and OVERFLOW the
+ overflow predicate. Return 1 if the result overflows. See above
+ for restrictions. */
+#if _GL_HAS_BUILTIN_OVERFLOW
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
+#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (_Generic \
+ (*(r), \
+ signed char: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ signed char, SCHAR_MIN, SCHAR_MAX), \
+ short int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ short int, SHRT_MIN, SHRT_MAX), \
+ int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX), \
+ long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX), \
+ long long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX)))
+#else
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (sizeof *(r) == sizeof (signed char) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ signed char, SCHAR_MIN, SCHAR_MAX) \
+ : sizeof *(r) == sizeof (short int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ short int, SHRT_MIN, SHRT_MAX) \
+ : sizeof *(r) == sizeof (int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX) \
+ : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
+# ifdef LLONG_MAX
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ (sizeof *(r) == sizeof (long int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX))
+# else
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX)
+# endif
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where the operation
+ is given by OP. Use the unsigned type UT for calculation to avoid
+ overflow problems. *R's type is T, with extrema TMIN and TMAX.
+ T must be a signed integer type. Return 1 if the result overflows. */
+#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ (sizeof ((a) op (b)) < sizeof (t) \
+ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
+ : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax))
+#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ ((overflow (a, b) \
+ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
+ || (tmax) < ((a) op (b))) \
+ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
+ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
+
+/* Return the low-order bits of A <op> B, where the operation is given
+ by OP. Use the unsigned type UT for calculation to avoid undefined
+ behavior on signed integer overflow, and convert the result to type T.
+ UT is at least as wide as T and is no narrower than unsigned int,
+ T is two's complement, and there is no padding or trap representations.
+ Assume that converting UT to T yields the low-order bits, as is
+ done in all known two's-complement C compilers. E.g., see:
+ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
+
+ According to the C standard, converting UT to T yields an
+ implementation-defined result or signal for values outside T's
+ range. However, code that works around this theoretical problem
+ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
+ https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
+ As the compiler bug is real, don't try to work around the
+ theoretical problem. */
+
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
+ ((t) ((ut) (a) op (ut) (b)))
+
#endif /* _GL_INTPROPS_H */
diff --git a/contrib/ntp/sntp/libopts/libopts.c b/contrib/ntp/sntp/libopts/libopts.c
index 97bc359ed8c5..457edc433afc 100644
--- a/contrib/ntp/sntp/libopts/libopts.c
+++ b/contrib/ntp/sntp/libopts/libopts.c
@@ -1,9 +1,9 @@
#define AUTOOPTS_INTERNAL 1
#include "autoopts/project.h"
-#define LOCAL static
+
#include "ao-strs.h"
static char const ao_ver_string[] =
- "41:0:16\n";
+ "42:1:17\n";
#include "autoopts/options.h"
#include "autoopts/usage-txt.h"
#include "genshell.h"
@@ -11,12 +11,14 @@ static char const ao_ver_string[] =
#include "option-value-type.h"
#include "ao-strs.h"
#include "ag-char-map.h"
+#include "save-flags.h"
#include "autoopts.h"
#include "proto.h"
#include "parse-duration.c"
#include "ao-strs.c"
#include "option-value-type.c"
#include "option-xat-attribute.c"
+#include "save-flags.c"
#include "autoopts.c"
#include "alias.c"
#include "boolean.c"
diff --git a/contrib/ntp/sntp/libopts/load.c b/contrib/ntp/sntp/libopts/load.c
index ccda5b4e870d..59d124ebd4ac 100644
--- a/contrib/ntp/sntp/libopts/load.c
+++ b/contrib/ntp/sntp/libopts/load.c
@@ -12,7 +12,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -31,26 +31,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static bool
-get_realpath(char * buf, size_t b_sz);
-
-static bool
-add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path);
-
-static bool
-add_env_val(char * buf, int buf_sz, char const * name);
-
-static char *
-assemble_arg_val(char * txt, tOptionLoadMode mode);
-
-static char *
-trim_quotes(char * arg);
-
-static bool
-direction_ok(opt_state_mask_t f, int dir);
-/* = = = END-STATIC-FORWARD = = = */
-
static bool
get_realpath(char * buf, size_t b_sz)
{
@@ -207,6 +187,8 @@ add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path)
char const * path;
char const * pz;
int skip = 2;
+ size_t fname_len;
+ size_t dir_len; //!< length of the directory portion of the path to the exe
switch (fname[2]) {
case DIRCH:
@@ -225,7 +207,7 @@ add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path)
if (strchr(prg_path, DIRCH) != NULL)
path = prg_path;
else {
- path = pathfind(getenv("PATH"), prg_path, "rx");
+ path = pathfind(getenv("PATH"), (char *)prg_path, "rx");
if (path == NULL)
return false;
@@ -240,17 +222,19 @@ add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path)
if (pz == NULL)
return false;
- fname += skip;
+ fname += skip;
+ fname_len = strlen(fname) + 1; // + NUL byte
+ dir_len = (pz - path) + 1; // + dir sep character
/*
* Concatenate the file name to the end of the executable path.
* The result may be either a file or a directory.
*/
- if ((unsigned)(pz - path) + 1 + strlen(fname) >= (unsigned)b_sz)
+ if (dir_len + fname_len > (unsigned)b_sz)
return false;
- memcpy(buf, path, (size_t)((pz - path)+1));
- strcpy(buf + (pz - path) + 1, fname);
+ memcpy(buf, path, dir_len);
+ memcpy(buf + dir_len, fname, fname_len);
/*
* If the "path" path was gotten from "pathfind()", then it was
@@ -289,10 +273,16 @@ add_env_val(char * buf, int buf_sz, char const * name)
if (dir_part == NULL)
return false;
- if (strlen(dir_part) + 1 + strlen(name) >= (unsigned)buf_sz)
- return false;
+ {
+ size_t dir_len = strlen(dir_part);
+ size_t nm_len = strlen(name) + 1;
+
+ if (dir_len + nm_len >= (unsigned)buf_sz)
+ return false;
+ memcpy(buf, dir_part, dir_len);
+ memcpy(buf + dir_len, name, nm_len);
+ }
- sprintf(buf, "%s%s", dir_part, name);
return true;
}
@@ -304,10 +294,10 @@ add_env_val(char * buf, int buf_sz, char const * name)
* @param[in,out] txt the input and output string
* @param[in] mode the handling mode (cooking method)
*/
-LOCAL void
+static void
munge_str(char * txt, tOptionLoadMode mode)
{
- char * pzE;
+ char * end;
if (mode == OPTION_LOAD_KEEP)
return;
@@ -316,13 +306,13 @@ munge_str(char * txt, tOptionLoadMode mode)
char * src = SPN_WHITESPACE_CHARS(txt+1);
size_t l = strlen(src) + 1;
memmove(txt, src, l);
- pzE = txt + l - 1;
+ end = txt + l - 1;
} else
- pzE = txt + strlen(txt);
+ end = txt + strlen(txt);
- pzE = SPN_WHITESPACE_BACK(txt, pzE);
- *pzE = NUL;
+ end = SPN_WHITESPACE_BACK(txt, end);
+ *end = NUL;
if (mode == OPTION_LOAD_UNCOOKED)
return;
@@ -333,7 +323,7 @@ munge_str(char * txt, tOptionLoadMode mode)
case '\'': break;
}
- switch (pzE[-1]) {
+ switch (end[-1]) {
default: return;
case '"':
case '\'': break;
@@ -435,7 +425,7 @@ direction_ok(opt_state_mask_t f, int dir)
if (PRESETTING(dir)) {
/*
* We are in the presetting direction with an option we handle
- * immediately for disablement, but normally for disablement.
+ * immediately for disablement, but normally for handling.
* Therefore, skip if NOT disabled.
*/
if ((f & OPTST_DISABLED) != 0)
@@ -443,7 +433,7 @@ direction_ok(opt_state_mask_t f, int dir)
} else {
/*
* We are in the processing direction with an option we handle
- * immediately for disablement, but normally for disablement.
+ * immediately for disablement, but normally for handling.
* Therefore, skip if disabled.
*/
if ((f & OPTST_DISABLED) == 0)
@@ -476,7 +466,7 @@ direction_ok(opt_state_mask_t f, int dir)
* @param[in] direction current processing direction (preset or not)
* @param[in] load_mode option loading mode (OPTION_LOAD_*)
*/
-LOCAL void
+static void
load_opt_line(tOptions * opts, tOptState * opt_state, char * line,
tDirection direction, tOptionLoadMode load_mode )
{
diff --git a/contrib/ntp/sntp/libopts/m4/libopts.m4 b/contrib/ntp/sntp/libopts/m4/libopts.m4
index f8b2c38e16d8..23738cab47fe 100644
--- a/contrib/ntp/sntp/libopts/m4/libopts.m4
+++ b/contrib/ntp/sntp/libopts/m4/libopts.m4
@@ -1,11 +1,4 @@
-dnl -*- buffer-read-only: t -*- vi: set ro:
-dnl
-dnl DO NOT EDIT THIS FILE (libopts.m4)
-dnl
-dnl It has been AutoGen-ed
-dnl From the definitions libopts.def
-dnl and the template file conftest.tpl
-dnl
+
dnl do always before generated macros:
dnl
AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
@@ -114,6 +107,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
AC_PROG_SED
[while :
do
+ test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which bash`
test -x "$POSIX_SHELL" && break
POSIX_SHELL=`which dash`
@@ -235,9 +229,9 @@ int main() {
fputs( "error: regex -->.<-- did not match\n", stderr );
return 1;
}
- return 0; }])],
+ return 0; }] )],
[libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
- [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
+ [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
fi ## disabled by request
AC_MSG_RESULT([${libopts_cv_with_libregex}])
@@ -265,7 +259,7 @@ AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
int main (int argc, char ** argv) {
char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
return (pz == 0) ? 1 : 0;
-}])],
+}] )],
[libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
@@ -313,7 +307,7 @@ choke me!!
@%:@endif
char *pz = realpath(argv@<:@0@:>@, zPath);
return (pz == zPath) ? 0 : 1;
-}])],
+}] )],
[libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
@@ -346,7 +340,7 @@ int main() {
tm.tm_yday = 239; /* days since January 1 @<:@0, 365@:>@ */
tm.tm_isdst = 1; /* flag for daylight savings time */
strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
- return (strcmp( t_buf, z ) != 0); }])],
+ return (strcmp( t_buf, z ) != 0); }] )],
[libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
@@ -366,7 +360,7 @@ AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
int main (int argc, char ** argv) {
FILE * fp = fopen("conftest.@S|@ac_ext", "rb");
-return (fp == NULL) ? 1 : fclose(fp); }])],
+return (fp == NULL) ? 1 : fclose(fp); }] )],
[libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
@@ -389,7 +383,7 @@ AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
int main (int argc, char ** argv) {
FILE * fp = fopen("conftest.@S|@ac_ext", "rt");
-return (fp == NULL) ? 1 : fclose(fp); }])],
+return (fp == NULL) ? 1 : fclose(fp); }] )],
[libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
@@ -461,7 +455,7 @@ dnl the config tests that the library needs. Invoke the
dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
dnl
dnl This file is part of AutoGen.
-dnl AutoGen Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+dnl AutoGen Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
dnl
dnl AutoGen is free software: you can redistribute it and/or modify it
dnl under the terms of the GNU General Public License as published by the
diff --git a/contrib/ntp/sntp/libopts/m4/liboptschk.m4 b/contrib/ntp/sntp/libopts/m4/liboptschk.m4
index 34d5658c2ff1..9d107d696212 100644
--- a/contrib/ntp/sntp/libopts/m4/liboptschk.m4
+++ b/contrib/ntp/sntp/libopts/m4/liboptschk.m4
@@ -1,5 +1,5 @@
# liboptschk.m4 serial 2 (autogen - 5.11.4)
-dnl Copyright (C) 2005-2015 by Bruce Korb - all rights reserved
+dnl Copyright (C) 2005-2018 by Bruce Korb - all rights reserved
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/contrib/ntp/sntp/libopts/m4/stdnoreturn.m4 b/contrib/ntp/sntp/libopts/m4/stdnoreturn.m4
index 003941164f11..a7ce376428eb 100644
--- a/contrib/ntp/sntp/libopts/m4/stdnoreturn.m4
+++ b/contrib/ntp/sntp/libopts/m4/stdnoreturn.m4
@@ -1,6 +1,6 @@
# Check for stdnoreturn.h that conforms to C11.
-dnl Copyright 2012-2015 Free Software Foundation, Inc.
+dnl Copyright 2012-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,33 +9,43 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDNORETURN_H],
[
- AC_CACHE_CHECK([for working stdnoreturn.h],
- [gl_cv_header_working_stdnoreturn_h],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdlib.h>
- #include <stdnoreturn.h>
- /* Do not check for 'noreturn' after the return type.
- C11 allows it, but it's rarely done that way
- and circa-2012 bleeding-edge GCC rejects it when given
- -Werror=old-style-declaration. */
- noreturn void foo1 (void) { exit (0); }
- _Noreturn void foo2 (void) { exit (0); }
- int testit (int argc, char **argv) {
- if (argc & 1)
- return 0;
- (argv[0][0] ? foo1 : foo2) ();
- }
- ]])],
- [gl_cv_header_working_stdnoreturn_h=yes],
- [gl_cv_header_working_stdnoreturn_h=no])])
-
- if test $gl_cv_header_working_stdnoreturn_h = yes; then
- STDNORETURN_H=''
- else
- STDNORETURN_H='stdnoreturn.h'
- fi
-
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ cygwin*)
+ dnl Regardless whether a working <stdnoreturn.h> exists or not,
+ dnl we need our own <stdnoreturn.h>, because of the definition
+ dnl of _Noreturn done by gnulib-common.m4.
+ STDNORETURN_H='stdnoreturn.h'
+ ;;
+ *)
+ AC_CACHE_CHECK([for working stdnoreturn.h],
+ [gl_cv_header_working_stdnoreturn_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #include <stdnoreturn.h>
+ /* Do not check for 'noreturn' after the return type.
+ C11 allows it, but it's rarely done that way
+ and circa-2012 bleeding-edge GCC rejects it when given
+ -Werror=old-style-declaration. */
+ noreturn void foo1 (void) { exit (0); }
+ _Noreturn void foo2 (void) { exit (0); }
+ int testit (int argc, char **argv)
+ {
+ if (argc & 1)
+ return 0;
+ (argv[0][0] ? foo1 : foo2) ();
+ }
+ ]])],
+ [gl_cv_header_working_stdnoreturn_h=yes],
+ [gl_cv_header_working_stdnoreturn_h=no])])
+ if test $gl_cv_header_working_stdnoreturn_h = yes; then
+ STDNORETURN_H=''
+ else
+ STDNORETURN_H='stdnoreturn.h'
+ fi
+ ;;
+ esac
AC_SUBST([STDNORETURN_H])
AM_CONDITIONAL([GL_GENERATE_STDNORETURN_H], [test -n "$STDNORETURN_H"])
])
diff --git a/contrib/ntp/sntp/libopts/makeshell.c b/contrib/ntp/sntp/libopts/makeshell.c
index fbe8e171de0d..8541c1ff68d9 100644
--- a/contrib/ntp/sntp/libopts/makeshell.c
+++ b/contrib/ntp/sntp/libopts/makeshell.c
@@ -11,7 +11,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -35,45 +35,7 @@
#define UPPER(_c) (toupper(to_uchar(_c)))
#define LOWER(_c) (tolower(to_uchar(_c)))
-/* = = = START-STATIC-FORWARD = = = */
-static void
-emit_var_text(char const * prog, char const * var, int fdin);
-
-static void
-text_to_var(tOptions * opts, teTextTo which, tOptDesc * od);
-
-static void
-emit_usage(tOptions * opts);
-
-static void
-emit_wrapup(tOptions * opts);
-
-static void
-emit_setup(tOptions * opts);
-
-static void
-emit_action(tOptions * opts, tOptDesc * od);
-
-static void
-emit_inaction(tOptions * opts, tOptDesc * od);
-
-static void
-emit_flag(tOptions * opts);
-
-static void
-emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts);
-
-static void
-emit_long(tOptions * opts);
-
-static char *
-load_old_output(char const * fname, char const * pname);
-
-static void
-open_out(char const * fname, char const * pname);
-/* = = = END-STATIC-FORWARD = = = */
-
-LOCAL noreturn void
+lo_noreturn static void
option_exits(int exit_code)
{
if (print_exit)
@@ -81,21 +43,21 @@ option_exits(int exit_code)
exit(exit_code);
}
-LOCAL noreturn void
+lo_noreturn static void
ao_bug(char const * msg)
{
fprintf(stderr, zao_bug_msg, msg);
option_exits(EX_SOFTWARE);
}
-LOCAL void
+static void
fserr_warn(char const * prog, char const * op, char const * fname)
{
fprintf(stderr, zfserr_fmt, prog, errno, strerror(errno),
op, fname);
}
-LOCAL noreturn void
+lo_noreturn static void
fserr_exit(char const * prog, char const * op, char const * fname)
{
fserr_warn(prog, op, fname);
@@ -322,11 +284,11 @@ text_to_var(tOptions * opts, teTextTo which, tOptDesc * od)
switch (which) {
case TT_LONGUSAGE:
(*(opts->pUsageProc))(opts, EXIT_SUCCESS);
- /* NOTREACHED */
+ /* FALLTHROUGH */ /* NOTREACHED */
case TT_USAGE:
(*(opts->pUsageProc))(opts, EXIT_FAILURE);
- /* NOTREACHED */
+ /* FALLTHROUGH */ /* NOTREACHED */
case TT_VERSION:
if (od->fOptState & OPTST_ALLOC_ARG) {
@@ -335,13 +297,13 @@ text_to_var(tOptions * opts, teTextTo which, tOptDesc * od)
}
od->optArg.argString = "c";
optionPrintVersion(opts, od);
- /* NOTREACHED */
+ /* FALLTHROUGH */ /* NOTREACHED */
default:
option_exits(EXIT_FAILURE);
- /* NOTREACHED */
+ /* FALLTHROUGH */ /* NOTREACHED */
}
- /* NOTREACHED */
+ /* FALLTHROUGH */ /* NOTREACHED */
default:
close(fdpair[1]);
@@ -401,7 +363,7 @@ emit_usage(tOptions * opts)
/* Copy the program name into the time/name buffer */
for (;;) {
- if ((*pzPN++ = (char)tolower((unsigned char)*pz++)) == NUL)
+ if ((*pzPN++ = (char)tolower(*pz++)) == NUL)
break;
}
@@ -671,8 +633,8 @@ emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts)
continue;
match_ct = 0;
- while ( toupper((unsigned char)od->pz_DisableName[match_ct])
- == toupper((unsigned char)name[match_ct]))
+ while ( toupper(od->pz_DisableName[match_ct])
+ == toupper(name[match_ct]))
match_ct++;
if (match_ct > min_match_ct)
min_match_ct = match_ct;
@@ -885,13 +847,12 @@ genshelloptUsage(tOptions * opts, int exit_cd)
switch (fork()) {
case -1:
optionUsage(opts, EXIT_FAILURE);
- /* NOTREACHED */
+ /* FALLTHROUGH */ /* NOTREACHED */
case 0:
pagerState = PAGER_STATE_CHILD;
optionUsage(opts, EXIT_SUCCESS);
- /* NOTREACHED */
- _exit(EXIT_FAILURE);
+ /* FALLTHROUGH */ /* NOTREACHED */
default:
{
@@ -930,6 +891,7 @@ genshelloptUsage(tOptions * opts, int exit_cd)
/*FALLTHROUGH*/
case -1:
optionUsage(optionParseShellOptions, EXIT_FAILURE);
+ /* FALLTHROUGH */ /* NOTREACHED */
default:
{
diff --git a/contrib/ntp/sntp/libopts/nested.c b/contrib/ntp/sntp/libopts/nested.c
index aaf089f543d8..e7604506781b 100644
--- a/contrib/ntp/sntp/libopts/nested.c
+++ b/contrib/ntp/sntp/libopts/nested.c
@@ -12,7 +12,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -37,7 +37,7 @@ typedef struct {
char xml_txt[8];
} xml_xlate_t;
-static xml_xlate_t const xml_xlate[] = {
+ static xml_xlate_t const xml_xlate[] = {
{ '&', 4, "amp;" },
{ '<', 3, "lt;" },
{ '>', 3, "gt;" },
@@ -49,48 +49,6 @@ static xml_xlate_t const xml_xlate[] = {
#define ENOMSG ENOENT
#endif
-/* = = = START-STATIC-FORWARD = = = */
-static void
-remove_continuation(char * src);
-
-static char const *
-scan_q_str(char const * pzTxt);
-
-static tOptionValue *
-add_string(void ** pp, char const * name, size_t nm_len,
- char const * val, size_t d_len);
-
-static tOptionValue *
-add_bool(void ** pp, char const * name, size_t nm_len,
- char const * val, size_t d_len);
-
-static tOptionValue *
-add_number(void ** pp, char const * name, size_t nm_len,
- char const * val, size_t d_len);
-
-static tOptionValue *
-add_nested(void ** pp, char const * name, size_t nm_len,
- char * val, size_t d_len);
-
-static char const *
-scan_name(char const * name, tOptionValue * res);
-
-static char const *
-unnamed_xml(char const * txt);
-
-static char const *
-scan_xml_name(char const * name, size_t * nm_len, tOptionValue * val);
-
-static char const *
-find_end_xml(char const * src, size_t nm_len, char const * val, size_t * len);
-
-static char const *
-scan_xml(char const * xml_name, tOptionValue * res_val);
-
-static void
-sort_list(tArgList * arg_list);
-/* = = = END-STATIC-FORWARD = = = */
-
/**
* Backslashes are used for line continuations. We keep the newline
* characters, but trim out the backslash:
@@ -638,7 +596,7 @@ bail_scan_xml:
* an internal call, so it is not validated. The caller is responsible for
* knowing what they are doing.
*/
-LOCAL void
+static void
unload_arg_list(tArgList * arg_list)
{
int ct = arg_list->useCt;
@@ -743,7 +701,7 @@ sort_list(tArgList * arg_list)
* @code{ENOMSG} no configuration values were found
* @end itemize
=*/
-LOCAL tOptionValue *
+static tOptionValue *
optionLoadNested(char const * text, char const * name, size_t nm_len)
{
tOptionValue * res_val;
@@ -783,12 +741,23 @@ optionLoadNested(char const * text, char const * name, size_t nm_len)
text = scan_name(text, res_val);
else switch (*text) {
- case NUL: goto scan_done;
- case '<': text = scan_xml(text, res_val);
- if (text == NULL) goto woops;
- if (*text == ',') text++; break;
- case '#': text = strchr(text, NL); break;
- default: goto woops;
+ case NUL:
+ goto scan_done;
+
+ case '<':
+ text = scan_xml(text, res_val);
+ if (text == NULL)
+ goto woops;
+ if (*text == ',')
+ text++;
+ break;
+
+ case '#':
+ text = strchr(text, NL);
+ break;
+
+ default:
+ goto woops;
}
} while (text != NULL); scan_done:;
@@ -855,11 +824,10 @@ optionNestedVal(tOptions * opts, tOptDesc * od)
/**
* get_special_char
*/
-LOCAL int
+static int
get_special_char(char const ** ppz, int * ct)
{
char const * pz = *ppz;
- char * rz;
if (*ct < 3)
return '&';
@@ -873,8 +841,7 @@ get_special_char(char const ** ppz, int * ct)
base = 16;
pz++;
}
- retch = (int)strtoul(pz, &rz, base);
- pz = rz;
+ retch = (int)strtoul(pz, (char **)&pz, base);
if (*pz != ';')
return '&';
base = (int)(++pz - *ppz);
@@ -909,7 +876,7 @@ get_special_char(char const ** ppz, int * ct)
/**
* emit_special_char
*/
-LOCAL void
+static void
emit_special_char(FILE * fp, int ch)
{
int ctr = sizeof(xml_xlate) / sizeof(xml_xlate[0]);
diff --git a/contrib/ntp/sntp/libopts/numeric.c b/contrib/ntp/sntp/libopts/numeric.c
index ab8f3d1958be..bbb43ccdcd1e 100644
--- a/contrib/ntp/sntp/libopts/numeric.c
+++ b/contrib/ntp/sntp/libopts/numeric.c
@@ -10,7 +10,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -124,7 +124,8 @@ optionNumericVal(tOptions * opts, tOptDesc * od)
*/
if ( (od == NULL)
|| (od->optArg.argString == NULL)
- || ((od->fOptState & OPTST_RESET) != 0))
+ || ((od->fOptState & OPTST_RESET) != 0)
+ || (opts <= OPTPROC_EMIT_LIMIT))
return;
errno = 0;
@@ -135,14 +136,14 @@ optionNumericVal(tOptions * opts, tOptDesc * od)
if ((od->fOptState & OPTST_SCALED_NUM) != 0)
switch (*(pz++)) {
case NUL: pz--; break;
- case 't': val *= 1000;
- case 'g': val *= 1000;
- case 'm': val *= 1000;
+ case 't': val *= 1000; /* FALLTHROUGH */
+ case 'g': val *= 1000; /* FALLTHROUGH */
+ case 'm': val *= 1000; /* FALLTHROUGH */
case 'k': val *= 1000; break;
- case 'T': val *= 1024;
- case 'G': val *= 1024;
- case 'M': val *= 1024;
+ case 'T': val *= 1024; /* FALLTHROUGH */
+ case 'G': val *= 1024; /* FALLTHROUGH */
+ case 'M': val *= 1024; /* FALLTHROUGH */
case 'K': val *= 1024; break;
default: goto bad_number;
diff --git a/contrib/ntp/sntp/libopts/option-value-type.c b/contrib/ntp/sntp/libopts/option-value-type.c
index 5f676408ae00..2bc8642809c9 100644
--- a/contrib/ntp/sntp/libopts/option-value-type.c
+++ b/contrib/ntp/sntp/libopts/option-value-type.c
@@ -31,7 +31,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "option-value-type.h"
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf option-value-type.gp */
/* Computed positions: -k'1' */
@@ -64,7 +64,7 @@ typedef struct {
/* maximum key range = 15, duplicates = 0 */
static unsigned int
-option_value_type_hash (register const char *str, register unsigned int len)
+option_value_type_hash (register const char *str, register size_t len)
{
static const unsigned char asso_values[] =
{
@@ -119,13 +119,13 @@ static const option_value_type_map_t option_value_type_table[] =
};
static inline const option_value_type_map_t *
-find_option_value_type_name (register const char *str, register unsigned int len)
+find_option_value_type_name (register const char *str, register size_t len)
{
if (len <= 14 && len >= 3)
{
- register int key = (int)option_value_type_hash (str, len);
+ register unsigned int key = (int)option_value_type_hash (str, len);
- if (key <= 17 && key >= 0)
+ if (key <= 17)
{
register const char *s = option_value_type_table[key].vtp_name;
diff --git a/contrib/ntp/sntp/libopts/option-xat-attribute.c b/contrib/ntp/sntp/libopts/option-xat-attribute.c
index be86041fd816..a34ab1b5b2c0 100644
--- a/contrib/ntp/sntp/libopts/option-xat-attribute.c
+++ b/contrib/ntp/sntp/libopts/option-xat-attribute.c
@@ -31,7 +31,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "option-xat-attribute.h"
-/* ANSI-C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf option-xat-attribute.gp */
/* Computed positions: -k'1' */
@@ -64,7 +64,7 @@ typedef struct {
/* maximum key range = 6, duplicates = 0 */
static unsigned int
-option_xat_attribute_hash (register const char *str, register unsigned int len)
+option_xat_attribute_hash (register const char *str, register size_t len)
{
static const unsigned char asso_values[] =
{
@@ -111,13 +111,13 @@ static const option_xat_attribute_map_t option_xat_attribute_table[] =
};
static inline const option_xat_attribute_map_t *
-find_option_xat_attribute_name (register const char *str, register unsigned int len)
+find_option_xat_attribute_name (register const char *str, register size_t len)
{
if (len <= 8 && len >= 4)
{
- register int key = (int)option_xat_attribute_hash (str, len);
+ register unsigned int key = (int)option_xat_attribute_hash (str, len);
- if (key <= 9 && key >= 0)
+ if (key <= 9)
{
register const char *s = option_xat_attribute_table[key].xat_name;
diff --git a/contrib/ntp/sntp/libopts/parse-duration.c b/contrib/ntp/sntp/libopts/parse-duration.c
index 11e3d828d897..0f4a05634b9b 100644
--- a/contrib/ntp/sntp/libopts/parse-duration.c
+++ b/contrib/ntp/sntp/libopts/parse-duration.c
@@ -1,5 +1,5 @@
/* Parse a time duration and return a seconds count
- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
Written by Bruce Korb <bkorb@gnu.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -60,20 +60,14 @@ typedef enum {
static unsigned long
str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
{
- char * pz;
- int rv = strtoul (str, &pz, base);
- *ppz = pz;
- return rv;
+ return strtoul (str, (char **)ppz, base);
}
/* Wrapper around strtol that does not require a cast. */
static long
str_const_to_l (cch_t * str, cch_t ** ppz, int base)
{
- char * pz;
- int rv = strtol (str, &pz, base);
- *ppz = pz;
- return rv;
+ return strtol (str, (char **)ppz, base);
}
/* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
diff --git a/contrib/ntp/sntp/libopts/parse-duration.h b/contrib/ntp/sntp/libopts/parse-duration.h
index 33ddc3366e9f..9a7bcd5e100f 100644
--- a/contrib/ntp/sntp/libopts/parse-duration.h
+++ b/contrib/ntp/sntp/libopts/parse-duration.h
@@ -1,5 +1,5 @@
/* Parse a time duration and return a seconds count
- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+ Copyright (C) 2008-2018 Free Software Foundation, Inc.
Written by Bruce Korb <bkorb@gnu.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/*
@@ -22,7 +22,7 @@
At the time of writing, this worked:
- http://en.wikipedia.org/wiki/ISO_8601#Durations
+ https://en.wikipedia.org/wiki/ISO_8601#Durations
The string must start with a 'P', 'T' or a digit.
diff --git a/contrib/ntp/sntp/libopts/pgusage.c b/contrib/ntp/sntp/libopts/pgusage.c
index 3d229c18d058..f895b3bb56d0 100644
--- a/contrib/ntp/sntp/libopts/pgusage.c
+++ b/contrib/ntp/sntp/libopts/pgusage.c
@@ -13,7 +13,7 @@
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
diff --git a/contrib/ntp/sntp/libopts/proto.h b/contrib/ntp/sntp/libopts/proto.h
index a78b794fc6a5..49c75bb5dbbb 100644
--- a/contrib/ntp/sntp/libopts/proto.h
+++ b/contrib/ntp/sntp/libopts/proto.h
@@ -1,19 +1,20 @@
/* -*- buffer-read-only: t -*- vi: set ro:
*
* Prototypes for autoopts
- * Generated Sat Apr 25 09:53:18 PDT 2015
+ * Generated Sun Aug 26 10:44:39 PDT 2018
*/
#ifndef AUTOOPTS_PROTO_H_GUARD
#define AUTOOPTS_PROTO_H_GUARD 1
+
/*
- * Extracted from alias.c
+ * Static declarations from alias.c
*/
static tSuccess
too_many_occurrences(tOptions * opts, tOptDesc * od);
/*
- * Extracted from autoopts.c
+ * Static declarations from autoopts.c
*/
static void *
ao_malloc(size_t sz);
@@ -34,33 +35,151 @@ static tSuccess
regular_opts(tOptions * opts);
/*
- * Extracted from check.c
+ * Static declarations from check.c
*/
static bool
+has_conflict(tOptions * pOpts, tOptDesc * od);
+
+static bool
+occurs_enough(tOptions * pOpts, tOptDesc * pOD);
+
+static bool
is_consistent(tOptions * pOpts);
/*
- * Extracted from configfile.c
+ * Static declarations from configfile.c
*/
static void
+file_preset(tOptions * opts, char const * fname, int dir);
+
+static char *
+handle_comment(char * txt);
+
+static char *
+handle_cfg(tOptions * opts, tOptState * ost, char * txt, int dir);
+
+static char *
+handle_directive(tOptions * opts, char * txt);
+
+static char *
+aoflags_directive(tOptions * opts, char * txt);
+
+static char *
+program_directive(tOptions * opts, char * txt);
+
+static char *
+handle_section(tOptions * opts, char * txt);
+
+static int
+parse_xml_encoding(char ** ppz);
+
+static char *
+trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode);
+
+static void
+cook_xml_text(char * pzData);
+
+static char *
+handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir);
+
+static void
intern_file_load(tOptions * opts);
static char const *
parse_attrs(tOptions * opts, char const * txt, tOptionLoadMode * pMode,
tOptionValue * pType);
+static char const *
+parse_keyword(tOptions * opts, char const * txt, tOptionValue * typ);
+
+static char const *
+parse_set_mem(tOptions * opts, char const * txt, tOptionValue * typ);
+
+static char const *
+parse_value(char const * txt, tOptionValue * typ);
+
+/*
+ * Static declarations from cook.c
+ */
+static char *
+nl_count(char * start, char * end, int * lnct_p);
+
+static bool
+contiguous_quote(char ** pps, char * pq, int * lnct_p);
+
+/*
+ * Static declarations from enum.c
+ */
+static void
+enum_err(tOptions * pOpts, tOptDesc * pOD,
+ char const * const * paz_names, int name_ct);
+
+static uintptr_t
+find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
+ char const * const * paz_names, unsigned int name_ct);
+
+static void
+set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
+ unsigned int name_ct);
+
+static void
+set_memb_names(tOptions * opts, tOptDesc * od, char const * const * nm_list,
+ unsigned int nm_ct);
+
+static uintptr_t
+check_membership_start(tOptDesc * od, char const ** argp, bool * invert);
+
+static uintptr_t
+find_member_bit(tOptions * opts, tOptDesc * od, char const * pz, int len,
+ char const * const * nm_list, unsigned int nm_ct);
+
/*
- * Extracted from env.c
+ * Static declarations from env.c
*/
static void
doPrognameEnv(tOptions * pOpts, teEnvPresetType type);
static void
+do_env_opt(tOptState * os, char * env_name,
+ tOptions * pOpts, teEnvPresetType type);
+
+static void
env_presets(tOptions * pOpts, teEnvPresetType type);
/*
- * Extracted from find.c
+ * Static declarations from file.c
*/
+static void
+check_existence(teOptFileType ftype, tOptions * pOpts, tOptDesc * pOD);
+
+static void
+open_file_fd(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode);
+
+static void
+fopen_file_fp(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode);
+
+/*
+ * Static declarations from find.c
+ */
+static int
+parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz);
+
+static void
+opt_ambiguities(tOptions * opts, char const * name, int nm_len);
+
+static int
+opt_match_ct(tOptions * opts, char const * name, int nm_len,
+ int * ixp, bool * disable);
+
+static tSuccess
+opt_set(tOptions * opts, char * arg, int idx, bool disable, tOptState * st);
+
+static tSuccess
+opt_unknown(tOptions * opts, char const * name, char * arg, tOptState * st);
+
+static tSuccess
+opt_ambiguous(tOptions * opts, char const * name, int match_ct);
+
static tSuccess
opt_find_long(tOptions * opts, char const * opt_name, tOptState * state);
@@ -68,13 +187,22 @@ static tSuccess
opt_find_short(tOptions * pOpts, uint_t optValue, tOptState * pOptState);
static tSuccess
+get_opt_arg_must(tOptions * opts, tOptState * o_st);
+
+static tSuccess
+get_opt_arg_may(tOptions * pOpts, tOptState * o_st);
+
+static tSuccess
+get_opt_arg_none(tOptions * pOpts, tOptState * o_st);
+
+static tSuccess
get_opt_arg(tOptions * opts, tOptState * o_st);
static tSuccess
find_opt(tOptions * opts, tOptState * o_st);
/*
- * Extracted from init.c
+ * Static declarations from init.c
*/
static tSuccess
validate_struct(tOptions * opts, char const * pname);
@@ -82,40 +210,137 @@ validate_struct(tOptions * opts, char const * pname);
static tSuccess
immediate_opts(tOptions * opts);
+static tSuccess
+do_presets(tOptions * opts);
+
static bool
ao_initialize(tOptions * opts, int a_ct, char ** a_v);
/*
- * Extracted from load.c
+ * Static declarations from load.c
*/
+static bool
+get_realpath(char * buf, size_t b_sz);
+
+static bool
+add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path);
+
+static bool
+add_env_val(char * buf, int buf_sz, char const * name);
+
static void
munge_str(char * txt, tOptionLoadMode mode);
+static char *
+assemble_arg_val(char * txt, tOptionLoadMode mode);
+
+static char *
+trim_quotes(char * arg);
+
+static bool
+direction_ok(opt_state_mask_t f, int dir);
+
static void
load_opt_line(tOptions * opts, tOptState * opt_state, char * line,
tDirection direction, tOptionLoadMode load_mode );
/*
- * Extracted from makeshell.c
+ * Static declarations from makeshell.c
*/
-static noreturn void
+lo_noreturn static void
option_exits(int exit_code);
-static noreturn void
+lo_noreturn static void
ao_bug(char const * msg);
static void
fserr_warn(char const * prog, char const * op, char const * fname);
-static noreturn void
+lo_noreturn static void
fserr_exit(char const * prog, char const * op, char const * fname);
+static void
+emit_var_text(char const * prog, char const * var, int fdin);
+
+static void
+text_to_var(tOptions * opts, teTextTo which, tOptDesc * od);
+
+static void
+emit_usage(tOptions * opts);
+
+static void
+emit_wrapup(tOptions * opts);
+
+static void
+emit_setup(tOptions * opts);
+
+static void
+emit_action(tOptions * opts, tOptDesc * od);
+
+static void
+emit_inaction(tOptions * opts, tOptDesc * od);
+
+static void
+emit_flag(tOptions * opts);
+
+static void
+emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts);
+
+static void
+emit_long(tOptions * opts);
+
+static char *
+load_old_output(char const * fname, char const * pname);
+
+static void
+open_out(char const * fname, char const * pname);
+
/*
- * Extracted from nested.c
+ * Static declarations from nested.c
*/
static void
+remove_continuation(char * src);
+
+static char const *
+scan_q_str(char const * pzTxt);
+
+static tOptionValue *
+add_string(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len);
+
+static tOptionValue *
+add_bool(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len);
+
+static tOptionValue *
+add_number(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len);
+
+static tOptionValue *
+add_nested(void ** pp, char const * name, size_t nm_len,
+ char * val, size_t d_len);
+
+static char const *
+scan_name(char const * name, tOptionValue * res);
+
+static char const *
+unnamed_xml(char const * txt);
+
+static char const *
+scan_xml_name(char const * name, size_t * nm_len, tOptionValue * val);
+
+static char const *
+find_end_xml(char const * src, size_t nm_len, char const * val, size_t * len);
+
+static char const *
+scan_xml(char const * xml_name, tOptionValue * res_val);
+
+static void
unload_arg_list(tArgList * arg_list);
+static void
+sort_list(tArgList * arg_list);
+
static tOptionValue *
optionLoadNested(char const * text, char const * name, size_t nm_len);
@@ -126,21 +351,270 @@ static void
emit_special_char(FILE * fp, int ch);
/*
- * Extracted from sort.c
+ * Static declarations from parse-duration.c
*/
+static unsigned long
+str_const_to_ul (cch_t * str, cch_t ** ppz, int base);
+
+static long
+str_const_to_l (cch_t * str, cch_t ** ppz, int base);
+
+static time_t
+scale_n_add (time_t base, time_t val, int scale);
+
+static time_t
+parse_hr_min_sec (time_t start, cch_t * pz);
+
+static time_t
+parse_scaled_value (time_t base, cch_t ** ppz, cch_t * endp, int scale);
+
+static time_t
+parse_year_month_day (cch_t * pz, cch_t * ps);
+
+static time_t
+parse_yearmonthday (cch_t * in_pz);
+
+static time_t
+parse_YMWD (cch_t * pz);
+
+static time_t
+parse_hour_minute_second (cch_t * pz, cch_t * ps);
+
+static time_t
+parse_hourminutesecond (cch_t * in_pz);
+
+static time_t
+parse_HMS (cch_t * pz);
+
+static time_t
+parse_time (cch_t * pz);
+
+static char *
+trim (char * pz);
+
+static time_t
+parse_period (cch_t * in_pz);
+
+static time_t
+parse_non_iso8601 (cch_t * pz);
+
+/*
+ * Static declarations from pgusage.c
+ */
+static inline FILE *
+open_tmp_usage(char ** buf);
+
+static inline char *
+mk_pager_cmd(char const * fname);
+
+/*
+ * Static declarations from putshell.c
+ */
+static size_t
+string_size(char const * scan, size_t nl_len);
+
+static char const *
+print_quoted_apostrophes(char const * str);
+
+static void
+print_quot_str(char const * str);
+
+static void
+print_enumeration(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+print_membership(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+print_stacked_arg(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+print_reordering(tOptions * opts);
+
+/*
+ * Static declarations from reset.c
+ */
+static void
+optionReset(tOptions * pOpts, tOptDesc * pOD);
+
+static void
+optionResetEverything(tOptions * pOpts);
+
+/*
+ * Static declarations from restore.c
+ */
+static void
+fixupSavedOptionArgs(tOptions * pOpts);
+
+/*
+ * Static declarations from save.c
+ */
+static char const *
+find_dir_name(tOptions * opts, int * p_free);
+
+static char const *
+find_file_name(tOptions * opts, int * p_free_name);
+
+static void
+prt_entry(FILE * fp, tOptDesc * od, char const * l_arg, save_flags_mask_t save_fl);
+
+static void
+prt_value(FILE * fp, int depth, tOptDesc * od, tOptionValue const * ovp);
+
+static void
+prt_string(FILE * fp, char const * name, char const * pz);
+
+static void
+prt_val_list(FILE * fp, char const * name, tArgList * al);
+
+static void
+prt_nested(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+remove_settings(tOptions * opts, char const * fname);
+
+static FILE *
+open_sv_file(tOptions * opts, save_flags_mask_t save_fl);
+
+static void
+prt_no_arg_opt(FILE * fp, tOptDesc * vod, tOptDesc * pod, save_flags_mask_t save_fl);
+
+static void
+prt_str_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+prt_enum_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+prt_set_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl);
+
+static void
+prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts, save_flags_mask_t save_fl);
+
+/*
+ * Static declarations from sort.c
+ */
+static tSuccess
+must_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx);
+
+static tSuccess
+maybe_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx);
+
+static tSuccess
+short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx);
+
static void
optionSort(tOptions * opts);
/*
- * Extracted from stack.c
+ * Static declarations from stack.c
*/
static void
addArgListEntry(void ** ppAL, void * entry);
/*
- * Extracted from usage.c
+ * Static declarations from text_mmap.c
*/
static void
+load_text_file(tmap_info_t * mapinfo, char const * pzFile);
+
+static void
+validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo);
+
+static void
+close_mmap_files(tmap_info_t * mi);
+
+/*
+ * Static declarations from tokenize.c
+ */
+static void
+copy_cooked(ch_t ** ppDest, char const ** ppSrc);
+
+static void
+copy_raw(ch_t ** ppDest, char const ** ppSrc);
+
+static token_list_t *
+alloc_token_list(char const * str);
+
+/*
+ * Static declarations from usage.c
+ */
+static unsigned int
+parse_usage_flags(ao_flag_names_t const * fnt, char const * txt);
+
+static void
set_usage_flags(tOptions * opts, char const * flg_txt);
+static inline bool
+do_gnu_usage(tOptions * pOpts);
+
+static inline bool
+skip_misuse_usage(tOptions * pOpts);
+
+static void
+print_offer_usage(tOptions * opts);
+
+static void
+print_usage_details(tOptions * opts, int exit_code);
+
+static void
+print_one_paragraph(char const * text, bool plain, FILE * fp);
+
+static void
+prt_conflicts(tOptions * opts, tOptDesc * od);
+
+static void
+prt_one_vendor(tOptions * opts, tOptDesc * od,
+ arg_types_t * argtp, char const * usefmt);
+
+static void
+prt_vendor_opts(tOptions * opts, char const * title);
+
+static void
+prt_extd_usage(tOptions * opts, tOptDesc * od, char const * title);
+
+static void
+prt_ini_list(char const * const * papz, char const * ini_file,
+ char const * path_nm);
+
+static void
+prt_preamble(tOptions * opts, tOptDesc * od, arg_types_t * at);
+
+static void
+prt_one_usage(tOptions * opts, tOptDesc * od, arg_types_t * at);
+
+static void
+prt_opt_usage(tOptions * opts, int ex_code, char const * title);
+
+static void
+prt_prog_detail(tOptions * opts);
+
+static int
+setGnuOptFmts(tOptions * opts, char const ** ptxt);
+
+static int
+setStdOptFmts(tOptions * opts, char const ** ptxt);
+
+/*
+ * Static declarations from version.c
+ */
+static void
+emit_first_line(
+ FILE * fp, char const * alt1, char const * alt2, char const * alt3);
+
+static void
+emit_simple_ver(tOptions * o, FILE * fp);
+
+static void
+emit_copy_full(tOptions * o, FILE * fp);
+
+static void
+emit_copy_note(tOptions * opts, FILE * fp);
+
+static void
+print_ver(tOptions * opts, tOptDesc * od, FILE * fp, bool call_exit);
+
#endif /* AUTOOPTS_PROTO_H_GUARD */
diff --git a/contrib/ntp/sntp/libopts/putshell.c b/contrib/ntp/sntp/libopts/putshell.c
index 9bfa984da67d..84463dd40be4 100644
--- a/contrib/ntp/sntp/libopts/putshell.c
+++ b/contrib/ntp/sntp/libopts/putshell.c
@@ -12,7 +12,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -31,29 +31,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static size_t
-string_size(char const * scan, size_t nl_len);
-
-static char const *
-print_quoted_apostrophes(char const * str);
-
-static void
-print_quot_str(char const * str);
-
-static void
-print_enumeration(tOptions * pOpts, tOptDesc * pOD);
-
-static void
-print_membership(tOptions * pOpts, tOptDesc * pOD);
-
-static void
-print_stacked_arg(tOptions * pOpts, tOptDesc * pOD);
-
-static void
-print_reordering(tOptions * opts);
-/* = = = END-STATIC-FORWARD = = = */
-
/**
* Count the number of bytes required to represent a string as a
* compilable string.
@@ -129,8 +106,10 @@ char const *
optionQuoteString(char const * text, char const * nl)
{
size_t nl_len = strlen(nl);
+ size_t out_sz = string_size(text, nl_len);
char * out;
- char * res = out = AGALOC(string_size(text, nl_len), "quot str");
+ char * res = out = AGALOC(out_sz, "quot str");
+
*(out++) = '"';
for (;;) {
@@ -179,16 +158,21 @@ optionQuoteString(char const * text, char const * nl)
* deallocate the text string. Return the scan resumption point.
*/
*(out++) = '"';
- *out = NUL;
+ *(out++) = NUL;
+#ifndef NDEBUG
+ if ((size_t)(out - res) > out_sz) {
+ fputs(misguess_len, stderr);
+ option_exits(EXIT_FAILURE);
+ }
+#endif
return res;
default:
/*
* sprintf is safe here, because we already computed
- * the amount of space we will be using.
+ * the amount of space we will be using. Assertion is above.
*/
- sprintf(out, MK_STR_OCT_FMT, ch);
- out += 4;
+ out += sprintf(out, MK_STR_OCT_FMT, ch);
}
text++;
diff --git a/contrib/ntp/sntp/libopts/reset.c b/contrib/ntp/sntp/libopts/reset.c
index 97ecb52e2425..f7b58e8d1a14 100644
--- a/contrib/ntp/sntp/libopts/reset.c
+++ b/contrib/ntp/sntp/libopts/reset.c
@@ -10,7 +10,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -113,7 +113,7 @@ optionResetOpt(tOptions * pOpts, tOptDesc * pOD)
assert(0 == 1);
}
} else {
- succ = opt_find_long(pOpts, pzArg, &opt_state);
+ succ = opt_find_long(pOpts, (char *)pzArg, &opt_state);
if (! SUCCESSFUL(succ)) {
fprintf(stderr, zIllOptStr, pOpts->pzProgPath, pzArg);
pOpts->pUsageProc(pOpts, EXIT_FAILURE);
diff --git a/contrib/ntp/sntp/libopts/restore.c b/contrib/ntp/sntp/libopts/restore.c
index 02ef14aeba38..36ebbce1a72f 100644
--- a/contrib/ntp/sntp/libopts/restore.c
+++ b/contrib/ntp/sntp/libopts/restore.c
@@ -12,7 +12,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
diff --git a/contrib/ntp/sntp/libopts/save-flags.c b/contrib/ntp/sntp/libopts/save-flags.c
new file mode 100644
index 000000000000..d295170edbb7
--- /dev/null
+++ b/contrib/ntp/sntp/libopts/save-flags.c
@@ -0,0 +1,248 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (save-flags.c)
+ *
+ * It has been AutoGen-ed
+ * From the definitions /tmp/.ag-ufBbQe/save-flags.def
+ * and the template file str2enum
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL Bruce Korb OR ANY OTHER CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "save-flags.h"
+#include <sys/types.h>
+#ifndef MISSING_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+typedef enum {
+ SVFL_BNM_DEFAULT = 0,
+ SVFL_BNM_USAGE = 1,
+ SVFL_BNM_UPDATE = 2,
+ SVFL_COUNT_BNM
+} save_flags_enum_t;
+
+static save_flags_enum_t
+find_save_flags_bnm(char const * str, size_t len);
+
+
+#include <sys/types.h>
+#include <string.h>
+#ifndef NUL
+#define NUL '\0'
+#endif
+
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf save-flags.gp */
+/* Computed positions: -k'' */
+
+
+# if 0 /* gperf build options: */
+// %struct-type
+// %language=ANSI-C
+// %includes
+// %global-table
+// %omit-struct-type
+// %readonly-tables
+// %compare-strncmp
+//
+// %define slot-name svfl_name
+// %define hash-function-name save_flags_hash
+// %define lookup-function-name find_save_flags_name
+// %define word-array-name save_flags_table
+// %define initializer-suffix ,SVFL_COUNT_BNM
+//
+# endif
+
+#include "save-flags.h"
+typedef struct {
+ char const * svfl_name;
+ save_flags_enum_t svfl_id;
+} save_flags_map_t;
+#include <string.h>
+
+/* maximum key range = 3, duplicates = 0 */
+
+static unsigned int
+save_flags_hash (register const char *str, register size_t len)
+{
+ (void)str;
+ (void)len;
+ return len;
+}
+
+static const save_flags_map_t save_flags_table[] =
+ {
+ {"",SVFL_COUNT_BNM}, {"",SVFL_COUNT_BNM},
+ {"",SVFL_COUNT_BNM}, {"",SVFL_COUNT_BNM},
+ {"",SVFL_COUNT_BNM},
+ {"usage", SVFL_BNM_USAGE},
+ {"update", SVFL_BNM_UPDATE},
+ {"default", SVFL_BNM_DEFAULT}
+ };
+
+static inline const save_flags_map_t *
+find_save_flags_name (register const char *str, register size_t len)
+{
+ if (len <= 7 && len >= 5)
+ {
+ register unsigned int key = (int)save_flags_hash (str, len);
+
+ if (key <= 7)
+ {
+ register const char *s = save_flags_table[key].svfl_name;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return &save_flags_table[key];
+ }
+ }
+ return 0;
+}
+
+/**
+ * Convert a command (keyword) to a save_flags_enum_t enumeration value.
+ *
+ * @param[in] str a string that should start with a known key word.
+ * @param[in] len the provided length of the keyword at \a str.
+ * @returns the enumeration value.
+ * If not found, that value is SVFL_COUNT_BNM.
+ */
+static save_flags_enum_t
+find_save_flags_bnm(char const * str, size_t len)
+{
+ save_flags_map_t const * map;
+
+ map = find_save_flags_name(str, (unsigned int)len);
+ if (map != NULL)
+ return map->svfl_id;
+ /* Check for a partial match */
+ {
+ /*
+ * Indexes of valid save_flags_table entries in sorted order:
+ */
+ static unsigned int const ix_map[] = {
+ 7, 6, 5 };
+ save_flags_enum_t res = SVFL_COUNT_BNM;
+ static int const HI = (sizeof(ix_map) / sizeof(ix_map[0])) - 1;
+ int lo = 0;
+ int hi = HI;
+ int av;
+ int cmp;
+
+ for (;;) {
+ av = (hi + lo) / 2;
+ map = save_flags_table + ix_map[av];
+ cmp = strncmp(map->svfl_name, str, len);
+ if (cmp == 0) break;
+ if (cmp > 0)
+ hi = av - 1;
+ else lo = av + 1;
+ if (lo > hi)
+ return SVFL_COUNT_BNM;
+ }
+ res = map->svfl_id;
+ /*
+ * If we have an exact match, accept it.
+ */
+ if (map->svfl_name[len] == NUL)
+ return res;
+ /*
+ * Check for a duplicate partial match (a partial match
+ * with a higher or lower index than "av".
+ */
+ if (av < HI) {
+ map = save_flags_table + ix_map[av + 1];
+ if (strncmp(map->svfl_name, str, len) == 0)
+ return SVFL_COUNT_BNM;
+ }
+ if (av > 0) {
+ map = save_flags_table + ix_map[av - 1];
+ if (strncmp(map->svfl_name, str, len) == 0)
+ return SVFL_COUNT_BNM;
+ }
+ return res;
+ }
+}
+
+/**
+ * Convert a string to a save_flags_mask_t mask.
+ * Bit names prefixed with a hyphen have the bit removed from the mask.
+ * If the string starts with a '-', '+' or '|' character, then
+ * the old value is used as a base, otherwise the result mask
+ * is initialized to zero. Separating bit names with '+' or '|'
+ * characters is optional. By default, the bits are "or"-ed into the
+ * result.
+ *
+ * @param[in] str string with a list of bit names
+ * @param[in] old previous value, used if \a str starts with a '+' or '-'.
+ *
+ * @returns an unsigned integer with the bits set.
+ */
+save_flags_mask_t
+save_flags_str2mask(char const * str, save_flags_mask_t old)
+{
+ static char const white[] = ", \t\f";
+ static char const name_chars[] =
+ "adefglpstu"
+ "ADEFGLPSTU";
+
+ save_flags_mask_t res = 0;
+ int have_data = 0;
+
+ for (;;) {
+ save_flags_enum_t val;
+ unsigned int val_len;
+ unsigned int invert = 0;
+
+ str += strspn(str, white);
+ switch (*str) {
+ case NUL: return res;
+ case '-': case '~':
+ invert = 1;
+ /* FALLTHROUGH */
+
+ case '+': case '|':
+ if (have_data == 0)
+ res = old;
+
+ str += 1 + strspn(str + 1, white);
+ if (*str == NUL)
+ return 0;
+ }
+
+ val_len = strspn(str, name_chars);
+ if (val_len == 0)
+ return 0;
+ val = find_save_flags_bnm(str, val_len);
+ if (val == SVFL_COUNT_BNM)
+ return 0;
+ if (invert)
+ res &= ~((save_flags_mask_t)1 << val);
+ else
+ res |= (save_flags_mask_t)1 << val;
+ have_data = 1;
+ str += val_len;
+ }
+}
+/* end of save-flags.c */
diff --git a/contrib/ntp/sntp/libopts/save-flags.h b/contrib/ntp/sntp/libopts/save-flags.h
new file mode 100644
index 000000000000..dcfe0c9ae513
--- /dev/null
+++ b/contrib/ntp/sntp/libopts/save-flags.h
@@ -0,0 +1,68 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (save-flags.h)
+ *
+ * It has been AutoGen-ed
+ * From the definitions /tmp/.ag-ufBbQe/save-flags.def
+ * and the template file str2enum
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL Bruce Korb OR ANY OTHER CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Command/Keyword Dispatcher
+ */
+#ifndef STR2ENUM_SAVE_FLAGS_H_GUARD
+#define STR2ENUM_SAVE_FLAGS_H_GUARD 1
+#include <sys/types.h>
+#include <inttypes.h>
+
+/** integral type for holding save_flags masks */
+typedef uint32_t save_flags_mask_t;
+
+/** bits defined for save_flags_mask_t */
+/** include default values in commentary */
+#define SVFL_DEFAULT 0x0001U
+/** include usage text in commentary */
+#define SVFL_USAGE 0x0002U
+/** replace or append state */
+#define SVFL_UPDATE 0x0004U
+
+/** bits in USAGE_DEFAULT mask:
+ * usage default */
+#define SVFL_USAGE_DEFAULT_MASK 0x0003U
+
+/** all bits in save_flags_mask_t masks */
+#define SVFL_MASK_ALL 0x0007U
+
+/** no bits in save_flags_mask_t */
+#define SVFL_NONE 0x0000U
+
+/** buffer size needed to hold all bit names for save_flags_mask_t masks */
+#define MAX_SAVE_FLAGS_NAME_SIZE 21
+
+extern save_flags_mask_t
+save_flags_str2mask(char const * str, save_flags_mask_t old);
+
+#endif /* STR2ENUM_SAVE_FLAGS_H_GUARD */
+/* end of save-flags.h */
diff --git a/contrib/ntp/sntp/libopts/save.c b/contrib/ntp/sntp/libopts/save.c
index cdab05f628ec..628c27a460bd 100644
--- a/contrib/ntp/sntp/libopts/save.c
+++ b/contrib/ntp/sntp/libopts/save.c
@@ -12,7 +12,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -30,131 +30,69 @@
* 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-
-/* = = = START-STATIC-FORWARD = = = */
-static char const *
-find_dir_name(tOptions * opts, int * p_free);
-
-static char const *
-find_file_name(tOptions * opts, int * p_free_name);
-
-static void
-prt_entry(FILE * fp, tOptDesc * od, char const * l_arg);
-
-static void
-prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp);
-
-static void
-prt_string(FILE * fp, char const * name, char const * pz);
-
-static void
-prt_val_list(FILE * fp, char const * name, tArgList * al);
-
-static void
-prt_nested(FILE * fp, tOptDesc * p);
-
-static FILE *
-open_sv_file(tOptions * opts);
-
-static void
-prt_no_arg_opt(FILE * fp, tOptDesc * p, tOptDesc * pOD);
-
-static void
-prt_str_arg(FILE * fp, tOptDesc * pOD);
-
-static void
-prt_enum_arg(FILE * fp, tOptDesc * od);
-
-static void
-prt_set_arg(FILE * fp, tOptDesc * od);
-
-static void
-prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts);
-/* = = = END-STATIC-FORWARD = = = */
+#include "save-flags.h"
/**
+ * find the config file directory name
+ *
+ * @param opts the options descriptor
+ * @param p_free tell caller if name was allocated or not
*/
static char const *
find_dir_name(tOptions * opts, int * p_free)
{
- char const * pzDir;
+ char const * dir;
if ( (opts->specOptIdx.save_opts == NO_EQUIVALENT)
|| (opts->specOptIdx.save_opts == 0))
return NULL;
- pzDir = opts->pOptDesc[ opts->specOptIdx.save_opts ].optArg.argString;
- if ((pzDir != NULL) && (*pzDir != NUL))
- return pzDir;
+ dir = opts->pOptDesc[ opts->specOptIdx.save_opts ].optArg.argString;
+ if ((dir != NULL) && (*dir != NUL)) {
+ char const * pz = strchr(dir, '>');
+ if (pz == NULL)
+ return dir;
+ while (*(++pz) == '>') ;
+ pz += strspn(pz, " \t");
+ dir = pz;
+ if (*dir != NUL)
+ return dir;
+ }
+
+ if (opts->papzHomeList == NULL)
+ return NULL;
/*
* This function only works if there is a directory where
* we can stash the RC (INI) file.
*/
- {
- char const * const * papz = opts->papzHomeList;
- if (papz == NULL)
- return NULL;
-
- while (papz[1] != NULL) papz++;
- pzDir = *papz;
- }
-
- /*
- * IF it does not require deciphering an env value, then just copy it
- */
- if (*pzDir != '$')
- return pzDir;
+ for (int idx = 0;; idx++) {
+ char f_name[ AG_PATH_MAX+1 ];
- {
- char const * pzEndDir = strchr(++pzDir, DIRCH);
- char * pzFileName;
- char * pzEnv;
+ dir = opts->papzHomeList[idx];
- if (pzEndDir != NULL) {
- char z[ AO_NAME_SIZE ];
- if ((pzEndDir - pzDir) > AO_NAME_LIMIT )
- return NULL;
- memcpy(z, pzDir, (size_t)(pzEndDir - pzDir));
- z[pzEndDir - pzDir] = NUL;
- pzEnv = getenv(z);
- } else {
-
- /*
- * Make sure we can get the env value (after stripping off
- * any trailing directory or file names)
- */
- pzEnv = getenv(pzDir);
+ switch (*dir) {
+ case '$':
+ break;
+ case NUL:
+ continue;
+ default:
+ return dir;
}
-
- if (pzEnv == NULL) {
- fprintf(stderr, zsave_warn, opts->pzProgName);
- fprintf(stderr, zNotDef, pzDir);
- return NULL;
+ if (optionMakePath(f_name, (int)sizeof(f_name), dir, opts->pzProgPath)) {
+ *p_free = true;
+ AGDUPSTR(dir, f_name, "homerc");
+ return dir;
}
-
- if (pzEndDir == NULL)
- return pzEnv;
-
- {
- size_t sz = strlen(pzEnv) + strlen(pzEndDir) + 2;
- pzFileName = (char *)AGALOC(sz, "dir name");
- }
-
- if (pzFileName == NULL)
- return NULL;
-
- *p_free = 1;
- /*
- * Glue together the full name into the allocated memory.
- * FIXME: We lose track of this memory.
- */
- sprintf(pzFileName, "%s/%s", pzEnv, pzEndDir);
- return pzFileName;
}
+ return NULL;
}
/**
+ * Find the name of the save-the-options file
+ *
+ * @param opts the options descriptor
+ * @param p_free_name tell caller if name was allocated or not
*/
static char const *
find_file_name(tOptions * opts, int * p_free_name)
@@ -162,15 +100,15 @@ find_file_name(tOptions * opts, int * p_free_name)
struct stat stBuf;
int free_dir_name = 0;
- char const * pzDir = find_dir_name(opts, &free_dir_name);
- if (pzDir == NULL)
- return NULL;
+ char const * res = find_dir_name(opts, &free_dir_name);
+ if (res == NULL)
+ return res;
/*
* See if we can find the specified directory. We use a once-only loop
* structure so we can bail out early.
*/
- if (stat(pzDir, &stBuf) != 0) do {
+ if (stat(res, &stBuf) != 0) do {
char z[AG_PATH_MAX];
char * dirchp;
@@ -180,10 +118,10 @@ find_file_name(tOptions * opts, int * p_free_name)
*/
if (errno != ENOENT) {
bogus_name:
- fprintf(stderr, zsave_warn, opts->pzProgName);
- fprintf(stderr, zNoStat, errno, strerror(errno), pzDir);
+ fprintf(stderr, zsave_warn, opts->pzProgName, res);
+ fprintf(stderr, zNoStat, errno, strerror(errno), res);
if (free_dir_name)
- AGFREE(pzDir);
+ AGFREE(res);
return NULL;
}
@@ -191,17 +129,17 @@ find_file_name(tOptions * opts, int * p_free_name)
* Strip off the last component, stat the remaining string and
* that string must name a directory
*/
- dirchp = strrchr(pzDir, DIRCH);
+ dirchp = strrchr(res, DIRCH);
if (dirchp == NULL) {
stBuf.st_mode = S_IFREG;
break; /* found directory -- viz., "." */
}
- if ((size_t)(dirchp - pzDir) >= sizeof(z))
+ if ((size_t)(dirchp - res) >= sizeof(z))
goto bogus_name;
- memcpy(z, pzDir, (size_t)(dirchp - pzDir));
- z[dirchp - pzDir] = NUL;
+ memcpy(z, res, (size_t)(dirchp - res));
+ z[dirchp - res] = NUL;
if ((stat(z, &stBuf) != 0) || ! S_ISDIR(stBuf.st_mode))
goto bogus_name;
@@ -213,18 +151,17 @@ find_file_name(tOptions * opts, int * p_free_name)
* THEN tack on the config file name
*/
if (S_ISDIR(stBuf.st_mode)) {
- size_t sz = strlen(pzDir) + strlen(opts->pzRcName) + 2;
{
+ size_t sz = strlen(res) + strlen(opts->pzRcName) + 2;
char * pzPath = (char *)AGALOC(sz, "file name");
-#ifdef HAVE_SNPRINTF
- snprintf(pzPath, sz, "%s/%s", pzDir, opts->pzRcName);
-#else
- sprintf(pzPath, "%s/%s", pzDir, opts->pzRcName);
-#endif
+ if ( snprintf(pzPath, sz, "%s/%s", res, opts->pzRcName)
+ >= (int)sz)
+ option_exits(EXIT_FAILURE);
+
if (free_dir_name)
- AGFREE(pzDir);
- pzDir = pzPath;
+ AGFREE(res);
+ res = pzPath;
free_dir_name = 1;
}
@@ -232,12 +169,12 @@ find_file_name(tOptions * opts, int * p_free_name)
* IF we cannot stat the object for any reason other than
* it does not exist, then we bail out
*/
- if (stat(pzDir, &stBuf) != 0) {
+ if (stat(res, &stBuf) != 0) {
if (errno != ENOENT) {
- fprintf(stderr, zsave_warn, opts->pzProgName);
+ fprintf(stderr, zsave_warn, opts->pzProgName, res);
fprintf(stderr, zNoStat, errno, strerror(errno),
- pzDir);
- AGFREE(pzDir);
+ res);
+ AGFREE(res);
return NULL;
}
@@ -253,32 +190,37 @@ find_file_name(tOptions * opts, int * p_free_name)
* or will soon be a file.
*/
if (! S_ISREG(stBuf.st_mode)) {
- fprintf(stderr, zsave_warn, opts->pzProgName, pzDir);
+ fprintf(stderr, zsave_warn, opts->pzProgName, res);
if (free_dir_name)
- AGFREE(pzDir);
+ AGFREE(res);
return NULL;
}
/*
* Get rid of the old file
*/
- unlink(pzDir);
*p_free_name = free_dir_name;
- return pzDir;
+ return res;
}
/**
* print one option entry to the save file.
*
- * @param[in] fp the file pointer for the save file
- * @param[in] od the option descriptor to print
- * @param[in] l_arg the last argument for the option
+ * @param[in] fp the file pointer for the save file
+ * @param[in] od the option descriptor to print
+ * @param[in] l_arg the last argument for the option
+ * @param[in] save_fl include usage in comments
*/
static void
-prt_entry(FILE * fp, tOptDesc * od, char const * l_arg)
+prt_entry(FILE * fp, tOptDesc * od, char const * l_arg, save_flags_mask_t save_fl)
{
int space_ct;
+ if (save_fl & SVFL_USAGE)
+ fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
+ if (UNUSED_OPT(od) && (save_fl & SVFL_DEFAULT))
+ fputs(ao_default_use, fp);
+
/*
* There is an argument. Pad the name so values line up.
* Not disabled *OR* this got equivalenced to another opt,
@@ -287,9 +229,14 @@ prt_entry(FILE * fp, tOptDesc * od, char const * l_arg)
*/
{
char const * pz =
- (! DISABLED_OPT(od) || (od->optEquivIndex != NO_EQUIVALENT))
+ (od->pz_DisableName == NULL)
? od->pz_Name
- : od->pz_DisableName;
+ : (DISABLED_OPT(od)
+ ? od->pz_DisableName
+ : ((od->optEquivIndex == NO_EQUIVALENT)
+ ? od->pz_Name : od->pz_DisableName)
+ );
+
space_ct = 17 - strlen(pz);
fputs(pz, fp);
}
@@ -338,9 +285,13 @@ end_entry:
}
/**
+ * print an option's value
+ *
+ * @param[in] fp the file pointer for the save file
+ * @param[in] od the option descriptor to print
*/
static void
-prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
+prt_value(FILE * fp, int depth, tOptDesc * od, tOptionValue const * ovp)
{
while (--depth >= 0)
putc(' ', fp), putc(' ', fp);
@@ -357,9 +308,9 @@ prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
case OPARG_TYPE_ENUMERATION:
case OPARG_TYPE_MEMBERSHIP:
- if (pOD != NULL) {
- uint32_t opt_state = pOD->fOptState;
- uintptr_t val = pOD->optArg.argEnum;
+ if (od != NULL) {
+ uint32_t opt_state = od->fOptState;
+ uintptr_t val = od->optArg.argEnum;
char const * typ = (ovp->valType == OPARG_TYPE_ENUMERATION)
? "keyword" : "set-membership";
@@ -369,20 +320,20 @@ prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
* This is a magic incantation that will convert the
* bit flag values back into a string suitable for printing.
*/
- (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD );
- if (pOD->optArg.argString != NULL) {
- fputs(pOD->optArg.argString, fp);
+ (*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od );
+ if (od->optArg.argString != NULL) {
+ fputs(od->optArg.argString, fp);
if (ovp->valType != OPARG_TYPE_ENUMERATION) {
/*
* set membership strings get allocated
*/
- AGFREE(pOD->optArg.argString);
+ AGFREE(od->optArg.argString);
}
}
- pOD->optArg.argEnum = val;
- pOD->fOptState = opt_state;
+ od->optArg.argEnum = val;
+ od->fOptState = opt_state;
fprintf(fp, END_XML_FMT, ovp->pzName);
break;
}
@@ -404,6 +355,9 @@ prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
}
/**
+ * Print a string value in XML format
+ *
+ * @param[in] fp the file pointer for the save file
*/
static void
prt_string(FILE * fp, char const * name, char const * pz)
@@ -440,6 +394,9 @@ prt_string(FILE * fp, char const * name, char const * pz)
}
/**
+ * Print an option that can have multiple values in XML format
+ *
+ * @param[in] fp file pointer
*/
static void
prt_val_list(FILE * fp, char const * name, tArgList * al)
@@ -453,7 +410,7 @@ prt_val_list(FILE * fp, char const * name, tArgList * al)
if (al == NULL)
return;
opt_ct = al->useCt;
- opt_list = VOIDP(al->apzArgs);
+ opt_list = (void **)al->apzArgs;
if (opt_ct <= 0) {
fprintf(fp, OPEN_CLOSE_FMT, name);
@@ -476,19 +433,30 @@ prt_val_list(FILE * fp, char const * name, tArgList * al)
}
/**
+ * printed a nested/hierarchical value
+ *
+ * @param[in] fp file pointer
+ * @param[in] od option descriptor
+ * @param[in] save_fl include usage in comments
*/
static void
-prt_nested(FILE * fp, tOptDesc * p)
+prt_nested(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
{
int opt_ct;
- tArgList * al = p->optCookie;
+ tArgList * al = od->optCookie;
void ** opt_list;
- if (al == NULL)
+ if (save_fl & SVFL_USAGE)
+ fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
+
+ /*
+ * Never show a default value if a hierarchical value is empty.
+ */
+ if (UNUSED_OPT(od) || (al == NULL))
return;
opt_ct = al->useCt;
- opt_list = VOIDP(al->apzArgs);
+ opt_list = (void **)al->apzArgs;
if (opt_ct <= 0)
return;
@@ -500,48 +468,152 @@ prt_nested(FILE * fp, tOptDesc * p)
if (ovp == NULL)
continue;
- fprintf(fp, NESTED_OPT_FMT, p->pz_Name);
+ fprintf(fp, NESTED_OPT_FMT, od->pz_Name);
do {
- prt_value(fp, 1, p, ovp);
+ prt_value(fp, 1, od, ovp);
} while (ovp = optionNextValue(base, ovp),
ovp != NULL);
- fprintf(fp, "</%s>\n", p->pz_Name);
+ fprintf(fp, "</%s>\n", od->pz_Name);
} while (--opt_ct > 0);
}
+#ifdef _MSC_VER
/**
- * open the file for saving option state.
+ * truncate() emulation for Microsoft C
+ *
+ * @param[in] fname the save file name
+ * @param[in] newsz new size of fname in octets
+ */
+static int
+truncate(char const* fname, size_t newsz)
+{
+ int fd;
+ int err;
+
+ fd = open(fname, O_RDWR);
+ if (fd < 0)
+ return fd;
+ err = _chsize_s(fd, newsz);
+ close(fd);
+ if (0 != err)
+ errno = err;
+ return err;
+}
+#endif /* _MSC_VER */
+
+/**
+ * remove the current program settings
*
* @param[in] opts the program options structure
+ * @param[in] fname the save file name
+ */
+static void
+remove_settings(tOptions * opts, char const * fname)
+{
+ size_t const name_len = strlen(opts->pzProgName);
+ tmap_info_t map_info;
+ char * text = text_mmap(fname, PROT_READ|PROT_WRITE, MAP_PRIVATE, &map_info);
+ char * scan = text;
+
+ for (;;) {
+ char * next = scan = strstr(scan, zCfgProg);
+ if (scan == NULL)
+ goto leave;
+
+ scan = SPN_WHITESPACE_CHARS(scan + zCfgProg_LEN);
+ if ( (strneqvcmp(scan, opts->pzProgName, (int)name_len) == 0)
+ && (IS_END_XML_TOKEN_CHAR(scan[name_len])) ) {
+
+ scan = next;
+ break;
+ }
+ }
+
+ /*
+ * If not NULL, "scan" points to the "<?program" string introducing
+ * the program segment we are to remove. See if another segment follows.
+ * If so, copy text. If not se trim off this segment.
+ */
+ {
+ char * next = strstr(scan + zCfgProg_LEN, zCfgProg);
+ size_t new_sz;
+
+ if (next == NULL)
+ new_sz = map_info.txt_size - strlen(scan);
+ else {
+ int fd = open(fname, O_RDWR);
+ if (fd < 0) return;
+ if (lseek(fd, (scan - text), SEEK_SET) < 0)
+ scan = next;
+ else if (write(fd, next, strlen(next)) < 0)
+ scan = next;
+ if (close(fd) < 0)
+ scan = next;
+ new_sz = map_info.txt_size - (next - scan);
+ }
+ if (new_sz != map_info.txt_size)
+ if (truncate(fname, new_sz) < 0)
+ scan = next; // we removed it, so shorten file
+ }
+
+ leave:
+ text_munmap(&map_info);
+}
+
+/**
+ * open the file for saving option state.
+ *
+ * @param[in] opts the program options structure
+ * @param[in] save_fl flags for saving data
* @returns the open file pointer. It may be NULL.
*/
static FILE *
-open_sv_file(tOptions * opts)
+open_sv_file(tOptions * opts, save_flags_mask_t save_fl)
{
FILE * fp;
{
int free_name = 0;
- char const * pzFName = find_file_name(opts, &free_name);
- if (pzFName == NULL)
+ char const * fname = find_file_name(opts, &free_name);
+ if (fname == NULL)
return NULL;
- fp = fopen(pzFName, "w" FOPEN_BINARY_FLAG);
+ if (save_fl == 0)
+ unlink(fname);
+ else
+ remove_settings(opts, fname);
+
+ fp = fopen(fname, "a" FOPEN_BINARY_FLAG);
if (fp == NULL) {
- fprintf(stderr, zsave_warn, opts->pzProgName);
- fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName);
+ fprintf(stderr, zsave_warn, opts->pzProgName, fname);
+ fprintf(stderr, zNoCreat, errno, strerror(errno), fname);
if (free_name)
- AGFREE(pzFName);
+ AGFREE(fname);
return fp;
}
if (free_name)
- AGFREE(pzFName);
+ AGFREE(fname);
}
+ do {
+ struct stat sbuf;
+ if (fstat(fileno(fp), &sbuf) < 0)
+ break;
+
+ if (sbuf.st_size > zPresetFile_LEN) {
+ /* non-zero size implies save_fl is non-zero */
+ fprintf(fp, zFmtProg, opts->pzProgName);
+ return fp;
+ }
+ } while (false);
+
+ /*
+ * We have a new file. Insert a header
+ */
fputs("# ", fp);
{
char const * e = strchr(opts->pzUsageTitle, NL);
@@ -563,40 +635,63 @@ open_sv_file(tOptions * opts)
AGFREE(time_str);
#endif
}
-
+ if (save_fl != 0)
+ fprintf(fp, zFmtProg, opts->pzProgName);
return fp;
}
/**
+ * print option without an arg
+ *
+ * @param[in] fp file pointer
+ * @param[in] vod value option descriptor
+ * @param[in] pod primary option descriptor
+ * @param[in] save_fl include usage in comments
*/
static void
-prt_no_arg_opt(FILE * fp, tOptDesc * p, tOptDesc * pOD)
+prt_no_arg_opt(FILE * fp, tOptDesc * vod, tOptDesc * pod, save_flags_mask_t save_fl)
{
/*
* The aliased to argument indicates whether or not the option
* is "disabled". However, the original option has the name
- * string, so we get that there, not with "p".
+ * string, so we get that there, not with "vod".
*/
char const * pznm =
- (DISABLED_OPT(p)) ? pOD->pz_DisableName : pOD->pz_Name;
+ (DISABLED_OPT(vod)) ? pod->pz_DisableName : pod->pz_Name;
/*
* If the option was disabled and the disablement name is NULL,
* then the disablement was caused by aliasing.
* Use the name as the string to emit.
*/
if (pznm == NULL)
- pznm = pOD->pz_Name;
+ pznm = pod->pz_Name;
+
+ if (save_fl & SVFL_USAGE)
+ fprintf(fp, ao_name_use_fmt, pod->pz_Name, pod->pzText);
+ if (UNUSED_OPT(pod) && (save_fl & SVFL_DEFAULT))
+ fputs(ao_default_use, fp);
fprintf(fp, "%s\n", pznm);
}
/**
+ * print the string valued argument(s).
+ *
+ * @param[in] fp file pointer
+ * @param[in] od value option descriptor
+ * @param[in] save_fl include usage in comments
*/
static void
-prt_str_arg(FILE * fp, tOptDesc * pOD)
+prt_str_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
{
- if (pOD->fOptState & OPTST_STACKED) {
- tArgList * pAL = (tArgList *)pOD->optCookie;
+ if (UNUSED_OPT(od) || ((od->fOptState & OPTST_STACKED) == 0)) {
+ char const * arg = od->optArg.argString;
+ if (arg == NULL)
+ arg = "''";
+ prt_entry(fp, od, arg, save_fl);
+
+ } else {
+ tArgList * pAL = (tArgList *)od->optCookie;
int uct = pAL->useCt;
char const ** ppz = pAL->apzArgs;
@@ -604,23 +699,24 @@ prt_str_arg(FILE * fp, tOptDesc * pOD)
* un-disable multiple copies of disabled options.
*/
if (uct > 1)
- pOD->fOptState &= ~OPTST_DISABLED;
+ od->fOptState &= ~OPTST_DISABLED;
- while (uct-- > 0)
- prt_entry(fp, pOD, *(ppz++));
- } else {
- prt_entry(fp, pOD, pOD->optArg.argString);
+ while (uct-- > 0) {
+ prt_entry(fp, od, *(ppz++), save_fl);
+ save_fl &= ~SVFL_USAGE;
+ }
}
}
/**
* print the string value of an enumeration.
*
- * @param[in] fp the file pointer to write to
- * @param[in] od the option descriptor with the enumerated value
+ * @param[in] fp the file pointer to write to
+ * @param[in] od the option descriptor with the enumerated value
+ * @param[in] save_fl include usage in comments
*/
static void
-prt_enum_arg(FILE * fp, tOptDesc * od)
+prt_enum_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
{
uintptr_t val = od->optArg.argEnum;
@@ -629,29 +725,31 @@ prt_enum_arg(FILE * fp, tOptDesc * od)
* bit flag values back into a string suitable for printing.
*/
(*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od);
- prt_entry(fp, od, VOIDP(od->optArg.argString));
+ prt_entry(fp, od, VOIDP(od->optArg.argString), save_fl);
od->optArg.argEnum = val;
}
/**
* Print the bits set in a bit mask option.
+ *
* We call the option handling function with a magic value for
* the options pointer and it allocates and fills in the string.
* We print that with a call to prt_entry().
*
- * @param[in] fp the file pointer to write to
- * @param[in] od the option descriptor with a bit mask value type
+ * @param[in] fp the file pointer to write to
+ * @param[in] od the option descriptor with a bit mask value type
+ * @param[in] save_fl include usage in comments
*/
static void
-prt_set_arg(FILE * fp, tOptDesc * od)
+prt_set_arg(FILE * fp, tOptDesc * od, save_flags_mask_t save_fl)
{
char * list = optionMemberList(od);
size_t len = strlen(list);
char * buf = (char *)AGALOC(len + 3, "dir name");
*buf= '=';
memcpy(buf+1, list, len + 1);
- prt_entry(fp, od, buf);
+ prt_entry(fp, od, buf, save_fl);
AGFREE(buf);
AGFREE(list);
}
@@ -660,29 +758,35 @@ prt_set_arg(FILE * fp, tOptDesc * od)
* figure out what the option file name argument is.
* If one can be found, call prt_entry() to emit it.
*
- * @param[in] fp the file pointer to write to.
- * @param[in] od the option descriptor with a bit mask value type
- * @param[in] opts the program options descriptor
+ * @param[in] fp the file pointer to write to.
+ * @param[in] od the option descriptor with a bit mask value type
+ * @param[in] opts the program options descriptor
+ * @param[in] save_fl include usage in comments
*/
static void
-prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts)
+prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts, save_flags_mask_t save_fl)
{
/*
* If the cookie is not NULL, then it has the file name, period.
* Otherwise, if we have a non-NULL string argument, then....
*/
if (od->optCookie != NULL)
- prt_entry(fp, od, od->optCookie);
+ prt_entry(fp, od, od->optCookie, save_fl);
else if (HAS_originalOptArgArray(opts)) {
char const * orig =
opts->originalOptArgArray[od->optIndex].argString;
- if (od->optArg.argString == orig)
+ if (od->optArg.argString == orig) {
+ if (save_fl)
+ fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
return;
+ }
- prt_entry(fp, od, od->optArg.argString);
- }
+ prt_entry(fp, od, od->optArg.argString, save_fl);
+
+ } else if (save_fl)
+ fprintf(fp, ao_name_use_fmt, od->pz_Name, od->pzText);
}
/*=export_func optionSaveFile
@@ -719,8 +823,32 @@ optionSaveFile(tOptions * opts)
{
tOptDesc * od;
int ct;
- FILE * fp = open_sv_file(opts);
+ FILE * fp;
+ save_flags_mask_t save_flags = SVFL_NONE;
+
+ do {
+ char * temp_str;
+ char const * dir = opts->pOptDesc[ opts->specOptIdx.save_opts ].optArg.argString;
+ size_t flen;
+
+ if (dir == NULL)
+ break;
+ temp_str = strchr(dir, '>');
+ if (temp_str == NULL)
+ break;
+ if (temp_str[1] == '>')
+ save_flags = SVFL_UPDATE;
+ flen = (temp_str - dir);
+ if (flen == 0)
+ break;
+ temp_str = AGALOC(flen + 1, "flag search str");
+ memcpy(temp_str, dir, flen);
+ temp_str[flen] = NUL;
+ save_flags |= save_flags_str2mask(temp_str, SVFL_NONE);
+ AGFREE(temp_str);
+ } while (false);
+ fp = open_sv_file(opts, save_flags & SVFL_UPDATE);
if (fp == NULL)
return;
@@ -730,20 +858,20 @@ optionSaveFile(tOptions * opts)
ct = opts->presetOptCt;
od = opts->pOptDesc;
do {
- tOptDesc * p;
+ tOptDesc * vod;
/*
- * IF the option has not been defined
- * OR it does not take an initialization value
- * OR it is equivalenced to another option
- * THEN continue (ignore it)
- *
* Equivalenced options get picked up when the equivalenced-to
- * option is processed.
+ * option is processed. And do not save options with any state
+ * bits in the DO_NOT_SAVE collection
+ *
+ * ** option cannot be preset
+ * #define OPTST_NO_INIT 0x0000100U
+ * ** disable from cmd line
+ * #define OPTST_NO_COMMAND 0x2000000U
+ * ** alias for other option
+ * #define OPTST_ALIAS 0x8000000U
*/
- if (UNUSED_OPT(od))
- continue;
-
if ((od->fOptState & OPTST_DO_NOT_SAVE_MASK) != 0)
continue;
@@ -751,45 +879,48 @@ optionSaveFile(tOptions * opts)
&& (od->optEquivIndex != od->optIndex))
continue;
+ if (UNUSED_OPT(od) && ((save_flags & SVFL_USAGE_DEFAULT_MASK) == SVFL_NONE))
+ continue;
+
/*
* The option argument data are found at the equivalenced-to option,
* but the actual option argument type comes from the original
* option descriptor. Be careful!
*/
- p = ((od->fOptState & OPTST_EQUIVALENCE) != 0)
- ? (opts->pOptDesc + od->optActualIndex) : od;
+ vod = ((od->fOptState & OPTST_EQUIVALENCE) != 0)
+ ? (opts->pOptDesc + od->optActualIndex) : od;
switch (OPTST_GET_ARGTYPE(od->fOptState)) {
case OPARG_TYPE_NONE:
- prt_no_arg_opt(fp, p, od);
+ prt_no_arg_opt(fp, vod, od, save_flags);
break;
case OPARG_TYPE_NUMERIC:
- prt_entry(fp, p, VOIDP(p->optArg.argInt));
+ prt_entry(fp, vod, VOIDP(vod->optArg.argInt), save_flags);
break;
case OPARG_TYPE_STRING:
- prt_str_arg(fp, p);
+ prt_str_arg(fp, vod, save_flags);
break;
case OPARG_TYPE_ENUMERATION:
- prt_enum_arg(fp, p);
+ prt_enum_arg(fp, vod, save_flags);
break;
case OPARG_TYPE_MEMBERSHIP:
- prt_set_arg(fp, p);
+ prt_set_arg(fp, vod, save_flags);
break;
case OPARG_TYPE_BOOLEAN:
- prt_entry(fp, p, p->optArg.argBool ? "true" : "false");
+ prt_entry(fp, vod, vod->optArg.argBool ? "true" : "false", save_flags);
break;
case OPARG_TYPE_HIERARCHY:
- prt_nested(fp, p);
+ prt_nested(fp, vod, save_flags);
break;
case OPARG_TYPE_FILE:
- prt_file_arg(fp, p, opts);
+ prt_file_arg(fp, vod, opts, save_flags);
break;
default:
diff --git a/contrib/ntp/sntp/libopts/sort.c b/contrib/ntp/sntp/libopts/sort.c
index da0033431aff..b4bd5cb7e224 100644
--- a/contrib/ntp/sntp/libopts/sort.c
+++ b/contrib/ntp/sntp/libopts/sort.c
@@ -10,7 +10,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -29,20 +29,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static tSuccess
-must_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
- char ** opt_txt, uint32_t * opt_idx);
-
-static tSuccess
-maybe_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
- char ** opt_txt, uint32_t * opt_idx);
-
-static tSuccess
-short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
- char ** opt_txt, uint32_t * opt_idx);
-/* = = = END-STATIC-FORWARD = = = */
-
/*
* "must_arg" and "maybe_arg" are really similar. The biggest
* difference is that "may" will consume the next argument only if it
@@ -178,7 +164,7 @@ short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
* If the program wants sorted options (separated operands and options),
* then this routine will to the trick.
*/
-LOCAL void
+static void
optionSort(tOptions * opts)
{
char ** opt_txt;
diff --git a/contrib/ntp/sntp/libopts/stack.c b/contrib/ntp/sntp/libopts/stack.c
index affe6b661fd5..39a328a85bec 100644
--- a/contrib/ntp/sntp/libopts/stack.c
+++ b/contrib/ntp/sntp/libopts/stack.c
@@ -11,7 +11,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -176,7 +176,7 @@ optionUnstackArg(tOptions * opts, tOptDesc * od)
* a pointer to the argument list structure. It gets passed around
* as an opaque address.
*/
-LOCAL void
+static void
addArgListEntry(void ** ppAL, void * entry)
{
tArgList * pAL = *(void **)ppAL;
diff --git a/contrib/ntp/sntp/libopts/stdnoreturn.in.h b/contrib/ntp/sntp/libopts/stdnoreturn.in.h
index 5b4d11bb3b0a..bf46c0883e87 100644
--- a/contrib/ntp/sntp/libopts/stdnoreturn.in.h
+++ b/contrib/ntp/sntp/libopts/stdnoreturn.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdnoreturn.h>.
- Copyright 2012-2015 Free Software Foundation, Inc.
+ Copyright 2012-2018 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
@@ -28,15 +28,25 @@
/* The definition of _Noreturn is copied here. */
-#if 1200 <= _MSC_VER
-/* Standard include files on this platform contain declarations like
- "__declspec (noreturn) void abort (void);". "#define noreturn
- _Noreturn" would cause this declaration to be rewritten to the
- invalid "__declspec (__declspec (noreturn)) void abort (void);".
- Instead, define noreturn to empty, so that such declarations are
- rewritten to "__declspec () void abort (void);", which is
- equivalent to "void abort (void);"; this gives up on noreturn's
- advice to the compiler but at least it is valid code. */
+#if 1200 <= _MSC_VER || defined __CYGWIN__
+/* On MSVC, standard include files contain declarations like
+ __declspec (noreturn) void abort (void);
+ "#define noreturn _Noreturn" would cause this declaration to be rewritten
+ to the invalid
+ __declspec (__declspec (noreturn)) void abort (void);
+
+ Similarly, on Cygwin, standard include files contain declarations like
+ void __cdecl abort (void) __attribute__ ((noreturn));
+ "#define noreturn _Noreturn" would cause this declaration to be rewritten
+ to the invalid
+ void __cdecl abort (void) __attribute__ ((__attribute__ ((__noreturn__))));
+
+ Instead, define noreturn to empty, so that such declarations are rewritten to
+ __declspec () void abort (void);
+ or
+ void __cdecl abort (void) __attribute__ (());
+ respectively. This gives up on noreturn's advice to the compiler but at
+ least it is valid code. */
# define noreturn /*empty*/
#else
# define noreturn _Noreturn
diff --git a/contrib/ntp/sntp/libopts/streqvcmp.c b/contrib/ntp/sntp/libopts/streqvcmp.c
index e87a232d199d..53477d65f9d6 100644
--- a/contrib/ntp/sntp/libopts/streqvcmp.c
+++ b/contrib/ntp/sntp/libopts/streqvcmp.c
@@ -15,7 +15,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -37,7 +37,7 @@
* together for a case independent comparison. The mappings are
* based upon ascii character sequences.
*/
-static unsigned char charmap[] = {
+ static unsigned char charmap[] = {
NUL, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, '\a',
'\b', '\t', NL, '\v', '\f', '\r', 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
diff --git a/contrib/ntp/sntp/libopts/text_mmap.c b/contrib/ntp/sntp/libopts/text_mmap.c
index 07c0bf10ebc3..ed5819271125 100644
--- a/contrib/ntp/sntp/libopts/text_mmap.c
+++ b/contrib/ntp/sntp/libopts/text_mmap.c
@@ -9,7 +9,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -185,7 +185,11 @@ validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo)
* then our updates will show in the file, so we must open with
* write access.
*/
- int o_flag = FILE_WRITABLE(prot, flags) ? O_RDWR : O_RDONLY;
+ int o_flag =
+#ifdef _WIN32
+ _O_BINARY |
+#endif
+ FILE_WRITABLE(prot, flags) ? O_RDWR : O_RDONLY;
/*
* If you're not sharing the file and you are writing to it,
@@ -349,16 +353,15 @@ text_munmap(tmap_info_t * mi)
#ifdef HAVE_MMAP
(void)munmap(mi->txt_data, mi->txt_full_size);
-#else /* don't HAVE_MMAP */
+#else // don't HAVE_MMAP
/*
* IF the memory is writable *AND* it is not private (copy-on-write)
* *AND* the memory is "sharable" (seen by other processes)
* THEN rewrite the data. Emulate mmap visibility.
*/
- if ( FILE_WRITABLE(mi->txt_prot, mi->txt_flags)
- && (lseek(mi->txt_fd, 0, SEEK_SET) >= 0) ) {
+ if ( FILE_WRITABLE(mi->txt_prot, mi->txt_flags)
+ && (lseek(mi->txt_fd, 0, SEEK_SET) >= 0) )
write(mi->txt_fd, mi->txt_data, mi->txt_size);
- }
free(mi->txt_data);
#endif /* HAVE_MMAP */
diff --git a/contrib/ntp/sntp/libopts/time.c b/contrib/ntp/sntp/libopts/time.c
index 62e07541e54a..debaa7aed340 100644
--- a/contrib/ntp/sntp/libopts/time.c
+++ b/contrib/ntp/sntp/libopts/time.c
@@ -8,7 +8,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -90,8 +90,10 @@ optionTimeDate(tOptions * opts, tOptDesc * od)
if (envptr == NULL) {
static char const fmt[] = "DATEMSK=%s/datemsk";
- envptr = AGALOC(sizeof(fmt) + strlen(opts->pzPkgDataDir), fmt);
- sprintf(envptr, fmt, opts->pzPkgDataDir);
+ size_t sz = sizeof(fmt) + strlen(opts->pzPkgDataDir);
+ envptr = AGALOC(sz, fmt);
+ if (snprintf(envptr, sz, fmt, opts->pzPkgDataDir) >= (int)sz)
+ option_exits(EXIT_FAILURE);
putenv(envptr);
}
diff --git a/contrib/ntp/sntp/libopts/tokenize.c b/contrib/ntp/sntp/libopts/tokenize.c
index 25550eaafeea..7489e3d526bb 100644
--- a/contrib/ntp/sntp/libopts/tokenize.c
+++ b/contrib/ntp/sntp/libopts/tokenize.c
@@ -9,7 +9,7 @@
* This file defines the string_tokenize interface
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -28,23 +28,6 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-#include <errno.h>
-#include <stdlib.h>
-
-#define cc_t const unsigned char
-#define ch_t unsigned char
-
-/* = = = START-STATIC-FORWARD = = = */
-static void
-copy_cooked(ch_t ** ppDest, char const ** ppSrc);
-
-static void
-copy_raw(ch_t ** ppDest, char const ** ppSrc);
-
-static token_list_t *
-alloc_token_list(char const * str);
-/* = = = END-STATIC-FORWARD = = = */
-
static void
copy_cooked(ch_t ** ppDest, char const ** ppSrc)
{
@@ -57,7 +40,7 @@ copy_cooked(ch_t ** ppDest, char const ** ppSrc)
case NUL: *ppSrc = NULL; return;
case '"': goto done;
case '\\':
- pSrc += ao_string_cook_escape_char((const char *)pSrc, (char *)&ch, 0x7F);
+ pSrc += ao_string_cook_escape_char((char *)pSrc, (char *)&ch, 0x7F);
if (ch == 0x7F)
break;
/* FALLTHROUGH */
diff --git a/contrib/ntp/sntp/libopts/usage.c b/contrib/ntp/sntp/libopts/usage.c
index c652da7f0bce..9775bdb0b282 100644
--- a/contrib/ntp/sntp/libopts/usage.c
+++ b/contrib/ntp/sntp/libopts/usage.c
@@ -18,7 +18,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -37,60 +37,8 @@
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-/* = = = START-STATIC-FORWARD = = = */
-static unsigned int
-parse_usage_flags(ao_flag_names_t const * fnt, char const * txt);
-
-static inline bool
-do_gnu_usage(tOptions * pOpts);
-
-static inline bool
-skip_misuse_usage(tOptions * pOpts);
-
-static void
-print_offer_usage(tOptions * opts);
-
-static void
-print_usage_details(tOptions * opts, int exit_code);
-
-static void
-print_one_paragraph(char const * text, bool plain, FILE * fp);
-
-static void
-prt_conflicts(tOptions * opts, tOptDesc * od);
-
-static void
-prt_one_vendor(tOptions * opts, tOptDesc * od,
- arg_types_t * argtp, char const * usefmt);
-
-static void
-prt_vendor_opts(tOptions * opts, char const * title);
-
-static void
-prt_extd_usage(tOptions * opts, tOptDesc * od, char const * title);
-
-static void
-prt_ini_list(char const * const * papz, char const * ini_file,
- char const * path_nm);
-
-static void
-prt_preamble(tOptions * opts, tOptDesc * od, arg_types_t * at);
-
-static void
-prt_one_usage(tOptions * opts, tOptDesc * od, arg_types_t * at);
-
-static void
-prt_opt_usage(tOptions * opts, int ex_code, char const * title);
-
-static void
-prt_prog_detail(tOptions * opts);
-
-static int
-setGnuOptFmts(tOptions * opts, char const ** ptxt);
-
-static int
-setStdOptFmts(tOptions * opts, char const ** ptxt);
-/* = = = END-STATIC-FORWARD = = = */
+#define GRAPH_CH(_ch) \
+ ((((unsigned)_ch) <= 0x7E) && (((unsigned)_ch) > ' '))
/**
* Parse the option usage flags string. Any parsing problems yield
@@ -151,6 +99,7 @@ parse_usage_flags(ao_flag_names_t const * fnt, char const * txt)
case ',':
txt = SPN_WHITESPACE_CHARS(txt + 1);
/* Something must follow the comma */
+ /* FALLTHROUGH */
default:
continue;
@@ -167,7 +116,7 @@ parse_usage_flags(ao_flag_names_t const * fnt, char const * txt)
* environment variable is parsed.
* @param[in,out] opts the program option descriptor
*/
-LOCAL void
+static void
set_usage_flags(tOptions * opts, char const * flg_txt)
{
# define _aof_(_n, _f) { sizeof(#_n)-1, _f, #_n },
@@ -304,7 +253,7 @@ print_offer_usage(tOptions * opts)
help[0] = help[1] = '-';
strncpy(help + 2, od->pz_Name, 20);
break;
-
+
case 0:
strncpy(help, od->pz_Name, 20);
break;
@@ -320,7 +269,7 @@ print_offer_usage(tOptions * opts)
case (OPTPROC_LONGOPT | OPTPROC_SHORTOPT):
strcpy(help, "--help");
break;
-
+
case 0:
strcpy(help, "help");
break;
@@ -351,8 +300,8 @@ print_usage_details(tOptions * opts, int exit_code)
flen = setGnuOptFmts(opts, &pOptTitle);
sprintf(line_fmt_buf, zFmtFmt, flen);
fputc(NL, option_usage_fp);
- }
- else {
+
+ } else {
flen = setStdOptFmts(opts, &pOptTitle);
sprintf(line_fmt_buf, zFmtFmt, flen);
@@ -438,7 +387,7 @@ print_one_paragraph(char const * text, bool plain, FILE * fp)
AGFREE(t);
}
}
-
+
/*=export_func optionPrintParagraphs
* private:
*
@@ -565,7 +514,7 @@ optionPrintParagraphs(char const * text, bool plain, FILE * fp)
* If "exitCode" is "AO_EXIT_REQ_USAGE" (normally 64), then output will to
* to stdout and the actual exit code will be "EXIT_SUCCESS".
=*/
-void
+lo_noreturn void
optionUsage(tOptions * opts, int usage_exit_code)
{
int exit_code = (usage_exit_code == AO_EXIT_REQ_USAGE)
@@ -617,7 +566,7 @@ optionUsage(tOptions * opts, int usage_exit_code)
print_usage_details(opts, usage_exit_code);
else
print_offer_usage(opts);
-
+
flush_and_exit:
fflush(option_usage_fp);
if (ferror(option_usage_fp) != 0)
@@ -777,7 +726,7 @@ prt_vendor_opts(tOptions * opts, char const * title)
do {
size_t l;
if ( ((od->fOptState & not_vended_mask) != 0)
- || IS_GRAPHIC_CHAR(od->optValue))
+ || GRAPH_CH(od->optValue))
continue;
l = strlen(od->pz_Name);
@@ -795,7 +744,7 @@ prt_vendor_opts(tOptions * opts, char const * title)
do {
if ( ((od->fOptState & not_vended_mask) != 0)
- || IS_GRAPHIC_CHAR(od->optValue))
+ || GRAPH_CH(od->optValue))
continue;
prt_one_vendor(opts, od, &argTypes, vfmt);
@@ -1005,7 +954,7 @@ prt_preamble(tOptions * opts, tOptDesc * od, arg_types_t * at)
if ((opts->fOptSet & OPTPROC_SHORTOPT) == 0)
fputs(at->pzSpc, option_usage_fp);
- else if (! IS_GRAPHIC_CHAR(od->optValue)) {
+ else if (! GRAPH_CH(od->optValue)) {
if ( (opts->fOptSet & (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
== (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
fputc(' ', option_usage_fp);
@@ -1132,7 +1081,7 @@ prt_opt_usage(tOptions * opts, int ex_code, char const * title)
/* Skip name only options when we have a vendor option */
if ( ((opts->fOptSet & OPTPROC_VENDOR_OPT) != 0)
- && (! IS_GRAPHIC_CHAR(od->optValue)))
+ && (! GRAPH_CH(od->optValue)))
continue;
/*
diff --git a/contrib/ntp/sntp/libopts/version.c b/contrib/ntp/sntp/libopts/version.c
index 8a8de75dbe31..cd46be3a4d85 100644
--- a/contrib/ntp/sntp/libopts/version.c
+++ b/contrib/ntp/sntp/libopts/version.c
@@ -10,7 +10,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -90,7 +90,7 @@ emit_copy_full(tOptions * o, FILE * fp)
else
emit_first_line(fp, o->pzUsageTitle, NULL, NULL);
-
+
if (HAS_pzPkgDataDir(o) && (o->pzPackager != NULL)) {
fputc(NL, fp);
fputs(o->pzPackager, fp);
@@ -119,7 +119,7 @@ emit_copy_note(tOptions * opts, FILE * fp)
fputc(NL, fp);
fprintf(fp, zao_ver_fmt, optionVersion());
-
+
if (HAS_pzPkgDataDir(opts) && (opts->pzPackager != NULL)) {
fputc(NL, fp);
fputs(opts->pzPackager, fp);
@@ -153,7 +153,10 @@ print_ver(tOptions * opts, tOptDesc * od, FILE * fp, bool call_exit)
ch = od->optArg.argString[0];
- else {
+ else if (OPTST_GET_ARGTYPE(od->fOptState) == OPARG_TYPE_STATIC) {
+ ch = od->optArg.argString[0];
+
+ } else {
set_usage_flags(opts, NULL);
ch = (opts->fOptSet & OPTPROC_GNUUSAGE) ? 'c' : 'v';
}
diff --git a/contrib/ntp/sntp/log.c b/contrib/ntp/sntp/log.c
index db6614d02710..6f45c635bf1f 100644
--- a/contrib/ntp/sntp/log.c
+++ b/contrib/ntp/sntp/log.c
@@ -2,7 +2,7 @@
#include "log.h"
-const char *progname; /* for msyslog use too */
+extern const char *progname; /* for msyslog use too */
static int counter = 0;
diff --git a/contrib/ntp/sntp/m4/ntp_cacheversion.m4 b/contrib/ntp/sntp/m4/ntp_cacheversion.m4
index 3619a603f524..0ec1f0d8dbca 100644
--- a/contrib/ntp/sntp/m4/ntp_cacheversion.m4
+++ b/contrib/ntp/sntp/m4/ntp_cacheversion.m4
@@ -14,7 +14,7 @@
# while children do not. This comes into play only when introducing
# NTP_CACHEVERSION where it had not been previously used: Previous
# cached results are presumed incompatible and not used. The reason
-# children do not flush the cached is it is shared with the parent and
+# children do not flush the cache is it is shared with the parent and
# the children can rely on the parent having cleared any cache variables
# predating this mechanism. Therefore the child can rely on the
# config.cache generated by the parent on the first run despite not
@@ -102,12 +102,7 @@ AC_DEFUN_ONCE([NTP_CACHEVERSION], [
for c_varname in $c_varname_list
do
- dnl AS_UNSET([$c_varname])
- dnl With Autoconf 2.61 and automake 1.10.3, using AS_UNSET
- dnl here triggers generation of a syntax error in configure.
- dnl Once we require a newer Autoconf we can revert to the
- dnl AS_UNSET code.
- { eval $c_varname=; unset $c_varname; }
+ AS_UNSET([$c_varname])
done
AC_MSG_NOTICE([[$cache_file saved by another version, ignored.]])
diff --git a/contrib/ntp/sntp/m4/ntp_compiler.m4 b/contrib/ntp/sntp/m4/ntp_compiler.m4
index ae897e72a08e..ddce106fe522 100644
--- a/contrib/ntp/sntp/m4/ntp_compiler.m4
+++ b/contrib/ntp/sntp/m4/ntp_compiler.m4
@@ -12,10 +12,12 @@ AC_REQUIRE([AC_PROG_CC_STDC])
dnl AC_REQUIRE([AC_PROG_CC_C89])
dnl AC_REQUIRE([AC_PROG_CC_C99])
+CC_NOFORMAT=
CFLAGS_NTP=
CPPFLAGS_NTP=
LDADD_NTP=
LDFLAGS_NTP=
+AC_SUBST([CC_NOFORMAT])
AC_SUBST([CFLAGS_NTP])
AC_SUBST([CPPFLAGS_NTP])
AC_SUBST([LDADD_NTP])
@@ -75,7 +77,7 @@ AH_VERBATIM(
case "$GCC" in
yes)
SAVED_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wstrict-overflow"
+ CFLAGS="$SAVED_CFLAGS -Wstrict-overflow"
AC_CACHE_CHECK(
[if $CC can handle -Wstrict-overflow],
[ntp_cv_gcc_Wstrict_overflow],
@@ -101,6 +103,32 @@ case "$GCC" in
)
]
)
+ #
+ # libopts specifically builds a string with embedded NULs.
+ # This causes a bunch of distracting warnings due to -Wformat.
+ # Let's see if we can figure out how to disable these.
+ #
+ CFLAGS="$SAVED_CFLAGS -Wno-format"
+ AC_CACHE_CHECK(
+ [if $CC can handle -Wno-format],
+ [ntp_cv_gcc_Wno_format],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [ntp_cv_gcc_Wno_format=yes],
+ [ntp_cv_gcc_Wno_format=no]
+ )
+ ]
+ )
+
+ case "$ntp_cv_gcc_Wno_format" in
+ yes)
+ CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
+ ;;
+ no)
+ ;;
+ esac
+
CFLAGS="$SAVED_CFLAGS"
AS_UNSET([SAVED_CFLAGS])
#
diff --git a/contrib/ntp/sntp/m4/ntp_crypto_rand.m4 b/contrib/ntp/sntp/m4/ntp_crypto_rand.m4
index c529f3a51dff..9d554226f44c 100644
--- a/contrib/ntp/sntp/m4/ntp_crypto_rand.m4
+++ b/contrib/ntp/sntp/m4/ntp_crypto_rand.m4
@@ -18,6 +18,7 @@
# as-is, without any warranty.
AC_DEFUN([NTP_CRYPTO_RAND], [
+AC_REQUIRE([NTP_OPENSSL])dnl
dnl check for --disable-openssl-random
dnl if that's not specified:
@@ -42,8 +43,8 @@ LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
dnl AC_MSG_NOTICE([LIBS is <$LIBS>])
AC_CHECK_FUNCS([RAND_bytes RAND_poll])
LIBS="$NTPO_SAVED_LIBS"
-case "$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
- yesyesyes)
+case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyesyes)
AC_DEFINE([USE_OPENSSL_CRYPTO_RAND], [1], [Use OpenSSL's crypto random functions])
;;
*) ntp_use_openssl_random=no ;;
diff --git a/contrib/ntp/sntp/m4/ntp_googletest.m4 b/contrib/ntp/sntp/m4/ntp_googletest.m4
deleted file mode 100644
index 4aa740f13e3c..000000000000
--- a/contrib/ntp/sntp/m4/ntp_googletest.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-dnl ######################################################################
-dnl NTP_GOOGLETEST gtest support shared by top-level and sntp/configure.ac
-AC_DEFUN([NTP_GOOGLETEST], [
-gta=false
-AC_ARG_WITH(
- [gtest],
- [AS_HELP_STRING(
- [--with-gtest],
- [Use the gtest framework (Default: if it's available)]
- )],
- [try_gtest=$withval],
- [try_gtest=yes]
-)
-case "$try_gtest" in
- yes)
- AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
- AS_UNSET([ac_cv_path_GTEST_CONFIG])
- case x${GTEST_CONFIG} in
- x) ;;
- *)
- AC_MSG_CHECKING([gtest version])
- gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
- case "$gtest_version_test" in
- toolow*)
- ;;
- *)
- GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
- GTEST_LIBS=`$GTEST_CONFIG --libs`
- GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
- GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
- AC_SUBST([GTEST_LDFLAGS])
- AC_SUBST([GTEST_LIBS])
- AC_SUBST([GTEST_CXXFLAGS])
- AC_SUBST([GTEST_CPPFLAGS])
- gta=true
- ;;
- esac
- gtest_version=`$GTEST_CONFIG --version`
- case "$gta" in
- true)
- AC_MSG_RESULT([($gtest_version) ok])
- ;;
- *) AC_MSG_RESULT([($gtest_version) not ok])
- ;;
- esac
- AS_UNSET([gtest_version_test])
- AS_UNSET([gtest_version])
- esac
-esac
-AM_CONDITIONAL([GTEST_AVAILABLE], [$gta])
-
-])
-dnl ======================================================================
diff --git a/contrib/ntp/sntp/m4/realpath.m4 b/contrib/ntp/sntp/m4/realpath.m4
new file mode 100644
index 000000000000..419d135f2f6c
--- /dev/null
+++ b/contrib/ntp/sntp/m4/realpath.m4
@@ -0,0 +1,49 @@
+#
+# SYNOPSIS
+#
+# NTP_FUNC_REALPATH
+#
+# DESCRIPTION
+#
+# This macro defines HAVE_FUNC_REALPATH if we have a realpath()
+# function that accepts NULL as the 2nd argument.
+#
+# LICENSE
+#
+# Copyright (c) 2020 Network Time Foundation
+#
+# Author: Harlan Stenn <stenn@nwtime.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([NTP_FUNC_REALPATH], [
+ AC_MSG_CHECKING([for a POSIX-2008 compliant realpath()])
+ AC_REQUIRE([AC_PROG_CC_C99])
+
+ AC_LANG_PUSH([C])
+
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <sys/param.h>
+ #include <stdlib.h>
+ int main() { return (NULL == realpath(".", NULL)); }
+ ]])],
+ ans="yes",
+ ans="no",
+ ans="CROSS COMPILE!"
+ )
+ AC_MSG_RESULT([$ans])
+ case "$ans" in
+ yes)
+ AC_DEFINE([HAVE_FUNC_POSIX_REALPATH], [1],
+ [Define to 1 if we have realpath() that supports NULL as the 2nd argument])
+ ;;
+ esac
+
+ AC_LANG_POP([C])
+ ]);
diff --git a/contrib/ntp/sntp/m4/version.m4 b/contrib/ntp/sntp/m4/version.m4
index 1b44051c8c0e..aef0b0c5a6fd 100644
--- a/contrib/ntp/sntp/m4/version.m4
+++ b/contrib/ntp/sntp/m4/version.m4
@@ -1 +1 @@
-m4_define([VERSION_NUMBER],[4.2.8p15])
+m4_define([VERSION_NUMBER],[4.2.8p16])
diff --git a/contrib/ntp/sntp/main.c b/contrib/ntp/sntp/main.c
index 8a4a2e562bb4..08064a6c0eaa 100644
--- a/contrib/ntp/sntp/main.c
+++ b/contrib/ntp/sntp/main.c
@@ -20,6 +20,7 @@
#include "log.h"
#include "libntp.h"
+extern const char *progname;
int shutting_down;
int time_derived;
diff --git a/contrib/ntp/sntp/scm-rev b/contrib/ntp/sntp/scm-rev
index fe53b4fe5a4d..c2fda3ce6d2e 100644
--- a/contrib/ntp/sntp/scm-rev
+++ b/contrib/ntp/sntp/scm-rev
@@ -1 +1 @@
-1.3728
+1.3996
diff --git a/contrib/ntp/sntp/scripts/Makefile.in b/contrib/ntp/sntp/scripts/Makefile.in
index 2e8e3df44911..42d86ecb59d3 100644
--- a/contrib/ntp/sntp/scripts/Makefile.in
+++ b/contrib/ntp/sntp/scripts/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -161,6 +161,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -168,6 +169,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -179,6 +182,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@@ -364,6 +368,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -401,8 +406,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -425,8 +430,10 @@ ctags CTAGS:
cscope cscopelist:
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/ntp/sntp/sntp-opts.c b/contrib/ntp/sntp/sntp-opts.c
index 66d9811f538a..d57f335e976d 100644
--- a/contrib/ntp/sntp/sntp-opts.c
+++ b/contrib/ntp/sntp/sntp-opts.c
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed June 23, 2020 at 02:19:32 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:47:47 PM by AutoGen 5.18.16
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The sntp program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -40,11 +40,15 @@
#define OPTION_CODE_COMPILE 1
#include "sntp-opts.h"
#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
+#include <string.h>
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -69,9 +73,9 @@ extern FILE * option_usage_fp;
/**
* static const strings for sntp options
*/
-static char const sntp_opt_strs[2566] =
-/* 0 */ "sntp 4.2.8p15\n"
- "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+static char const sntp_opt_strs[2567] =
+/* 0 */ "sntp 4.2.8p16\n"
+ "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -156,15 +160,15 @@ static char const sntp_opt_strs[2566] =
/* 2313 */ "LOAD_OPTS\0"
/* 2323 */ "no-load-opts\0"
/* 2336 */ "SNTP\0"
-/* 2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p15\n"
+/* 2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p16\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ hostname-or-IP ...]\n\0"
/* 2501 */ "$HOME\0"
/* 2507 */ ".\0"
/* 2509 */ ".ntprc\0"
-/* 2516 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2550 */ "\n\0"
-/* 2552 */ "sntp 4.2.8p15";
+/* 2516 */ "https://bugs.ntp.org, bugs@ntp.org\0"
+/* 2551 */ "\n\0"
+/* 2553 */ "sntp 4.2.8p16";
/**
* ipv4 option description with
@@ -761,12 +765,12 @@ static char const * const apzHomeList[3] = {
/** The sntp program bug email address. */
#define zBugsAddr (sntp_opt_strs+2516)
/** Clarification/explanation of what sntp does. */
-#define zExplain (sntp_opt_strs+2550)
+#define zExplain (sntp_opt_strs+2551)
/** Extra detail explaining what sntp does. */
#define zDetail (NULL)
/** The full version string for sntp. */
-#define zFullVersion (sntp_opt_strs+2552)
-/* extracted from optcode.tlib near line 364 */
+#define zFullVersion (sntp_opt_strs+2553)
+/* extracted from optcode.tlib near line 342 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -798,7 +802,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
ex_code = SNTP_EXIT_SUCCESS;
optionUsage(&sntpOptions, ex_code);
/* NOTREACHED */
- exit(1);
+ exit(SNTP_EXIT_FAILURE);
(void)opts;
(void)od;
}
@@ -1165,19 +1169,19 @@ static void bogus_function(void) {
extract the correct strings. These strings are actually referenced
by a field name in the sntpOptions structure noted in the
comments below. The literal text is defined in sntp_opt_strs.
-
+
NOTE: the strings below are segmented with respect to the source string
sntp_opt_strs. The strings above are handed off for translation
at run time a paragraph at a time. Consequently, they are presented here
for translation a paragraph at a time.
-
+
ALSO: often the description for an option will reference another option
by name. These are set off with apostrophe quotes (I hope). Do not
translate option names.
*/
/* referenced via sntpOptions.pzCopyright */
- puts(_("sntp 4.2.8p15\n\
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("sntp 4.2.8p16\n\
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1266,7 +1270,7 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via sntpOptions.pzUsageTitle */
- puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p15\n\
+ puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p16\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ hostname-or-IP ...]\n"));
@@ -1274,7 +1278,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via sntpOptions.pzFullVersion */
- puts(_("sntp 4.2.8p15"));
+ puts(_("sntp 4.2.8p16"));
/* referenced via sntpOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
@@ -1284,234 +1288,230 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -1520,17 +1520,17 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -1548,28 +1548,28 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/sntp/sntp-opts.h b/contrib/ntp/sntp/sntp-opts.h
index 338732e6ddf2..e8bee64a9cdd 100644
--- a/contrib/ntp/sntp/sntp-opts.h
+++ b/contrib/ntp/sntp/sntp-opts.h
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed June 23, 2020 at 02:19:32 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 02:47:47 PM by AutoGen 5.18.16
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The sntp program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -45,6 +45,8 @@
#define AUTOOPTS_SNTP_OPTS_H_GUARD 1
#include "config.h"
#include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
/**
* Ensure that the library used for compiling this generated header is at
@@ -53,13 +55,19 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
/**
* Enumeration of each option type for sntp
*/
@@ -91,9 +99,9 @@ typedef enum {
/** count of all options for sntp */
#define OPTION_CT 23
/** sntp version */
-#define SNTP_VERSION "4.2.8p15"
+#define SNTP_VERSION "4.2.8p16"
/** Full sntp version text */
-#define SNTP_FULL_VERSION "sntp 4.2.8p15"
+#define SNTP_FULL_VERSION "sntp 4.2.8p16"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -362,6 +370,7 @@ static inline char* aoGetsText(char const* pz) {
# endif
#endif /* ENABLE_NLS */
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/sntp/sntp.1sntpman b/contrib/ntp/sntp/sntp.1sntpman
index fd1d906e186a..a1fc294e2dc9 100644
--- a/contrib/ntp/sntp/sntp.1sntpman
+++ b/contrib/ntp/sntp/sntp.1sntpman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp 1sntpman "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH sntp 1sntpman "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:19:38 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:48:09 PM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -248,7 +248,7 @@ more than enough for a unicast response. If \fBsntp\fP is
only waiting for a broadcast response a longer timeout is
likely needed.
.TP
-.NOP \f\*[B-Font]\-\-wait\f[], \f\*[B-Font]\- Fl \-no\-wait\f[]
+.NOP \f\*[B-Font]\-\-wait\f[], \f\*[B-Font]\-\-no\-wait\f[]
Wait for pending replies (if not setting the time).
The \fIno\-wait\fP form will disable the option.
This option is enabled by default.
@@ -353,10 +353,10 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Dave Hart"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH "NOTES"
This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
option definitions.
diff --git a/contrib/ntp/sntp/sntp.1sntpmdoc b/contrib/ntp/sntp/sntp.1sntpmdoc
index 0b32150c6dbe..0c9753955405 100644
--- a/contrib/ntp/sntp/sntp.1sntpmdoc
+++ b/contrib/ntp/sntp/sntp.1sntpmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt SNTP 1sntpmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:19:35 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:48:05 PM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -308,10 +308,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.An "Harlan Stenn"
.An "Dave Hart"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh "NOTES"
This manual page was \fIAutoGen\fP\-erated from the \fBsntp\fP
option definitions.
diff --git a/contrib/ntp/sntp/sntp.c b/contrib/ntp/sntp/sntp.c
index 2e3bfecb3376..c83e05af86ec 100644
--- a/contrib/ntp/sntp/sntp.c
+++ b/contrib/ntp/sntp/sntp.c
@@ -2,6 +2,8 @@
#include "main.h"
+const char * progname;
+
int
main (
int argc,
diff --git a/contrib/ntp/sntp/sntp.html b/contrib/ntp/sntp/sntp.html
index 7a1e582d04ce..bfa3aa6ace98 100644
--- a/contrib/ntp/sntp/sntp.html
+++ b/contrib/ntp/sntp/sntp.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sntp User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,13 +41,11 @@ ul.no-bullet {list-style: none}
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#sntp-Description" accesskey="n" rel="next">sntp Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="Simple-Network-Time-Protocol-User-Manual"></a>
-<h1 class="top">Simple Network Time Protocol User Manual</h1>
+<span id="Simple-Network-Time-Protocol-User-Manual"></span><h1 class="top">Simple Network Time Protocol User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>sntp</code> program,
that can be used to query a Network Time Protocol (NTP) server and
@@ -64,38 +53,36 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
</p>
-<p>This document applies to version 4.2.8p15 of <code>sntp</code>.
+<p>This document applies to version 4.2.8p16 of <code>sntp</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
</p>
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
+<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#sntp-Description" accesskey="1">sntp Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
+<tr><td align="left" valign="top">&bull; <a href="#sntp-Description" accesskey="1">sntp Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-Invocation" accesskey="2">sntp Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking sntp
+<tr><td align="left" valign="top">&bull; <a href="#sntp-Invocation" accesskey="2">sntp Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking sntp
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
</table>
<hr>
-<a name="sntp-Description"></a>
-<div class="header">
+<span id="sntp-Description"></span><div class="header">
<p>
Next: <a href="#sntp-Invocation" accesskey="n" rel="next">sntp Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description"></span><h2 class="chapter">1 Description</h2>
<p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
standard output in the format:
@@ -112,22 +99,20 @@ the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#sntp-Invocation" accesskey="1">sntp Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#sntp-Invocation" accesskey="1">Invoking sntp</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="sntp-Invocation"></a>
-<div class="header">
+<span id="sntp-Invocation"></span><div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#sntp-Description" accesskey="p" rel="prev">sntp Description</a>, Up: <a href="#sntp-Description" accesskey="u" rel="up">sntp Description</a> &nbsp; </p>
</div>
-<a name="Invoking-sntp"></a>
-<h3 class="section">1.1 Invoking sntp</h3>
-<a name="index-sntp"></a>
-<a name="index-standard-Simple-Network-Time-Protocol-client-program"></a>
+<span id="Invoking-sntp"></span><h3 class="section">1.1 Invoking sntp</h3>
+<span id="index-sntp"></span>
+<span id="index-standard-Simple-Network-Time-Protocol-client-program"></span>
@@ -182,55 +167,53 @@ using the <code>agtexi-cmd</code> template and the option descriptions for the <
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#sntp-usage" accesskey="1">sntp usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sntp help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-usage" accesskey="1">sntp usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sntp help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-ipv4" accesskey="2">sntp ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-ipv4" accesskey="2">sntp ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-ipv6" accesskey="3">sntp ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-ipv6" accesskey="3">sntp ipv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-authentication" accesskey="4">sntp authentication</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authentication option (-a)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-authentication" accesskey="4">sntp authentication</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authentication option (-a)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-broadcast" accesskey="5">sntp broadcast</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">broadcast option (-b)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-broadcast" accesskey="5">sntp broadcast</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">broadcast option (-b)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-concurrent" accesskey="6">sntp concurrent</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">concurrent option (-c)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-concurrent" accesskey="6">sntp concurrent</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">concurrent option (-c)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-gap" accesskey="7">sntp gap</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">gap option (-g)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-gap" accesskey="7">sntp gap</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">gap option (-g)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-kod" accesskey="8">sntp kod</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">kod option (-K)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-kod" accesskey="8">sntp kod</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">kod option (-K)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-keyfile" accesskey="9">sntp keyfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">keyfile option (-k)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-keyfile" accesskey="9">sntp keyfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">keyfile option (-k)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-logfile">sntp logfile</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">logfile option (-l)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-logfile">sntp logfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">logfile option (-l)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-steplimit">sntp steplimit</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">steplimit option (-M)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-steplimit">sntp steplimit</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">steplimit option (-M)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-ntpversion">sntp ntpversion</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpversion option (-o)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-ntpversion">sntp ntpversion</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpversion option (-o)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-usereservedport">sntp usereservedport</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">usereservedport option (-r)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-usereservedport">sntp usereservedport</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">usereservedport option (-r)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-timeout">sntp timeout</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">timeout option (-t)
+<tr><td align="left" valign="top">&bull; <a href="#sntp-timeout">sntp timeout</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">timeout option (-t)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-wait">sntp wait</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wait option
+<tr><td align="left" valign="top">&bull; <a href="#sntp-wait">sntp wait</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wait option
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-config">sntp config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring sntp
+<tr><td align="left" valign="top">&bull; <a href="#sntp-config">sntp config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring sntp
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-exit-status">sntp exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#sntp-exit-status">sntp exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-Usage">sntp Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#sntp-Usage">sntp Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#sntp-Authors">sntp Authors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
+<tr><td align="left" valign="top">&bull; <a href="#sntp-Authors">sntp Authors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
</td></tr>
</table>
<hr>
-<a name="sntp-usage"></a>
-<div class="header">
+<span id="sntp-usage"></span><div class="header">
<p>
Next: <a href="#sntp-ipv4" accesskey="n" rel="next">sntp ipv4</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="sntp-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.1.1 sntp help/usage (<samp>--help</samp>)</h4>
-<a name="index-sntp-help"></a>
+<span id="sntp-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1.1 sntp help/usage (<samp>--help</samp>)</h4>
+<span id="index-sntp-help"></span>
<p>This is the automatically generated usage text for sntp.
</p>
@@ -243,7 +226,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p15
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p16
Usage: sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
@@ -294,18 +277,16 @@ The following option preset mechanisms are supported:
- reading file ./.ntprc
- examining environment variables named SNTP_*
-Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+Please send bug reports to: &lt;https://bugs.ntp.org, bugs@ntp.org&gt;
</pre></div>
<hr>
-<a name="sntp-ipv4"></a>
-<div class="header">
+<span id="sntp-ipv4"></span><div class="header">
<p>
Next: <a href="#sntp-ipv6" accesskey="n" rel="next">sntp ipv6</a>, Previous: <a href="#sntp-usage" accesskey="p" rel="prev">sntp usage</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="ipv4-option-_0028_002d4_0029"></a>
-<h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
-<a name="index-sntp_002dipv4"></a>
+<span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
+<span id="index-sntp_002dipv4"></span>
<p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
</p>
@@ -318,14 +299,12 @@ ipv6.
<p>Force DNS resolution of the following host names on the command line
to the IPv4 namespace.
</p><hr>
-<a name="sntp-ipv6"></a>
-<div class="header">
+<span id="sntp-ipv6"></span><div class="header">
<p>
Next: <a href="#sntp-authentication" accesskey="n" rel="next">sntp authentication</a>, Previous: <a href="#sntp-ipv4" accesskey="p" rel="prev">sntp ipv4</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="ipv6-option-_0028_002d6_0029"></a>
-<h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
-<a name="index-sntp_002dipv6"></a>
+<span id="ipv6-option-_0028_002d6_0029"></span><h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
+<span id="index-sntp_002dipv6"></span>
<p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
</p>
@@ -338,14 +317,12 @@ ipv4.
<p>Force DNS resolution of the following host names on the command line
to the IPv6 namespace.
</p><hr>
-<a name="sntp-authentication"></a>
-<div class="header">
+<span id="sntp-authentication"></span><div class="header">
<p>
Next: <a href="#sntp-broadcast" accesskey="n" rel="next">sntp broadcast</a>, Previous: <a href="#sntp-ipv6" accesskey="p" rel="prev">sntp ipv6</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="authentication-option-_0028_002da_0029"></a>
-<h4 class="subsection">1.1.4 authentication option (-a)</h4>
-<a name="index-sntp_002dauthentication"></a>
+<span id="authentication-option-_0028_002da_0029"></span><h4 class="subsection">1.1.4 authentication option (-a)</h4>
+<span id="index-sntp_002dauthentication"></span>
<p>This is the &ldquo;enable authentication with the key <var>auth-keynumber</var>&rdquo; option.
This option takes a number argument <samp>auth-keynumber</samp>.
@@ -354,14 +331,12 @@ argument. The argument of this option is the <samp>keyid</samp>, a
number specified in the <samp>keyfile</samp> as this key&rsquo;s identifier.
See the <samp>keyfile</samp> option (<samp>-k</samp>) for more details.
</p><hr>
-<a name="sntp-broadcast"></a>
-<div class="header">
+<span id="sntp-broadcast"></span><div class="header">
<p>
Next: <a href="#sntp-concurrent" accesskey="n" rel="next">sntp concurrent</a>, Previous: <a href="#sntp-authentication" accesskey="p" rel="prev">sntp authentication</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="broadcast-option-_0028_002db_0029"></a>
-<h4 class="subsection">1.1.5 broadcast option (-b)</h4>
-<a name="index-sntp_002dbroadcast"></a>
+<span id="broadcast-option-_0028_002db_0029"></span><h4 class="subsection">1.1.5 broadcast option (-b)</h4>
+<span id="index-sntp_002dbroadcast"></span>
<p>This is the &ldquo;listen to the address specified for broadcast time sync&rdquo; option.
This option takes a string argument <samp>broadcast-address</samp>.
@@ -375,14 +350,12 @@ This option takes a string argument <samp>broadcast-address</samp>.
for NTP broadcasts. The default maximum wait time
can (and probably should) be modified with <samp>-t</samp>.
</p><hr>
-<a name="sntp-concurrent"></a>
-<div class="header">
+<span id="sntp-concurrent"></span><div class="header">
<p>
Next: <a href="#sntp-gap" accesskey="n" rel="next">sntp gap</a>, Previous: <a href="#sntp-broadcast" accesskey="p" rel="prev">sntp broadcast</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="concurrent-option-_0028_002dc_0029"></a>
-<h4 class="subsection">1.1.6 concurrent option (-c)</h4>
-<a name="index-sntp_002dconcurrent"></a>
+<span id="concurrent-option-_0028_002dc_0029"></span><h4 class="subsection">1.1.6 concurrent option (-c)</h4>
+<span id="index-sntp_002dconcurrent"></span>
<p>This is the &ldquo;concurrently query all ips returned for host-name&rdquo; option.
This option takes a string argument <samp>host-name</samp>.
@@ -402,14 +375,12 @@ one after another, with a 2-second gap in between each query.
returned for the DNS lookup of the supplied host-name are on
different machines, so we can send concurrent queries.
</p><hr>
-<a name="sntp-gap"></a>
-<div class="header">
+<span id="sntp-gap"></span><div class="header">
<p>
Next: <a href="#sntp-kod" accesskey="n" rel="next">sntp kod</a>, Previous: <a href="#sntp-concurrent" accesskey="p" rel="prev">sntp concurrent</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="gap-option-_0028_002dg_0029"></a>
-<h4 class="subsection">1.1.7 gap option (-g)</h4>
-<a name="index-sntp_002dgap"></a>
+<span id="gap-option-_0028_002dg_0029"></span><h4 class="subsection">1.1.7 gap option (-g)</h4>
+<span id="index-sntp_002dgap"></span>
<p>This is the &ldquo;the gap (in milliseconds) between time requests&rdquo; option.
This option takes a number argument <samp>milliseconds</samp>.
@@ -418,14 +389,12 @@ there is benefit to specifying a good number of servers to query,
separate the queries we send out by the specified number of
milliseconds.
</p><hr>
-<a name="sntp-kod"></a>
-<div class="header">
+<span id="sntp-kod"></span><div class="header">
<p>
Next: <a href="#sntp-keyfile" accesskey="n" rel="next">sntp keyfile</a>, Previous: <a href="#sntp-gap" accesskey="p" rel="prev">sntp gap</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="kod-option-_0028_002dK_0029"></a>
-<h4 class="subsection">1.1.8 kod option (-K)</h4>
-<a name="index-sntp_002dkod"></a>
+<span id="kod-option-_0028_002dK_0029"></span><h4 class="subsection">1.1.8 kod option (-K)</h4>
+<span id="index-sntp_002dkod"></span>
<p>This is the &ldquo;kod history filename&rdquo; option.
This option takes a file argument <samp>file-name</samp>.
@@ -433,14 +402,12 @@ Specifies the filename to be used for the persistent history of KoD
responses received from servers. If the file does not exist, a
warning message will be displayed. The file will not be created.
</p><hr>
-<a name="sntp-keyfile"></a>
-<div class="header">
+<span id="sntp-keyfile"></span><div class="header">
<p>
Next: <a href="#sntp-logfile" accesskey="n" rel="next">sntp logfile</a>, Previous: <a href="#sntp-kod" accesskey="p" rel="prev">sntp kod</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="keyfile-option-_0028_002dk_0029"></a>
-<h4 class="subsection">1.1.9 keyfile option (-k)</h4>
-<a name="index-sntp_002dkeyfile"></a>
+<span id="keyfile-option-_0028_002dk_0029"></span><h4 class="subsection">1.1.9 keyfile option (-k)</h4>
+<span id="index-sntp_002dkeyfile"></span>
<p>This is the &ldquo;look in this file for the key specified with <samp>-a</samp>&rdquo; option.
This option takes a file argument <samp>file-name</samp>.
@@ -449,28 +416,24 @@ This option specifies the keyfile.
<samp>keyno</samp> in this file. See <code>ntp.keys(5)</code> for more
information.
</p><hr>
-<a name="sntp-logfile"></a>
-<div class="header">
+<span id="sntp-logfile"></span><div class="header">
<p>
Next: <a href="#sntp-steplimit" accesskey="n" rel="next">sntp steplimit</a>, Previous: <a href="#sntp-keyfile" accesskey="p" rel="prev">sntp keyfile</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="logfile-option-_0028_002dl_0029"></a>
-<h4 class="subsection">1.1.10 logfile option (-l)</h4>
-<a name="index-sntp_002dlogfile"></a>
+<span id="logfile-option-_0028_002dl_0029"></span><h4 class="subsection">1.1.10 logfile option (-l)</h4>
+<span id="index-sntp_002dlogfile"></span>
<p>This is the &ldquo;log to specified logfile&rdquo; option.
This option takes a file argument <samp>file-name</samp>.
This option causes the client to write log messages to the specified
<samp>logfile</samp>.
</p><hr>
-<a name="sntp-steplimit"></a>
-<div class="header">
+<span id="sntp-steplimit"></span><div class="header">
<p>
Next: <a href="#sntp-ntpversion" accesskey="n" rel="next">sntp ntpversion</a>, Previous: <a href="#sntp-logfile" accesskey="p" rel="prev">sntp logfile</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="steplimit-option-_0028_002dM_0029"></a>
-<h4 class="subsection">1.1.11 steplimit option (-M)</h4>
-<a name="index-sntp_002dsteplimit"></a>
+<span id="steplimit-option-_0028_002dM_0029"></span><h4 class="subsection">1.1.11 steplimit option (-M)</h4>
+<span id="index-sntp_002dsteplimit"></span>
<p>This is the &ldquo;adjustments less than <var>steplimit</var> msec will be slewed&rdquo; option.
This option takes a number argument.
@@ -480,41 +443,35 @@ correction using <code>settimeofday(2)</code>. The default value is 0,
which means all adjustments will be stepped. This is a feature, as
different situations demand different values.
</p><hr>
-<a name="sntp-ntpversion"></a>
-<div class="header">
+<span id="sntp-ntpversion"></span><div class="header">
<p>
Next: <a href="#sntp-usereservedport" accesskey="n" rel="next">sntp usereservedport</a>, Previous: <a href="#sntp-steplimit" accesskey="p" rel="prev">sntp steplimit</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="ntpversion-option-_0028_002do_0029"></a>
-<h4 class="subsection">1.1.12 ntpversion option (-o)</h4>
-<a name="index-sntp_002dntpversion"></a>
+<span id="ntpversion-option-_0028_002do_0029"></span><h4 class="subsection">1.1.12 ntpversion option (-o)</h4>
+<span id="index-sntp_002dntpversion"></span>
<p>This is the &ldquo;send <var>int</var> as our ntp protocol version&rdquo; option.
This option takes a number argument.
When sending requests to a remote server, tell them we are running
NTP protocol version <samp>ntpversion</samp> .
</p><hr>
-<a name="sntp-usereservedport"></a>
-<div class="header">
+<span id="sntp-usereservedport"></span><div class="header">
<p>
Next: <a href="#sntp-timeout" accesskey="n" rel="next">sntp timeout</a>, Previous: <a href="#sntp-ntpversion" accesskey="p" rel="prev">sntp ntpversion</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="usereservedport-option-_0028_002dr_0029"></a>
-<h4 class="subsection">1.1.13 usereservedport option (-r)</h4>
-<a name="index-sntp_002dusereservedport"></a>
+<span id="usereservedport-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.13 usereservedport option (-r)</h4>
+<span id="index-sntp_002dusereservedport"></span>
<p>This is the &ldquo;use the ntp reserved port (port 123)&rdquo; option.
Use port 123, which is reserved for NTP, for our network
communications.
</p><hr>
-<a name="sntp-timeout"></a>
-<div class="header">
+<span id="sntp-timeout"></span><div class="header">
<p>
Next: <a href="#sntp-wait" accesskey="n" rel="next">sntp wait</a>, Previous: <a href="#sntp-usereservedport" accesskey="p" rel="prev">sntp usereservedport</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="timeout-option-_0028_002dt_0029"></a>
-<h4 class="subsection">1.1.14 timeout option (-t)</h4>
-<a name="index-sntp_002dtimeout"></a>
+<span id="timeout-option-_0028_002dt_0029"></span><h4 class="subsection">1.1.14 timeout option (-t)</h4>
+<span id="index-sntp_002dtimeout"></span>
<p>This is the &ldquo;the number of seconds to wait for responses&rdquo; option.
This option takes a number argument <samp>seconds</samp>.
@@ -524,14 +481,12 @@ more than enough for a unicast response. If <code>sntp</code> is
only waiting for a broadcast response a longer timeout is
likely needed.
</p><hr>
-<a name="sntp-wait"></a>
-<div class="header">
+<span id="sntp-wait"></span><div class="header">
<p>
Next: <a href="#sntp-config" accesskey="n" rel="next">sntp config</a>, Previous: <a href="#sntp-timeout" accesskey="p" rel="prev">sntp timeout</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="wait-option"></a>
-<h4 class="subsection">1.1.15 wait option</h4>
-<a name="index-sntp_002dwait"></a>
+<span id="wait-option"></span><h4 class="subsection">1.1.15 wait option</h4>
+<span id="index-sntp_002dwait"></span>
<p>This is the &ldquo;wait for pending replies (if not setting the time)&rdquo; option.
</p>
@@ -545,13 +500,11 @@ Next: <a href="#sntp-config" accesskey="n" rel="next">sntp config</a>, Previous:
</p>
<hr>
-<a name="sntp-config"></a>
-<div class="header">
+<span id="sntp-config"></span><div class="header">
<p>
Next: <a href="#sntp-exit-status" accesskey="n" rel="next">sntp exit status</a>, Previous: <a href="#sntp-wait" accesskey="p" rel="prev">sntp wait</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="presetting_002fconfiguring-sntp"></a>
-<h4 class="subsection">1.1.16 presetting/configuring sntp</h4>
+<span id="presetting_002fconfiguring-sntp"></span><h4 class="subsection">1.1.16 presetting/configuring sntp</h4>
<p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from configuration (&quot;rc&quot; or &quot;ini&quot;) files, and values from environment variables named <code>SNTP</code> and <code>SNTP_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
@@ -607,12 +560,11 @@ the associated name/value pair list (see: optionFindValue).
</p>
<p>The command line options relating to configuration and/or usage help are:
</p>
-<a name="version-_0028_002d_0029"></a>
-<h4 class="subsubheading">version (-)</h4>
+<span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>
<p>Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
</p>
<dl compact="compact">
@@ -628,13 +580,11 @@ Only the first letter of the argument is examined:
</dl>
<hr>
-<a name="sntp-exit-status"></a>
-<div class="header">
+<span id="sntp-exit-status"></span><div class="header">
<p>
Next: <a href="#sntp-Usage" accesskey="n" rel="next">sntp Usage</a>, Previous: <a href="#sntp-config" accesskey="p" rel="prev">sntp config</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="sntp-exit-status-1"></a>
-<h4 class="subsection">1.1.17 sntp exit status</h4>
+<span id="sntp-exit-status-1"></span><h4 class="subsection">1.1.17 sntp exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
@@ -653,30 +603,24 @@ it to autogen-users@lists.sourceforge.net. Thank you.
</p></dd>
</dl>
<hr>
-<a name="sntp-Usage"></a>
-<div class="header">
+<span id="sntp-Usage"></span><div class="header">
<p>
Next: <a href="#sntp-Authors" accesskey="n" rel="next">sntp Authors</a>, Previous: <a href="#sntp-exit-status" accesskey="p" rel="prev">sntp exit status</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="sntp-Usage-1"></a>
-<h4 class="subsection">1.1.18 sntp Usage</h4>
+<span id="sntp-Usage-1"></span><h4 class="subsection">1.1.18 sntp Usage</h4>
<hr>
-<a name="sntp-Authors"></a>
-<div class="header">
+<span id="sntp-Authors"></span><div class="header">
<p>
Previous: <a href="#sntp-Usage" accesskey="p" rel="prev">sntp Usage</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
</div>
-<a name="sntp-Authors-1"></a>
-<h4 class="subsection">1.1.19 sntp Authors</h4>
+<span id="sntp-Authors-1"></span><h4 class="subsection">1.1.19 sntp Authors</h4>
<hr>
-<a name="Usage"></a>
-<div class="header">
+<span id="Usage"></span><div class="header">
<p>
Previous: <a href="#sntp-Invocation" accesskey="p" rel="prev">sntp Invocation</a>, Up: <a href="#sntp-Description" accesskey="u" rel="up">sntp Description</a> &nbsp; </p>
</div>
-<a name="Usage-1"></a>
-<h3 class="section">1.2 Usage</h3>
+<span id="Usage-1"></span><h3 class="section">1.2 Usage</h3>
<p>The simplest use of this program is as an unprivileged command to
check the current time, offset, and error in the local clock.
diff --git a/contrib/ntp/sntp/sntp.man.in b/contrib/ntp/sntp/sntp.man.in
index a31c74698ee6..61768840982f 100644
--- a/contrib/ntp/sntp/sntp.man.in
+++ b/contrib/ntp/sntp/sntp.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp @SNTP_MS@ "23 Jun 2020" "4.2.8p15" "User Commands"
+.TH sntp @SNTP_MS@ "31 May 2023" "4.2.8p16" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:19:38 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:48:09 PM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -248,7 +248,7 @@ more than enough for a unicast response. If \fBsntp\fP is
only waiting for a broadcast response a longer timeout is
likely needed.
.TP
-.NOP \f\*[B-Font]\-\-wait\f[], \f\*[B-Font]\- Fl \-no\-wait\f[]
+.NOP \f\*[B-Font]\-\-wait\f[], \f\*[B-Font]\-\-no\-wait\f[]
Wait for pending replies (if not setting the time).
The \fIno\-wait\fP form will disable the option.
This option is enabled by default.
@@ -353,10 +353,10 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.NOP "Dave Hart"
.br
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH "NOTES"
This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
option definitions.
diff --git a/contrib/ntp/sntp/sntp.mdoc.in b/contrib/ntp/sntp/sntp.mdoc.in
index 329a6d24af77..9585720e18b7 100644
--- a/contrib/ntp/sntp/sntp.mdoc.in
+++ b/contrib/ntp/sntp/sntp.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt SNTP @SNTP_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:19:35 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 02:48:05 PM by AutoGen 5.18.16
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -216,7 +216,7 @@ of seconds specified before giving up. The default should be
more than enough for a unicast response. If \fBsntp\fP is
only waiting for a broadcast response a longer timeout is
likely needed.
-.It Fl \-wait , " Fl \-no\-wait"
+.It Fl \-wait , Fl \-no\-wait
Wait for pending replies (if not setting the time).
The \fIno\-wait\fP form will disable the option.
This option is enabled by default.
@@ -308,10 +308,10 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.An "Harlan Stenn"
.An "Dave Hart"
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh "NOTES"
This manual page was \fIAutoGen\fP\-erated from the \fBsntp\fP
option definitions.
diff --git a/contrib/ntp/sntp/tests/Makefile.am b/contrib/ntp/sntp/tests/Makefile.am
index 0a0d2800bd08..00202f583de0 100644
--- a/contrib/ntp/sntp/tests/Makefile.am
+++ b/contrib/ntp/sntp/tests/Makefile.am
@@ -2,6 +2,8 @@ NULL =
BUILT_SOURCES =
EXTRA_PROGRAMS =
+# data CLEANFILES down below
+
CLEANFILES = \
debug-output-lfp-bin \
debug-output-lfp-dec \
@@ -11,6 +13,8 @@ CLEANFILES = \
kod-output-single \
testLogfile.log \
testLogfile2.log \
+ .version \
+ version.c \
$(NULL)
DISTCLEANFILES = \
@@ -108,7 +112,6 @@ AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
AM_CPPFLAGS += $(CPPFLAGS_LIBEVENT)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
-#AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_CPPFLAGS += -I$(top_srcdir)/unity
AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS)
@@ -129,47 +132,56 @@ BUILT_SOURCES += \
test_networking_SOURCES = \
networking.c \
run-networking.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_networking_SOURCES = version.c
+
test_packetHandling_SOURCES = \
packetHandling.c \
run-packetHandling.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_packetHandling_SOURCES = version.c
+
test_kodDatabase_SOURCES = \
kodDatabase.c \
run-kodDatabase.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_kodDatabase_SOURCES = version.c
+
test_keyFile_SOURCES = \
fileHandlingTest.c \
keyFile.c \
run-keyFile.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_keyFile_SOURCES = version.c
+
test_kodFile_SOURCES = \
fileHandlingTest.c \
kodFile.c \
run-kodFile.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_kodFile_SOURCES = version.c
+
test_packetProcessing_SOURCES = \
packetProcessing.c \
run-packetProcessing.c \
sntptest.c \
$(NULL)
+nodist_test_packetProcessing_SOURCES = version.c
+
test_utilities_SOURCES = \
fileHandlingTest.c \
utilities.c \
run-utilities.c \
$(NULL)
+nodist_test_utilities_SOURCES = version.c
+
test_crypto_CFLAGS = \
$(CFLAGS_LIBEVENT) \
$(AM_CFLAGS) \
@@ -178,15 +190,17 @@ test_crypto_CFLAGS = \
test_crypto_SOURCES = \
crypto.c \
run-crypto.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_crypto_SOURCES = version.c
+
test_log_SOURCES = \
- t-log.c \
+ t-log.c \
run-t-log.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_log_SOURCES = version.c
+
$(srcdir)/run-kodFile.c: $(srcdir)/kodFile.c $(std_unity_list)
$(run_unity) $< $@
@@ -215,10 +229,6 @@ $(srcdir)/run-crypto.c: $(srcdir)/crypto.c $(std_unity_list)
$(srcdir)/run-t-log.c: $(srcdir)/t-log.c $(std_unity_list)
$(run_unity) $< $@
-
-#$(srcdir)/../version.c: $(srcdir)/../version.c
-# gcc -o version.o ../version.c
-
TESTS =
if !NTP_CROSSCOMPILE
@@ -228,34 +238,19 @@ endif
#TESTS += tests-runner
#endif
-## ensure ../libsntp.a is built
-
-BUILT_SOURCES += check-libsntp
-CLEANFILES += check-libsntp
-
-check-libsntp: ../libsntp.a
- @echo stamp > $@
-
-../libsntp.a:
- cd .. && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
-
-## check-libntp.mf - automake fragment
-## slightly adapted for deeper directory
-
-BUILT_SOURCES += check-libntp check-libunity
-CLEANFILES += check-libntp check-libunity
-
-check-libntp: ../../libntp/libntp.a
- @echo stamp > $@
-
-../../libntp/libntp.a:
- cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+version.c: Makefile $(top_srcdir)/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(srcdir)/../scm-rev` $(top_builddir)/../scripts/build/mkver sntp-tests
-check-libunity: ../unity/libunity.a
- @echo stamp > $@
+$(top_srcdir)/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd .. && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-../unity/libunity.a:
- cd ../unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
+include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-libsntp.mf
+include $(top_srcdir)/check-libunity.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/sntp/tests/Makefile.in b/contrib/ntp/sntp/tests/Makefile.in
index a3fc69ec702e..2e52ab0b27ca 100644
--- a/contrib/ntp/sntp/tests/Makefile.in
+++ b/contrib/ntp/sntp/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -138,9 +138,10 @@ am__EXEEXT_1 =
@BUILD_TEST_KODFILE_TRUE@am__EXEEXT_3 = test-kodFile$(EXEEXT)
am__objects_1 =
am_test_crypto_OBJECTS = test_crypto-crypto.$(OBJEXT) \
- test_crypto-run-crypto.$(OBJEXT) test_crypto-version.$(OBJEXT) \
- $(am__objects_1)
-test_crypto_OBJECTS = $(am_test_crypto_OBJECTS)
+ test_crypto-run-crypto.$(OBJEXT) $(am__objects_1)
+nodist_test_crypto_OBJECTS = test_crypto-version.$(OBJEXT)
+test_crypto_OBJECTS = $(am_test_crypto_OBJECTS) \
+ $(nodist_test_crypto_OBJECTS)
test_crypto_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = ../libsntp.a $(am__DEPENDENCIES_1) \
@@ -158,44 +159,54 @@ test_crypto_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_crypto_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
am_test_keyFile_OBJECTS = fileHandlingTest.$(OBJEXT) keyFile.$(OBJEXT) \
- run-keyFile.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
-test_keyFile_OBJECTS = $(am_test_keyFile_OBJECTS)
+ run-keyFile.$(OBJEXT) $(am__objects_1)
+nodist_test_keyFile_OBJECTS = version.$(OBJEXT)
+test_keyFile_OBJECTS = $(am_test_keyFile_OBJECTS) \
+ $(nodist_test_keyFile_OBJECTS)
test_keyFile_LDADD = $(LDADD)
test_keyFile_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_test_kodDatabase_OBJECTS = kodDatabase.$(OBJEXT) \
- run-kodDatabase.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
-test_kodDatabase_OBJECTS = $(am_test_kodDatabase_OBJECTS)
+ run-kodDatabase.$(OBJEXT) $(am__objects_1)
+nodist_test_kodDatabase_OBJECTS = version.$(OBJEXT)
+test_kodDatabase_OBJECTS = $(am_test_kodDatabase_OBJECTS) \
+ $(nodist_test_kodDatabase_OBJECTS)
test_kodDatabase_LDADD = $(LDADD)
test_kodDatabase_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_test_kodFile_OBJECTS = fileHandlingTest.$(OBJEXT) kodFile.$(OBJEXT) \
- run-kodFile.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
-test_kodFile_OBJECTS = $(am_test_kodFile_OBJECTS)
+ run-kodFile.$(OBJEXT) $(am__objects_1)
+nodist_test_kodFile_OBJECTS = version.$(OBJEXT)
+test_kodFile_OBJECTS = $(am_test_kodFile_OBJECTS) \
+ $(nodist_test_kodFile_OBJECTS)
test_kodFile_LDADD = $(LDADD)
test_kodFile_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_test_log_OBJECTS = t-log.$(OBJEXT) run-t-log.$(OBJEXT) \
- version.$(OBJEXT) $(am__objects_1)
-test_log_OBJECTS = $(am_test_log_OBJECTS)
+ $(am__objects_1)
+nodist_test_log_OBJECTS = version.$(OBJEXT)
+test_log_OBJECTS = $(am_test_log_OBJECTS) $(nodist_test_log_OBJECTS)
test_log_LDADD = $(LDADD)
test_log_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_test_networking_OBJECTS = networking.$(OBJEXT) \
- run-networking.$(OBJEXT) version.$(OBJEXT) $(am__objects_1)
-test_networking_OBJECTS = $(am_test_networking_OBJECTS)
+ run-networking.$(OBJEXT) $(am__objects_1)
+nodist_test_networking_OBJECTS = version.$(OBJEXT)
+test_networking_OBJECTS = $(am_test_networking_OBJECTS) \
+ $(nodist_test_networking_OBJECTS)
test_networking_LDADD = $(LDADD)
test_networking_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_test_packetHandling_OBJECTS = packetHandling.$(OBJEXT) \
- run-packetHandling.$(OBJEXT) version.$(OBJEXT) \
- $(am__objects_1)
-test_packetHandling_OBJECTS = $(am_test_packetHandling_OBJECTS)
+ run-packetHandling.$(OBJEXT) $(am__objects_1)
+nodist_test_packetHandling_OBJECTS = version.$(OBJEXT)
+test_packetHandling_OBJECTS = $(am_test_packetHandling_OBJECTS) \
+ $(nodist_test_packetHandling_OBJECTS)
test_packetHandling_LDADD = $(LDADD)
test_packetHandling_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
@@ -203,14 +214,18 @@ test_packetHandling_DEPENDENCIES = $(am__DEPENDENCIES_2) \
am_test_packetProcessing_OBJECTS = packetProcessing.$(OBJEXT) \
run-packetProcessing.$(OBJEXT) sntptest.$(OBJEXT) \
$(am__objects_1)
-test_packetProcessing_OBJECTS = $(am_test_packetProcessing_OBJECTS)
+nodist_test_packetProcessing_OBJECTS = version.$(OBJEXT)
+test_packetProcessing_OBJECTS = $(am_test_packetProcessing_OBJECTS) \
+ $(nodist_test_packetProcessing_OBJECTS)
test_packetProcessing_LDADD = $(LDADD)
test_packetProcessing_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_test_utilities_OBJECTS = fileHandlingTest.$(OBJEXT) \
utilities.$(OBJEXT) run-utilities.$(OBJEXT) $(am__objects_1)
-test_utilities_OBJECTS = $(am_test_utilities_OBJECTS)
+nodist_test_utilities_OBJECTS = version.$(OBJEXT)
+test_utilities_OBJECTS = $(am_test_utilities_OBJECTS) \
+ $(nodist_test_utilities_OBJECTS)
test_utilities_LDADD = $(LDADD)
test_utilities_DEPENDENCIES = $(am__DEPENDENCIES_2) \
$(top_builddir)/unity/libunity.a $(am__DEPENDENCIES_1) \
@@ -229,7 +244,20 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/fileHandlingTest.Po \
+ ./$(DEPDIR)/keyFile.Po ./$(DEPDIR)/kodDatabase.Po \
+ ./$(DEPDIR)/kodFile.Po ./$(DEPDIR)/networking.Po \
+ ./$(DEPDIR)/packetHandling.Po ./$(DEPDIR)/packetProcessing.Po \
+ ./$(DEPDIR)/run-keyFile.Po ./$(DEPDIR)/run-kodDatabase.Po \
+ ./$(DEPDIR)/run-kodFile.Po ./$(DEPDIR)/run-networking.Po \
+ ./$(DEPDIR)/run-packetHandling.Po \
+ ./$(DEPDIR)/run-packetProcessing.Po ./$(DEPDIR)/run-t-log.Po \
+ ./$(DEPDIR)/run-utilities.Po ./$(DEPDIR)/sntptest.Po \
+ ./$(DEPDIR)/t-log.Po ./$(DEPDIR)/test_crypto-crypto.Po \
+ ./$(DEPDIR)/test_crypto-run-crypto.Po \
+ ./$(DEPDIR)/test_crypto-version.Po ./$(DEPDIR)/utilities.Po \
+ ./$(DEPDIR)/version.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -249,11 +277,17 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(test_crypto_SOURCES) $(test_keyFile_SOURCES) \
- $(test_kodDatabase_SOURCES) $(test_kodFile_SOURCES) \
- $(test_log_SOURCES) $(test_networking_SOURCES) \
+SOURCES = $(test_crypto_SOURCES) $(nodist_test_crypto_SOURCES) \
+ $(test_keyFile_SOURCES) $(nodist_test_keyFile_SOURCES) \
+ $(test_kodDatabase_SOURCES) $(nodist_test_kodDatabase_SOURCES) \
+ $(test_kodFile_SOURCES) $(nodist_test_kodFile_SOURCES) \
+ $(test_log_SOURCES) $(nodist_test_log_SOURCES) \
+ $(test_networking_SOURCES) $(nodist_test_networking_SOURCES) \
$(test_packetHandling_SOURCES) \
- $(test_packetProcessing_SOURCES) $(test_utilities_SOURCES)
+ $(nodist_test_packetHandling_SOURCES) \
+ $(test_packetProcessing_SOURCES) \
+ $(nodist_test_packetProcessing_SOURCES) \
+ $(test_utilities_SOURCES) $(nodist_test_utilities_SOURCES)
DIST_SOURCES = $(test_crypto_SOURCES) $(test_keyFile_SOURCES) \
$(test_kodDatabase_SOURCES) $(test_kodFile_SOURCES) \
$(test_log_SOURCES) $(test_networking_SOURCES) \
@@ -282,8 +316,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
@@ -466,6 +498,7 @@ am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
@@ -490,8 +523,9 @@ TEST_LOG_DRIVER = $(SHELL) \
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
am__DIST_COMMON = $(srcdir)/Makefile.in \
- $(srcdir)/fileHandlingTest.h.in $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf \
+ $(srcdir)/fileHandlingTest.h.in $(top_srcdir)/check-libntp.mf \
+ $(top_srcdir)/check-libsntp.mf $(top_srcdir)/check-libunity.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
$(top_srcdir)/libevent/build-aux/depcomp \
$(top_srcdir)/libevent/build-aux/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -512,6 +546,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -519,6 +554,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -530,6 +567,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@@ -715,6 +753,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -725,29 +764,24 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-#if !NTP_CROSSCOMPILE
-#TESTS += tests-runner
-#endif
BUILT_SOURCES = $(srcdir)/run-crypto.c $(srcdir)/run-keyFile.c \
$(srcdir)/run-kodDatabase.c $(srcdir)/run-kodFile.c \
$(srcdir)/run-networking.c $(srcdir)/run-packetHandling.c \
$(srcdir)/run-packetProcessing.c $(srcdir)/run-utilities.c \
- $(NULL) check-libsntp check-libntp check-libunity .deps-ver
+ $(NULL) check-libntp check-libsntp check-libunity .deps-ver
+
+# data CLEANFILES down below
CLEANFILES = debug-output-lfp-bin debug-output-lfp-dec \
debug-output-pkt kod-output-blank kod-output-multiple \
- kod-output-single testLogfile.log testLogfile2.log $(NULL) \
- data/kod-output-multiple data/kod-output-single \
- data/debug-output-pkt data/debug-output-lfp-dec \
- data/kod-output-blank data/debug-output-lfp-bin $(NULL) \
- check-libsntp check-libntp check-libunity .deps-ver
-DISTCLEANFILES = \
- kod-output-blank \
- kod-output-single \
- kod-output-multiple \
- testLogfile.log \
- testLogfile2.log \
- $(NULL)
-
+ kod-output-single testLogfile.log testLogfile2.log .version \
+ version.c $(NULL) data/kod-output-multiple \
+ data/kod-output-single data/debug-output-pkt \
+ data/debug-output-lfp-dec data/kod-output-blank \
+ data/debug-output-lfp-bin $(NULL) check-libntp check-libsntp \
+ check-libunity .deps-ver
+DISTCLEANFILES = kod-output-blank kod-output-single \
+ kod-output-multiple testLogfile.log testLogfile2.log $(NULL) \
+ $(DEPDIR)/deps-ver
std_unity_list = \
$(abs_top_srcdir)/unity/auto/generate_test_runner.rb \
$(abs_srcdir)/testconf.yml \
@@ -794,7 +828,6 @@ LDADD = \
$(NULL)
AM_CFLAGS = $(CFLAGS_NTP) $(NTP_HARD_CFLAGS)
-#AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
AM_CPPFLAGS = $(SNTP_INCS) -I$(srcdir)/.. -I$(top_srcdir)/../tests \
$(LIBOPTS_CFLAGS) $(CPPFLAGS_LIBEVENT) $(CPPFLAGS_NTP) \
-DUNITY_INCLUDE_CONFIG_H -I$(top_srcdir)/unity \
@@ -803,47 +836,49 @@ AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
test_networking_SOURCES = \
networking.c \
run-networking.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_networking_SOURCES = version.c
test_packetHandling_SOURCES = \
packetHandling.c \
run-packetHandling.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_packetHandling_SOURCES = version.c
test_kodDatabase_SOURCES = \
kodDatabase.c \
run-kodDatabase.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_kodDatabase_SOURCES = version.c
test_keyFile_SOURCES = \
fileHandlingTest.c \
keyFile.c \
run-keyFile.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_keyFile_SOURCES = version.c
test_kodFile_SOURCES = \
fileHandlingTest.c \
kodFile.c \
run-kodFile.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_kodFile_SOURCES = version.c
test_packetProcessing_SOURCES = \
packetProcessing.c \
run-packetProcessing.c \
sntptest.c \
$(NULL)
+nodist_test_packetProcessing_SOURCES = version.c
test_utilities_SOURCES = \
fileHandlingTest.c \
utilities.c \
run-utilities.c \
$(NULL)
+nodist_test_utilities_SOURCES = version.c
test_crypto_CFLAGS = \
$(CFLAGS_LIBEVENT) \
$(AM_CFLAGS) \
@@ -852,29 +887,26 @@ test_crypto_CFLAGS = \
test_crypto_SOURCES = \
crypto.c \
run-crypto.c \
- $(top_builddir)/version.c \
$(NULL)
+nodist_test_crypto_SOURCES = version.c
test_log_SOURCES = \
- t-log.c \
+ t-log.c \
run-t-log.c \
- $(top_builddir)/version.c \
$(NULL)
-
-#$(srcdir)/../version.c: $(srcdir)/../version.c
-# gcc -o version.o ../version.c
+nodist_test_log_SOURCES = version.c
TESTS = $(am__append_3)
SNTP_INCS = -I$(top_srcdir)/../include \
- -I$(top_srcdir)/../lib/isc/include \
- -I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/../lib/isc/unix/include
+ -I$(top_srcdir)/../libntp/lib/isc/include \
+ -I$(top_srcdir)/../libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/../libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libsntp.mf $(top_srcdir)/check-libunity.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -891,10 +923,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libsntp.mf $(top_srcdir)/check-libunity.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -958,46 +990,55 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileHandlingTest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodDatabase.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networking.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetHandling.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetProcessing.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-keyFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-kodDatabase.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-kodFile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-networking.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-packetHandling.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-packetProcessing.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-t-log.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-utilities.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sntptest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-log.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-crypto.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-run-crypto.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileHandlingTest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyFile.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodDatabase.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodFile.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networking.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetHandling.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetProcessing.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-keyFile.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-kodDatabase.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-kodFile.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-networking.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-packetHandling.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-packetProcessing.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-t-log.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run-utilities.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sntptest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-log.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-crypto.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-run-crypto.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto-version.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -1030,33 +1071,19 @@ test_crypto-run-crypto.obj: run-crypto.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -c -o test_crypto-run-crypto.obj `if test -f 'run-crypto.c'; then $(CYGPATH_W) 'run-crypto.c'; else $(CYGPATH_W) '$(srcdir)/run-crypto.c'; fi`
-test_crypto-version.o: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -MT test_crypto-version.o -MD -MP -MF $(DEPDIR)/test_crypto-version.Tpo -c -o test_crypto-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
+test_crypto-version.o: version.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -MT test_crypto-version.o -MD -MP -MF $(DEPDIR)/test_crypto-version.Tpo -c -o test_crypto-version.o `test -f 'version.c' || echo '$(srcdir)/'`version.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_crypto-version.Tpo $(DEPDIR)/test_crypto-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_crypto-version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='version.c' object='test_crypto-version.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -c -o test_crypto-version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -c -o test_crypto-version.o `test -f 'version.c' || echo '$(srcdir)/'`version.c
-test_crypto-version.obj: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -MT test_crypto-version.obj -MD -MP -MF $(DEPDIR)/test_crypto-version.Tpo -c -o test_crypto-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
+test_crypto-version.obj: version.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -MT test_crypto-version.obj -MD -MP -MF $(DEPDIR)/test_crypto-version.Tpo -c -o test_crypto-version.obj `if test -f 'version.c'; then $(CYGPATH_W) 'version.c'; else $(CYGPATH_W) '$(srcdir)/version.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_crypto-version.Tpo $(DEPDIR)/test_crypto-version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='test_crypto-version.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -c -o test_crypto-version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-
-version.o: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT version.o -MD -MP -MF $(DEPDIR)/version.Tpo -c -o version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/version.Tpo $(DEPDIR)/version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='version.c' object='test_crypto-version.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o version.o `test -f '$(top_builddir)/version.c' || echo '$(srcdir)/'`$(top_builddir)/version.c
-
-version.obj: $(top_builddir)/version.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT version.obj -MD -MP -MF $(DEPDIR)/version.Tpo -c -o version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/version.Tpo $(DEPDIR)/version.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/version.c' object='version.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o version.obj `if test -f '$(top_builddir)/version.c'; then $(CYGPATH_W) '$(top_builddir)/version.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/version.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_crypto_CFLAGS) $(CFLAGS) -c -o test_crypto-version.obj `if test -f 'version.c'; then $(CYGPATH_W) 'version.c'; else $(CYGPATH_W) '$(srcdir)/version.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -1223,7 +1250,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
@@ -1236,7 +1263,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
fi; \
$$success || exit 1
-check-TESTS:
+check-TESTS: $(check_PROGRAMS) $(dist_check_SCRIPTS)
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@@ -1334,8 +1361,10 @@ test-kodFile.log: test-kodFile$(EXEEXT)
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1375,7 +1404,8 @@ all-am: Makefile $(HEADERS)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1416,7 +1446,28 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/fileHandlingTest.Po
+ -rm -f ./$(DEPDIR)/keyFile.Po
+ -rm -f ./$(DEPDIR)/kodDatabase.Po
+ -rm -f ./$(DEPDIR)/kodFile.Po
+ -rm -f ./$(DEPDIR)/networking.Po
+ -rm -f ./$(DEPDIR)/packetHandling.Po
+ -rm -f ./$(DEPDIR)/packetProcessing.Po
+ -rm -f ./$(DEPDIR)/run-keyFile.Po
+ -rm -f ./$(DEPDIR)/run-kodDatabase.Po
+ -rm -f ./$(DEPDIR)/run-kodFile.Po
+ -rm -f ./$(DEPDIR)/run-networking.Po
+ -rm -f ./$(DEPDIR)/run-packetHandling.Po
+ -rm -f ./$(DEPDIR)/run-packetProcessing.Po
+ -rm -f ./$(DEPDIR)/run-t-log.Po
+ -rm -f ./$(DEPDIR)/run-utilities.Po
+ -rm -f ./$(DEPDIR)/sntptest.Po
+ -rm -f ./$(DEPDIR)/t-log.Po
+ -rm -f ./$(DEPDIR)/test_crypto-crypto.Po
+ -rm -f ./$(DEPDIR)/test_crypto-run-crypto.Po
+ -rm -f ./$(DEPDIR)/test_crypto-version.Po
+ -rm -f ./$(DEPDIR)/utilities.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1462,7 +1513,28 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/fileHandlingTest.Po
+ -rm -f ./$(DEPDIR)/keyFile.Po
+ -rm -f ./$(DEPDIR)/kodDatabase.Po
+ -rm -f ./$(DEPDIR)/kodFile.Po
+ -rm -f ./$(DEPDIR)/networking.Po
+ -rm -f ./$(DEPDIR)/packetHandling.Po
+ -rm -f ./$(DEPDIR)/packetProcessing.Po
+ -rm -f ./$(DEPDIR)/run-keyFile.Po
+ -rm -f ./$(DEPDIR)/run-kodDatabase.Po
+ -rm -f ./$(DEPDIR)/run-kodFile.Po
+ -rm -f ./$(DEPDIR)/run-networking.Po
+ -rm -f ./$(DEPDIR)/run-packetHandling.Po
+ -rm -f ./$(DEPDIR)/run-packetProcessing.Po
+ -rm -f ./$(DEPDIR)/run-t-log.Po
+ -rm -f ./$(DEPDIR)/run-utilities.Po
+ -rm -f ./$(DEPDIR)/sntptest.Po
+ -rm -f ./$(DEPDIR)/t-log.Po
+ -rm -f ./$(DEPDIR)/test_crypto-crypto.Po
+ -rm -f ./$(DEPDIR)/test_crypto-run-crypto.Po
+ -rm -f ./$(DEPDIR)/test_crypto-version.Po
+ -rm -f ./$(DEPDIR)/utilities.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1481,18 +1553,19 @@ ps-am:
uninstall-am:
-.MAKE: all check check-am install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
- ctags ctags-am distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.MAKE: all check check-am install install-am install-exec \
+ install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
+ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
recheck tags tags-am uninstall uninstall-am
@@ -1526,31 +1599,45 @@ $(srcdir)/run-crypto.c: $(srcdir)/crypto.c $(std_unity_list)
$(srcdir)/run-t-log.c: $(srcdir)/t-log.c $(std_unity_list)
$(run_unity) $< $@
+#if !NTP_CROSSCOMPILE
+#TESTS += tests-runner
+#endif
+
+version.c: Makefile $(top_srcdir)/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(srcdir)/../scm-rev` $(top_builddir)/../scripts/build/mkver sntp-tests
+
+$(top_srcdir)/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd .. && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
-check-libsntp: ../libsntp.a
- @echo stamp > $@
+check-libntp: $(top_builddir)/../libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libsntp.a:
- cd .. && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
+$(top_builddir)/../libntp/libntp.a:
+ cd $(top_builddir)/../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
-check-libntp: ../../libntp/libntp.a
- @echo stamp > $@
+check-libsntp: $(top_builddir)/sntp/libsntp.a
+ @: avoid default SCCS get by some make implementations
-../../libntp/libntp.a:
- cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/sntp/libsntp.a:
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
-check-libunity: ../unity/libunity.a
- @echo stamp > $@
+check-libunity: $(top_builddir)/unity/libunity.a
+ @: avoid default SCCS get by some make implementations
-../unity/libunity.a:
- cd ../unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
+$(top_builddir)/unity/libunity.a:
+ cd $(top_builddir)/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1568,7 +1655,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1598,7 +1685,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/sntp/tests/packetProcessing.c b/contrib/ntp/sntp/tests/packetProcessing.c
index 9c9f061c4aee..53c454a9f064 100644
--- a/contrib/ntp/sntp/tests/packetProcessing.c
+++ b/contrib/ntp/sntp/tests/packetProcessing.c
@@ -9,8 +9,6 @@
#define CMAC_LENGTH 16
-const char * Version = "stub unit test Version string";
-
/* Hacks into the key database. */
extern struct key* key_ptr;
extern int key_cnt;
diff --git a/contrib/ntp/sntp/tests/sntptest.c b/contrib/ntp/sntp/tests/sntptest.c
index 73c1ad26f396..cb08d371ab75 100644
--- a/contrib/ntp/sntp/tests/sntptest.c
+++ b/contrib/ntp/sntp/tests/sntptest.c
@@ -1,7 +1,5 @@
#include "config.h"
-#include "ntp_stdlib.h"
-#include "sntp-opts.h"
#include "sntptest.h"
void
@@ -28,6 +26,6 @@ ActivateOption(const char* option, const char* argument) {
opts[2] = estrdup(argument);
opts[3] = estrdup("127.0.0.1");
- optionProcess(&sntpOptions, ARGV_SIZE, opts);
+ optionProcess(&sntpOptions, COUNTOF(opts), opts);
}
diff --git a/contrib/ntp/sntp/tests/sntptest.h b/contrib/ntp/sntp/tests/sntptest.h
index 82e2562dd290..05a6d5db4cbf 100644
--- a/contrib/ntp/sntp/tests/sntptest.h
+++ b/contrib/ntp/sntp/tests/sntptest.h
@@ -2,6 +2,7 @@
#define SNTPTEST_H
#include "ntp_stdlib.h"
+#include "ntp_types.h"
#include "sntp-opts.h"
void sntptest(void);
diff --git a/contrib/ntp/sntp/tests/t-log.c b/contrib/ntp/sntp/tests/t-log.c
index 08d4b6c59b2f..7b935c302326 100644
--- a/contrib/ntp/sntp/tests/t-log.c
+++ b/contrib/ntp/sntp/tests/t-log.c
@@ -3,7 +3,6 @@
#include "ntp_types.h"
-//#include "log.h"
#include "log.c"
void setUp(void);
diff --git a/contrib/ntp/sntp/tests/utilities.c b/contrib/ntp/sntp/tests/utilities.c
index a68aaacae9ae..aeeee4b2cf47 100644
--- a/contrib/ntp/sntp/tests/utilities.c
+++ b/contrib/ntp/sntp/tests/utilities.c
@@ -22,9 +22,6 @@ void test_LfpOutputBinaryFormat(void);
void test_LfpOutputDecimalFormat(void);
-const char * Version = "stub unit test Version string";
-
-
sockaddr_u
CreateSockaddr4(const char* address) {
sockaddr_u s;
diff --git a/contrib/ntp/sntp/unity/Makefile.am b/contrib/ntp/sntp/unity/Makefile.am
index 24a44257a43b..a7d5d9c568fe 100644
--- a/contrib/ntp/sntp/unity/Makefile.am
+++ b/contrib/ntp/sntp/unity/Makefile.am
@@ -1,7 +1,7 @@
-#AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
NULL =
BUILT_SOURCES =
CLEANFILES =
+DISTCLEANFILES =
AM_CFLAGS = $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS)
@@ -15,7 +15,7 @@ libunity_a_CFLAGS = \
$(NULL)
libunity_a_SOURCES = \
- ../libpkgver/colcomp.c \
+ libpkgver-colcomp.c \
unity.c \
ulib_setup.c \
ulib_teardown.c \
diff --git a/contrib/ntp/sntp/unity/Makefile.in b/contrib/ntp/sntp/unity/Makefile.in
index 0923192d4783..927f648ffea8 100644
--- a/contrib/ntp/sntp/unity/Makefile.in
+++ b/contrib/ntp/sntp/unity/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -132,7 +132,7 @@ am__v_AR_1 =
libunity_a_AR = $(AR) $(ARFLAGS)
libunity_a_LIBADD =
am__objects_1 =
-am_libunity_a_OBJECTS = libunity_a-colcomp.$(OBJEXT) \
+am_libunity_a_OBJECTS = libunity_a-libpkgver-colcomp.$(OBJEXT) \
libunity_a-unity.$(OBJEXT) libunity_a-ulib_setup.$(OBJEXT) \
libunity_a-ulib_teardown.$(OBJEXT) \
libunity_a-unity_fixture.$(OBJEXT) $(am__objects_1)
@@ -151,7 +151,12 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/libunity_a-libpkgver-colcomp.Po \
+ ./$(DEPDIR)/libunity_a-ulib_setup.Po \
+ ./$(DEPDIR)/libunity_a-ulib_teardown.Po \
+ ./$(DEPDIR)/libunity_a-unity.Po \
+ ./$(DEPDIR)/libunity_a-unity_fixture.Po
am__mv = mv -f
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -199,8 +204,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
$(top_srcdir)/includes.mf \
$(top_srcdir)/libevent/build-aux/depcomp
@@ -222,6 +225,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -229,6 +233,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -240,6 +246,7 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
@@ -425,6 +432,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -434,11 +442,10 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-
-#AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
NULL =
BUILT_SOURCES = .deps-ver
CLEANFILES = .deps-ver
+DISTCLEANFILES = $(DEPDIR)/deps-ver
AM_CFLAGS = $(NTP_HARD_CFLAGS)
AM_CPPFLAGS = $(NTP_HARD_CPPFLAGS)
AM_LDFLAGS = $(NTP_HARD_LDFLAGS)
@@ -449,7 +456,7 @@ libunity_a_CFLAGS = \
$(NULL)
libunity_a_SOURCES = \
- ../libpkgver/colcomp.c \
+ libpkgver-colcomp.c \
unity.c \
ulib_setup.c \
ulib_teardown.c \
@@ -464,9 +471,9 @@ libunity_a_SOURCES = \
$(NULL)
SNTP_INCS = -I$(top_srcdir)/../include \
- -I$(top_srcdir)/../lib/isc/include \
- -I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/../lib/isc/unix/include
+ -I$(top_srcdir)/../libntp/lib/isc/include \
+ -I$(top_srcdir)/../libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/../libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -489,8 +496,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
@@ -517,46 +524,55 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-colcomp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-ulib_setup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-ulib_teardown.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-unity.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-unity_fixture.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-libpkgver-colcomp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-ulib_setup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-ulib_teardown.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-unity.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libunity_a-unity_fixture.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-libunity_a-colcomp.o: ../libpkgver/colcomp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -MT libunity_a-colcomp.o -MD -MP -MF $(DEPDIR)/libunity_a-colcomp.Tpo -c -o libunity_a-colcomp.o `test -f '../libpkgver/colcomp.c' || echo '$(srcdir)/'`../libpkgver/colcomp.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libunity_a-colcomp.Tpo $(DEPDIR)/libunity_a-colcomp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libpkgver/colcomp.c' object='libunity_a-colcomp.o' libtool=no @AMDEPBACKSLASH@
+libunity_a-libpkgver-colcomp.o: libpkgver-colcomp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -MT libunity_a-libpkgver-colcomp.o -MD -MP -MF $(DEPDIR)/libunity_a-libpkgver-colcomp.Tpo -c -o libunity_a-libpkgver-colcomp.o `test -f 'libpkgver-colcomp.c' || echo '$(srcdir)/'`libpkgver-colcomp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libunity_a-libpkgver-colcomp.Tpo $(DEPDIR)/libunity_a-libpkgver-colcomp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libpkgver-colcomp.c' object='libunity_a-libpkgver-colcomp.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -c -o libunity_a-colcomp.o `test -f '../libpkgver/colcomp.c' || echo '$(srcdir)/'`../libpkgver/colcomp.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -c -o libunity_a-libpkgver-colcomp.o `test -f 'libpkgver-colcomp.c' || echo '$(srcdir)/'`libpkgver-colcomp.c
-libunity_a-colcomp.obj: ../libpkgver/colcomp.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -MT libunity_a-colcomp.obj -MD -MP -MF $(DEPDIR)/libunity_a-colcomp.Tpo -c -o libunity_a-colcomp.obj `if test -f '../libpkgver/colcomp.c'; then $(CYGPATH_W) '../libpkgver/colcomp.c'; else $(CYGPATH_W) '$(srcdir)/../libpkgver/colcomp.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libunity_a-colcomp.Tpo $(DEPDIR)/libunity_a-colcomp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libpkgver/colcomp.c' object='libunity_a-colcomp.obj' libtool=no @AMDEPBACKSLASH@
+libunity_a-libpkgver-colcomp.obj: libpkgver-colcomp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -MT libunity_a-libpkgver-colcomp.obj -MD -MP -MF $(DEPDIR)/libunity_a-libpkgver-colcomp.Tpo -c -o libunity_a-libpkgver-colcomp.obj `if test -f 'libpkgver-colcomp.c'; then $(CYGPATH_W) 'libpkgver-colcomp.c'; else $(CYGPATH_W) '$(srcdir)/libpkgver-colcomp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libunity_a-libpkgver-colcomp.Tpo $(DEPDIR)/libunity_a-libpkgver-colcomp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libpkgver-colcomp.c' object='libunity_a-libpkgver-colcomp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -c -o libunity_a-colcomp.obj `if test -f '../libpkgver/colcomp.c'; then $(CYGPATH_W) '../libpkgver/colcomp.c'; else $(CYGPATH_W) '$(srcdir)/../libpkgver/colcomp.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -c -o libunity_a-libpkgver-colcomp.obj `if test -f 'libpkgver-colcomp.c'; then $(CYGPATH_W) 'libpkgver-colcomp.c'; else $(CYGPATH_W) '$(srcdir)/libpkgver-colcomp.c'; fi`
libunity_a-unity.o: unity.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libunity_a_CFLAGS) $(CFLAGS) -MT libunity_a-unity.o -MD -MP -MF $(DEPDIR)/libunity_a-unity.Tpo -c -o libunity_a-unity.o `test -f 'unity.c' || echo '$(srcdir)/'`unity.c
@@ -671,8 +687,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -709,7 +727,8 @@ all-am: Makefile $(LIBRARIES)
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -735,6 +754,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -746,7 +766,11 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libunity_a-libpkgver-colcomp.Po
+ -rm -f ./$(DEPDIR)/libunity_a-ulib_setup.Po
+ -rm -f ./$(DEPDIR)/libunity_a-ulib_teardown.Po
+ -rm -f ./$(DEPDIR)/libunity_a-unity.Po
+ -rm -f ./$(DEPDIR)/libunity_a-unity_fixture.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -792,7 +816,11 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libunity_a-libpkgver-colcomp.Po
+ -rm -f ./$(DEPDIR)/libunity_a-ulib_setup.Po
+ -rm -f ./$(DEPDIR)/libunity_a-ulib_teardown.Po
+ -rm -f ./$(DEPDIR)/libunity_a-unity.Po
+ -rm -f ./$(DEPDIR)/libunity_a-unity_fixture.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -811,18 +839,18 @@ ps-am:
uninstall-am:
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \
- ctags-am distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.MAKE: all check install install-am install-exec install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libtool clean-noinstLIBRARIES \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
@@ -833,9 +861,9 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -853,7 +881,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -883,7 +911,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/sntp/unity/auto/parseOutput.rb b/contrib/ntp/sntp/unity/auto/parseOutput.rb
index 7ea180f4c9cd..7ea180f4c9cd 100755..100644
--- a/contrib/ntp/sntp/unity/auto/parseOutput.rb
+++ b/contrib/ntp/sntp/unity/auto/parseOutput.rb
diff --git a/contrib/ntp/sntp/unity/auto/type_sanitizer.rb b/contrib/ntp/sntp/unity/auto/type_sanitizer.rb
index 7c2c0ac2c4ec..7c2c0ac2c4ec 100755..100644
--- a/contrib/ntp/sntp/unity/auto/type_sanitizer.rb
+++ b/contrib/ntp/sntp/unity/auto/type_sanitizer.rb
diff --git a/contrib/ntp/sntp/unity/auto/unity_test_summary.py b/contrib/ntp/sntp/unity/auto/unity_test_summary.py
index c64f6c5df28a..c64f6c5df28a 100755..100644
--- a/contrib/ntp/sntp/unity/auto/unity_test_summary.py
+++ b/contrib/ntp/sntp/unity/auto/unity_test_summary.py
diff --git a/contrib/ntp/sntp/unity/libpkgver-colcomp.c b/contrib/ntp/sntp/unity/libpkgver-colcomp.c
new file mode 100644
index 000000000000..52e3f2b7cba6
--- /dev/null
+++ b/contrib/ntp/sntp/unity/libpkgver-colcomp.c
@@ -0,0 +1 @@
+#include "../libpkgver/colcomp.c"
diff --git a/contrib/ntp/sntp/unity/unity_internals.h b/contrib/ntp/sntp/unity/unity_internals.h
index f1cc40000af7..a04f52b478bb 100644
--- a/contrib/ntp/sntp/unity/unity_internals.h
+++ b/contrib/ntp/sntp/unity/unity_internals.h
@@ -308,7 +308,7 @@ extern int UNITY_OUTPUT_CHAR(int);
#if !defined(UNITY_NORETURN_ATTRIBUTE)
# ifdef __GNUC__ // includes clang
# if !(defined(__WIN32__) && defined(__clang__))
-# define UNITY_NORETURN_ATTRIBUTE __attribute__((noreturn))
+# define UNITY_NORETURN_ATTRIBUTE __attribute__((__noreturn__))
# endif
# endif
#endif
diff --git a/contrib/ntp/sntp/utilities.c b/contrib/ntp/sntp/utilities.c
index 43cd786b9939..2069bc9b3da2 100644
--- a/contrib/ntp/sntp/utilities.c
+++ b/contrib/ntp/sntp/utilities.c
@@ -140,17 +140,22 @@ tv_to_str(
const size_t bufsize = 48;
char *buf;
time_t gmt_time, local_time;
- struct tm *p_tm_local;
- int hh, mm, lto;
+ struct tm *ptm, tm_local;
+ int hh, mm, lto, isdst;
/*
* convert to struct tm in UTC, then intentionally feed
* that tm to mktime() which expects local time input, to
* derive the offset from UTC to local time.
+ * Need to retrieve dst flag from localtime first for mktime.
*/
gmt_time = tv->tv_sec;
- local_time = mktime(gmtime(&gmt_time));
- p_tm_local = localtime(&gmt_time);
+ ptm = localtime(&gmt_time);
+ memcpy (&tm_local, ptm, sizeof(tm_local));
+ isdst = ptm->tm_isdst;
+ ptm = gmtime(&gmt_time);
+ ptm->tm_isdst = isdst;
+ local_time = mktime(ptm);
/* Local timezone offsets should never cause an overflow. Yeah. */
lto = difftime(local_time, gmt_time);
@@ -161,12 +166,12 @@ tv_to_str(
buf = emalloc(bufsize);
snprintf(buf, bufsize,
"%d-%.2d-%.2d %.2d:%.2d:%.2d.%.6d (%+03d%02d)",
- p_tm_local->tm_year + 1900,
- p_tm_local->tm_mon + 1,
- p_tm_local->tm_mday,
- p_tm_local->tm_hour,
- p_tm_local->tm_min,
- p_tm_local->tm_sec,
+ tm_local.tm_year + 1900,
+ tm_local.tm_mon + 1,
+ tm_local.tm_mday,
+ tm_local.tm_hour,
+ tm_local.tm_min,
+ tm_local.tm_sec,
(int)tv->tv_usec,
hh,
mm);
diff --git a/contrib/ntp/sntp/version.c b/contrib/ntp/sntp/version.c
deleted file mode 100644
index 9574047d5d4d..000000000000
--- a/contrib/ntp/sntp/version.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * version file for sntp
- */
-#include <config.h>
-const char * Version = "sntp 4.2.8p15@1.3728-o Tue Jun 23 09:22:10 UTC 2020 (10)";
diff --git a/contrib/ntp/tests/libntp/realpath.c b/contrib/ntp/tests/libntp/realpath.c
new file mode 100644
index 000000000000..c45d363537c5
--- /dev/null
+++ b/contrib/ntp/tests/libntp/realpath.c
@@ -0,0 +1,94 @@
+#include "config.h"
+
+#include "ntp_stdlib.h"
+#include "unity.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <stdarg.h>
+
+static char * resolved;
+
+void setUp(void);
+void setUp(void) {
+ resolved = NULL;
+}
+
+void tearDown(void);
+void tearDown(void) {
+ free(resolved);
+ resolved = NULL;
+}
+
+static int/*BOOL*/ isValidAbsPath(const char * path)
+{
+ int retv = FALSE;
+ /* this needs some elaboration: */
+ if (path && path[0] == '/') {
+ struct stat sb;
+ if (0 == lstat(path, &sb)) {
+ retv = (sb.st_mode & S_IFMT) != S_IFLNK;
+ }
+ }
+ return retv;
+}
+
+static const char * errMsg(const char *fmt, ...)
+{
+ static char buf[256];
+ va_list va;
+ va_start(va, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, va);
+ va_end(va);
+ return buf;
+}
+
+void test_CurrentWorkingDir(void);
+void test_CurrentWorkingDir(void) {
+# ifdef SYS_WINNT
+ TEST_IGNORE_MESSAGE("not applicable to windows so far");
+# else
+ resolved = ntp_realpath(".");
+ TEST_ASSERT_NOT_NULL_MESSAGE(resolved, "failed to resolve '.'");
+ TEST_ASSERT_TRUE_MESSAGE(isValidAbsPath(resolved), "'.' not resolved to absolute path");
+# endif
+}
+
+void test_DevLinks(void);
+void test_DevLinks(void) {
+# ifdef SYS_WINNT
+ TEST_IGNORE_MESSAGE("not applicable to windows so far");
+# else
+ char nam[512];
+ char abs[512];
+ struct dirent * ent;
+ DIR * dfs = opendir("/dev");
+
+ TEST_ASSERT_NOT_NULL_MESSAGE(dfs, "failed to open '/dev' !?!");
+ while (NULL != (ent = readdir(dfs))) {
+ /* the /dev/std{in,out,err} symlinks are prone to some
+ * kind of race condition under Linux, so we better skip
+ * them here; running tests in parallel can fail mysteriously
+ * otherwise. (Dunno *how* this could happen, but it
+ * did at some point in time, quite reliably...)
+ */
+ if (!strncmp(ent->d_name, "std", 3))
+ continue;
+ /* otherwise build the full name & try to resolve: */
+ snprintf(nam, sizeof(nam), "/dev/%s", ent->d_name);
+ resolved = ntp_realpath(nam);
+ TEST_ASSERT_NOT_NULL_MESSAGE(resolved, errMsg("could not resolve '%s'", nam));
+ strlcpy(abs, resolved, sizeof(abs));
+ free(resolved);
+ resolved = NULL;
+ /* test/development code:
+ if (strcmp(nam, abs))
+ printf(" '%s' --> '%s'\n", nam, abs);
+ */
+ TEST_ASSERT_TRUE_MESSAGE(isValidAbsPath(abs), errMsg("could not validate '%s'", abs));
+ }
+ closedir(dfs);
+# endif
+}
diff --git a/contrib/ntp/tests/libntp/run-realpath.c b/contrib/ntp/tests/libntp/run-realpath.c
new file mode 100644
index 000000000000..ebabdabc36cc
--- /dev/null
+++ b/contrib/ntp/tests/libntp/run-realpath.c
@@ -0,0 +1,70 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+
+//=======Test Runner Used To Run Each Test Below=====
+#define RUN_TEST(TestFunc, TestLineNum) \
+{ \
+ Unity.CurrentTestName = #TestFunc; \
+ Unity.CurrentTestLineNumber = TestLineNum; \
+ Unity.NumberOfTests++; \
+ if (TEST_PROTECT()) \
+ { \
+ setUp(); \
+ TestFunc(); \
+ } \
+ if (TEST_PROTECT() && !TEST_IS_IGNORED) \
+ { \
+ tearDown(); \
+ } \
+ UnityConcludeTest(); \
+}
+
+//=======Automagically Detected Files To Include=====
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "config.h"
+#include "ntp_stdlib.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <stdarg.h>
+
+//=======External Functions This Runner Calls=====
+extern void setUp(void);
+extern void tearDown(void);
+extern void test_CurrentWorkingDir(void);
+extern void test_DevLinks(void);
+
+
+//=======Suite Setup=====
+static void suite_setup(void)
+{
+extern int change_iobufs(int);
+extern int change_logfile(const char*, int);
+change_iobufs(1);
+change_logfile("stderr", 0);
+}
+
+//=======Test Reset Option=====
+void resetTest(void);
+void resetTest(void)
+{
+ tearDown();
+ setUp();
+}
+
+char const *progname;
+
+
+//=======MAIN=====
+int main(int argc, char *argv[])
+{
+ progname = argv[0];
+ suite_setup();
+ UnityBegin("realpath.c");
+ RUN_TEST(test_CurrentWorkingDir, 48);
+ RUN_TEST(test_DevLinks, 59);
+
+ return (UnityEnd());
+}
diff --git a/contrib/ntp/tests/ntpd/test-libntp.c b/contrib/ntp/tests/ntpd/test-libntp.c
new file mode 100644
index 000000000000..91d4b3af4a1f
--- /dev/null
+++ b/contrib/ntp/tests/ntpd/test-libntp.c
@@ -0,0 +1,2 @@
+#include "../libntp/test-libntp.c"
+
diff --git a/contrib/ntp/util/Makefile.am b/contrib/ntp/util/Makefile.am
index 8d8067d39d7a..cef623c592d0 100644
--- a/contrib/ntp/util/Makefile.am
+++ b/contrib/ntp/util/Makefile.am
@@ -21,10 +21,11 @@ AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
-ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a
+ntp_keygen_LDADD = $(LIBOPTS_LDADD) ../libntp/libntp.a
ntp_keygen_LDADD += $(LDADD_LIBEVENT)
ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
+nodist_ntp_keygen_SOURCES = version.c
tickadj_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NLIST)
@@ -42,8 +43,8 @@ EXTRA_DIST= \
$(NULL)
BUILT_SOURCES= ntp-keygen-opts.c ntp-keygen-opts.h
-CLEANFILES=
-DISTCLEANFILES= .version version.c config.log $(man_MANS)
+CLEANFILES = .version version.c
+DISTCLEANFILES= config.log $(man_MANS)
html_DATA= \
$(srcdir)/ntp-keygen.html \
@@ -111,7 +112,7 @@ $(srcdir)/invoke-ntp-keygen.texi: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-keygen-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntp-keygen.html: $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp-keygen.html: $(srcdir)/invoke-ntp-keygen.texi $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp-keygen.html ntp-keygen.texi || true )
@@ -121,19 +122,12 @@ jitter_LDADD=
kern.o: kern.c
$(COMPILE) -DHAVE_TIMEX_H -c kern.c
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntp_keygen_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
-
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
include $(top_srcdir)/bincheck.mf
-include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libntp.mf
include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/check-scm-rev.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf
diff --git a/contrib/ntp/util/Makefile.in b/contrib/ntp/util/Makefile.in
index 099e27015b22..bfc308c6cc5f 100644
--- a/contrib/ntp/util/Makefile.in
+++ b/contrib/ntp/util/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -118,7 +118,6 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
- $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_harden.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
@@ -138,6 +137,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/realpath.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -185,9 +185,11 @@ longsize_LDADD = $(LDADD)
longsize_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_ntp_keygen_OBJECTS = ntp-keygen.$(OBJEXT) ntp-keygen-opts.$(OBJEXT)
-ntp_keygen_OBJECTS = $(am_ntp_keygen_OBJECTS)
-ntp_keygen_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) \
- ../libntp/libntp.a $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+nodist_ntp_keygen_OBJECTS = version.$(OBJEXT)
+ntp_keygen_OBJECTS = $(am_ntp_keygen_OBJECTS) \
+ $(nodist_ntp_keygen_OBJECTS)
+ntp_keygen_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
ntptime_SOURCES = ntptime.c
@@ -248,7 +250,16 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/audio-pcm.Po \
+ ./$(DEPDIR)/byteorder.Po ./$(DEPDIR)/hist.Po \
+ ./$(DEPDIR)/jitter.Po ./$(DEPDIR)/kern.Po \
+ ./$(DEPDIR)/longsize.Po ./$(DEPDIR)/ntp-keygen-opts.Po \
+ ./$(DEPDIR)/ntp-keygen.Po ./$(DEPDIR)/ntptime.Po \
+ ./$(DEPDIR)/pps-api.Po ./$(DEPDIR)/precision.Po \
+ ./$(DEPDIR)/sht.Po ./$(DEPDIR)/testrs6000.Po ./$(DEPDIR)/tg.Po \
+ ./$(DEPDIR)/tg2.Po ./$(DEPDIR)/tickadj.Po \
+ ./$(DEPDIR)/timetrim.Po ./$(DEPDIR)/version.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -269,8 +280,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = audio-pcm.c byteorder.c hist.c $(jitter_SOURCES) kern.c \
- longsize.c $(ntp_keygen_SOURCES) ntptime.c pps-api.c \
- precision.c sht.c testrs6000.c tg.c tg2.c tickadj.c timetrim.c
+ longsize.c $(ntp_keygen_SOURCES) $(nodist_ntp_keygen_SOURCES) \
+ ntptime.c pps-api.c precision.c sht.c testrs6000.c tg.c tg2.c \
+ tickadj.c timetrim.c
DIST_SOURCES = audio-pcm.c byteorder.c hist.c $(jitter_SOURCES) kern.c \
longsize.c $(ntp_keygen_SOURCES) ntptime.c pps-api.c \
precision.c sht.c testrs6000.c tg.c tg2.c tickadj.c timetrim.c
@@ -328,11 +340,10 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
- $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
+ $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -352,6 +363,7 @@ CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_NOFORMAT = @CC_NOFORMAT@
CFLAGS = @CFLAGS@
CFLAGS_LIBEVENT = @CFLAGS_LIBEVENT@
CFLAGS_NTP = @CFLAGS_NTP@
@@ -361,6 +373,8 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -373,14 +387,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
+ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
-GTEST_CONFIG = @GTEST_CONFIG@
-GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
-GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
-GTEST_LDFLAGS = @GTEST_LDFLAGS@
-GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
@@ -591,6 +601,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -612,10 +623,11 @@ AM_LDFLAGS = $(LDFLAGS_NTP) $(NTP_HARD_LDFLAGS)
# LDADD might need RESLIB and ADJLIB
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
tg2_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
-ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
+ntp_keygen_LDADD = $(LIBOPTS_LDADD) ../libntp/libntp.a \
$(LDADD_LIBEVENT) $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) \
$(LIBM)
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
+nodist_ntp_keygen_SOURCES = version.c
tickadj_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NLIST)
EXTRA_DIST = \
invoke-ntp-keygen.menu \
@@ -632,8 +644,8 @@ EXTRA_DIST = \
BUILT_SOURCES = ntp-keygen-opts.c ntp-keygen-opts.h check-libntp \
check-libopts .deps-ver
-CLEANFILES = check-libntp check-libopts .deps-ver
-DISTCLEANFILES = .version version.c config.log $(man_MANS)
+CLEANFILES = .version version.c check-libntp check-libopts .deps-ver
+DISTCLEANFILES = config.log $(man_MANS) $(DEPDIR)/deps-ver
html_DATA = \
$(srcdir)/ntp-keygen.html \
$(NULL)
@@ -663,15 +675,16 @@ std_def_list = \
jitter_SOURCES = jitter.c
jitter_LDADD =
-NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
- -I$(top_srcdir)/lib/isc/unix/include
+NTP_INCS = -I$(top_srcdir)/include \
+ -I$(top_srcdir)/libntp/lib/isc/include \
+ -I$(top_srcdir)/libntp/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/libntp/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -688,10 +701,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
-$(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/check-scm-rev.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -919,41 +932,51 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio-pcm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/byteorder.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jitter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kern.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/longsize.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp-keygen-opts.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp-keygen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pps-api.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/precision.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sht.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrs6000.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tg.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tg2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tickadj.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetrim.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio-pcm.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/byteorder.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jitter.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kern.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/longsize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp-keygen-opts.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp-keygen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pps-api.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/precision.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sht.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrs6000.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tg.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tg2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tickadj.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetrim.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
@@ -1122,8 +1145,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
-distdir: $(DISTFILES)
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1163,7 +1188,8 @@ installdirs:
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1201,7 +1227,24 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/audio-pcm.Po
+ -rm -f ./$(DEPDIR)/byteorder.Po
+ -rm -f ./$(DEPDIR)/hist.Po
+ -rm -f ./$(DEPDIR)/jitter.Po
+ -rm -f ./$(DEPDIR)/kern.Po
+ -rm -f ./$(DEPDIR)/longsize.Po
+ -rm -f ./$(DEPDIR)/ntp-keygen-opts.Po
+ -rm -f ./$(DEPDIR)/ntp-keygen.Po
+ -rm -f ./$(DEPDIR)/ntptime.Po
+ -rm -f ./$(DEPDIR)/pps-api.Po
+ -rm -f ./$(DEPDIR)/precision.Po
+ -rm -f ./$(DEPDIR)/sht.Po
+ -rm -f ./$(DEPDIR)/testrs6000.Po
+ -rm -f ./$(DEPDIR)/tg.Po
+ -rm -f ./$(DEPDIR)/tg2.Po
+ -rm -f ./$(DEPDIR)/tickadj.Po
+ -rm -f ./$(DEPDIR)/timetrim.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1249,7 +1292,24 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/audio-pcm.Po
+ -rm -f ./$(DEPDIR)/byteorder.Po
+ -rm -f ./$(DEPDIR)/hist.Po
+ -rm -f ./$(DEPDIR)/jitter.Po
+ -rm -f ./$(DEPDIR)/kern.Po
+ -rm -f ./$(DEPDIR)/longsize.Po
+ -rm -f ./$(DEPDIR)/ntp-keygen-opts.Po
+ -rm -f ./$(DEPDIR)/ntp-keygen.Po
+ -rm -f ./$(DEPDIR)/ntptime.Po
+ -rm -f ./$(DEPDIR)/pps-api.Po
+ -rm -f ./$(DEPDIR)/precision.Po
+ -rm -f ./$(DEPDIR)/sht.Po
+ -rm -f ./$(DEPDIR)/testrs6000.Po
+ -rm -f ./$(DEPDIR)/tg.Po
+ -rm -f ./$(DEPDIR)/tg2.Po
+ -rm -f ./$(DEPDIR)/tickadj.Po
+ -rm -f ./$(DEPDIR)/timetrim.Po
+ -rm -f ./$(DEPDIR)/version.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1271,9 +1331,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
uninstall-man: uninstall-man1 uninstall-man8
-.MAKE: all check install install-am install-exec-am install-strip
+.MAKE: all check install install-am install-exec install-exec-am \
+ install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic \
@@ -1334,22 +1395,14 @@ $(srcdir)/invoke-ntp-keygen.texi: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-keygen-opts.def
$(top_srcdir)/scripts/build/check--help $@
-$(srcdir)/ntp-keygen.html: $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/version.texi
+$(srcdir)/ntp-keygen.html: $(srcdir)/invoke-ntp-keygen.texi $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp-keygen.html ntp-keygen.texi || true )
kern.o: kern.c
$(COMPILE) -DHAVE_TIMEX_H -c kern.c
-$(PROGRAMS): version.o
-
-$(top_srcdir)/sntp/scm-rev:
- cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-
-version.c: $(ntp_keygen_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
- env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
-
-version.o: version.c
- env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+version.c: Makefile $(top_srcdir)/sntp/scm-rev
+ $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
install-exec-hook:
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
@@ -1365,23 +1418,31 @@ install-exec-hook:
#
-check-libntp: ../libntp/libntp.a
+check-libntp: $(top_builddir)/libntp/libntp.a
+ @: avoid default SCCS get by some make implementations
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(top_builddir)/libntp/libntp.a:
+ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
check-libopts: ../sntp/libopts/libopts.la
@echo stamp > $@
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
+$(top_srcdir)/sntp/scm-rev: FRC.scm-rev
+ $(AM_V_GEN)cd $(top_builddir)/sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+
+FRC.scm-rev:
+ @: FRC.scm-rev "force" depends on nothing and is not a file, so is \
+ always out-of-date causing targets which depend on it to also \
+ be outdated so their rules to fire each time they are built.
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
- chmod ug+w $@
+ chmod u+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) $(AM_MAKEFLAGS) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1399,7 +1460,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
- cp $(top_srcdir)/deps-ver $@
+ $(AM_V_at)cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@@ -1429,7 +1490,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
-# This comment block follows rather than leads the related code so that
+# This comment block follows rather than leads the related rules so that
# it stays with it in the generated Makefile.in and Makefile.
#
diff --git a/contrib/ntp/util/invoke-ntp-keygen.texi b/contrib/ntp/util/invoke-ntp-keygen.texi
index 868ca818dec0..da9f2695f921 100644
--- a/contrib/ntp/util/invoke-ntp-keygen.texi
+++ b/contrib/ntp/util/invoke-ntp-keygen.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi)
#
-# It has been AutoGen-ed June 23, 2020 at 02:21:07 AM by AutoGen 5.18.5
+# It has been AutoGen-ed May 31, 2023 at 08:03:04 PM by AutoGen 5.18.16
# From the definitions ntp-keygen-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -1056,7 +1056,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p15
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p16
Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
@@ -1103,7 +1103,7 @@ The following option preset mechanisms are supported:
- reading file ./.ntprc
- examining environment variables named NTP_KEYGEN_*
-Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+Please send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4
@@ -1121,7 +1121,7 @@ This option has some usage constraints. It:
must be compiled in by defining @code{AUTOKEY} during the compilation.
@end itemize
-The number of bits in the identity modulus. The default is 256.
+The number of bits in the identity modulus. The default is 512.
@node ntp-keygen certificate
@subsection certificate option (-c)
@cindex ntp-keygen-certificate
@@ -1490,7 +1490,7 @@ The command line options relating to configuration and/or usage help are:
Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
@table @samp
diff --git a/contrib/ntp/util/ntp-keygen-opts.c b/contrib/ntp/util/ntp-keygen-opts.c
index 2dbd4cc16275..47d03516a713 100644
--- a/contrib/ntp/util/ntp-keygen-opts.c
+++ b/contrib/ntp/util/ntp-keygen-opts.c
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed June 23, 2020 at 02:21:03 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 08:03:01 PM by AutoGen 5.18.16
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntp-keygen program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -40,11 +40,15 @@
#define OPTION_CODE_COMPILE 1
#include "ntp-keygen-opts.h"
#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
+#include <string.h>
+#include <unistd.h>
#ifdef __cplusplus
extern "C" {
@@ -71,9 +75,9 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntp-keygen options
*/
-static char const ntp_keygen_opt_strs[2442] =
-/* 0 */ "ntp-keygen (ntp) 4.2.8p15\n"
- "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
+static char const ntp_keygen_opt_strs[2443] =
+/* 0 */ "ntp-keygen (ntp) 4.2.8p16\n"
+ "Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
@@ -165,14 +169,14 @@ static char const ntp_keygen_opt_strs[2442] =
/* 2223 */ "no-load-opts\0"
/* 2236 */ "no\0"
/* 2239 */ "NTP_KEYGEN\0"
-/* 2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p15\n"
+/* 2250 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p16\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 2365 */ "$HOME\0"
/* 2371 */ ".\0"
/* 2373 */ ".ntprc\0"
-/* 2380 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2414 */ "\n\0"
-/* 2416 */ "ntp-keygen (ntp) 4.2.8p15";
+/* 2380 */ "https://bugs.ntp.org, bugs@ntp.org\0"
+/* 2415 */ "\n\0"
+/* 2417 */ "ntp-keygen (ntp) 4.2.8p16";
/**
* imbits option description:
@@ -974,12 +978,12 @@ static char const * const apzHomeList[3] = {
/** The ntp-keygen program bug email address. */
#define zBugsAddr (ntp_keygen_opt_strs+2380)
/** Clarification/explanation of what ntp-keygen does. */
-#define zExplain (ntp_keygen_opt_strs+2414)
+#define zExplain (ntp_keygen_opt_strs+2415)
/** Extra detail explaining what ntp-keygen does. */
#define zDetail (NULL)
/** The full version string for ntp-keygen. */
-#define zFullVersion (ntp_keygen_opt_strs+2416)
-/* extracted from optcode.tlib near line 364 */
+#define zFullVersion (ntp_keygen_opt_strs+2417)
+/* extracted from optcode.tlib near line 342 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -1011,7 +1015,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
ex_code = NTP_KEYGEN_EXIT_SUCCESS;
optionUsage(&ntp_keygenOptions, ex_code);
/* NOTREACHED */
- exit(1);
+ exit(NTP_KEYGEN_EXIT_FAILURE);
(void)opts;
(void)od;
}
@@ -1019,7 +1023,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* Code to handle the imbits option, when AUTOKEY is #define-d.
- * The number of bits in the identity modulus. The default is 256.
+ * The number of bits in the identity modulus. The default is 512.
* @param[in] pOptions the ntp-keygen options data structure
* @param[in,out] pOptDesc the option descriptor for this option.
*/
@@ -1299,19 +1303,19 @@ static void bogus_function(void) {
extract the correct strings. These strings are actually referenced
by a field name in the ntp_keygenOptions structure noted in the
comments below. The literal text is defined in ntp_keygen_opt_strs.
-
+
NOTE: the strings below are segmented with respect to the source string
ntp_keygen_opt_strs. The strings above are handed off for translation
at run time a paragraph at a time. Consequently, they are presented here
for translation a paragraph at a time.
-
+
ALSO: often the description for an option will reference another option
by name. These are set off with apostrophe quotes (I hope). Do not
translate option names.
*/
/* referenced via ntp_keygenOptions.pzCopyright */
- puts(_("ntp-keygen (ntp) 4.2.8p15\n\
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
+ puts(_("ntp-keygen (ntp) 4.2.8p16\n\
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1409,14 +1413,14 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntp_keygenOptions.pzUsageTitle */
- puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p15\n\
+ puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p16\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntp_keygenOptions.pzExplain */
puts(_("\n"));
/* referenced via ntp_keygenOptions.pzFullVersion */
- puts(_("ntp-keygen (ntp) 4.2.8p15"));
+ puts(_("ntp-keygen (ntp) 4.2.8p16"));
/* referenced via ntp_keygenOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
@@ -1426,234 +1430,230 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* LIBOPTS-MESSAGES: */
#line 67 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 93 "../autoopts.c"
+#line 89 "../autoopts.c"
puts(_("allocation of %d bytes failed\n"));
-#line 53 "../init.c"
+#line 48 "../init.c"
puts(_("AutoOpts function called without option descriptor\n"));
-#line 86 "../init.c"
+#line 81 "../init.c"
puts(_("\tThis exceeds the compiled library version: "));
-#line 84 "../init.c"
+#line 79 "../init.c"
puts(_("Automated Options Processing Error!\n"
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
-#line 80 "../autoopts.c"
+#line 78 "../autoopts.c"
puts(_("realloc of %d bytes at 0x%p failed\n"));
-#line 88 "../init.c"
+#line 83 "../init.c"
puts(_("\tThis is less than the minimum library version: "));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
- "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 87 "../makeshell.c"
+ "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
+#line 49 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
-#line 292 "../usage.c"
+#line 241 "../usage.c"
puts(_("could not locate the 'help' option"));
-#line 336 "../autoopts.c"
+#line 330 "../autoopts.c"
puts(_("optionProcess() was called with invalid data"));
-#line 748 "../usage.c"
+#line 697 "../usage.c"
puts(_("invalid argument type specified"));
-#line 598 "../find.c"
+#line 568 "../find.c"
puts(_("defaulted to option with optional arg"));
#line 76 "../alias.c"
puts(_("aliasing option is out of range."));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
-#line 108 "../find.c"
+#line 78 "../find.c"
puts(_(" The following options match:\n"));
-#line 293 "../find.c"
+#line 263 "../find.c"
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
#line 161 "../check.c"
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 94 "../makeshell.c"
+#line 56 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 306 "../makeshell.c"
+#line 268 "../makeshell.c"
puts(_("interprocess pipe"));
-#line 168 "../version.c"
+#line 171 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
"\t'n' - version and full copyright notice\n"));
#line 58 "../check.c"
puts(_("%s error: the '%s' and '%s' options conflict\n"));
-#line 217 "../find.c"
+#line 187 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
-#line 430 "../find.c"
+#line 400 "../find.c"
puts(_("%s: The '%s' option has been disabled."));
#line 38 "../alias.c"
puts(_("-equivalence"));
-#line 469 "../find.c"
+#line 439 "../find.c"
puts(_("%s: illegal option -- %c\n"));
#line 110 "../reset.c"
puts(_("%s: illegal option -- %c\n"));
-#line 271 "../find.c"
+#line 241 "../find.c"
puts(_("%s: illegal option -- %s\n"));
-#line 755 "../find.c"
+#line 740 "../find.c"
puts(_("%s: illegal option -- %s\n"));
#line 118 "../reset.c"
puts(_("%s: illegal option -- %s\n"));
-#line 335 "../find.c"
+#line 305 "../find.c"
puts(_("%s: unknown vendor extension option -- %s\n"));
-#line 159 "../enum.c"
+#line 135 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 169 "../enum.c"
+#line 145 "../enum.c"
puts(_(" or an integer from %d through %d\n"));
-#line 747 "../usage.c"
+#line 696 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 1081 "../usage.c"
+#line 1030 "../usage.c"
puts(_("%s error: invalid option descriptor for %s\n"));
-#line 385 "../find.c"
+#line 355 "../find.c"
puts(_("%s: invalid option name: %s\n"));
-#line 527 "../find.c"
+#line 497 "../find.c"
puts(_("%s: The '%s' option requires an argument.\n"));
-#line 156 "../autoopts.c"
+#line 150 "../autoopts.c"
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
"\t'%s' and '%s'."));
#line 94 "../check.c"
puts(_("%s error: The %s option is required\n"));
-#line 632 "../find.c"
+#line 602 "../find.c"
puts(_("%s: The '%s' option cannot have an argument.\n"));
#line 151 "../check.c"
puts(_("%s: Command line arguments are not allowed.\n"));
-#line 535 "../save.c"
+#line 568 "../save.c"
puts(_("error %d (%s) creating %s\n"));
-#line 234 "../enum.c"
+#line 210 "../enum.c"
puts(_("%s error: '%s' does not match any %s keywords.\n"));
#line 93 "../reset.c"
puts(_("%s error: The '%s' option requires an argument.\n"));
-#line 184 "../save.c"
+#line 122 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
-#line 238 "../save.c"
+#line 175 "../save.c"
puts(_("error %d (%s) stat-ing %s\n"));
#line 143 "../restore.c"
puts(_("%s error: no saved option state\n"));
-#line 231 "../autoopts.c"
+#line 225 "../autoopts.c"
puts(_("'%s' is not a command line option.\n"));
-#line 111 "../time.c"
+#line 113 "../time.c"
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
-#line 132 "../save.c"
- puts(_("'%s' not defined\n"));
#line 50 "../time.c"
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
#line 92 "../check.c"
puts(_("%s error: The %s option must appear %d times.\n"));
-#line 164 "../numeric.c"
+#line 165 "../numeric.c"
puts(_("%s error: '%s' is not a recognizable number.\n"));
-#line 200 "../enum.c"
+#line 176 "../enum.c"
puts(_("%s error: %s exceeds %s keyword count\n"));
-#line 330 "../usage.c"
+#line 279 "../usage.c"
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("standard output"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard output"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard output"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard output"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard output"));
-#line 274 "../usage.c"
+#line 223 "../usage.c"
puts(_("standard error"));
-#line 415 "../usage.c"
+#line 364 "../usage.c"
puts(_("standard error"));
-#line 625 "../usage.c"
+#line 574 "../usage.c"
puts(_("standard error"));
-#line 175 "../version.c"
+#line 178 "../version.c"
puts(_("standard error"));
-#line 208 "../makeshell.c"
+#line 170 "../makeshell.c"
puts(_("write"));
-#line 943 "../makeshell.c"
+#line 905 "../makeshell.c"
puts(_("write"));
-#line 273 "../usage.c"
+#line 222 "../usage.c"
puts(_("write"));
-#line 414 "../usage.c"
+#line 363 "../usage.c"
puts(_("write"));
-#line 624 "../usage.c"
+#line 573 "../usage.c"
puts(_("write"));
-#line 174 "../version.c"
+#line 177 "../version.c"
puts(_("write"));
#line 60 "../numeric.c"
puts(_("%s error: %s option value %ld is out of range.\n"));
#line 44 "../check.c"
puts(_("%s error: %s option requires the %s option\n"));
-#line 131 "../save.c"
+#line 121 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 183 "../save.c"
+#line 174 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 237 "../save.c"
+#line 193 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 256 "../save.c"
- puts(_("%s warning: cannot save options - %s not regular file\n"));
-#line 534 "../save.c"
+#line 567 "../save.c"
puts(_("%s warning: cannot save options - %s not regular file\n"));
/* END-LIBOPTS-MESSAGES */
/* USAGE-TEXT: */
-#line 873 "../usage.c"
+#line 822 "../usage.c"
puts(_("\t\t\t\t- an alternate for '%s'\n"));
-#line 1148 "../usage.c"
+#line 1097 "../usage.c"
puts(_("Version, usage and configuration options:"));
-#line 924 "../usage.c"
+#line 873 "../usage.c"
puts(_("\t\t\t\t- default option for unnamed options\n"));
-#line 837 "../usage.c"
+#line 786 "../usage.c"
puts(_("\t\t\t\t- disabled as '--%s'\n"));
-#line 1117 "../usage.c"
+#line 1066 "../usage.c"
puts(_(" --- %-14s %s\n"));
-#line 1115 "../usage.c"
+#line 1064 "../usage.c"
puts(_("This option has been disabled"));
-#line 864 "../usage.c"
+#line 813 "../usage.c"
puts(_("\t\t\t\t- enabled by default\n"));
#line 40 "../alias.c"
puts(_("%s error: only "));
-#line 1194 "../usage.c"
+#line 1143 "../usage.c"
puts(_(" - examining environment variables named %s_*\n"));
#line 168 "../file.c"
puts(_("\t\t\t\t- file must not pre-exist\n"));
#line 172 "../file.c"
puts(_("\t\t\t\t- file must pre-exist\n"));
-#line 380 "../usage.c"
+#line 329 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 921 "../makeshell.c"
+#line 882 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
"a shell script to parse the options for %s:\n\n"));
-#line 166 "../enum.c"
+#line 142 "../enum.c"
puts(_(" or an integer mask with any of the lower %d bits set\n"));
-#line 897 "../usage.c"
+#line 846 "../usage.c"
puts(_("\t\t\t\t- is a set membership option\n"));
-#line 918 "../usage.c"
+#line 867 "../usage.c"
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
-#line 382 "../usage.c"
+#line 331 "../usage.c"
puts(_("Options are specified by single or double hyphens and their name.\n"));
-#line 904 "../usage.c"
+#line 853 "../usage.c"
puts(_("\t\t\t\t- may appear multiple times\n"));
-#line 891 "../usage.c"
+#line 840 "../usage.c"
puts(_("\t\t\t\t- may not be preset\n"));
-#line 1309 "../usage.c"
+#line 1258 "../usage.c"
puts(_(" Arg Option-Name Description\n"));
-#line 1245 "../usage.c"
+#line 1194 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1303 "../usage.c"
+#line 1252 "../usage.c"
puts(_(" Flg Arg Option-Name Description\n"));
-#line 1304 "../usage.c"
+#line 1253 "../usage.c"
puts(_(" %3s %s"));
-#line 1310 "../usage.c"
+#line 1259 "../usage.c"
puts(_(" %3s %s"));
-#line 387 "../usage.c"
+#line 336 "../usage.c"
puts(_("The '-#<number>' option may omit the hash char\n"));
-#line 383 "../usage.c"
+#line 332 "../usage.c"
puts(_("All arguments are named options.\n"));
-#line 971 "../usage.c"
+#line 920 "../usage.c"
puts(_(" - reading file %s"));
-#line 409 "../usage.c"
+#line 358 "../usage.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
#line 100 "../version.c"
@@ -1662,17 +1662,17 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
#line 129 "../version.c"
puts(_("\n"
"Please send bug reports to: <%s>\n"));
-#line 903 "../usage.c"
+#line 852 "../usage.c"
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
-#line 944 "../usage.c"
+#line 893 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 1192 "../usage.c"
+#line 1141 "../usage.c"
puts(_("\n"
"The following option preset mechanisms are supported:\n"));
-#line 682 "../usage.c"
+#line 631 "../usage.c"
puts(_("prohibits these options:\n"));
-#line 677 "../usage.c"
+#line 626 "../usage.c"
puts(_("prohibits the option '%s'\n"));
#line 81 "../numeric.c"
puts(_("%s%ld to %ld"));
@@ -1690,28 +1690,28 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
#line 77 "../numeric.c"
puts(_("%sless than or equal to %ld"));
-#line 390 "../usage.c"
+#line 339 "../usage.c"
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
-#line 652 "../usage.c"
+#line 601 "../usage.c"
puts(_("requires the option '%s'\n"));
-#line 655 "../usage.c"
+#line 604 "../usage.c"
puts(_("requires these options:\n"));
-#line 1321 "../usage.c"
+#line 1270 "../usage.c"
puts(_(" Arg Option-Name Req? Description\n"));
-#line 1315 "../usage.c"
+#line 1264 "../usage.c"
puts(_(" Flg Arg Option-Name Req? Description\n"));
-#line 167 "../enum.c"
+#line 143 "../enum.c"
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
"will set them all. Multiple entries may be passed as an option\n"
"argument list.\n"));
-#line 910 "../usage.c"
+#line 859 "../usage.c"
puts(_("\t\t\t\t- may appear up to %d times\n"));
-#line 77 "../enum.c"
+#line 52 "../enum.c"
puts(_("The valid \"%s\" option keywords are:\n"));
-#line 1152 "../usage.c"
+#line 1101 "../usage.c"
puts(_("The next option supports vendor supported extra options:"));
-#line 773 "../usage.c"
+#line 722 "../usage.c"
puts(_("These additional options are:"));
/* END-USAGE-TEXT */
}
diff --git a/contrib/ntp/util/ntp-keygen-opts.def b/contrib/ntp/util/ntp-keygen-opts.def
index f89ee334484f..632dbbec778d 100644
--- a/contrib/ntp/util/ntp-keygen-opts.def
+++ b/contrib/ntp/util/ntp-keygen-opts.def
@@ -22,7 +22,7 @@ flag = {
ifdef = AUTOKEY;
descrip = "identity modulus bits";
doc = <<- _EndOfDoc_
- The number of bits in the identity modulus. The default is 256.
+ The number of bits in the identity modulus. The default is 512.
_EndOfDoc_;
};
diff --git a/contrib/ntp/util/ntp-keygen-opts.h b/contrib/ntp/util/ntp-keygen-opts.h
index e17412417f92..8bbd22dcd932 100644
--- a/contrib/ntp/util/ntp-keygen-opts.h
+++ b/contrib/ntp/util/ntp-keygen-opts.h
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed June 23, 2020 at 02:21:03 AM by AutoGen 5.18.5
+ * It has been AutoGen-ed May 31, 2023 at 08:03:00 PM by AutoGen 5.18.16
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 41:1:16 templates.
+ * Generated from AutoOpts 42:1:17 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -18,7 +18,7 @@
* The ntp-keygen program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
+ * Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -45,6 +45,8 @@
#define AUTOOPTS_NTP_KEYGEN_OPTS_H_GUARD 1
#include "config.h"
#include <autoopts/options.h>
+#include <stdarg.h>
+#include <stdnoreturn.h>
/**
* Ensure that the library used for compiling this generated header is at
@@ -53,13 +55,19 @@
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 167937
+#define AO_TEMPLATE_VERSION 172033
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
+#if GCC_VERSION > 40400
+#define NOT_REACHED __builtin_unreachable();
+#else
+#define NOT_REACHED
+#endif
+
/**
* Enumeration of each option type for ntp-keygen
*/
@@ -94,9 +102,9 @@ typedef enum {
/** count of all options for ntp-keygen */
#define OPTION_CT 26
/** ntp-keygen version */
-#define NTP_KEYGEN_VERSION "4.2.8p15"
+#define NTP_KEYGEN_VERSION "4.2.8p16"
/** Full ntp-keygen version text */
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p15"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8p16"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -378,6 +386,7 @@ static inline char* aoGetsText(char const* pz) {
# endif
#endif /* ENABLE_NLS */
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/ntp/util/ntp-keygen.1ntp-keygenman b/contrib/ntp/util/ntp-keygen.1ntp-keygenman
index 8ed9a945b540..235e0b903d81 100644
--- a/contrib/ntp/util/ntp-keygen.1ntp-keygenman
+++ b/contrib/ntp/util/ntp-keygen.1ntp-keygenman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen 1ntp-keygenman "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntp-keygen 1ntp-keygenman "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:08 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:44:05 PM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1132,7 +1132,7 @@ in the range 256 through 2048
.fi
.in -4
.sp
-The number of bits in the identity modulus. The default is 256.
+The number of bits in the identity modulus. The default is 512.
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[], \f\*[B-Font]\-\-certificate\f[]=\f\*[I-Font]scheme\f[]
certificate scheme.
@@ -1351,7 +1351,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
It can take quite a while to generate some cryptographic values.
@@ -1362,7 +1362,7 @@ Please report bugs to http://bugs.ntp.org .
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
Portions of this document came from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc b/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
index 0faf3187b2c5..87ef82e6bb62 100644
--- a/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
+++ b/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:05 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:44:01 PM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1017,7 +1017,7 @@ in the range 256 through 2048
.fi
.in -4
.sp
-The number of bits in the identity modulus. The default is 256.
+The number of bits in the identity modulus. The default is 512.
.It Fl c Ar scheme , Fl \-certificate Ns = Ns Ar scheme
certificate scheme.
.sp
@@ -1208,14 +1208,14 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
It can take quite a while to generate some cryptographic values.
.Pp
Please report bugs to http://bugs.ntp.org .
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
Portions of this document came from FreeBSD.
.Pp
diff --git a/contrib/ntp/util/ntp-keygen.c b/contrib/ntp/util/ntp-keygen.c
index eb2cb34f7ed7..ff9d6cad8980 100644
--- a/contrib/ntp/util/ntp-keygen.c
+++ b/contrib/ntp/util/ntp-keygen.c
@@ -121,7 +121,7 @@
#define MD5SIZE 20 /* maximum key size */
#ifdef AUTOKEY
#define PLEN 512 /* default prime modulus size (bits) */
-#define ILEN 256 /* default identity modulus size (bits) */
+#define ILEN 512 /* default identity modulus size (bits) */
#define MVMAX 100 /* max MV parameters */
/*
@@ -266,7 +266,7 @@ InitWin32Sockets() {
/*
* followlink() - replace filename with its target if symlink.
*
- * Some readlink() implementations do not null-terminate the result.
+ * readlink() does not null-terminate the result.
*/
void
followlink(
@@ -274,18 +274,22 @@ followlink(
size_t bufsiz
)
{
- int len;
+ ssize_t len;
+ char * target;
- REQUIRE(bufsiz > 0);
+ REQUIRE(bufsiz > 0 && bufsiz <= SSIZE_MAX);
- len = readlink(fname, fname, (int)bufsiz);
- if (len < 0 ) {
+ target = emalloc(bufsiz);
+ len = readlink(fname, target, bufsiz);
+ if (len < 0) {
fname[0] = '\0';
return;
}
- if (len > (int)bufsiz - 1)
- len = (int)bufsiz - 1;
+ if ((size_t)len > bufsiz - 1)
+ len = bufsiz - 1;
+ memcpy(fname, target, len);
fname[len] = '\0';
+ free(target);
}
diff --git a/contrib/ntp/util/ntp-keygen.html b/contrib/ntp/util/ntp-keygen.html
index 47daf5e0dfa0..53aabf6c9fb1 100644
--- a/contrib/ntp/util/ntp-keygen.html
+++ b/contrib/ntp/util/ntp-keygen.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Ntp-keygen User&rsquo;s Manual</title>
@@ -16,23 +16,14 @@
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -50,36 +41,34 @@ ul.no-bullet {list-style: none}
-<a name="SEC_Overview"></a>
+<span id="SEC_Overview"></span>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
-<li><a name="stoc-Description-1" href="#toc-Description-1">1 Description</a></li>
+<li><a id="stoc-Description-1" href="#toc-Description-1">1 Description</a></li>
</ul>
</div>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#Description" accesskey="1">Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Description" accesskey="1">Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Invocation" accesskey="2">ntp-keygen Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntp-keygen
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Invocation" accesskey="2">ntp-keygen Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntp-keygen
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Running-the-Program" accesskey="3">Running the Program</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Running-the-Program" accesskey="3">Running the Program</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Random-Seed-File" accesskey="4">Random Seed File</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Random-Seed-File" accesskey="4">Random Seed File</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Cryptographic-Data-Files" accesskey="5">Cryptographic Data Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Cryptographic-Data-Files" accesskey="5">Cryptographic Data Files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#Description" accesskey="n" rel="next">Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div>
-<a name="NTP-Key-Generation-Program-User-Manual"></a>
-<h1 class="top">NTP Key Generation Program User Manual</h1>
+<span id="NTP-Key-Generation-Program-User-Manual"></span><h1 class="top">NTP Key Generation Program User Manual</h1>
<p>This document describes the use of the NTP Project&rsquo;s <code>ntp-keygen</code>
program, that generates cryptographic data files used by the NTPv4
@@ -95,21 +84,19 @@ All other files are in PEM-encoded
printable ASCII format so they can be embedded as MIME attachments in
mail to other sites.
</p>
-<p>This document applies to version 4.2.8p15 of <code>ntp-keygen</code>.
+<p>This document applies to version 4.2.8p16 of <code>ntp-keygen</code>.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#Description" accesskey="1">Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Description" accesskey="1">Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="Description"></a>
-<div class="header">
+<span id="Description"></span><div class="header">
<p>
Next: <a href="#Running-the-Program" accesskey="n" rel="next">Running the Program</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Description-1"></a>
-<h2 class="chapter">1 Description</h2>
+<span id="Description-1"></span><h2 class="chapter">1 Description</h2>
<p>This program generates cryptographic data files used by the NTPv4
authentication and identity schemes. It can generate message digest
@@ -178,24 +165,22 @@ generating host and filestamp,
as described in the <a href="#Cryptographic-Data-Files">Cryptographic Data Files</a> section below.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#Running-the-Program" accesskey="1">Running the Program</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Running-the-Program" accesskey="1">Running the Program</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Invocation" accesskey="2">ntp-keygen Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Invocation" accesskey="2">Invoking ntp-keygen</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Random-Seed-File" accesskey="3">Random Seed File</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Random-Seed-File" accesskey="3">Random Seed File</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#Cryptographic-Data-Files" accesskey="4">Cryptographic Data Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#Cryptographic-Data-Files" accesskey="4">Cryptographic Data Files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<hr>
-<a name="Running-the-Program"></a>
-<div class="header">
+<span id="Running-the-Program"></span><div class="header">
<p>
Next: <a href="#Random-Seed-File" accesskey="n" rel="next">Random Seed File</a>, Previous: <a href="#Description" accesskey="p" rel="prev">Description</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Running-the-Program-1"></a>
-<h3 class="section">1.1 Running the Program</h3>
+<span id="Running-the-Program-1"></span><h3 class="section">1.1 Running the Program</h3>
<p>To test and gain experience with Autokey concepts, log in as root and
change to the keys directory, usually <code>/usr/local/etc</code>.
@@ -243,15 +228,13 @@ certificate should be re-generated.
Autokey Public-Key Authentication page.
</p>
<hr>
-<a name="ntp_002dkeygen-Invocation"></a>
-<div class="header">
+<span id="ntp_002dkeygen-Invocation"></span><div class="header">
<p>
Next: <a href="#Random-Seed-File" accesskey="n" rel="next">Random Seed File</a>, Previous: <a href="#Running-the-Program" accesskey="p" rel="prev">Running the Program</a>, Up: <a href="#Description" accesskey="u" rel="up">Description</a> &nbsp; </p>
</div>
-<a name="Invoking-ntp_002dkeygen"></a>
-<h3 class="section">1.2 Invoking ntp-keygen</h3>
-<a name="index-ntp_002dkeygen"></a>
-<a name="index-Create-a-NTP-host-key"></a>
+<span id="Invoking-ntp_002dkeygen"></span><h3 class="section">1.2 Invoking ntp-keygen</h3>
+<span id="index-ntp_002dkeygen"></span>
+<span id="index-Create-a-NTP-host-key"></span>
@@ -364,60 +347,59 @@ as described in the
section below.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-usage" accesskey="1">ntp-keygen usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-usage" accesskey="1">ntp-keygen help/usage (<samp>--help</samp>)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-imbits" accesskey="2">ntp-keygen imbits</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-imbits" accesskey="2">imbits option (-b)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-certificate" accesskey="3">ntp-keygen certificate</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-certificate" accesskey="3">certificate option (-c)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-cipher" accesskey="4">ntp-keygen cipher</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-cipher" accesskey="4">cipher option (-C)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-id_002dkey" accesskey="5">ntp-keygen id-key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-id_002dkey" accesskey="5">id-key option (-e)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-gq_002dparams" accesskey="6">ntp-keygen gq-params</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-gq_002dparams" accesskey="6">gq-params option (-G)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-host_002dkey" accesskey="7">ntp-keygen host-key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-host_002dkey" accesskey="7">host-key option (-H)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-iffkey" accesskey="8">ntp-keygen iffkey</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-iffkey" accesskey="8">iffkey option (-I)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-ident" accesskey="9">ntp-keygen ident</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-ident" accesskey="9">ident option (-i)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-lifetime">lifetime option (-l)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-modulus">modulus option (-m)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-md5key">md5key option (-M)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-pvt_002dcert">pvt-cert option (-P)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-password">ntp-keygen password</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-password">password option (-p)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-export_002dpasswd">export-passwd option (-q)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-subject_002dname">subject-name option (-s)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-sign_002dkey">sign-key option (-S)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-trusted_002dcert">trusted-cert option (-T)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dparams">mv-params option (-V)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dkeys">mv-keys option (-v)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-config">ntp-keygen config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-config">presetting/configuring ntp-keygen</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
-<a name="Running-the-Program-2"></a>
-<h4 class="subsection">1.2.1 Running the Program</h4>
+<span id="Running-the-Program-2"></span><h4 class="subsection">1.2.1 Running the Program</h4>
<p>The safest way to run the
<code>ntp-keygen</code>
program is logged in directly as root.
@@ -649,8 +631,7 @@ To further reduce the risk of misconfiguration,
the first two lines of a file contain the file name
and generation date and time as comments.
</p>
-<a name="Trusted-Hosts-and-Groups"></a>
-<h4 class="subsubsection">1.2.1.1 Trusted Hosts and Groups</h4>
+<span id="Trusted-Hosts-and-Groups"></span><h4 class="subsubsection">1.2.1.1 Trusted Hosts and Groups</h4>
<p>Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
@@ -738,8 +719,7 @@ is restarted, it loads any new files and restarts the protocol.
Other dependent hosts will continue as usual until signatures are refreshed,
at which time the protocol is restarted.
</p>
-<a name="Identity-Schemes"></a>
-<h4 class="subsubsection">1.2.1.2 Identity Schemes</h4>
+<span id="Identity-Schemes"></span><h4 class="subsubsection">1.2.1.2 Identity Schemes</h4>
<p>As mentioned on the Autonomous Authentication page,
the default
<code>TC</code>
@@ -912,8 +892,7 @@ As the
scheme is independent of keys and certificates,
these files can be refreshed as needed.
</p>
-<a name="Command-Line-Options"></a>
-<h4 class="subsubsection">1.2.1.3 Command Line Options</h4>
+<span id="Command-Line-Options"></span><h4 class="subsubsection">1.2.1.3 Command Line Options</h4>
<dl compact="compact">
<dt><code>-b</code> <code>--imbits</code>= <kbd>modulus</kbd></dt>
<dd><p>Set the number of bits in the identity modulus for generating identity keys to
@@ -1132,8 +1111,7 @@ Note: support for this option should be considered a work in progress.
</p></dd>
</dl>
-<a name="Random-Seed-File-1"></a>
-<h4 class="subsubsection">1.2.1.4 Random Seed File</h4>
+<span id="Random-Seed-File-1"></span><h4 class="subsubsection">1.2.1.4 Random Seed File</h4>
<p>All cryptographically sound key generation schemes must have means
to randomize the entropy seed used to initialize
the internal pseudo-random number generator used
@@ -1192,8 +1170,7 @@ If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
</p>
-<a name="Cryptographic-Data-Files-1"></a>
-<h4 class="subsubsection">1.2.1.5 Cryptographic Data Files</h4>
+<span id="Cryptographic-Data-Files-1"></span><h4 class="subsubsection">1.2.1.5 Cryptographic Data Files</h4>
<p>All file formats begin with two nonencrypted lines.
The first line contains the file name, including the generated host name
and filestamp, in the format
@@ -1332,67 +1309,65 @@ using the <code>agtexi-cmd</code> template and the option descriptions for the <
This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-usage" accesskey="1">ntp-keygen usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntp-keygen help/usage (<samp>--help</samp>)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-usage" accesskey="1">ntp-keygen usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntp-keygen help/usage (<samp>--help</samp>)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-imbits" accesskey="2">ntp-keygen imbits</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">imbits option (-b)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-imbits" accesskey="2">ntp-keygen imbits</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">imbits option (-b)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-certificate" accesskey="3">ntp-keygen certificate</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">certificate option (-c)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-certificate" accesskey="3">ntp-keygen certificate</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">certificate option (-c)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-cipher" accesskey="4">ntp-keygen cipher</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">cipher option (-C)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-cipher" accesskey="4">ntp-keygen cipher</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">cipher option (-C)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-id_002dkey" accesskey="5">ntp-keygen id-key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">id-key option (-e)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-id_002dkey" accesskey="5">ntp-keygen id-key</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">id-key option (-e)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-gq_002dparams" accesskey="6">ntp-keygen gq-params</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">gq-params option (-G)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-gq_002dparams" accesskey="6">ntp-keygen gq-params</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">gq-params option (-G)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-host_002dkey" accesskey="7">ntp-keygen host-key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host-key option (-H)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-host_002dkey" accesskey="7">ntp-keygen host-key</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">host-key option (-H)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-iffkey" accesskey="8">ntp-keygen iffkey</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">iffkey option (-I)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-iffkey" accesskey="8">ntp-keygen iffkey</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">iffkey option (-I)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-ident" accesskey="9">ntp-keygen ident</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ident option (-i)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-ident" accesskey="9">ntp-keygen ident</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ident option (-i)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">lifetime option (-l)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">lifetime option (-l)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">modulus option (-m)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">modulus option (-m)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">md5key option (-M)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">md5key option (-M)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pvt-cert option (-P)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">pvt-cert option (-P)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-password">ntp-keygen password</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">password option (-p)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-password">ntp-keygen password</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">password option (-p)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">export-passwd option (-q)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">export-passwd option (-q)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">subject-name option (-s)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">subject-name option (-s)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sign-key option (-S)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sign-key option (-S)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">trusted-cert option (-T)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">trusted-cert option (-T)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mv-params option (-V)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mv-params option (-V)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mv-keys option (-v)
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">mv-keys option (-v)
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-config">ntp-keygen config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntp-keygen
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-config">ntp-keygen config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntp-keygen
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
</td></tr>
-<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
+<tr><td align="left" valign="top">&bull; <a href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
</td></tr>
</table>
<hr>
-<a name="ntp_002dkeygen-usage"></a>
-<div class="header">
+<span id="ntp_002dkeygen-usage"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-imbits" accesskey="n" rel="next">ntp-keygen imbits</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dkeygen-help_002fusage-_0028_002d_002dhelp_0029"></a>
-<h4 class="subsection">1.2.2 ntp-keygen help/usage (<samp>--help</samp>)</h4>
-<a name="index-ntp_002dkeygen-help"></a>
+<span id="ntp_002dkeygen-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.2.2 ntp-keygen help/usage (<samp>--help</samp>)</h4>
+<span id="index-ntp_002dkeygen-help"></span>
<p>This is the automatically generated usage text for ntp-keygen.
</p>
@@ -1405,7 +1380,7 @@ used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p14
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p16
Usage: ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
@@ -1452,18 +1427,16 @@ The following option preset mechanisms are supported:
- reading file ./.ntprc
- examining environment variables named NTP_KEYGEN_*
-Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+Please send bug reports to: &lt;https://bugs.ntp.org, bugs@ntp.org&gt;
</pre></div>
<hr>
-<a name="ntp_002dkeygen-imbits"></a>
-<div class="header">
+<span id="ntp_002dkeygen-imbits"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-certificate" accesskey="n" rel="next">ntp-keygen certificate</a>, Previous: <a href="#ntp_002dkeygen-usage" accesskey="p" rel="prev">ntp-keygen usage</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="imbits-option-_0028_002db_0029"></a>
-<h4 class="subsection">1.2.3 imbits option (-b)</h4>
-<a name="index-ntp_002dkeygen_002dimbits"></a>
+<span id="imbits-option-_0028_002db_0029"></span><h4 class="subsection">1.2.3 imbits option (-b)</h4>
+<span id="index-ntp_002dkeygen_002dimbits"></span>
<p>This is the &ldquo;identity modulus bits&rdquo; option.
This option takes a number argument <samp>imbits</samp>.
@@ -1473,16 +1446,14 @@ This option takes a number argument <samp>imbits</samp>.
<li> must be compiled in by defining <code>AUTOKEY</code> during the compilation.
</li></ul>
-<p>The number of bits in the identity modulus. The default is 256.
+<p>The number of bits in the identity modulus. The default is 512.
</p><hr>
-<a name="ntp_002dkeygen-certificate"></a>
-<div class="header">
+<span id="ntp_002dkeygen-certificate"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-cipher" accesskey="n" rel="next">ntp-keygen cipher</a>, Previous: <a href="#ntp_002dkeygen-imbits" accesskey="p" rel="prev">ntp-keygen imbits</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="certificate-option-_0028_002dc_0029"></a>
-<h4 class="subsection">1.2.4 certificate option (-c)</h4>
-<a name="index-ntp_002dkeygen_002dcertificate"></a>
+<span id="certificate-option-_0028_002dc_0029"></span><h4 class="subsection">1.2.4 certificate option (-c)</h4>
+<span id="index-ntp_002dkeygen_002dcertificate"></span>
<p>This is the &ldquo;certificate scheme&rdquo; option.
This option takes a string argument <samp>scheme</samp>.
@@ -1501,14 +1472,12 @@ Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA-MD5.
</p><hr>
-<a name="ntp_002dkeygen-cipher"></a>
-<div class="header">
+<span id="ntp_002dkeygen-cipher"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-id_002dkey" accesskey="n" rel="next">ntp-keygen id-key</a>, Previous: <a href="#ntp_002dkeygen-certificate" accesskey="p" rel="prev">ntp-keygen certificate</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="cipher-option-_0028_002dC_0029"></a>
-<h4 class="subsection">1.2.5 cipher option (-C)</h4>
-<a name="index-ntp_002dkeygen_002dcipher"></a>
+<span id="cipher-option-_0028_002dC_0029"></span><h4 class="subsection">1.2.5 cipher option (-C)</h4>
+<span id="index-ntp_002dkeygen_002dcipher"></span>
<p>This is the &ldquo;privatekey cipher&rdquo; option.
This option takes a string argument <samp>cipher</samp>.
@@ -1523,14 +1492,12 @@ private keys. The default is three-key triple DES in CBC mode,
equivalent to &quot;<code>-C des-ede3-cbc</code>&quot;. The openssl tool lists ciphers
available in &quot;<code>openssl -h</code>&quot; output.
</p><hr>
-<a name="ntp_002dkeygen-id_002dkey"></a>
-<div class="header">
+<span id="ntp_002dkeygen-id_002dkey"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-gq_002dparams" accesskey="n" rel="next">ntp-keygen gq-params</a>, Previous: <a href="#ntp_002dkeygen-cipher" accesskey="p" rel="prev">ntp-keygen cipher</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="id_002dkey-option-_0028_002de_0029"></a>
-<h4 class="subsection">1.2.6 id-key option (-e)</h4>
-<a name="index-ntp_002dkeygen_002did_002dkey"></a>
+<span id="id_002dkey-option-_0028_002de_0029"></span><h4 class="subsection">1.2.6 id-key option (-e)</h4>
+<span id="index-ntp_002dkeygen_002did_002dkey"></span>
<p>This is the &ldquo;write iff or gq identity keys&rdquo; option.
</p>
@@ -1543,14 +1510,12 @@ Next: <a href="#ntp_002dkeygen-gq_002dparams" accesskey="n" rel="next">ntp-keyge
the standard output.
This is intended for automatic key distribution by email.
</p><hr>
-<a name="ntp_002dkeygen-gq_002dparams"></a>
-<div class="header">
+<span id="ntp_002dkeygen-gq_002dparams"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-host_002dkey" accesskey="n" rel="next">ntp-keygen host-key</a>, Previous: <a href="#ntp_002dkeygen-id_002dkey" accesskey="p" rel="prev">ntp-keygen id-key</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="gq_002dparams-option-_0028_002dG_0029"></a>
-<h4 class="subsection">1.2.7 gq-params option (-G)</h4>
-<a name="index-ntp_002dkeygen_002dgq_002dparams"></a>
+<span id="gq_002dparams-option-_0028_002dG_0029"></span><h4 class="subsection">1.2.7 gq-params option (-G)</h4>
+<span id="index-ntp_002dkeygen_002dgq_002dparams"></span>
<p>This is the &ldquo;generate gq parameters and keys&rdquo; option.
</p>
@@ -1562,14 +1527,12 @@ Next: <a href="#ntp_002dkeygen-host_002dkey" accesskey="n" rel="next">ntp-keygen
<p>Generate parameters and keys for the GQ identification scheme,
obsoleting any that may exist.
</p><hr>
-<a name="ntp_002dkeygen-host_002dkey"></a>
-<div class="header">
+<span id="ntp_002dkeygen-host_002dkey"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-iffkey" accesskey="n" rel="next">ntp-keygen iffkey</a>, Previous: <a href="#ntp_002dkeygen-gq_002dparams" accesskey="p" rel="prev">ntp-keygen gq-params</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="host_002dkey-option-_0028_002dH_0029"></a>
-<h4 class="subsection">1.2.8 host-key option (-H)</h4>
-<a name="index-ntp_002dkeygen_002dhost_002dkey"></a>
+<span id="host_002dkey-option-_0028_002dH_0029"></span><h4 class="subsection">1.2.8 host-key option (-H)</h4>
+<span id="index-ntp_002dkeygen_002dhost_002dkey"></span>
<p>This is the &ldquo;generate rsa host key&rdquo; option.
</p>
@@ -1580,14 +1543,12 @@ Next: <a href="#ntp_002dkeygen-iffkey" accesskey="n" rel="next">ntp-keygen iffke
<p>Generate new host keys, obsoleting any that may exist.
</p><hr>
-<a name="ntp_002dkeygen-iffkey"></a>
-<div class="header">
+<span id="ntp_002dkeygen-iffkey"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-ident" accesskey="n" rel="next">ntp-keygen ident</a>, Previous: <a href="#ntp_002dkeygen-host_002dkey" accesskey="p" rel="prev">ntp-keygen host-key</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="iffkey-option-_0028_002dI_0029"></a>
-<h4 class="subsection">1.2.9 iffkey option (-I)</h4>
-<a name="index-ntp_002dkeygen_002diffkey"></a>
+<span id="iffkey-option-_0028_002dI_0029"></span><h4 class="subsection">1.2.9 iffkey option (-I)</h4>
+<span id="index-ntp_002dkeygen_002diffkey"></span>
<p>This is the &ldquo;generate iff parameters&rdquo; option.
</p>
@@ -1599,14 +1560,12 @@ Next: <a href="#ntp_002dkeygen-ident" accesskey="n" rel="next">ntp-keygen ident<
<p>Generate parameters for the IFF identification scheme, obsoleting
any that may exist.
</p><hr>
-<a name="ntp_002dkeygen-ident"></a>
-<div class="header">
+<span id="ntp_002dkeygen-ident"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-lifetime" accesskey="n" rel="next">ntp-keygen lifetime</a>, Previous: <a href="#ntp_002dkeygen-iffkey" accesskey="p" rel="prev">ntp-keygen iffkey</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="ident-option-_0028_002di_0029"></a>
-<h4 class="subsection">1.2.10 ident option (-i)</h4>
-<a name="index-ntp_002dkeygen_002dident"></a>
+<span id="ident-option-_0028_002di_0029"></span><h4 class="subsection">1.2.10 ident option (-i)</h4>
+<span id="index-ntp_002dkeygen_002dident"></span>
<p>This is the &ldquo;set autokey group name&rdquo; option.
This option takes a string argument <samp>group</samp>.
@@ -1626,14 +1585,12 @@ issuer names in the form <code>host@group</code> and should match the
&rsquo;<code>crypto ident</code>&rsquo; or &rsquo;<code>server ident</code>&rsquo; configuration in the
<code>ntpd</code> configuration file.
</p><hr>
-<a name="ntp_002dkeygen-lifetime"></a>
-<div class="header">
+<span id="ntp_002dkeygen-lifetime"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-modulus" accesskey="n" rel="next">ntp-keygen modulus</a>, Previous: <a href="#ntp_002dkeygen-ident" accesskey="p" rel="prev">ntp-keygen ident</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="lifetime-option-_0028_002dl_0029"></a>
-<h4 class="subsection">1.2.11 lifetime option (-l)</h4>
-<a name="index-ntp_002dkeygen_002dlifetime"></a>
+<span id="lifetime-option-_0028_002dl_0029"></span><h4 class="subsection">1.2.11 lifetime option (-l)</h4>
+<span id="index-ntp_002dkeygen_002dlifetime"></span>
<p>This is the &ldquo;set certificate lifetime&rdquo; option.
This option takes a number argument <samp>lifetime</samp>.
@@ -1645,14 +1602,12 @@ This option takes a number argument <samp>lifetime</samp>.
<p>Set the certificate expiration to lifetime days from now.
</p><hr>
-<a name="ntp_002dkeygen-modulus"></a>
-<div class="header">
+<span id="ntp_002dkeygen-modulus"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-md5key" accesskey="n" rel="next">ntp-keygen md5key</a>, Previous: <a href="#ntp_002dkeygen-lifetime" accesskey="p" rel="prev">ntp-keygen lifetime</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="modulus-option-_0028_002dm_0029"></a>
-<h4 class="subsection">1.2.12 modulus option (-m)</h4>
-<a name="index-ntp_002dkeygen_002dmodulus"></a>
+<span id="modulus-option-_0028_002dm_0029"></span><h4 class="subsection">1.2.12 modulus option (-m)</h4>
+<span id="index-ntp_002dkeygen_002dmodulus"></span>
<p>This is the &ldquo;prime modulus&rdquo; option.
This option takes a number argument <samp>modulus</samp>.
@@ -1664,26 +1619,22 @@ This option takes a number argument <samp>modulus</samp>.
<p>The number of bits in the prime modulus. The default is 512.
</p><hr>
-<a name="ntp_002dkeygen-md5key"></a>
-<div class="header">
+<span id="ntp_002dkeygen-md5key"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-pvt_002dcert" accesskey="n" rel="next">ntp-keygen pvt-cert</a>, Previous: <a href="#ntp_002dkeygen-modulus" accesskey="p" rel="prev">ntp-keygen modulus</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="md5key-option-_0028_002dM_0029"></a>
-<h4 class="subsection">1.2.13 md5key option (-M)</h4>
-<a name="index-ntp_002dkeygen_002dmd5key"></a>
+<span id="md5key-option-_0028_002dM_0029"></span><h4 class="subsection">1.2.13 md5key option (-M)</h4>
+<span id="index-ntp_002dkeygen_002dmd5key"></span>
<p>This is the &ldquo;generate symmetric keys&rdquo; option.
Generate symmetric keys, obsoleting any that may exist.
</p><hr>
-<a name="ntp_002dkeygen-pvt_002dcert"></a>
-<div class="header">
+<span id="ntp_002dkeygen-pvt_002dcert"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-password" accesskey="n" rel="next">ntp-keygen password</a>, Previous: <a href="#ntp_002dkeygen-md5key" accesskey="p" rel="prev">ntp-keygen md5key</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="pvt_002dcert-option-_0028_002dP_0029"></a>
-<h4 class="subsection">1.2.14 pvt-cert option (-P)</h4>
-<a name="index-ntp_002dkeygen_002dpvt_002dcert"></a>
+<span id="pvt_002dcert-option-_0028_002dP_0029"></span><h4 class="subsection">1.2.14 pvt-cert option (-P)</h4>
+<span id="index-ntp_002dkeygen_002dpvt_002dcert"></span>
<p>This is the &ldquo;generate pc private certificate&rdquo; option.
</p>
@@ -1695,14 +1646,12 @@ Next: <a href="#ntp_002dkeygen-password" accesskey="n" rel="next">ntp-keygen pas
<p>Generate a private certificate. By default, the program generates
public certificates.
</p><hr>
-<a name="ntp_002dkeygen-password"></a>
-<div class="header">
+<span id="ntp_002dkeygen-password"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-export_002dpasswd" accesskey="n" rel="next">ntp-keygen export-passwd</a>, Previous: <a href="#ntp_002dkeygen-pvt_002dcert" accesskey="p" rel="prev">ntp-keygen pvt-cert</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="password-option-_0028_002dp_0029"></a>
-<h4 class="subsection">1.2.15 password option (-p)</h4>
-<a name="index-ntp_002dkeygen_002dpassword"></a>
+<span id="password-option-_0028_002dp_0029"></span><h4 class="subsection">1.2.15 password option (-p)</h4>
+<span id="index-ntp_002dkeygen_002dpassword"></span>
<p>This is the &ldquo;local private password&rdquo; option.
This option takes a string argument <samp>passwd</samp>.
@@ -1718,14 +1667,12 @@ must be specified to the local ntpd via the &quot;crypto pw password&quot;
configuration command. The default password is the local
hostname.
</p><hr>
-<a name="ntp_002dkeygen-export_002dpasswd"></a>
-<div class="header">
+<span id="ntp_002dkeygen-export_002dpasswd"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-subject_002dname" accesskey="n" rel="next">ntp-keygen subject-name</a>, Previous: <a href="#ntp_002dkeygen-password" accesskey="p" rel="prev">ntp-keygen password</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="export_002dpasswd-option-_0028_002dq_0029"></a>
-<h4 class="subsection">1.2.16 export-passwd option (-q)</h4>
-<a name="index-ntp_002dkeygen_002dexport_002dpasswd"></a>
+<span id="export_002dpasswd-option-_0028_002dq_0029"></span><h4 class="subsection">1.2.16 export-passwd option (-q)</h4>
+<span id="index-ntp_002dkeygen_002dexport_002dpasswd"></span>
<p>This is the &ldquo;export iff or gq group keys with password&rdquo; option.
This option takes a string argument <samp>passwd</samp>.
@@ -1741,14 +1688,12 @@ The same password must be specified to the remote ntpd via the
&quot;crypto pw password&quot; configuration command. See also the option
&ndash;id-key (-e) for unencrypted exports.
</p><hr>
-<a name="ntp_002dkeygen-subject_002dname"></a>
-<div class="header">
+<span id="ntp_002dkeygen-subject_002dname"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-sign_002dkey" accesskey="n" rel="next">ntp-keygen sign-key</a>, Previous: <a href="#ntp_002dkeygen-export_002dpasswd" accesskey="p" rel="prev">ntp-keygen export-passwd</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="subject_002dname-option-_0028_002ds_0029"></a>
-<h4 class="subsection">1.2.17 subject-name option (-s)</h4>
-<a name="index-ntp_002dkeygen_002dsubject_002dname"></a>
+<span id="subject_002dname-option-_0028_002ds_0029"></span><h4 class="subsection">1.2.17 subject-name option (-s)</h4>
+<span id="index-ntp_002dkeygen_002dsubject_002dname"></span>
<p>This is the &ldquo;set host and optionally group name&rdquo; option.
This option takes a string argument <samp>host@group</samp>.
@@ -1769,14 +1714,12 @@ subject and issuer fields, as with <code>-i group</code>. The group name, or
if not provided, the host name are also used in the file names
of IFF, GQ, and MV client parameter files.
</p><hr>
-<a name="ntp_002dkeygen-sign_002dkey"></a>
-<div class="header">
+<span id="ntp_002dkeygen-sign_002dkey"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-trusted_002dcert" accesskey="n" rel="next">ntp-keygen trusted-cert</a>, Previous: <a href="#ntp_002dkeygen-subject_002dname" accesskey="p" rel="prev">ntp-keygen subject-name</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="sign_002dkey-option-_0028_002dS_0029"></a>
-<h4 class="subsection">1.2.18 sign-key option (-S)</h4>
-<a name="index-ntp_002dkeygen_002dsign_002dkey"></a>
+<span id="sign_002dkey-option-_0028_002dS_0029"></span><h4 class="subsection">1.2.18 sign-key option (-S)</h4>
+<span id="index-ntp_002dkeygen_002dsign_002dkey"></span>
<p>This is the &ldquo;generate sign key (rsa or dsa)&rdquo; option.
This option takes a string argument <samp>sign</samp>.
@@ -1790,14 +1733,12 @@ This option takes a string argument <samp>sign</samp>.
that may exist. By default, the program uses the host key as the
sign key.
</p><hr>
-<a name="ntp_002dkeygen-trusted_002dcert"></a>
-<div class="header">
+<span id="ntp_002dkeygen-trusted_002dcert"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-mv_002dparams" accesskey="n" rel="next">ntp-keygen mv-params</a>, Previous: <a href="#ntp_002dkeygen-sign_002dkey" accesskey="p" rel="prev">ntp-keygen sign-key</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="trusted_002dcert-option-_0028_002dT_0029"></a>
-<h4 class="subsection">1.2.19 trusted-cert option (-T)</h4>
-<a name="index-ntp_002dkeygen_002dtrusted_002dcert"></a>
+<span id="trusted_002dcert-option-_0028_002dT_0029"></span><h4 class="subsection">1.2.19 trusted-cert option (-T)</h4>
+<span id="index-ntp_002dkeygen_002dtrusted_002dcert"></span>
<p>This is the &ldquo;trusted certificate (tc scheme)&rdquo; option.
</p>
@@ -1809,14 +1750,12 @@ Next: <a href="#ntp_002dkeygen-mv_002dparams" accesskey="n" rel="next">ntp-keyge
<p>Generate a trusted certificate. By default, the program generates
a non-trusted certificate.
</p><hr>
-<a name="ntp_002dkeygen-mv_002dparams"></a>
-<div class="header">
+<span id="ntp_002dkeygen-mv_002dparams"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-mv_002dkeys" accesskey="n" rel="next">ntp-keygen mv-keys</a>, Previous: <a href="#ntp_002dkeygen-trusted_002dcert" accesskey="p" rel="prev">ntp-keygen trusted-cert</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="mv_002dparams-option-_0028_002dV_0029"></a>
-<h4 class="subsection">1.2.20 mv-params option (-V)</h4>
-<a name="index-ntp_002dkeygen_002dmv_002dparams"></a>
+<span id="mv_002dparams-option-_0028_002dV_0029"></span><h4 class="subsection">1.2.20 mv-params option (-V)</h4>
+<span id="index-ntp_002dkeygen_002dmv_002dparams"></span>
<p>This is the &ldquo;generate &lt;num&gt; mv parameters&rdquo; option.
This option takes a number argument <samp>num</samp>.
@@ -1829,14 +1768,12 @@ This option takes a number argument <samp>num</samp>.
<p>Generate parameters and keys for the Mu-Varadharajan (MV)
identification scheme.
</p><hr>
-<a name="ntp_002dkeygen-mv_002dkeys"></a>
-<div class="header">
+<span id="ntp_002dkeygen-mv_002dkeys"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-config" accesskey="n" rel="next">ntp-keygen config</a>, Previous: <a href="#ntp_002dkeygen-mv_002dparams" accesskey="p" rel="prev">ntp-keygen mv-params</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="mv_002dkeys-option-_0028_002dv_0029"></a>
-<h4 class="subsection">1.2.21 mv-keys option (-v)</h4>
-<a name="index-ntp_002dkeygen_002dmv_002dkeys"></a>
+<span id="mv_002dkeys-option-_0028_002dv_0029"></span><h4 class="subsection">1.2.21 mv-keys option (-v)</h4>
+<span id="index-ntp_002dkeygen_002dmv_002dkeys"></span>
<p>This is the &ldquo;update &lt;num&gt; mv keys&rdquo; option.
This option takes a number argument <samp>num</samp>.
@@ -1850,13 +1787,11 @@ This option takes a number argument <samp>num</samp>.
</p>
<hr>
-<a name="ntp_002dkeygen-config"></a>
-<div class="header">
+<span id="ntp_002dkeygen-config"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-exit-status" accesskey="n" rel="next">ntp-keygen exit status</a>, Previous: <a href="#ntp_002dkeygen-mv_002dkeys" accesskey="p" rel="prev">ntp-keygen mv-keys</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="presetting_002fconfiguring-ntp_002dkeygen"></a>
-<h4 class="subsection">1.2.22 presetting/configuring ntp-keygen</h4>
+<span id="presetting_002fconfiguring-ntp_002dkeygen"></span><h4 class="subsection">1.2.22 presetting/configuring ntp-keygen</h4>
<p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from configuration (&quot;rc&quot; or &quot;ini&quot;) files, and values from environment variables named <code>NTP-KEYGEN</code> and <code>NTP-KEYGEN_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
@@ -1912,12 +1847,11 @@ the associated name/value pair list (see: optionFindValue).
</p>
<p>The command line options relating to configuration and/or usage help are:
</p>
-<a name="version-_0028_002d_0029"></a>
-<h4 class="subsubheading">version (-)</h4>
+<span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>
<p>Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing
-detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+detail to provide. The default is to print just the version. The licensing information may be selected with an option argument.
Only the first letter of the argument is examined:
</p>
<dl compact="compact">
@@ -1933,13 +1867,11 @@ Only the first letter of the argument is examined:
</dl>
<hr>
-<a name="ntp_002dkeygen-exit-status"></a>
-<div class="header">
+<span id="ntp_002dkeygen-exit-status"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-Usage" accesskey="n" rel="next">ntp-keygen Usage</a>, Previous: <a href="#ntp_002dkeygen-config" accesskey="p" rel="prev">ntp-keygen config</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dkeygen-exit-status-1"></a>
-<h4 class="subsection">1.2.23 ntp-keygen exit status</h4>
+<span id="ntp_002dkeygen-exit-status-1"></span><h4 class="subsection">1.2.23 ntp-keygen exit status</h4>
<p>One of the following exit values will be returned:
</p><dl compact="compact">
@@ -1958,38 +1890,30 @@ it to autogen-users@lists.sourceforge.net. Thank you.
</p></dd>
</dl>
<hr>
-<a name="ntp_002dkeygen-Usage"></a>
-<div class="header">
+<span id="ntp_002dkeygen-Usage"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-Notes" accesskey="n" rel="next">ntp-keygen Notes</a>, Previous: <a href="#ntp_002dkeygen-exit-status" accesskey="p" rel="prev">ntp-keygen exit status</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dkeygen-Usage-1"></a>
-<h4 class="subsection">1.2.24 ntp-keygen Usage</h4>
+<span id="ntp_002dkeygen-Usage-1"></span><h4 class="subsection">1.2.24 ntp-keygen Usage</h4>
<hr>
-<a name="ntp_002dkeygen-Notes"></a>
-<div class="header">
+<span id="ntp_002dkeygen-Notes"></span><div class="header">
<p>
Next: <a href="#ntp_002dkeygen-Bugs" accesskey="n" rel="next">ntp-keygen Bugs</a>, Previous: <a href="#ntp_002dkeygen-Usage" accesskey="p" rel="prev">ntp-keygen Usage</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dkeygen-Notes-1"></a>
-<h4 class="subsection">1.2.25 ntp-keygen Notes</h4>
+<span id="ntp_002dkeygen-Notes-1"></span><h4 class="subsection">1.2.25 ntp-keygen Notes</h4>
<hr>
-<a name="ntp_002dkeygen-Bugs"></a>
-<div class="header">
+<span id="ntp_002dkeygen-Bugs"></span><div class="header">
<p>
Previous: <a href="#ntp_002dkeygen-Notes" accesskey="p" rel="prev">ntp-keygen Notes</a>, Up: <a href="#ntp_002dkeygen-Invocation" accesskey="u" rel="up">ntp-keygen Invocation</a> &nbsp; </p>
</div>
-<a name="ntp_002dkeygen-Bugs-1"></a>
-<h4 class="subsection">1.2.26 ntp-keygen Bugs</h4>
+<span id="ntp_002dkeygen-Bugs-1"></span><h4 class="subsection">1.2.26 ntp-keygen Bugs</h4>
<hr>
-<a name="Random-Seed-File"></a>
-<div class="header">
+<span id="Random-Seed-File"></span><div class="header">
<p>
Next: <a href="#Cryptographic-Data-Files" accesskey="n" rel="next">Cryptographic Data Files</a>, Previous: <a href="#Running-the-Program" accesskey="p" rel="prev">Running the Program</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Random-Seed-File-2"></a>
-<h3 class="section">1.3 Random Seed File</h3>
+<span id="Random-Seed-File-2"></span><h3 class="section">1.3 Random Seed File</h3>
<p>All cryptographically sound key generation schemes must have means to
randomize the entropy seed used to initialize the internal
@@ -2013,13 +1937,11 @@ If the file is not available or cannot be written, the program exits
with a message to the system log.
</p>
<hr>
-<a name="Cryptographic-Data-Files"></a>
-<div class="header">
+<span id="Cryptographic-Data-Files"></span><div class="header">
<p>
Previous: <a href="#Random-Seed-File" accesskey="p" rel="prev">Random Seed File</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div>
-<a name="Cryptographic-Data-Files-2"></a>
-<h3 class="section">1.4 Cryptographic Data Files</h3>
+<span id="Cryptographic-Data-Files-2"></span><h3 class="section">1.4 Cryptographic Data Files</h3>
<p>File and link names are in the <code>form ntpkey_key_name.fstamp</code>,
where <code>key</code> is the key or parameter type,
diff --git a/contrib/ntp/util/ntp-keygen.man.in b/contrib/ntp/util/ntp-keygen.man.in
index de93b031a3af..5910410ed424 100644
--- a/contrib/ntp/util/ntp-keygen.man.in
+++ b/contrib/ntp/util/ntp-keygen.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen @NTP_KEYGEN_MS@ "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
+.TH ntp-keygen @NTP_KEYGEN_MS@ "31 May 2023" "ntp (4.2.8p16)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:08 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:44:05 PM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1132,7 +1132,7 @@ in the range 256 through 2048
.fi
.in -4
.sp
-The number of bits in the identity modulus. The default is 256.
+The number of bits in the identity modulus. The default is 512.
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[], \f\*[B-Font]\-\-certificate\f[]=\f\*[I-Font]scheme\f[]
certificate scheme.
@@ -1351,7 +1351,7 @@ it to autogen-users@lists.sourceforge.net. Thank you.
.SH "AUTHORS"
The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
It can take quite a while to generate some cryptographic values.
@@ -1362,7 +1362,7 @@ Please report bugs to http://bugs.ntp.org .
.sp \n(Ppu
.ne 2
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.SH NOTES
Portions of this document came from FreeBSD.
.sp \n(Ppu
diff --git a/contrib/ntp/util/ntp-keygen.mdoc.in b/contrib/ntp/util/ntp-keygen.mdoc.in
index 23ee11caf9bc..22a2e86f026b 100644
--- a/contrib/ntp/util/ntp-keygen.mdoc.in
+++ b/contrib/ntp/util/ntp-keygen.mdoc.in
@@ -1,9 +1,9 @@
-.Dd June 23 2020
+.Dd May 31 2023
.Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 23, 2020 at 02:21:05 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed May 31, 2023 at 07:44:01 PM by AutoGen 5.18.16
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -1017,7 +1017,7 @@ in the range 256 through 2048
.fi
.in -4
.sp
-The number of bits in the identity modulus. The default is 256.
+The number of bits in the identity modulus. The default is 512.
.It Fl c Ar scheme , Fl \-certificate Ns = Ns Ar scheme
certificate scheme.
.sp
@@ -1208,14 +1208,14 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved.
+Copyright (C) 1992\-2023 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
It can take quite a while to generate some cryptographic values.
.Pp
Please report bugs to http://bugs.ntp.org .
.Pp
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: https://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
Portions of this document came from FreeBSD.
.Pp
diff --git a/usr.sbin/ntp/libntp/Makefile b/usr.sbin/ntp/libntp/Makefile
index 8ac370cae693..b3d7b741e5b1 100644
--- a/usr.sbin/ntp/libntp/Makefile
+++ b/usr.sbin/ntp/libntp/Makefile
@@ -1,10 +1,10 @@
# $FreeBSD$
.PATH: ${SRCTOP}/contrib/ntp/libntp \
- ${SRCTOP}/contrib/ntp/lib/isc \
- ${SRCTOP}/contrib/ntp/lib/isc/nls \
- ${SRCTOP}/contrib/ntp/lib/isc/pthreads \
- ${SRCTOP}/contrib/ntp/lib/isc/unix \
+ ${SRCTOP}/contrib/ntp/libntp/lib/isc \
+ ${SRCTOP}/contrib/ntp/libntp/lib/isc/nls \
+ ${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads \
+ ${SRCTOP}/contrib/ntp/libntp/lib/isc/unix \
LIB= ntp
INTERNALLIB=
@@ -23,7 +23,8 @@ NTP_SRCS= systime.c a_md5encrypt.c adjtime.c atoint.c \
mstolfp.c msyslog.c netof.c ntp_calendar.c \
ntp_calgps.c \
ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \
- ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_worker.c \
+ ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_realpath.c \
+ ntp_worker.c \
numtoa.c numtohost.c octtoint.c prettydate.c \
recvbuff.c refidsmear.c \
refnumtoa.c snprintf.c socket.c \
@@ -77,9 +78,9 @@ ISC_SRCS= assertions.c \
SRCS= ${NTP_SRCS} ${ISC_SRCS} version.c
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
-I${SRCTOP}/contrib/ntp/sntp/libopts \
-I${SRCTOP}/lib/libc/${MACHINE_ARCH} \
-I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit \
diff --git a/usr.sbin/ntp/libparse/Makefile b/usr.sbin/ntp/libparse/Makefile
index a5530ac473c1..4bbf19853c57 100644
--- a/usr.sbin/ntp/libparse/Makefile
+++ b/usr.sbin/ntp/libparse/Makefile
@@ -13,7 +13,7 @@ SRCS= binio.c clk_computime.c clk_dcf7000.c clk_hopf6021.c \
trim_info.c
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include -I${.CURDIR:H}
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include -I${.CURDIR:H}
.include <bsd.lib.mk>
diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile
index 923ff42bdd43..a147f3833603 100644
--- a/usr.sbin/ntp/ntp-keygen/Makefile
+++ b/usr.sbin/ntp/ntp-keygen/Makefile
@@ -12,10 +12,10 @@ SRCS= ntp-keygen.c ntp-keygen-opts.c
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
-I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/${NTP_ATOMIC}/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/${NTP_ATOMIC}/include \
-I${SRCTOP}/contrib/ntp/sntp/libopts \
-I${.CURDIR}/lib/libc/${MACHINE_ARCH} \
-I${.CURDIR:H}
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index 2d8a8b9d2a2d..beacd96f52a2 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -16,9 +16,12 @@ FILESDIR= ETC_NTP
FILESMODE= 644
PROG= ntpd
-SRCS= cmd_args.c ntp_config.c ntp_control.c ntp_crypto.c ntp_filegen.c \
+SRCS= cmd_args.c \
+ ntp_clockdev.c \
+ ntp_config.c ntp_control.c ntp_crypto.c ntp_filegen.c \
ntp_io.c ntp_leapsec.c ntp_loopfilter.c ntp_monitor.c ntp_parser.c \
ntp_peer.c ntp_proto.c ntp_refclock.c ntp_request.c ntp_restrict.c \
+ ntp_ppsdev.c \
ntp_scanner.c ntp_signd.c ntp_timer.c ntp_util.c ntpd-opts.c ntpd.c \
rc_cmdlength.c \
refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
@@ -36,9 +39,9 @@ SRCS= cmd_args.c ntp_config.c ntp_control.c ntp_crypto.c ntp_filegen.c \
CFLAGS+= -I${SRCTOP}/contrib/ntp/ntpd \
-I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \
-I${SRCTOP}/contrib/ntp/sntp/libopts \
-I${.CURDIR:H} \
-I${.CURDIR}
diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile
index afd544d020da..427986fa3e4c 100644
--- a/usr.sbin/ntp/ntpdate/Makefile
+++ b/usr.sbin/ntp/ntpdate/Makefile
@@ -9,9 +9,9 @@ MAN=
SRCS= ntpdate.c version.c
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include/ \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include/ \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include/ \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include/ \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
-I${.CURDIR:H}
LIBADD= ntp m pthread
diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
index 1e363a3e2a83..9038010ca6d3 100644
--- a/usr.sbin/ntp/ntpdc/Makefile
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -10,9 +10,9 @@ PROG= ntpdc
SRCS= ntpdc.c ntpdc_ops.c ntpdc-opts.c version.c
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
-I${SRCTOP}/contrib/ntp/sntp/libopts \
-I${.CURDIR}/lib/libc/${MACHINE_ARCH} \
-I${.CURDIR:H} -I${.CURDIR}
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
index 3efa1e149a5d..60b7b0103e5e 100644
--- a/usr.sbin/ntp/ntpq/Makefile
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -13,10 +13,10 @@ SRCS= ntpq.c ntpq-opts.c ntpq-subs.c version.c
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
-I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/${NTP_ATOMIC}/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/${NTP_ATOMIC}/include \
-I${SRCTOP}/contrib/ntp/sntp/libopts \
-I${.CURDIR:H}
diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile
index 1111434541ce..173e31e4e4bd 100644
--- a/usr.sbin/ntp/ntptime/Makefile
+++ b/usr.sbin/ntp/ntptime/Makefile
@@ -6,9 +6,9 @@ PROG= ntptime
MAN=
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include/ \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include/ \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include/ \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include/ \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
-I${.CURDIR:H}
LIBADD= m ntp pthread
diff --git a/usr.sbin/ntp/sntp/Makefile b/usr.sbin/ntp/sntp/Makefile
index 11a9a5af8e9d..325102c3ee09 100644
--- a/usr.sbin/ntp/sntp/Makefile
+++ b/usr.sbin/ntp/sntp/Makefile
@@ -11,9 +11,9 @@ SRCS= crypto.c kod_management.c log.c main.c networking.c \
CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
-I${SRCTOP}/contrib/ntp/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
- -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \
+ -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \
-I${SRCTOP}/contrib/ntp/sntp \
-I${SRCTOP}/contrib/ntp/sntp/libopts \
-I${SRCTOP}/contrib/ntp/sntp/libevent/include \